/* nayge.com. One stylesheet for every page.
   The tokens are the app's own (Theme.swift): the near-white background with
   white cards on a soft two-layer shadow, the teal primary, Inter, the type
   roles (caps section titles, 16 pt body, muted captions) and glass for the
   controls that float over content (the back circle, the QR dialog). */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/assets/fonts/Inter-Regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/assets/fonts/Inter-Medium.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/assets/fonts/Inter-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/assets/fonts/Inter-Bold.woff2) format("woff2"); }

:root {
  color-scheme: only light;   /* one look everywhere: no browser auto-darkening */
  --bg: #F8F9FA;              /* Palette.background */
  --card: #FFFFFF;            /* surfaceContainerLowest */
  --low: #F3F4F5;             /* surfaceContainerLow: fields, chips */
  --mid: #EDEEEF;             /* surfaceContainer */
  --high: #E7E8E9;            /* surfaceContainerHigh */
  --text: #191C1D;            /* onSurface */
  --text-2: #414848;          /* onSurfaceVariant */
  --muted: #676D6D;           /* outline, one step darker for AA contrast at small sizes on the web */
  --faint: #C1C8C7;           /* outlineVariant */
  --hair: rgba(25, 28, 29, .08);
  --primary: #405959;
  --primary-press: #344B4B;
  --primary-tint: rgba(64, 89, 89, .10);
  --danger: #C4321F;
  --danger-tint: #FDEDEB;
  --good: #12B155;

  --shadow: 0 8px 20px rgba(25, 28, 29, .07), 0 1px 3px rgba(25, 28, 29, .06);   /* softCard */
  --shadow-lift: 0 14px 34px rgba(25, 28, 29, .10), 0 2px 6px rgba(25, 28, 29, .06);
  --r-card: 14px;
  --r-field: 10px;
  --r-btn: 10px;

  --glass: rgba(255, 255, 255, .72);
  --glass-edge: rgba(255, 255, 255, .7);
  --glass-shadow: 0 6px 20px rgba(25, 28, 29, .10), 0 0 0 .5px rgba(25, 28, 29, .08);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --gutter: 20px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;                              /* minimal scrollbars everywhere */
  scrollbar-color: rgba(25, 28, 29, .18) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(25, 28, 29, .16); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(25, 28, 29, .28); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; color: var(--text); }
p { text-wrap: pretty; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(64, 89, 89, .18); }
.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; }

/* ---------- type roles ---------- */
.label {                     /* SectionTitle: 12 medium caps 0.6 tracking */
  font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--text-2);
}
.micro {                     /* MicroLabel: field labels */
  font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}

/* ---------- glass back circle (every page but home) ---------- */
.back {
  position: fixed; z-index: 40;
  top: max(16px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left));
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  color: var(--text);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.back:hover { background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-lift); }
.back:active { transform: scale(.94); }
.back svg { width: 20px; height: 20px; }

/* ---------- buttons ---------- */
.btn {                       /* SheetActionButtonStyle(wide:) */
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 24px; border: 0; border-radius: var(--r-btn);
  background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--primary-press); }
.btn:active { transform: scale(.985); }
.btn[disabled] { background: var(--high); color: var(--muted); cursor: not-allowed; transform: none; }
.btn.is-busy, .btn.is-busy[disabled] { background: var(--primary); color: #fff; cursor: progress; }
.btn.wide { width: 100%; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.text-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none;
  color: var(--primary); font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none;
}
.text-btn:hover { color: var(--primary-press); text-decoration: underline; text-underline-offset: 3px; }
.text-btn svg { width: 16px; height: 16px; }

.circle-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--low); color: var(--text-2);
  transition: background .15s, transform .1s;
}
.circle-btn:hover { background: var(--high); }
.circle-btn:active { transform: scale(.94); }
.circle-btn svg { width: 18px; height: 18px; }

/* ---------- footer ---------- */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px;
  font-size: 13px; color: var(--muted);
}
.site-foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-foot nav a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.site-foot nav a:hover { color: var(--text); }
.site-foot nav a[aria-current="page"] { color: var(--text); }
.site-foot nav a.ig { display: inline-flex; align-items: center; gap: 6px; }
.site-foot nav a.ig svg { width: 15px; height: 15px; }
.site-foot .credit { font-size: 12px; color: var(--muted); }

