/* YapRoll — yaproll.app
   One stylesheet for the landing page and the legal pages.

   The palette is the app's: ink (#0A0E17) and volt (#D4FF00). Dark is the
   default, as in the app. Light is the prototype's inversion — cream paper,
   ink as the brand surface, volt as the accent — not a white-paper theme.
   The theme follows the system unless the header's switch has set
   data-theme on the root; the switch keeps its choice in the visitor's own
   browser (site.js). Which of the switch's icons shows, and which of the
   hero's two screenshots, follow the same two inputs, here -- never from
   the script. */

/* The fonts are served from this site, never from a font CDN: a font
   fetched from a third party hands every visitor's IP address to it. Both
   are SIL Open Font License 1.1 (fonts/OFL-*.txt). Space Grotesk is a
   variable font, so one file per subset covers 500 to 700. */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("fonts/space-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/space-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/space-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink-000: #FFFFFF; --ink-025: #F7F9FB; --ink-100: #DDE4EC; --ink-200: #C1CBD8;
  --ink-300: #97A5B8; --ink-400: #6E7F98; --ink-500: #4E5F79; --ink-600: #35435A;
  --ink-700: #212C3F; --ink-800: #131A29; --ink-850: #0E1320; --ink-900: #0A0E17; --ink-950: #06090F;
  --volt-100: #F6FFD6; --volt-200: #EDFFAD; --volt-300: #E2FF7A; --volt-500: #D4FF00; --volt-900: #4E6100;
  --spark-500: #37E6FF; --spark-900: #0A5B6B;
  --flare-500: #FF3B4E;

  /* dark (default) */
  --surface-app: var(--ink-900);
  --surface-raised: var(--ink-850);
  --surface-sunken: var(--ink-950);
  --surface-subtle: var(--ink-800);
  --surface-brand: var(--volt-500);
  --surface-brand-hover: #DBFF40;
  --text-primary: var(--ink-025);
  --text-secondary: var(--ink-300);
  --text-muted: var(--ink-400);
  --text-brand: var(--volt-500);
  --text-on-brand: var(--ink-900);
  --text-link: var(--spark-500);
  --border-subtle: var(--ink-800);
  --border-default: var(--ink-700);
  --border-strong: var(--ink-600);
  --halo: rgba(212, 255, 0, .14);
  --mark: url("logo-mark.svg");

  --font-display: "Space Grotesk", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
  --radius-sm: 10px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: dark;
}

/* Light, from the system unless the switch chose dark, or from the switch
   on a dark system. The same palette twice: a media query and a selector
   cannot share one block. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --surface-app: #F7FFD8;
    --surface-raised: #FDFFF0;
    --surface-sunken: #EEFFB4;
    --surface-subtle: #EDFFAD;
    --surface-brand: #0A0E17;
    --surface-brand-hover: #131A29;
    --text-primary: #0A0E17;
    --text-secondary: #35435A;
    --text-muted: #4E5F79;
    --text-brand: #0A0E17;
    --text-on-brand: #D4FF00;
    --text-link: #0A5B6B;
    --border-subtle: rgba(10, 14, 23, .12);
    --border-default: rgba(10, 14, 23, .22);
    --border-strong: rgba(10, 14, 23, .34);
    --halo: rgba(10, 14, 23, .10);
    --mark: url("logo-mark-light.svg");
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --surface-app: #F7FFD8;
  --surface-raised: #FDFFF0;
  --surface-sunken: #EEFFB4;
  --surface-subtle: #EDFFAD;
  --surface-brand: #0A0E17;
  --surface-brand-hover: #131A29;
  --text-primary: #0A0E17;
  --text-secondary: #35435A;
  --text-muted: #4E5F79;
  --text-brand: #0A0E17;
  --text-on-brand: #D4FF00;
  --text-link: #0A5B6B;
  --border-subtle: rgba(10, 14, 23, .12);
  --border-default: rgba(10, 14, 23, .22);
  --border-strong: rgba(10, 14, 23, .34);
  --halo: rgba(10, 14, 23, .10);
  --mark: url("logo-mark-light.svg");
  color-scheme: light;
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 17px/1.6 var(--font-display);
  color: var(--text-primary);
  background: var(--surface-app);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-link); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--text-brand); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.015em; margin: 0; font-weight: 700; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--text-secondary); }
.skip {
  position: absolute; left: -999px; top: 0; padding: .5rem .75rem;
  background: var(--surface-brand); color: var(--text-on-brand); z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 44rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--surface-app) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.lockup { display: inline-flex; align-items: center; gap: .6rem; color: var(--text-primary); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.mark { width: 32px; height: 32px; border-radius: 8px; background: var(--mark) center / contain no-repeat; flex: none; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav > a { color: var(--text-secondary); text-decoration: none; padding: .5rem .7rem; border-radius: var(--radius-sm); font-size: .95rem; white-space: nowrap; }
.nav > a:hover, .nav > a[aria-current="page"] { color: var(--text-primary); background: var(--surface-subtle); }
/* The theme switch. Hidden until site.js runs, so a visitor without
   scripts never sees a button that does nothing. */
