:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --line: #d2d2d7;
  --accent: #1a7ae6;
  --good: #1e9e47;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #161617;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: #424245;
    --accent: #4da3ff;
    --good: #34c759;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  max-width: 980px; margin: 0 auto; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.nav .brand img { width: 28px; height: 28px; }
.nav .links { display: flex; gap: 20px; font-size: 14px; }
.nav .links a { color: var(--text-2); }
.nav .links a[aria-current="page"] { color: var(--text); }

main { max-width: 680px; margin: 0 auto; padding: 24px 16px 72px; }

.hero { text-align: center; padding: 48px 0 24px; }
.hero img { width: 128px; height: 128px; }
.hero h1 { font-size: 48px; line-height: 1.08; letter-spacing: -0.02em; margin: 24px 0 12px; }
.hero p.lead { font-size: 21px; color: var(--text-2); margin: 0 auto; max-width: 520px; }
.badge {
  display: inline-block; margin-top: 28px; padding: 12px 22px; border-radius: 980px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 15px;
}
.badge.soon { background: var(--bg-soft); color: var(--text-2); }

.features { display: grid; gap: 14px; margin-top: 40px; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.card { background: var(--bg-soft); border-radius: 20px; padding: 22px; }
.card h2 { font-size: 19px; margin: 0 0 6px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }

article h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.015em; margin: 16px 0 4px; }
article .date { color: var(--text-2); font-size: 15px; margin: 0 0 32px; }
article h2 { font-size: 24px; margin: 40px 0 10px; }
article h3 { font-size: 18px; margin: 28px 0 6px; }
article p, article li { color: var(--text); }
article ul { padding-left: 1.2em; }
article li { margin: 6px 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; }
@media (max-width: 560px) {
  table, thead, tbody, tr, th, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  td { border: 0; padding: 2px 0; }
  td[data-label]::before { content: attr(data-label) " · "; color: var(--text-2); font-weight: 600; }
}

.contact { background: var(--bg-soft); border-radius: 20px; padding: 22px; margin-top: 28px; }
.contact p { margin: 4px 0; }

footer {
  max-width: 980px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line);
  color: var(--text-2); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
footer a { color: var(--text-2); }

