@font-face {
  font-family: "Google Sans Flex";
  src: url("/fonts/google-sans-flex.woff2") format("woff2");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: "Google Sans Code";
  src: url("/fonts/google-sans-code.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #f2f4f3;
  --raised: #ffffff;
  --ink: #14201f;
  --ink-2: #56625f;
  --rule: #d6dcda;
  --honey: #c98a1e;
  --slot: #17282b;
  --slot-edge: #17282b;
  --focus: #b77a10;
  --sans: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --code: "Google Sans Code", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --page: min(1180px, 100% - 32px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #17282b;
    --raised: #1d3134;
    --ink: #e8eeec;
    --ink-2: #9aa8a5;
    --rule: #2c4245;
    --honey: #edb65a;
    --slot: #0f1c1e;
    --slot-edge: #2c4245;
    --focus: #edb65a;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 28px;
  font-weight: 420;
  font-variation-settings: "ROND" 60;
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: var(--page); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--ground); padding: 8px 14px; border-radius: 999px; z-index: 10; }
.skip:focus { top: 12px; }

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 720; font-variation-settings: "ROND" 100; font-size: 19px; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.top nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.top nav a { display: inline-block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: 16px; font-weight: 520; color: var(--ink-2); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }

/* Hero */
.hero { display: grid; gap: 40px; padding-block: 24px 72px; align-items: center; }
.hero-text { max-width: 560px; }
.trail { font-family: var(--code); font-size: 18px; line-height: 28px; color: var(--ink-2); margin: 0 0 18px; }
.trail s { text-decoration: none; background: linear-gradient(var(--honey), var(--honey)) 0 55% / 100% 3px no-repeat; padding-block: 2px; }
.trail .arrow { margin-inline: 2px; }
h1 {
  font-size: clamp(44px, 7.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  font-weight: 760;
  font-variation-settings: "ROND" 100;
  margin: 0 0 22px;
  text-wrap: balance;
}
.lede { font-size: 20px; line-height: 30px; color: var(--ink-2); margin: 0 0 28px; max-width: 30em; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.play {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px 12px 16px; border-radius: 999px;
  border: 1.5px solid var(--ink); font-weight: 620; font-size: 16px; line-height: 20px;
}
.play svg { width: 20px; height: 20px; flex: none; }
.play small { display: block; font-size: 13px; font-weight: 450; color: var(--ink-2); line-height: 16px; }
.textlink { font-weight: 560; font-size: 16px; }

/* The slot: a phone-width piece of home screen holding a life-size widget */
.slot {
  justify-self: center;
  width: min(100%, 412px);
  background: var(--slot);
  border: 1px solid var(--slot-edge);
  border-radius: 44px;
  padding: 28px 16px 20px;
}
.widget { position: relative; height: 178px; }
.widget > .w { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility 0s linear .28s; }
.widget[data-style="tidal"] .w-tidal,
.widget[data-style="minimal"] .w-minimal,
.widget[data-style="focus"] .w-focus { opacity: 1; visibility: visible; transition: opacity .28s ease; }
.styles { display: flex; justify-content: center; gap: 2px; margin-top: 20px; }
.styles button {
  font: inherit; font-size: 14px; line-height: 18px; font-weight: 560;
  color: #dfe9e6; background: #2a3f42; border: 0; padding: 10px 14px; cursor: pointer;
  min-height: 44px;
}
.styles button:first-child { border-radius: 999px 8px 8px 999px; }
.styles button:last-child { border-radius: 8px 999px 999px 8px; }
.styles button[aria-pressed="true"] { background: #6ff2d8; color: #0b2b26; border-radius: 999px; }
.styles button:focus-visible { outline-color: #edb65a; }

/* Battery · Tidal */
.w-tidal { background: #dcf8f1; border-radius: 30px; padding: 16px 18px; display: grid; gap: 8px; align-content: center; color: #17282b; }
.w-tidal .row { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; }
.w-tidal .ic { width: 36px; height: 36px; display: grid; place-items: center; }
.w-tidal .ic svg { width: 20px; height: 20px; }
.w-tidal .ic.phone { background: #8eebd6; border-radius: 50%; }
.w-tidal .ic.buds { background: #fadcae; border-radius: 12px; }
.w-tidal .ic.watch { background: #edb65a; border-radius: 14px 14px 14px 4px; }
.w-tidal .line { display: flex; justify-content: space-between; font-size: 15px; line-height: 18px; font-weight: 680; font-variation-settings: "ROND" 100; }
.w-tidal .bar { height: 7px; border-radius: 9px; background: #b9ebe1; margin-top: 5px; overflow: hidden; }
.w-tidal .bar i { display: block; height: 100%; border-radius: 9px; background: #2e6b5e; }
.w-tidal .low { color: #8a5a12; }
.w-tidal .bar i.b { background: #735c35; }
.w-tidal .bar i.w { background: #8a5a12; }

/* Battery · Minimal */
.w-minimal { background: #000; border-radius: 30px; box-shadow: inset 0 0 0 1px #3a3533; color: #fff; padding: 20px 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: end; font-variation-settings: "ROND" 0; }
.w-minimal .cell { display: grid; gap: 8px; }
.w-minimal .n { font-size: 40px; line-height: 40px; font-weight: 400; letter-spacing: -0.02em; font-feature-settings: "tnum" 1; }
.w-minimal .n sup { font-size: 16px; vertical-align: top; line-height: 20px; margin-left: 1px; }
.w-minimal .t { font-size: 14px; line-height: 16px; font-weight: 500; color: #b9b9b9; }
.w-minimal .track { height: 4px; background: #333; border-radius: 2px; }
.w-minimal .track i { display: block; height: 100%; background: #fff; border-radius: 2px; }
.w-minimal .red { color: #ff5a3c; }
.w-minimal .track i.red { background: #ff5a3c; }

/* Battery · Focus Modes (Charge skyline) */
.w-focus { background: #2a1c18; border-radius: 30px; color: #f6d9cd; padding: 18px 20px 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: stretch; }
.w-focus .say { display: flex; flex-direction: column; justify-content: space-between; }
.w-focus .say b { display: block; font-size: 64px; line-height: 60px; font-weight: 860; letter-spacing: -0.03em; color: #f2b9a3; font-variation-settings: "ROND" 40; }
.w-focus .say span { font-size: 17px; line-height: 21px; font-weight: 600; }
.w-focus .say small { font-size: 13px; color: #c9a596; }
.w-focus .sky { display: flex; gap: 8px; align-items: flex-end; height: 100%; }
.w-focus .col { width: 40px; height: 100%; background: #3d2a24; border-radius: 20px; display: flex; align-items: flex-end; }
.w-focus .col i { display: flex; justify-content: center; align-items: flex-end; width: 100%; border-radius: 20px; background: #dc9a80; padding-bottom: 8px; }
.w-focus .col i svg { width: 16px; height: 16px; }
.w-focus .col.low i { background: #ff7a5c; }

@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1.15fr; gap: 56px; padding-block: 40px 104px; }
  .hero .slot { order: -1; justify-self: start; }
}

/* Sections */
section { padding-block: 72px; border-top: 1px solid var(--rule); }
h2 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 740; font-variation-settings: "ROND" 100; margin: 0 0 16px; text-wrap: balance; }
h3 { font-size: 22px; line-height: 28px; font-weight: 700; font-variation-settings: "ROND" 100; margin: 0 0 4px; }
.sub { color: var(--ink-2); max-width: 34em; margin: 0 0 40px; text-wrap: pretty; }
.count { font-family: var(--code); font-size: 14px; color: var(--ink-2); font-weight: 450; }

.wall { display: grid; gap: 32px; align-items: center; }
.wall figure { margin: 0; border-radius: 32px; overflow: hidden; max-width: 412px; }
@media (min-width: 900px) { .wall { grid-template-columns: 1.2fr 1fr; gap: 64px; } .wall figure { order: 2; justify-self: end; } }

.packs { display: grid; gap: 56px; margin-top: 64px; }
.pack header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pack p { margin: 0 0 20px; color: var(--ink-2); max-width: 34em; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 178px)); gap: 12px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(4, 178px); } }
.tiles img { width: 178px; max-width: 100%; aspect-ratio: 1; border-radius: 22%; }

.index { columns: 2 220px; column-gap: 32px; margin: 0 0 32px; }
.index div { break-inside: avoid; margin-bottom: 24px; }
.index h3 { font-size: 16px; line-height: 22px; color: var(--ink-2); font-weight: 560; }
.index ul { list-style: none; margin: 0; padding: 0; font-size: 20px; line-height: 32px; font-weight: 600; font-variation-settings: "ROND" 100; }

.things { display: grid; gap: 28px 48px; margin: 0; }
@media (min-width: 760px) { .things { grid-template-columns: 1fr 1fr; } }
.things dt { font-weight: 700; font-variation-settings: "ROND" 100; font-size: 20px; }
.things dd { margin: 4px 0 0; color: var(--ink-2); }

.plain { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; font-weight: 720; letter-spacing: -0.015em; font-variation-settings: "ROND" 100; margin: 0 0 12px; text-wrap: balance; }

footer { border-top: 1px solid var(--rule); padding-block: 40px 56px; font-size: 15px; color: var(--ink-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
footer ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }

/* Document pages */
.doc { max-width: 720px; padding-block: 32px 80px; }
.doc h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 18px; }
.doc .lede { margin-bottom: 8px; }
.doc .meta { font-size: 15px; color: var(--ink-2); margin: 0 0 40px; }
.doc h2 { font-size: 28px; line-height: 34px; margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--rule); }
.doc h3 { font-size: 20px; margin: 28px 0 6px; }
.doc p, .doc li, .doc dd { color: var(--ink); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc dl { margin: 0; }
.doc dt { font-weight: 680; margin-top: 16px; font-variation-settings: "ROND" 100; }
.doc dd { margin: 2px 0 0; color: var(--ink-2); }
.doc code { font-family: var(--code); font-size: 0.88em; }
.doc .toc { font-size: 16px; display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 8px; }

/* Widgets page */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center; padding-block: 18px; border-top: 1px solid var(--rule); }
.list img, .list .ph { width: 96px; height: 96px; border-radius: 24px; }
.list .ph { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 18px; background: var(--raised); border: 1px solid var(--rule); }
.list .ph i { border-radius: 6px; background: var(--ink-2); opacity: .55; }
.list h3 { margin: 0; }
.list p { margin: 2px 0 0; color: var(--ink-2); font-size: 16px; line-height: 24px; }
.list .reads { font-family: var(--code); font-size: 13px; line-height: 20px; color: var(--ink-2); }
.group { margin: 56px 0 8px; font-size: 16px; color: var(--ink-2); font-weight: 600; }

@media (max-width: 440px) {
  .top nav a { padding: 8px 8px; font-size: 15px; }
  .brand { font-size: 17px; }
  .trail { font-size: 15px; line-height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .widget > .w { transition: none; }
}