.theme-toggle {
  margin-left: .25rem; width: 2.4rem; height: 2.4rem; padding: 0; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); background: transparent; color: var(--text-secondary);
  cursor: pointer; display: inline-grid; place-items: center; flex: none;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--border-strong); background: var(--surface-subtle); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 18px; height: 18px; }
/* One icon at a time, naming the theme a tap switches to: the sun on a
   dark page, the moon on a light one. */
.theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
/* A phone keeps the lockup, Legal and the two buttons, on one line. */
@media (max-width: 40rem) {
  .nav > a:not(.nav-keep) { display: none; }
  .site-header .wrap { gap: .6rem; }
  .nav > a { padding: .5rem .55rem; }
}

/* The language menu, in the header and the footer. A <details>, so it
   opens and closes without a script. Closed, the page's flag and nothing
   else; open, every language with its flag and its own name. The
   footer's opens upwards. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.flag { display: block; flex: none; width: 21px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px var(--border-subtle); }
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; width: 2.4rem; height: 2.4rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); display: grid; place-items: center;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: var(--border-strong); background: var(--surface-subtle); }
.lang-menu .lang-list {
  position: absolute; z-index: 6; top: calc(100% + .4rem); right: 0; min-width: 11rem;
  display: grid; gap: .1rem; padding: .35rem; background: var(--surface-raised);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, .5);
}
.lang-menu-up .lang-list { top: auto; bottom: calc(100% + .4rem); }
.lang-menu .lang-list a {
  display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: 8px;
  color: var(--text-secondary); text-decoration: none; font-size: .95rem; white-space: nowrap;
}
.lang-menu .lang-list a:hover { color: var(--text-primary); background: var(--surface-subtle); text-decoration: none; }
.lang-menu .lang-list a[aria-current] { color: var(--text-primary); font-weight: 700; background: var(--surface-subtle); }
.site-footer .lang-menu { margin-left: auto; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.35rem; border-radius: var(--radius); font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 1px solid transparent; line-height: 1; cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-brand { background: var(--surface-brand); color: var(--text-on-brand); box-shadow: 0 0 0 0 var(--halo); }
.btn-brand:hover { background: var(--surface-brand-hover); box-shadow: 0 0 0 6px var(--halo); }
.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--border-default); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-subtle); }
.btn svg { width: 18px; height: 18px; }

/* ---- hero ---- */
.hero { padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: auto auto -40% 50%; width: 60rem; height: 60rem;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, var(--halo), transparent 70%); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 56rem) { .hero .wrap { grid-template-columns: 1.2fr .8fr; } }
.eyebrow { color: var(--text-brand); }
.hero h1 { font-size: clamp(2.4rem, 6.5vw, 4.5rem); margin: .6rem 0 1rem; text-wrap: balance; }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--text-secondary); max-width: 34rem; margin-bottom: 1.75rem; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.cta .fine { width: 100%; color: var(--text-muted); font-size: .9rem; margin-top: .25rem; }

/* The app itself, in a phone: a screenshot of the current build inside a
   dark body with rounded corners, a front camera over the status bar and
   a side button. The body stays dark on the light page, as phones do. */
.screen {
  position: relative; justify-self: center; margin: 0; width: min(19rem, 82%);
  padding: .7rem; border-radius: 3.1rem; background: #05070C;
  box-shadow:
    0 0 0 1px #2B3547,
    0 0 0 5px #10151F,
    0 0 0 6px #2B3547,
    0 40px 90px -30px rgba(0, 0, 0, .6);
}
.screen img { display: block; width: 100%; height: auto; border-radius: 2.4rem; }
.screen::before {
  content: ""; position: absolute; z-index: 1; top: 1.05rem; left: 50%;
  width: .6rem; height: .6rem; margin-left: -.3rem; border-radius: 50%;
  background: #05070C; box-shadow: 0 0 0 2px #151B27;
}
.screen::after {
  content: ""; position: absolute; right: -10px; top: 7rem; width: 4px; height: 3.6rem;
  border-radius: 0 4px 4px 0; background: #2B3547;
}
/* The screenshot that matches the page. The stylesheet chooses, as it does
   for the switch's icon: a <picture> would follow the system alone and show
   the dark one on a page the switch has turned light. */
.screen .shot-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .screen .shot-dark { display: none; }
  :root:not([data-theme="dark"]) .screen .shot-light { display: block; }
}
:root[data-theme="light"] .screen .shot-dark { display: none; }
:root[data-theme="light"] .screen .shot-light { display: block; }

/* Google's own badge, as Google supplies it: its transparent margin is the
   clear space the badge rules ask for, so only the left edge is pulled in
   to line the badge up with the text above it. */