/* Start page: full-width stage with a battery-life chart behind the headline */
/* Light by default; the dark stage below follows the system's dark mode. */
.stage {
  --stage-bg: radial-gradient(90% 70% at 50% 35%, #eaf3ff 0%, #f7faff 55%, #ffffff 100%);
  --stage-text: #1d1d1f; --stage-muted: #6e6e73; --stage-fine: #86868b;
  --stage-glow: radial-gradient(60% 45% at 50% 38%, rgba(247,250,255,.9) 0%, rgba(247,250,255,.45) 55%, transparent 80%);
  --grid: rgba(0,0,0,.06); --line-opacity: .7;
  --pill-bg: rgba(0,0,0,.04); --pill-border: rgba(0,0,0,.1); --pill-text: #424245;
  --store-bg: rgba(255,255,255,.7); --store-text: #1d1d1f; --store-border: #1d1d1f; --how: #1a7ae6;
  position: relative; overflow: hidden; color: var(--stage-text); text-align: center;
  background: var(--stage-bg);
  padding: 96px 16px 120px; min-height: min(88vh, 860px);
  display: flex; align-items: center; justify-content: center;
}
@media (prefers-color-scheme: dark) {
  .stage {
    --stage-bg: radial-gradient(90% 70% at 50% 35%, #0f2c57 0%, #06142b 55%, #000 100%);
    --stage-text: #f5f5f7; --stage-muted: #c7c7cc; --stage-fine: #8e8e93;
    --stage-glow: radial-gradient(60% 45% at 50% 38%, rgba(6,20,43,.85) 0%, rgba(6,20,43,.35) 55%, transparent 80%);
    --grid: rgba(255,255,255,.07); --line-opacity: .55;
    --pill-bg: rgba(255,255,255,.08); --pill-border: rgba(255,255,255,.16); --pill-text: #d2d2d7;
    --store-bg: rgba(0,0,0,.35); --store-text: #f5f5f7; --store-border: #f5f5f7; --how: #fff;
  }
  .chart-bg .health { stroke: #3987e5; }
}
.chart-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-bg .grid line { stroke: var(--grid); stroke-width: 1; }
.chart-bg .replace { stroke: rgba(208,59,59,.45); stroke-width: 1.5; }
.chart-bg .area { opacity: 0; animation: fadein 1.6s ease 1.2s forwards; }
.chart-bg .line {
  fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 2.6s ease-out forwards; opacity: var(--line-opacity);
}
.chart-bg .health { stroke: #2a78d6; opacity: .9; }
.chart-bg .power { stroke: #eb6834; animation-delay: .15s; }
.chart-bg .charge { stroke: #1baf7a; animation-delay: .3s; }
.chart-bg .voltage { stroke: #eda100; stroke-dasharray: 10 7; stroke-dashoffset: 0; animation: fadein 1.2s ease .6s both; }
.chart-bg .resistance { stroke: #e87ba4; stroke-dasharray: 1 9; stroke-dashoffset: 0; animation: fadein 1.2s ease .8s both; }
.chart-bg .forecast { stroke: #3987e5; stroke-dasharray: 9 8; stroke-dashoffset: 0; opacity: 0; animation: fadein 1s ease 2.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } to { opacity: var(--line-opacity); } }
.glow { position: absolute; inset: 0; pointer-events: none; background: var(--stage-glow); }
.stage-copy { position: relative; max-width: 720px; margin: 0 auto; }
.eyebrow {
  display: block; font-size: 17px; font-weight: 600; letter-spacing: 0; color: var(--stage-muted);
}
.stage h1 { font-size: clamp(48px, 9vw, 96px); line-height: 1; letter-spacing: -0.035em; margin: 10px 0 20px; font-weight: 700; }
.stage .lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--stage-muted); margin: 0 auto; max-width: 600px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: center; margin-top: 32px; }
.store {
  display: inline-block; padding: 13px 22px; border-radius: 14px; background: var(--store-bg); color: var(--store-text);
  border: 1.5px solid var(--store-border); font-weight: 600; font-size: 16px;
}
/* The closing button: outlined in the page's text colour, in light and dark mode. */
.store.dark { background: transparent; color: var(--text); border-color: var(--text); }
.how { color: var(--how); font-size: 17px; }
.fine { color: var(--stage-fine); font-size: 14px; margin: 22px 0 0; }

.quote { text-align: center; padding: 64px 0 8px; }
.quote p { font-size: clamp(22px, 3vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin: 0; }
.block { margin-top: 72px; }
.block h2, .closing h2 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.025em; line-height: 1.08; margin: 0 0 24px; }
.card h3 { font-size: 19px; margin: 0 0 6px; }
.lead-2 { font-size: 19px; color: var(--text-2); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 18px; background: var(--bg-soft); border-radius: 20px; padding: 22px; }
.steps span { font-size: 28px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.steps h3 { margin: 0 0 4px; font-size: 19px; }
.steps p { margin: 0; color: var(--text-2); font-size: 15px; }

.gallery { margin-top: 56px; }
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 24px; justify-content: center; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; display: block; border-radius: 30px; border: 7px solid #1d1d1f; box-shadow: 0 16px 36px -16px rgba(0,0,0,.35); }
.shots figcaption { font-size: 14px; color: var(--text-2); margin-top: 12px; text-align: center; }
.closing { text-align: center; margin: 88px 0 24px; }
/* The guide ends with an invitation to the app: a soft panel, like the cards. */
.guide-closing { margin: 56px 0 40px; padding: 48px 24px; background: var(--bg-soft); border-radius: 28px; }
.guide-closing h2 { margin-bottom: 14px; }
.guide-closing .lead-2 { max-width: 34em; margin: 0 auto; }
.guide-closing .cta { margin-top: 28px; }
@media (min-width: 760px) { main { max-width: 900px; } }
/* Photo hero (preview): the photo fills the screen; the text sits left on a fade to the page
   colour (white, or black in dark mode), like a product page. */
.photo-hero {
  --fade: 255,255,255;
  position: relative; overflow: hidden; color: var(--text);
  min-height: 100vh; min-height: 100svh; box-sizing: border-box;
  display: flex; align-items: center;
  padding: 88px max(24px, calc((100vw - 1200px) / 2)) 64px;
}
.photo-hero .stage-copy { position: relative; z-index: 1; max-width: 520px; margin: 0; text-align: left; }
.photo-hero .eyebrow { color: var(--text-2); }
.photo-hero h1 { font-size: clamp(44px, 6.4vw, 84px); line-height: 1; letter-spacing: -0.035em; margin: 10px 0 18px; font-weight: 700; }
.photo-hero .lead { font-size: clamp(18px, 1.7vw, 21px); color: var(--text-2); margin: 0; max-width: 420px; }
.photo-hero .cta { justify-content: flex-start; }
.photo-hero .text-link { font-size: 17px; }
.photo-hero .cta { margin-top: 28px; gap: 14px 24px; }
.hero-photo { position: absolute; inset: 0; margin: 0; z-index: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; display: block; }
/* Full bleed with a partial fade: the photo shows everywhere, dimmed only behind the text. */
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(var(--fade),.88) 0%, rgba(var(--fade),.78) 30%, rgba(var(--fade),.35) 46%, rgba(var(--fade),0) 60%);
}
@media (max-width: 760px) {
  .photo-hero { align-items: flex-start; padding: 72px 20px 0; }
  .hero-photo img { object-position: 60% 70%; }
  .hero-photo::after { background: linear-gradient(to bottom, rgba(var(--fade),.9) 0%, rgba(var(--fade),.8) 42%, rgba(var(--fade),.2) 58%, rgba(var(--fade),0) 70%); }
}
@media (prefers-color-scheme: dark) {
  .photo-hero { --fade: 0,0,0; }
}

/* Story (story.js): one battery's four years, drawn by scrolling. The section is tall; its
   full-screen stage stays put while the chart, the playhead and the legend follow the scroll. */
body { overflow-x: clip; }
.story {
  --story-bg: radial-gradient(90% 70% at 50% 45%, #eaf3ff 0%, #f7faff 55%, #ffffff 100%);
  --story-panel: rgba(255,255,255,.72); --dot-ring: #f7faff; --grid: rgba(0,0,0,.06);
  width: 100vw; margin: 64px calc(50% - 50vw) 0; height: 180vh; position: relative;
}
.story-sticky {
  position: sticky; top: 0; height: 100vh; min-height: 560px; overflow: hidden; background: var(--story-bg);
  display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  padding: 72px 16px 28px; box-sizing: border-box;
}
.story-plot { position: absolute; left: 0; width: 100%; top: 27%; bottom: 36%; will-change: transform; }
.story-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.story-plot .grid line { stroke: var(--grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.story-plot .replace { stroke: rgba(208,59,59,.45); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.story-plot .line { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.story-plot .health { stroke: #2a78d6; }
.story-plot .power { stroke: #eb6834; }
.story-plot .charge { stroke: #1baf7a; }
.story-plot .voltage { stroke: #eda100; stroke-dasharray: 10 7; }
.story-plot .resistance { stroke: #e87ba4; stroke-dasharray: 1 9; }
.story-plot .forecast { stroke: #3987e5; stroke-dasharray: 9 8; }
.replace-label { position: absolute; left: 16px; bottom: 0; transform: translateY(50%); font-size: 13px; color: rgba(208,59,59,.7); background: transparent; }
.story-plot .playhead { position: absolute; top: -8%; bottom: 0; width: 1.5px; margin-left: -.75px; background: rgba(42,120,214,.45); }
.story-plot .dot {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 3px solid var(--dot-ring); box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.story .dot.health, .story i.health { background: #2a78d6; }
.story-plot .tag {
  position: absolute; transform: translate(14px, 10px); padding: 4px 10px; border-radius: 999px;
  background: #2a78d6; color: #fff; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 12px -4px rgba(42,120,214,.6); white-space: nowrap;
}
.story-plot .tag.before { transform: translate(calc(-100% - 14px), 10px); }
.story .dot.power, .story i.power { background: #eb6834; }
.story .dot.charge, .story i.charge { background: #1baf7a; }
.story .dot.voltage { background: #eda100; }
.story .dot.resistance { background: #e87ba4; }
.story-quote { position: relative; margin: 0; max-width: 940px; text-wrap: balance; text-align: center; font-size: clamp(24px, 3.6vw, 40px); line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; }
.story-quote span { color: var(--text-2); }
.story-foot {
  position: absolute; top: calc(64% + 18px); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  text-align: center; padding: 14px 20px 12px; border-radius: 22px;
  background: var(--story-panel); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.story .when { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.story .legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; }
.story .legend li { display: grid; grid-template-columns: 18px auto; grid-template-rows: auto auto; column-gap: 7px; text-align: left; }
.story .legend i { grid-row: 1; align-self: center; display: block; width: 16px; height: 3px; border-radius: 2px; }
.story .legend span { font-size: 13px; color: var(--text-2); }
.story .legend b { grid-column: 2; font-size: 19px; font-weight: 600; font-variant-numeric: tabular-nums; }
.story i.voltage { background: repeating-linear-gradient(90deg, #eda100 0 5px, transparent 5px 8px); }
.story i.resistance { background: radial-gradient(circle, #e87ba4 1.4px, transparent 1.6px) 0 50% / 5px 3px repeat-x; }
.story.forecast .legend { opacity: .45; }
.story .legend { transition: opacity .3s ease; }
.story .hint { margin: 10px 0 0; font-size: 12px; color: var(--text-2); }
.story.still { height: auto; }
.story.still .story-sticky { position: relative; height: 80vh; }
@media (max-width: 600px) {
  .story-plot { top: 28%; bottom: 44%; }
  .story-foot { top: calc(56% + 14px); }
  .story .legend { gap: 6px 16px; }
  .story .legend b { font-size: 16px; }
}
@media (prefers-color-scheme: dark) {
  .story {
    --story-bg: radial-gradient(90% 70% at 50% 45%, #0f2c57 0%, #06142b 55%, #000 100%);
    --story-panel: rgba(10,28,56,.6); --dot-ring: #06142b; --grid: rgba(255,255,255,.07);
  }
  .story-plot .health, .story .dot.health, .story i.health, .story-plot .tag { stroke: #3987e5; background: #3987e5; }
  .story-plot .playhead { background: rgba(120,170,240,.45); }
}
@media (prefers-reduced-motion: reduce) {
  .chart-bg .line, .chart-bg .area, .chart-bg .forecast { animation: none; stroke-dashoffset: 0; opacity: var(--line-opacity); }
  .chart-bg .area { opacity: 1; }
}

/* Apple-style band of cards that scroll sideways, each with a crop of the app */
.band {
  margin: 72px calc(50% - 50vw) 0; padding: 64px 0 40px; background: var(--bg-soft);
}
.band-head { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 12px 24px;
  align-items: flex-end; justify-content: space-between; }
.band-head h2 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.025em; line-height: 1.08; margin: 0; }
.band-head a { font-size: 17px; }
.cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(360px, 82vw); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 32px max(24px, calc((100vw - 1100px) / 2 + 24px)) 24px;
  scroll-padding-left: max(24px, calc((100vw - 1100px) / 2 + 24px));
}
.cards::-webkit-scrollbar { display: none; }
.tcard {
  scroll-snap-align: start; background: var(--bg); border-radius: 28px; padding: 30px 28px 0;
  display: flex; flex-direction: column; min-height: 560px; overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.05);
}
.tcard .kicker { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.tcard h3 { font-size: 28px; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 12px; }
.tcard p { font-size: 16px; color: var(--text); margin: 0; }
/* Every card's text takes the same height, so the pictures line up at the same size. */
.tcard h3 + p { min-height: calc(16px * 1.5 * 4); line-height: 1.5; }
.tcard picture { margin-top: auto; display: block; }
.tcard p + picture { margin-top: 24px; }
.tcard img {
  margin: auto -6px 0; width: calc(100% + 12px); height: auto; display: block;
  border-radius: 22px 22px 0 0; translate: 0 14px;
  box-shadow: 0 -2px 24px rgba(0,0,0,.08), 0 0 0 1px var(--line);
}
.arrows { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
/* Siri sits with the arrows: one line, not a card of its own. */
.siri { margin: 0 auto 0 0; font-size: 15px; color: var(--text-2); }
.siri q { color: var(--text); font-weight: 500; }
.arrows button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer; font-size: 24px; line-height: 1;
  background: rgba(0,0,0,.08); color: var(--text); display: grid; place-items: center; padding-bottom: 3px;
}
.arrows button:disabled { opacity: .35; cursor: default; }
@media (prefers-color-scheme: dark) {
  .band { background: #0b0b0c; }
  .tcard { background: #1c1c1e; box-shadow: none; }
  .arrows button { background: rgba(255,255,255,.12); }
}

/* Private cars, shared battery statistics */
.split { display: grid; gap: 14px; }
@media (min-width: 640px) { .split { grid-template-columns: 1fr 1fr; } }
.split .kicker { font-size: 14px; font-weight: 600; color: var(--accent); margin: 0 0 6px; }
.split h3 { font-size: 22px; margin: 0 0 8px; }
.split p { font-size: 16px; }
.fine-print { margin-top: 18px; font-size: 15px; }

/* Apple-style pill buttons: filled blue for the main action, outlined blue beside it */
.pill {
  display: inline-block; padding: 11px 22px; border-radius: 980px; font-size: 17px; font-weight: 400;
  line-height: 1.18; border: 1px solid var(--accent); transition: background .2s ease, color .2s ease;
}
.pill:hover { text-decoration: none; }
.pill.filled { background: var(--accent); color: #fff; }
.pill.filled:hover { filter: brightness(1.08); }
.pill.outline { background: transparent; color: var(--accent); }
.pill.outline:hover { background: var(--accent); color: #fff; }
.cta { gap: 14px; }
.closing-fine { color: var(--text-2); }
@media (prefers-color-scheme: dark) { .pill.filled { color: #000; } }

.eyebrow.tagline { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }

.quote-2 { color: var(--accent); }
main > .block#how:first-child { margin-top: 56px; }

/* Battery Guide */
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a { font-size: 14px; padding: 6px 12px; border-radius: 980px; background: var(--bg-soft); color: var(--text); }
.toc a:hover { text-decoration: none; background: var(--line); }
.guide section { scroll-margin-top: 16px; }
.guide h2 { margin-top: 48px; }
.guide h3 { margin-top: 22px; }
.guide p { color: var(--text-2); }
.guide table { max-width: 420px; }

/* Guide pictograms */
.toc a { display: inline-flex; align-items: center; gap: 6px; }
.chip-icon { width: 15px; height: 15px; color: var(--accent); flex: none; }
.guide h2.topic { display: flex; align-items: center; gap: 14px; }
.pict {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent);
}
.pict svg { width: 26px; height: 26px; }
/* The voltage table stays a table on phones. */
@media (max-width: 560px) {
  table.plain { display: table; } table.plain thead { display: table-header-group; }
  table.plain tbody { display: table-row-group; } table.plain tr { display: table-row; padding: 0; }
  table.plain th, table.plain td { display: table-cell; width: auto; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
  table.plain td[data-label]::before { content: none; }
}

.guide ol, .guide ul { color: var(--text-2); padding-left: 1.3em; }
.guide li { margin: 6px 0; }
.guide strong { color: var(--text); }
.sources h2 { font-size: 20px; margin-top: 40px; }
.sources li { font-size: 15px; }

/* Guide: quick answers, a worked example and the app's chart */
.quick { background: var(--bg-soft); border-radius: 20px; padding: 22px 22px 8px; margin: 8px 0 40px; }
.quick h2 { margin-top: 0; }
.quick-table td:first-child { font-weight: 600; white-space: nowrap; }
.quick-table tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) {
  table.plain.quick-table, table.plain.quick-table tbody, table.plain.quick-table tr, table.plain.quick-table td { display: block; width: auto; }
  table.plain.quick-table thead { display: none; }
  table.plain.quick-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  table.plain.quick-table tr:last-child { border-bottom: 0; }
  table.plain.quick-table td { border: 0; padding: 2px 0; white-space: normal; }
  table.plain.quick-table td:first-child { white-space: normal; }
}
.note { font-size: 14px; color: var(--text-2); }
.shot { margin: 24px 0 8px; }
.shot img { width: 100%; max-width: 460px; height: auto; display: block; border-radius: 20px; border: 1px solid var(--line); }
.shot figcaption { font-size: 14px; color: var(--text-2); margin-top: 10px; max-width: 460px; }

/* Guide on wide screens: a sticky contents sidebar beside a readable column */
@media (min-width: 1080px) {
  main.guide-page { max-width: 1160px; padding-top: 48px; }
  .guide { display: grid; grid-template-columns: 220px minmax(0, 740px); column-gap: 72px; justify-content: center; }
  .guide > * { grid-column: 2; }
  .guide > h1 { grid-column: 1 / -1; grid-row: 1; font-size: 56px; letter-spacing: -0.025em; margin: 0 0 10px; }
  .guide > .date { grid-column: 1 / -1; grid-row: 2; font-size: 21px; max-width: 34em; margin-bottom: 48px; }
  .guide > .toc {
    grid-column: 1; grid-row: 3 / span 40; align-self: start; position: sticky; top: 28px;
    flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0;
  }
  .toc a { background: transparent; font-size: 15px; padding: 7px 12px; border-radius: 10px; color: var(--text-2); }
  .toc a:hover { background: var(--bg-soft); color: var(--text); }
  .toc a.active { background: var(--bg-soft); color: var(--text); font-weight: 600; }
  .chip-icon { width: 17px; height: 17px; }
  .toc::before { content: "Contents"; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); padding: 0 12px 8px; }

  .guide h2.topic { font-size: 32px; letter-spacing: -0.015em; margin-top: 72px; gap: 16px; }
  .pict { width: 52px; height: 52px; border-radius: 14px; }
  .pict svg { width: 30px; height: 30px; }
  .guide h3 { font-size: 19px; margin-top: 28px; }
  .guide table { max-width: none; }

  /* Quick answers as four cards */
  .quick { background: transparent; padding: 0; margin: 0; }
  .quick h2 { font-size: 32px; letter-spacing: -0.015em; }
  table.plain.quick-table, table.plain.quick-table tbody { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  table.plain.quick-table { display: block; }
  table.plain.quick-table thead { display: none; }
  table.plain.quick-table tr { display: block; background: var(--bg-soft); border-radius: 20px; padding: 20px 22px; }
  table.plain.quick-table td { display: block; border: 0; padding: 0; white-space: normal; color: var(--text-2); font-size: 15px; }
  table.plain.quick-table td:first-child { font-size: 17px; margin-bottom: 6px; }


  /* The chart beside its caption */
  .shot { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 32px; align-items: center; margin-top: 32px; }
  .shot figcaption { font-size: 15px; margin: 0; }
  .guide-closing { margin-top: 88px; }
}

/* Guide illustrations: drawn with the page's colours, so they follow light and dark mode */
.illus { margin: 18px 0 8px; --neg: #1d1d1f; --red: #e5484d; --grease: #e0a526; }
@media (prefers-color-scheme: dark) { .illus { --neg: #98989d; --red: #ff6961; --grease: #f2c14e; } }
.illus svg { display: block; width: 100%; max-width: 440px; height: auto; }
.illus figcaption { font-size: 14px; color: var(--text-2); margin-top: 8px; max-width: 440px; }
.illus .case { fill: var(--bg-soft); stroke: var(--text); stroke-width: 2.5; }
.illus .ln { fill: none; stroke: var(--text); stroke-width: 2; }
.illus .post { fill: var(--text-2); }
.illus .plate { fill: var(--text-2); opacity: .6; }
.illus .acid { fill: color-mix(in srgb, var(--accent) 20%, transparent); }
.illus .wave { fill: none; stroke: var(--accent); stroke-width: 2; }
.illus .scrim { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 3 3; }
.illus .mat { fill: url(#agm-mat); }
.illus .hatch { stroke: var(--accent); stroke-width: 1.6; }
.illus .screen { fill: #0d1b14; }
.illus .lcdline { stroke: #9ff0b7; stroke-width: 3; stroke-linecap: round; }
.illus .cable { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.illus .handle { fill: none; stroke-width: 10; stroke-linecap: round; }
.illus .pos-c { stroke: var(--red); } .illus .neg-c { stroke: var(--neg); }
.illus .pos-f { fill: var(--red); } .illus .neg-f { fill: var(--neg); }
.illus .sym { font: 700 34px/1 -apple-system, BlinkMacSystemFont, sans-serif; fill: var(--text); }
.illus .metal { fill: color-mix(in srgb, var(--text-2) 35%, var(--bg)); stroke: var(--text); stroke-width: 2; }
.illus .clamp { fill: color-mix(in srgb, var(--text-2) 70%, var(--bg)); stroke: var(--text); stroke-width: 2; }
.illus .bolt { fill: var(--bg); stroke: var(--text); stroke-width: 2; }
.illus .grease { fill: none; stroke: var(--grease); stroke-width: 10; stroke-linejoin: round; stroke-linecap: round; opacity: .6; }
.illus .leader { stroke: var(--text-2); stroke-width: 1.5; }
.illus .dot { fill: var(--text-2); }
.illus .num { fill: var(--accent); }
.illus .numt { font: 700 15px/1 -apple-system, BlinkMacSystemFont, sans-serif; fill: #fff; }
.legend { margin: 0; padding-left: 1.3em; }
.legend li { margin: 2px 0; color: var(--text-2); }
.types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 620px; }
.types div { text-align: center; }
.types svg { max-width: 180px; margin: 0 auto 6px; }
.types b { display: block; font-size: 15px; }
.types span { display: block; font-size: 13px; color: var(--text-2); line-height: 1.35; }

/* An example tester screen with what each value means */
.reading { display: grid; grid-template-columns: minmax(0, 170px) 1fr; column-gap: 20px; margin: 16px 0; max-width: 620px; }
.reading .lcd {
  background: #0d1b14; color: #9ff0b7; font: 600 19px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .02em;
  padding: 14px 18px; display: flex; align-items: center; font-variant-numeric: tabular-nums;
}
.reading .lcd:first-child { border-radius: 16px 16px 0 0; padding-top: 22px; }
.reading .lcd:nth-last-child(2) { border-radius: 0 0 16px 16px; padding-bottom: 22px; }
.reading .what { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--text-2); display: flex; flex-direction: column; justify-content: center; }
.reading .what:last-child { border-bottom: 0; }
.reading .what b { color: var(--text); font-size: 16px; }
@media (max-width: 600px) {
  .reading { grid-template-columns: minmax(0, 128px) 1fr; column-gap: 14px; }
  .reading .lcd { font-size: 15px; padding: 12px 12px; }
  .types { gap: 8px; }
}