/* =====================================================================
   HOME
   ===================================================================== */
.home {
  min-height: 100svh;
  max-width: 1200px; margin: 0 auto;
  padding: 40px 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-rows: 1fr auto;
  grid-template-areas: "copy art" "foot foot";
  column-gap: 40px;
}
.home .copy { grid-area: copy; align-self: center; display: flex; flex-direction: column; align-items: flex-start; }
.app-icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 10px 26px rgba(33, 120, 200, .14), 0 1px 3px rgba(25, 28, 29, .08); }
.home h1 { margin-top: 28px; font-size: 68px; line-height: 1; font-weight: 700; letter-spacing: -.035em; }
.home .tagline { margin-top: 12px; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: var(--text); }
.home .lede { margin-top: 14px; font-size: 20px; line-height: 1.5; color: var(--text-2); max-width: 25ch; }

.get { margin-top: 36px; display: flex; align-items: center; gap: 20px; }
.badge { display: block; border-radius: 12px; transition: transform .15s var(--ease), opacity .15s; }
.badge:hover { opacity: .86; }
.badge:active { transform: scale(.98); }
.badge img { width: 172px; height: auto; }

.qr-btn {
  position: relative; display: block; padding: 10px; border: 0; border-radius: 16px; cursor: zoom-in;
  background: var(--card); box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.qr-btn img { width: 104px; height: 104px; }
.qr-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.qr-btn:active { transform: scale(.98); }
.qr-btn .zoom {
  position: absolute; right: -8px; bottom: -8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-2);
  background: var(--glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--glass-shadow); border: 1px solid var(--glass-edge);
}
.qr-btn .zoom svg { width: 14px; height: 14px; }
.qr-hint { font-size: 13px; line-height: 1.4; color: var(--muted); max-width: 12ch; }

/* carousel: the current phone in front, the one before and after it visible
   behind on either side. Each side phone is a button to that phone. */
