/*
  Simple Battery Alarm's legal pages, in the app's own look (see /simple-battery-alarm/index.html):
  its blue top bar for the title band, the icon's yellow bolt, the battery's green, the app's pale sky
  and one family, Bricolage Grotesque. The meta lines sit on a white card like a row in the app, and the
  band carries the page's battery cell, charged to 80%, ringing.
*/
:root {
  --field: #0372ec;
  --signal: #0481ff;
  --bell: #1563cc;
  --bolt: #ffc23a;
  --bolt-wash: #fff6df;
  --charge: #27d900;
  --sky: #dde8f4;
  --mist: #eef4fb;
  --paper: #ffffff;
  --ink: #0b1e3f;
  --ink-2: #3a4a66;
  --col: 42rem;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-optical-sizing: auto; font-size: 17.5px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--bolt); color: var(--ink); }
a { color: var(--bell); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--bolt); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--col), 100% - 56px); margin-inline: auto; }

/* ---------- Title band: the app's blue top bar ---------- */
.band { background: var(--field); color: #fff; position: relative; overflow: hidden; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0;
  width: min(1180px, 100% - 56px); margin-inline: auto; position: relative; z-index: 1;
}
.top .app { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.top .app img { width: 38px; height: 38px; border-radius: 10px; }
.top nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; line-height: 1.2; }
.top nav a { text-decoration: none; color: #fff; white-space: nowrap; }
.top .gp { padding: 8px 16px; border-radius: 12px; border: 1.5px solid rgba(255, 255, 255, .5); font-weight: 600; }
.top .gp:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.top .by:hover { text-decoration: underline; }

.hero { position: relative; z-index: 1; padding: 40px 0 64px; }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 5px 13px; border-radius: 999px;
  background: var(--bolt); color: var(--ink); font-weight: 700; font-size: .86rem; line-height: 1.35;
}
h1 {
  margin: 0 0 30px; font-weight: 800; font-stretch: 82%; letter-spacing: -.02em; line-height: .92;
  font-size: clamp(2.8rem, 6.2vw, 5rem); text-wrap: balance;
}
/* The meta lines on a white card, like a row in the app's list. */
.meta {
  display: grid; max-width: 34em; padding: 6px 22px; border-radius: 20px;
  background: var(--paper); color: var(--ink-2);
  box-shadow: 0 2px 0 rgba(11, 30, 63, .18), 0 18px 34px -18px rgba(11, 30, 63, .55);
}
.meta span { padding: 11px 0; border-top: 1.5px solid var(--sky); font-size: .98rem; line-height: 1.45; }
.meta span:first-child { border-top: 0; }
.meta b { color: var(--ink); font-weight: 700; }
.meta code { font-family: inherit; font-weight: 600; color: var(--ink); background: none; padding: 0; }

/* The page's battery cell, at 80%, with the icon's ring waves. */
.ringing { position: absolute; z-index: 0; right: calc(50% - 600px); bottom: 92px; width: 210px; height: 96px; pointer-events: none; }
.ringing .cell { position: absolute; inset: 0 22px 0 0; border: 7px solid #fff; border-radius: 30px; padding: 8px; }
.ringing .cell::after { content: ""; position: absolute; right: -22px; top: 50%; width: 13px; height: 38px; margin-top: -19px; background: #fff; border-radius: 0 11px 11px 0; }
.ringing .cell i { display: block; height: 100%; width: 80%; border-radius: 17px; background: var(--charge); }
.ringing::before, .ringing::after {
  content: ""; position: absolute; top: 50%; border-radius: 50%; border: 11px solid transparent; border-right-color: rgba(255, 255, 255, .34);
}
.ringing::before { right: -44px; width: 120px; height: 120px; margin-top: -60px; }
.ringing::after { right: -78px; width: 180px; height: 180px; margin-top: -90px; border-right-color: rgba(255, 255, 255, .2); }

/* ---------- Contents ---------- */
.toc { margin: 52px auto 8px; padding: 24px 28px 20px; background: var(--sky); border-radius: 22px; }
.toc h2 { margin: 0 0 10px; font-weight: 800; font-stretch: 82%; font-size: 1.3rem; letter-spacing: -.01em; line-height: 1.2; }
.toc ol { margin: 0; padding-left: 1.7em; columns: 2; column-gap: 32px; }
.toc li { margin: 0 0 6px; break-inside: avoid; font-size: 1rem; line-height: 1.45; }
.toc li::marker { color: var(--bell); font-weight: 700; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--bell); text-decoration: underline; }

/* ---------- The document ---------- */
main { padding: 16px 0 96px; }
section { padding: 40px 0 12px; border-top: 1.5px solid var(--sky); scroll-margin-top: 16px; }
section:first-of-type { border-top: 0; }
h2.sec {
  margin: 0 0 18px; font-weight: 800; font-stretch: 82%; letter-spacing: -.015em; line-height: 1.02;
  font-size: clamp(1.85rem, 3vw, 2.3rem); text-wrap: balance;
}
h3 { margin: 28px 0 8px; font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 18px; }
p, li, td { text-wrap: pretty; }
ul, ol { margin: 0 0 18px; padding-left: 1.3em; }
li { margin: 0 0 10px; }
main ul > li::marker { color: var(--field); }
strong, b { font-weight: 700; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .84em;
  background: var(--mist); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere;
}

/* Tables scroll inside their own box. */
.table-scroll { overflow-x: auto; margin: 4px 0 24px; border: 1.5px solid var(--sky); border-radius: 18px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.55; min-width: 560px; }
table:has(th:nth-child(4)) { min-width: 720px; }
th, td { text-align: left; vertical-align: top; padding: 13px 16px; border-bottom: 1.5px solid var(--sky); }
tbody tr:last-child td { border-bottom: 0; }
th { background: var(--sky); font-weight: 700; font-size: .9rem; color: var(--ink); }
td code { overflow-wrap: normal; white-space: nowrap; }

/* Callouts: the icon's bolt, as a highlight. */
.callout { margin: 6px 0 24px; padding: 18px 22px; background: var(--bolt-wash); border: 2px solid var(--bolt); border-radius: 18px; }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Footer, as on the app's page ---------- */
footer { background: var(--ink); color: rgba(255, 255, 255, .78); font-size: .95rem; line-height: 1.6; padding: 40px 0 48px; }
footer .wrap { width: min(1180px, 100% - 56px); display: flex; flex-wrap: wrap; gap: 14px 32px; justify-content: space-between; align-items: center; }
footer ul { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 0; padding: 0; list-style: none; }
footer li { margin: 0; }
footer a { color: #fff; text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 1240px) {
  .ringing { display: none; }
}
@media (max-width: 760px) {
  .wrap, .top, footer .wrap { width: min(var(--col), 100% - 40px); }
  .toc ol { columns: 1; }
  .hero { padding: 26px 0 48px; }
  h1 { margin-bottom: 26px; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .top { gap: 12px; padding: 18px 0; }
  .top .app { gap: 9px; font-size: .92rem; line-height: 1.12; }
  .top .app span { max-width: 8.2em; }
  .top .app img { width: 34px; height: 34px; }
  .top nav { gap: 12px; font-size: .88rem; }
  .top .gp { padding: 7px 11px; }
  .meta { padding: 4px 18px; }
  .toc { padding: 20px 20px 16px; }
}
@media (max-width: 360px) {
  .top .app span { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