.badge { display: inline-block; line-height: 0; margin-left: -.75rem; }
.badge img { height: 4.6rem; width: auto; }
/* Until the listing is public: says so, and is not a link. */
.btn-soon { background: transparent; color: var(--text-secondary); border: 1px dashed var(--border-strong); cursor: default; }

/* ---- sections ---- */
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
section + section { border-top: 1px solid var(--border-subtle); }
.section-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: .5rem 0 1.25rem; text-wrap: balance; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card {
  background: var(--surface-raised); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem;
}
.card h3 { font-size: 1.1rem; }
.card p { margin: 0; color: var(--text-secondary); font-size: .97rem; }
.step { font-family: var(--font-mono); font-size: .8rem; color: var(--text-brand); letter-spacing: .06em; }
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.check li { padding-left: 1.6rem; position: relative; color: var(--text-secondary); }
.check li::before { content: ""; position: absolute; left: 0; top: .5em; width: .8rem; height: .8rem; border-radius: 3px; background: var(--surface-brand); }
.split { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; } }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 2rem 0 3rem; color: var(--text-muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); text-decoration: underline; }
.site-footer .legal-line { width: 100%; }

/* ---- legal / prose pages ---- */
.doc { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: .25rem; }
.doc .meta { color: var(--text-muted); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; margin-bottom: 2rem; }
.doc h2 { font-size: 1.25rem; margin: 2.25rem 0 .6rem; }
.doc p, .doc li { margin: .45rem 0; }
.doc ul, .doc ol { padding-left: 1.3rem; }
.doc table { border-collapse: collapse; width: 100%; margin: .75rem 0 1rem; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .55rem .5rem; border-top: 1px solid var(--border-default); }
.doc th { font-weight: 700; }
.doc .table-scroll { overflow-x: auto; }
.doc strong { font-weight: 700; }
.callout {
  border: 1px solid var(--border-default); border-left: 4px solid var(--surface-brand);
  border-radius: var(--radius-sm); padding: .9rem 1rem; margin: 1.25rem 0; background: var(--surface-raised);
}
.callout p:last-child { margin-bottom: 0; }
/* The five documents and the five languages, beside the text on a wide
   screen and folded into two disclosure menus on a phone -- both plain
   HTML, no script. */
.doc-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
.doc-layout .prose { max-width: 44rem; margin: 0; padding: 0; }
.doc-side { display: none; }
.side-label { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 1.4rem 0 .4rem .8rem; }
.side-label:first-child { margin-top: 0; }
.doc-side nav { display: grid; gap: .1rem; }
.doc-side a { color: var(--text-secondary); text-decoration: none; padding: .38rem .75rem; border-left: 2px solid transparent; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.doc-side a:hover { color: var(--text-primary); background: var(--surface-subtle); }
.doc-side a[aria-current] { color: var(--text-primary); font-weight: 700; border-left-color: var(--surface-brand); background: var(--surface-subtle); }
.doc-menus { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.doc-menu { position: relative; }
.doc-menu summary {
  list-style: none; cursor: pointer; padding: .5rem .85rem; font-size: .92rem;
  border: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--text-primary);
}
.doc-menu summary::-webkit-details-marker { display: none; }
.doc-menu summary::after { content: "\25BE"; margin-left: .5rem; color: var(--text-muted); }
.doc-menu[open] summary::after { content: "\25B4"; }
.doc-menu nav {
  position: absolute; z-index: 4; top: calc(100% + .35rem); left: 0; min-width: 15rem;
  display: grid; padding: .35rem; background: var(--surface-raised);
  border: 1px solid var(--border-default); border-radius: var(--radius-sm);
  box-shadow: 0 16px 40px -20px rgba(0, 0, 0, .5);
}
/* The right-hand menu opens leftwards, or it runs off a phone's edge. */
.doc-menu:last-child nav { left: auto; right: 0; }
.doc-menu nav a { padding: .5rem .65rem; color: var(--text-secondary); text-decoration: none; border-radius: 8px; }
.doc-menu nav a:hover, .doc-menu nav a[aria-current] { color: var(--text-primary); background: var(--surface-subtle); }
/* Wide enough for both: the lists beside the text, and no menus. Last, so
   it outranks every base rule above it. */
@media (min-width: 60rem) {
  .doc-layout { grid-template-columns: 14rem minmax(0, 44rem); justify-content: center; gap: 3.5rem; }
  .doc-side { display: grid; gap: .2rem; position: sticky; top: 5.5rem; align-self: start; font-size: .92rem; }
  .doc-menus { display: none; }
}
kbd {
  font-family: var(--font-mono); font-size: .85em; padding: .1em .45em; border-radius: 6px;
  border: 1px solid var(--border-default); background: var(--surface-subtle); white-space: nowrap;
}

/* ---- 404 ---- */
.oops { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 3rem var(--gutter); }
.oops h1 { font-size: clamp(3rem, 12vw, 7rem); color: var(--text-brand); }
.oops .lede { color: var(--text-secondary); font-size: 1.15rem; margin: .5rem 0 1.5rem; }