.home .art { grid-area: art; align-self: center; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.carousel {
  position: relative; width: 100%;
  height: min(660px, calc(100svh - 200px)); min-height: 440px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.carousel:focus-visible { outline-offset: 8px; border-radius: 24px; }
.slide {
  position: absolute; left: 50%; top: 0; height: 100%;
  aspect-ratio: 792 / 1400;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 44px;
  transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none; z-index: 0;
  transition: transform .6s var(--ease), opacity .45s var(--ease), filter .45s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.slide img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; pointer-events: none; -webkit-user-drag: none; }
.slide[data-pos="0"]  { transform: translateX(calc(-50% + var(--drag, 0px))); opacity: 1; z-index: 3; cursor: default; pointer-events: auto; }
.slide[data-pos="-1"] { transform: translateX(calc(-112% + var(--drag, 0px))) scale(.8); opacity: .5; z-index: 2; pointer-events: auto; filter: saturate(.7); }
.slide[data-pos="1"]  { transform: translateX(calc(12% + var(--drag, 0px))) scale(.8); opacity: .5; z-index: 2; pointer-events: auto; filter: saturate(.7); }
.slide[data-pos="-1"]:hover, .slide[data-pos="1"]:hover { opacity: .8; filter: none; }
.slide:focus-visible { outline-offset: -4px; }
.carousel.dragging .slide { transition: none; }

.car-meta { margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.car-caption { font-size: 15px; font-weight: 500; color: var(--text); min-height: 24px; text-align: center; transition: opacity .2s; }
.dots { display: flex; gap: 2px; }
.dots button {
  width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center; border-radius: 8px;
}
.dots button::before {
  content: ""; width: 7px; height: 7px; border-radius: 4px; background: #8A9191;
  transition: width .3s var(--ease), background .3s;
}
.dots button:hover::before { background: var(--text-2); }
.dots button[aria-current="true"]::before { width: 20px; background: var(--primary); }

.home .site-foot { grid-area: foot; padding-top: 18px; border-top: 1px solid var(--hair); margin-top: 8px; }

/* dialogs (QR and the sent sheet) */
dialog { padding: 0; border: 0; background: transparent; color: inherit; max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: rgba(248, 249, 250, .55); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
dialog[open] { animation: pop .38s var(--spring); }
dialog[open]::backdrop { animation: fade .25s ease; }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(8px); } }
@keyframes fade { from { opacity: 0; } }
.qr-card {
  position: relative; width: min(440px, calc(100vw - 32px));
  padding: 44px 40px 32px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.qr-card .circle-btn { position: absolute; top: 14px; right: 14px; }
.qr-card > img { width: 100%; max-width: 300px; aspect-ratio: 1; }
.qr-card h2 { margin-top: 22px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.qr-card p { margin-top: 6px; font-size: 14px; color: var(--text-2); }

@media (max-width: 960px) {
  .home { grid-template-columns: 1fr; grid-template-rows: auto auto auto; grid-template-areas: "copy" "art" "foot";
    padding: 48px var(--gutter) 24px; row-gap: 32px; }
  .home h1 { font-size: 52px; margin-top: 24px; }
  .home .tagline { font-size: 24px; }
  .home .lede { font-size: 18px; max-width: 30ch; }
  .get { margin-top: 28px; }
  .qr-btn, .qr-hint { display: none; }   /* a QR code is no use on the phone that would scan it */
  .home .art { overflow: clip; margin: 0 calc(var(--gutter) * -1); padding: 4px 0; width: calc(100% + var(--gutter) * 2); }
  .carousel { height: min(560px, 120vw); min-height: 0; }
  .slide[data-pos="-1"] { transform: translateX(calc(-124% + var(--drag, 0px))) scale(.78); }
  .slide[data-pos="1"]  { transform: translateX(calc(24% + var(--drag, 0px))) scale(.78); }
}
/* phones: the same page, centred and tightened so the icon, name, badge and
   the whole front phone fit on the first screen */
@media (max-width: 720px) {
  .home { min-height: 100svh; padding: calc(env(safe-area-inset-top) + 14px) var(--gutter) calc(env(safe-area-inset-bottom) + 20px);
    row-gap: 22px; grid-template-rows: auto 1fr auto; }
  .home .copy { align-items: center; text-align: center; }
  .app-icon { width: 60px; height: 60px; border-radius: 14px; }
  .home h1 { font-size: 42px; margin-top: 14px; letter-spacing: -.03em; }
  .home .tagline { margin-top: 6px; font-size: 20px; }
  .home .lede { margin-top: 8px; font-size: 17px; line-height: 1.5; max-width: 28ch; }
  .get { margin-top: 20px; justify-content: center; }
  .badge img { width: 156px; }
  .home .art { align-self: start; }
  .carousel { height: clamp(330px, calc(100svh - 470px), 560px); }
  .slide[data-pos="-1"], .slide[data-pos="1"] { opacity: .6; filter: none; }
  /* the side phones peek in from the screen edges */
  .slide[data-pos="-1"] { transform: translateX(calc(-150% + var(--drag, 0px))) scale(.82); }
  .slide[data-pos="1"]  { transform: translateX(calc(50% + var(--drag, 0px))) scale(.82); }
  .car-meta { margin-top: 14px; gap: 8px; }
  .car-caption { font-size: 14px; }
  .home .site-foot { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .home .site-foot .credit { max-width: 34ch; line-height: 1.5; }
}
@media (min-width: 961px) and (max-height: 720px) {
  .home h1 { font-size: 56px; margin-top: 20px; }
  .get { margin-top: 26px; }
}

/* =====================================================================
   INNER PAGES (support, privacy, terms, 404)
   ===================================================================== */
.page { max-width: 1120px; margin: 0 auto; padding: 104px var(--gutter) 32px; }
.page-head { max-width: 640px; }
.page-head .label { display: block; margin-bottom: 10px; }
.page-head h1 { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.page-head p { margin-top: 12px; font-size: 18px; line-height: 1.55; color: var(--text-2); }
.page .site-foot { margin-top: 72px; padding-top: 18px; border-top: 1px solid var(--hair); }
@media (max-width: 720px) {
  .page { padding-top: 84px; }
  .page-head h1 { font-size: 32px; }
  .page-head p { font-size: 17px; }
}

/* ---------- support ---------- */
.support-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
.jump { margin-top: 16px; display: none; }

.faq-group + .faq-group { margin-top: 32px; }
.faq-group > h2 { padding: 0 4px 10px; }
.list {                      /* the app's grouped list: one card, hairline rows */
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden;
}
.list details + details { border-top: 1px solid var(--hair); }
.list summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 17px 20px; font-size: 16px; font-weight: 500; line-height: 1.4; color: var(--text);
  transition: background .15s;
}
.list summary::-webkit-details-marker { display: none; }
.list summary:hover { background: #FBFBFC; }
.list summary .chev { flex: none; width: 18px; height: 18px; color: var(--muted); transition: transform .3s var(--ease); }
.list details[open] > summary .chev { transform: rotate(90deg); color: var(--text-2); }
.list .answer { padding: 0 20px 18px; font-size: 15px; line-height: 1.65; color: var(--text-2); max-width: 64ch; }
.list .answer p + p { margin-top: 10px; }
@supports (interpolate-size: allow-keywords) {
  .list { interpolate-size: allow-keywords; }
  .list details::details-content { height: 0; overflow: clip; transition: height .32s var(--ease), content-visibility .32s allow-discrete; }
  .list details[open]::details-content { height: auto; }
}

.contact { position: sticky; top: 24px; scroll-margin-top: 24px; }
.card { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 28px; }
.contact h2 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.contact .sub { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.field { margin-top: 22px; }
.field > .micro { display: block; margin-bottom: 8px; }
.field .opt { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); margin-left: 4px; }
fieldset { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chip { position: relative; display: flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; padding: 0 10px; border-radius: 8px; text-align: center; white-space: nowrap;
  background: var(--low); color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.chip input:hover + span { background: var(--mid); }
.chip input:checked + span { background: var(--primary); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

.input, .textarea {
  display: block; width: 100%; border: 1px solid transparent; border-radius: var(--r-field);
  background: var(--low); color: var(--text); font: inherit; font-size: 16px; /* 16 keeps iOS from zooming in */
  padding: 13px 14px; outline: none;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .textarea:hover { background: var(--mid); }
.input:focus, .textarea:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(224, 58, 40, .10); background: #fff; }
.textarea { min-height: 148px; max-height: 360px; resize: none; line-height: 1.5; field-sizing: content; }
.field-foot { margin-top: 6px; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.field-foot:not(:has(span:not(:empty))) { margin-top: 0; }
.field-foot .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.field-foot .count.over { color: var(--danger); }
.err-text { color: var(--danger); font-weight: 500; }
.hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.send { margin-top: 22px; }
.send .wait { font-variant-numeric: tabular-nums; }
.notice {                    /* WarningNote */
  margin-top: 14px; display: none; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-field); background: var(--danger-tint); color: #A12A1C;
  font-size: 14px; line-height: 1.45;
}
.notice.show { display: flex; }
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

.alt-contact { margin-top: 16px; padding: 0 4px; font-size: 14px; color: var(--text-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 28px; }
.alt-contact .addr { font-weight: 500; }

@media (max-width: 960px) {
  .support-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact { position: static; }
  .jump { display: inline-flex; }
}
@media (max-width: 720px) {
  .card { padding: 22px 18px; }
  .list summary { padding: 16px; }
  .list .answer { padding: 0 16px 16px; }
}

/* sent sheet: the app's SuccessSeal (green circle, check, confetti) */
.done-card {
  width: min(400px, calc(100vw - 24px)); padding: 28px 24px 24px; border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.done-card:focus { outline: none; }
.done-card h2 { margin-top: 20px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.done-card .detail { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); max-width: 32ch; }
.done-card .reply { margin-top: 10px; font-size: 13px; color: var(--muted); max-width: 34ch; overflow-wrap: anywhere; }
.done-card .btn { margin-top: 24px; }
@media (max-width: 520px) { .done-dialog { margin: auto auto 12px; } }

.seal { position: relative; width: 160px; height: 121px; }       /* 82 x 1.95 by 82 x 1.48, as in the app */
.seal .disc {
  position: absolute; left: 50%; top: 50%; width: 82px; height: 82px; margin: -41px 0 0 -41px;
  border-radius: 50%; background: var(--primary); display: grid; place-items: center;
  transform: scale(.68); opacity: 0;
}
.seal .disc svg { width: 46px; height: 46px; }
.seal .bit {
  position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  opacity: 0; transform: translate(0, 0) rotate(calc(var(--spin) - 140deg)) scale(.2);
}
.seal .bit svg { width: 100%; height: 100%; overflow: visible; }
.seal.go .disc { animation: seal-in .55s var(--spring) forwards; }
.seal.go .bit { animation: bit-burst .62s var(--spring) var(--d) forwards, bit-settle 1.6s ease-in-out calc(var(--d) + 1.1s) forwards; }
@keyframes seal-in { to { transform: scale(1); opacity: 1; } }
@keyframes bit-burst { to { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--spin)) scale(1); } }
@keyframes bit-settle {
  from { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--spin)) scale(1); }
  to { opacity: var(--rest); transform: translate(var(--x), calc(var(--y) + 2.9px)) rotate(var(--spin)) scale(1); }
}

/* ---------- legal ---------- */
.legal-grid { margin-top: 36px; display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc { position: sticky; top: 24px; max-height: calc(100svh - 48px); overflow-y: auto; scrollbar-width: none; padding-bottom: 8px; }
.toc::-webkit-scrollbar { display: none; }
.toc .label { display: block; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--hair); }
.toc a {
  display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.4; color: var(--muted); text-decoration: none;
  transition: color .15s, border-color .15s;
}
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-left-color: var(--primary); font-weight: 500; }
.toc-mobile { display: none; }

.doc { background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 44px 52px; min-width: 0; font-size: 16px; line-height: 1.7; color: var(--text-2); }
.doc > :first-child { margin-top: 0; }
.doc h2 {
  margin: 44px 0 14px; padding-top: 28px; border-top: 1px solid var(--hair);
  font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -.012em; color: var(--text);
  scroll-margin-top: 24px;
}
.doc h2.first { margin-top: 0; padding-top: 0; border-top: 0; }
.doc h3 { margin: 28px 0 10px; font-size: 17px; font-weight: 600; color: var(--text); scroll-margin-top: 24px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 8px; padding-left: 2px; }
.doc li::marker { color: var(--muted); }
.doc strong { font-weight: 600; color: var(--text); }
.doc code { font-family: ui-monospace, Menlo, monospace; font-size: .88em; background: var(--low); padding: 1px 5px; border-radius: 4px; }
.doc blockquote { margin: 18px 0; padding: 16px 18px; border-radius: var(--r-field); background: var(--low); color: var(--text-2); }
.doc blockquote p:last-child { margin-bottom: 0; }
.doc .tablewrap { overflow-x: auto; margin: 0 0 20px; border-radius: var(--r-field); border: 1px solid var(--hair); scrollbar-width: thin; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 1.5; }
.doc th, .doc td { text-align: left; padding: 10px 14px; vertical-align: top; border-bottom: 1px solid var(--hair); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { background: var(--low); color: var(--text); font-weight: 600; font-size: 13px; }
.doc a { overflow-wrap: anywhere; }
.doc .owner { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--hair); font-size: 14px; color: var(--muted); }
.page-head .updated-chip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 6px 12px; border-radius: 999px;
  background: var(--card); box-shadow: var(--shadow); font-size: 13px; font-weight: 500; color: var(--text-2);
}
.page-head .updated-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
@media (max-width: 960px) {
  .legal-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 28px; }
  .toc { display: none; }
  .toc-mobile { display: block; background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow); }
  .toc-mobile summary { list-style: none; cursor: pointer; padding: 15px 18px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 500; }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary svg { width: 18px; height: 18px; color: var(--muted); transition: transform .3s var(--ease); }
  .toc-mobile[open] summary svg { transform: rotate(90deg); }
  .toc-mobile ol { list-style: none; margin: 0; padding: 0 18px 10px; }
  .toc-mobile a { display: block; padding: 9px 0; font-size: 14px; color: var(--text-2); text-decoration: none; border-top: 1px solid var(--hair); }
  .doc { padding: 28px 20px; font-size: 15.5px; }
  .doc h2 { font-size: 19px; margin-top: 36px; padding-top: 24px; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 40px var(--gutter); }
.lost .app-icon { margin: 0 auto; }
.lost h1 { margin-top: 24px; font-size: 32px; letter-spacing: -.02em; }
.lost p { margin-top: 8px; color: var(--text-2); }
.lost .btn { margin-top: 24px; }

/* on phones the back circle floats over the top of the page, so a jump to a
   section stops below it */
@media (max-width: 960px) {
  .contact, .doc h2, .doc h3 { scroll-margin-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
