/* Open Shore design system: "First Light".
   An editorial layout set over a dawn horizon: wide serif display type, hairline rules,
   a 12-column grid with a narrow left rail, and one brass accent.
   System/local font stacks only; no network fonts. */

:root {
  --ink: #f6f3ec;
  --ink-2: rgba(246, 243, 236, .86);   /* body copy on the sky, AA on every palette */
  --ink-3: rgba(246, 243, 236, .66);   /* large or non-essential text only */
  --line: rgba(246, 243, 236, .16);
  --line-2: rgba(246, 243, 236, .32);
  --surface: rgba(6, 11, 24, .28);
  --surface-2: rgba(255, 255, 255, .07);
  --field: rgba(6, 11, 24, .4);
  --night: #0d1730;                    /* text on light buttons */
  --brass: #ecd5a8;                    /* ideas, the one move, the single accent */
  --mist: #c3d5ec;                     /* worries */
  --slate: #b4c4e0;                    /* tasks */
  --paper: #f6f3ec;
  --paper-ink: #1b2233;
  --paper-dim: #4d5468;
  --ease: cubic-bezier(.22, .61, .21, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --slow: 1s;
  --serif: ui-serif, "New York", "Iowan Old Style", Charter, "Bitstream Charter", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", "Source Serif Pro", "DejaVu Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans", Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  --r-lg: 10px;
  --r-md: 10px;
  --wrap: 1280px;
  --gutter: clamp(20px, 5vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #0a1a35; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font: 400 1.0625rem/1.6 var(--sans);
  color: var(--ink);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(236, 213, 168, .34); }

/* ---------- sky ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
/* a dark veil keeps text AA over the brightest part of the horizon */
body:not(.doc-page)::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 11, 24, .3), rgba(6, 11, 24, .24) 45%, rgba(6, 11, 24, .52));
}
@media (min-width: 900px) {
  body:not(.doc-page)::after { background: linear-gradient(90deg, rgba(6, 11, 24, .5), rgba(6, 11, 24, .3) 55%, rgba(6, 11, 24, .16)), linear-gradient(180deg, rgba(6, 11, 24, .1), rgba(6, 11, 24, .3)); }
}

/* ---------- masthead + layout ---------- */
.masthead {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-family: var(--serif); font-size: 1.2rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
}
.wordmark .ic { width: 24px; height: 24px; color: var(--brass); }
.dateline { margin: 0; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); text-align: right; }
@media (max-width: 480px) { .dateline { display: none; } }

main {
  flex: 1;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(28px, 7vh, 88px) var(--gutter) clamp(48px, 8vh, 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
main > * { width: 100%; }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.5rem, 9vw, 5rem); line-height: 1.02; margin: .1em 0 .35em; }
h2 { font-size: clamp(1.75rem, 5.4vw, 2.6rem); line-height: 1.12; margin: .1em 0 .5em; }
h3 { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.1; }
h1 em { font-style: italic; color: var(--brass); }
p { margin: .6em 0; }
b, strong { font-weight: 600; }
.lede { text-wrap: pretty; font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 32em; }
.small { font-size: .9rem; line-height: 1.6; color: var(--ink-2); max-width: 40em; }
.faint { color: inherit; opacity: .72; font-weight: 400; }
.kicker, .eyebrow {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0 0 1.1em;
}
.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem); margin: clamp(56px, 9vh, 96px) 0 24px;
  padding-top: 20px; border-top: 1px solid var(--line-2);
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--line-2); transition: text-decoration-color .4s var(--ease); }
a:hover { text-decoration-color: currentColor; }
.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; }

/* ---------- icons ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ic.lg { width: 32px; height: 32px; stroke-width: 1.25; }

/* ---------- blocks ---------- */
/* fill-mode "backwards" (not "both"): a held end keyframe would override .card.product:hover's transform */
.card { margin: 0 0 28px; animation: rise var(--slow) var(--ease-out) backwards; }
.card > :first-child { margin-top: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* On desktop each screen is an editorial spread: a narrow left rail for the kicker,
   the content on columns 4-11. */
@media (min-width: 900px) {
  .quiz, .flow, .sky-result, .signup, .hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-content: start; }
  .quiz > *, .flow > *, .sky-result > *, .signup > * { grid-column: 4 / 12; }
  .card > .kicker { grid-column: 1 / 4; grid-row: 1; padding-top: .7em; margin: 0; }
  .signup > * { grid-column: 4 / 11; }
  .signup > .kicker { grid-column: 1 / 4; }
}

/* hero */
.hero { padding: 0; }
.hero .kicker { margin-bottom: 2em; }
.hero h1 { font-size: clamp(3rem, 11vw, 8.25rem); line-height: .96; letter-spacing: -.035em; margin: 0 0 .4em; max-width: 9.5em; }
.hero .actions { margin: 32px 0 40px; }
.ledger { list-style: none; margin: 8px 0 36px; padding: 0; border-top: 1px solid var(--line-2); }
.ledger li { display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger .num { grid-row: 1 / 3; padding-top: .35em; font-size: .78rem; letter-spacing: .1em; color: var(--brass); font-variant-numeric: tabular-nums; }
.ledger b { font: 400 1.25rem/1.25 var(--serif); letter-spacing: -.01em; }
.ledger li > span:last-child { color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.tagline { color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; margin: 0; max-width: none; }
.meta .i { margin: 0; }
@media (min-width: 900px) {
  .hero > * { grid-column: 1 / 8; }
  .hero > .kicker { grid-column: 1 / -1; grid-row: 1; padding: 0; }
  .hero > h1 { grid-column: 1 / 12; grid-row: 2; }
  .hero > .lede { grid-row: 3; }
  .hero > .actions { grid-row: 4; align-self: start; margin-bottom: 0; }
  .hero > .ledger { grid-column: 9 / 13; grid-row: 3 / span 2; align-self: start; margin: 8px 0 0; }
  .hero > .meta { grid-column: 1 / -1; grid-row: 5; margin-top: clamp(40px, 8vh, 88px); padding-top: 20px; border-top: 1px solid var(--line); }
}

.sky-result h1 { font-size: clamp(3.25rem, 12vw, 7.5rem); line-height: .95; letter-spacing: -.035em; }
.sky-result .note { color: var(--ink-3); margin-top: 1.4em; }
.sky-result .actions { margin-top: 8px; }

/* product cards: the only true panels */
#cards { display: grid; gap: 16px; }
@media (min-width: 900px) { #cards { grid-template-columns: 1fr 1fr; gap: 24px; } }
.card.product {
  margin: 0;
  padding: 32px 30px 30px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(6, 11, 24, .3), rgba(6, 11, 24, .5));
  border: 1px solid var(--line);
  border-top-color: var(--line-2);
  display: flex; flex-direction: column;
  transition: border-color .6s var(--ease), background .6s var(--ease), transform .6s var(--ease);
}
.card.product:hover { border-color: rgba(236, 213, 168, .5); transform: translateY(-3px); }
#cards > .card:nth-child(2) { animation-delay: .14s; }
.eyebrow { margin-bottom: 1.6em; }
.product-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.product-head .ic { color: var(--brass); }
.product p { color: var(--ink-2); flex: 1; margin: 0 0 28px; max-width: 30em; }
.product p b { color: var(--ink); font: 400 clamp(1.25rem, 2.6vw, 1.5rem)/1.25 var(--serif); letter-spacing: -.01em; display: block; margin-bottom: 8px; }
.product button { align-self: flex-start; }

.signup { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.signup h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }

/* ---------- controls ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.actions.center { justify-content: center; }
button {
  -webkit-appearance: none; appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: var(--night);
  font: 500 1rem/1.2 var(--sans);
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease), box-shadow .5s var(--ease), color .5s var(--ease);
}
button:hover { background: var(--brass); box-shadow: 0 14px 34px -16px rgba(236, 213, 168, .6); }
button:active { transform: scale(.985); }
button .ic { width: 18px; height: 18px; transition: transform .5s var(--ease-out); }
button:hover .ic { transform: translateX(3px); }
button.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
button.ghost:hover { background: var(--surface-2); border-color: rgba(246, 243, 236, .55); box-shadow: none; }
.hidden { display: none !important; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
button:focus-visible { box-shadow: 0 0 0 6px rgba(10, 18, 36, .7); }

input, textarea {
  width: 100%;
  font: 400 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
textarea { min-height: 160px; resize: vertical; display: block; }
input::placeholder, textarea::placeholder { color: rgba(246, 243, 236, .6); }
input:hover, textarea:hover { border-color: rgba(246, 243, 236, .5); }
input:focus-visible, textarea:focus-visible { border-color: var(--brass); background: rgba(6, 11, 22, .55); outline-offset: 2px; }
#tbox, #edbox { margin-top: 20px; animation: rise .7s var(--ease-out) both; }

.check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 10px 0 0; cursor: pointer; }
.check input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 22px; height: 22px; margin: 0; padding: 0;
  border: 1px solid rgba(246, 243, 236, .6); border-radius: 6px; background: transparent;
  display: grid; place-items: center; cursor: pointer;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.check input::after { content: ""; width: 10px; height: 5px; border-left: 1.75px solid var(--night); border-bottom: 1.75px solid var(--night); transform: translateY(-1px) rotate(-45deg) scale(.6); opacity: 0; transition: opacity .3s var(--ease), transform .4s var(--ease-out); }
.check input:checked { background: var(--brass); border-color: var(--brass); }
.check input:checked::after { opacity: 1; transform: translateY(-1px) rotate(-45deg); }
.signup input[type="email"] { margin-top: 12px; }

/* ---------- quiz ---------- */
.progress { display: flex; gap: 6px; margin: 0 0 clamp(28px, 5vh, 48px); }
.progress span { flex: 1; height: 2px; border-radius: 2px; background: var(--line); transition: background 1s var(--ease); }
.progress .done { background: var(--ink-3); }
.progress .now { background: var(--brass); }
.quiz .q { font-size: clamp(2rem, 6.4vw, 3.6rem); line-height: 1.06; letter-spacing: -.025em; margin-bottom: clamp(28px, 5vh, 48px); }
.options { display: grid; border-top: 1px solid var(--line-2); }
.options button {
  justify-content: space-between;
  width: 100%;
  min-height: 68px;
  padding: 16px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 clamp(1.2rem, 3.4vw, 1.65rem)/1.2 var(--serif);
  letter-spacing: -.01em;
  text-align: left;
  transition: background .5s var(--ease), padding .6s var(--ease-out);
}
.options button::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg);
  opacity: .5; transition: opacity .4s var(--ease), transform .6s var(--ease-out);
}
.options button:hover { background: var(--surface-2); box-shadow: none; padding-left: 16px; }
.options button:hover::after { opacity: 1; transform: translateX(4px) rotate(45deg); }
.options button:focus-visible { outline-offset: -3px; box-shadow: none; }
.options button:first-child { animation: rise .8s var(--ease-out) backwards; }
.options button:nth-child(2) { animation: rise .8s .07s var(--ease-out) backwards; }
.options button:nth-child(3) { animation: rise .8s .14s var(--ease-out) backwards; }

/* ---------- flows (Drift, Clear Ten) ---------- */
.flow h2 { margin-bottom: .4em; }
/* the tide gauge: big numerals over a hairline that fills like a rising tide */
.dial {
  position: relative;
  display: flex; align-items: baseline; gap: 14px;
  margin: 32px 0 28px; padding: 0 0 16px;
  border-bottom: 1px solid var(--line-2);
}
.dial::after {
  content: ""; position: absolute; left: 0; bottom: -1px; height: 2px;
  width: calc(var(--p, 0) * 100%); background: var(--brass);
  box-shadow: 0 0 16px rgba(236, 213, 168, .7); transition: width 1s linear;
}
.timer {
  font-family: var(--serif);
  font-size: clamp(4rem, 14vw, 6.75rem);
  font-weight: 300;
  line-height: .95;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -.04em;
}
.dial .unit { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.ten .timer { font-size: clamp(3rem, 10vw, 4.75rem); }
#rec.live { background: transparent; color: var(--ink); border-color: rgba(246, 243, 236, .6); animation: listen 2.8s var(--ease) infinite; }
@keyframes listen { 0%, 100% { box-shadow: 0 0 0 0 rgba(236, 213, 168, .3); } 50% { box-shadow: 0 0 0 12px rgba(236, 213, 168, 0); } }
.status:empty { display: none; }
.status { margin-top: 14px; }

/* sorting: three drops rising and settling, like a swell */
.swell { display: flex; gap: 10px; margin: 28px 0 8px; }
.swell span { width: 8px; height: 8px; border-radius: 50%; background: var(--brass); animation: swell 2.4s var(--ease) infinite; }
.swell span:nth-child(2) { animation-delay: .3s; }
.swell span:nth-child(3) { animation-delay: .6s; }
@keyframes swell { 0%, 100% { opacity: .25; transform: translateY(4px); } 50% { opacity: 1; transform: translateY(-4px); } }

/* Clear Ten rows */
.line { padding: 18px 0; border-top: 1px solid var(--line); }
.line:last-of-type { border-bottom: 1px solid var(--line); }
.line-text { display: block; margin: 0 0 12px; overflow-wrap: anywhere; font: 400 1.2rem/1.35 var(--serif); }
.seg {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 4px; border-radius: 999px; border: 1px solid var(--line);
  max-width: 460px;
}
.seg button { min-height: 44px; padding: 8px 6px; font-size: .875rem; border-radius: 999px; }
.seg button.ghost { border-color: transparent; color: var(--ink-2); }
.seg button.ghost:hover { color: var(--ink); background: var(--surface-2); }

/* ---------- thought objects ---------- */
#objs { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; min-height: 56px; }
.obj {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 100%; overflow-wrap: anywhere; min-width: 0;
  padding: 11px 18px 11px 14px;
  color: var(--ink);
  font-size: .98rem; line-height: 1.35;
  border: 1px solid var(--line);
  animation: settle 1.4s var(--ease-out) both;
}
.obj .ic { width: 16px; height: 16px; }
@keyframes settle { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
/* task: a worn pebble, solid and slightly uneven, with a lit top edge */
.obj.stone {
  border-radius: 20px 26px 22px 28px;
  background: linear-gradient(165deg, rgba(180, 196, 224, .26), rgba(120, 140, 178, .12));
  border-color: rgba(180, 196, 224, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 12px 22px -14px rgba(0, 0, 0, .7);
}
.obj.stone .ic { color: var(--slate); fill: currentColor; fill-opacity: .4; }
/* worry: a drifting vapour, no hard edge, set in serif italic */
.obj.cloud {
  border-radius: 999px; border-color: transparent;
  background: radial-gradient(120% 150% at 30% 20%, rgba(195, 213, 236, .24), rgba(195, 213, 236, .07));
  box-shadow: 0 0 30px -4px rgba(195, 213, 236, .28), inset 0 0 20px rgba(195, 213, 236, .08);
  font-family: var(--serif); font-style: italic; font-size: 1.05rem;
}
.obj.cloud .ic { color: var(--mist); }
/* idea: a point of warm light with a faint halo */
.obj.star {
  border-radius: 999px; background: rgba(236, 213, 168, .1); border-color: rgba(236, 213, 168, .5);
  box-shadow: 0 0 22px -6px rgba(236, 213, 168, .5);
}
.obj.star .ic { color: var(--brass); fill: currentColor; fill-opacity: .35; }
.fade { animation: fadeup 2.5s var(--ease) forwards; }
@keyframes fadeup { to { opacity: 0; transform: translateY(-40px); filter: blur(6px); } }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.legend > span:not(.i) { display: inline-flex; align-items: center; gap: 8px; }
.legend .ic { width: 15px; height: 15px; }
.legend > span:nth-child(1) .ic { color: var(--slate); fill: currentColor; fill-opacity: .4; }
.legend > span:nth-child(2) .ic { color: var(--mist); }
.legend > span:nth-child(3) .ic { color: var(--brass); fill: currentColor; fill-opacity: .35; }

/* the one move: a single line, lit from the left like sun on the water */
.move-title { margin-top: 1.2em; }
.obj.glow {
  display: block;
  width: 100%;
  margin: 12px 0 8px;
  padding: 28px 0 28px 28px;
  border: 0; border-left: 2px solid var(--brass);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(236, 213, 168, .18), rgba(236, 213, 168, 0) 85%);
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.6vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -.015em;
  animation: settle 1.4s var(--ease-out) both, glow 7s 1.4s var(--ease) infinite;
}
@keyframes glow {
  0%, 100% { box-shadow: -24px 0 56px -28px rgba(236, 213, 168, .35); }
  50% { box-shadow: -24px 0 72px -24px rgba(236, 213, 168, .6); }
}
.locked { display: flex; align-items: flex-start; gap: 10px; flex-basis: 100%; margin: 4px 0; color: var(--ink); }
.locked .ic { color: var(--brass); margin-top: .2em; }

details.parked { margin: 0 0 8px; border-bottom: 1px solid var(--line); max-width: none; }
details.parked summary {
  list-style: none; cursor: pointer; min-height: 44px; padding: 12px 28px 12px 0; position: relative; color: var(--ink-2);
}
details.parked summary::-webkit-details-marker { display: none; }
details.parked summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg); transition: transform .5s var(--ease);
}
details.parked[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.parked-item { overflow-wrap: anywhere; display: flex; gap: 10px; align-items: baseline; padding: 6px 0; color: var(--ink); }
.parked-item .ic { width: 14px; height: 14px; position: relative; top: 2px; }
.parked-item.stone .ic { color: var(--slate); }
.parked-item.cloud .ic { color: var(--mist); }
.parked-item.star .ic { color: var(--brass); }
.parked-item i { color: var(--ink-2); }
details.parked[open] { padding-bottom: 10px; }

.pdf { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 24px; border: 1px solid var(--line-2); border-radius: 999px; text-decoration: none; }
.pdf:hover { background: var(--surface-2); }

/* ---------- citation chip ---------- */
.i {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 0 8px;
  padding: 3px 12px 3px 9px;
  font-family: var(--sans); font-style: normal; font-size: .78rem; line-height: 1.5;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  vertical-align: 1px;
  white-space: nowrap;
  transition: color .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
.i::before { content: ""; position: absolute; inset: -9px -4px; } /* 44px hit area, small visual */
.i .ic { width: 14px; height: 14px; }
.i:hover { color: var(--ink); background: var(--surface-2); border-color: rgba(246, 243, 236, .55); }
.i:focus-visible { border-radius: 999px; }

#chip {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(540px, calc(100vw - 32px));
  padding: 22px 24px;
  background: var(--paper); color: var(--paper-ink);
  border-radius: 14px;
  font-size: .9rem; line-height: 1.55;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .04);
  z-index: 10; overflow-wrap: anywhere; max-height: calc(100svh - 40px); overflow-y: auto;
  animation: pop .6s var(--ease-out) both;
}
#chip b { font-family: var(--serif); font-weight: 500; font-size: 1.12rem; line-height: 1.35; letter-spacing: -.01em; display: block; margin-bottom: 8px; }
#chip .small { color: var(--paper-dim); }
#chip b + br { display: none; }
@keyframes pop { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- footer ---------- */
footer {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding: 24px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: .8rem; line-height: 1.65; color: var(--ink-2);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 40px;
}
footer p { margin: 0; max-width: 46em; }
footer nav { display: flex; gap: 4px 22px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
footer a:hover { text-decoration: underline; }

/* ---------- doc pages (research / privacy / imprint) ---------- */
body.doc-page {
  background:
    radial-gradient(60% 9% at 70% 64%, rgba(224, 167, 125, .22), rgba(224, 167, 125, 0)),
    linear-gradient(180deg, #0a1a35 0%, #1d3a5f 64%, #0d1f3a 64.2%, #091528 100%) fixed;
}
body.doc-page::before { content: ""; position: fixed; left: 0; right: 0; top: 64%; height: 1px; background: linear-gradient(90deg, transparent, rgba(224, 167, 125, .5), transparent); z-index: -1; pointer-events: none; }
body.doc-page main { display: block; padding-top: clamp(32px, 6vh, 72px); }
.doc { animation: rise var(--slow) var(--ease-out) both; color: var(--ink-2); }
.doc-head h1 { font-size: clamp(2.4rem, 7vw, 4.25rem); line-height: 1; letter-spacing: -.03em; color: var(--ink); margin: 0 0 .5em; }
.doc-head .kicker { margin-bottom: 1.6em; }
.doc h2 { font-size: 1.5rem; color: var(--ink); margin: 2em 0 .5em; }
.doc-body > :first-child { margin-top: 0; }
.doc b { color: var(--ink); }
.doc .draft { display: block; margin-top: 1em; font-family: var(--sans); font-size: .72rem; font-weight: 500; line-height: 1.6; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.doc .summary { font-size: 1.08rem; padding: 0 0 0 20px; border-left: 2px solid var(--brass); margin: 0 0 40px; }
.doc ul { padding-left: 1.1em; }
.doc li { margin: .7em 0; }
.doc li::marker { color: var(--ink-3); }
.doc a { color: #d6e5f8; word-break: break-word; }
.doc table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.55; margin: 0 0 32px; }
.doc th { text-align: left; font-weight: 500; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 0 16px 12px 0; border-bottom: 1px solid var(--line-2); }
.doc td { vertical-align: top; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.doc td:first-child { color: var(--ink); font-family: var(--serif); font-size: 1.1rem; line-height: 1.3; width: 26%; }
.doc td:last-child { white-space: nowrap; }
.strength { display: inline-block; font-size: .78rem; line-height: 1.45; padding: 3px 10px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--ink); white-space: normal; }
.doc-footer { max-width: none; padding-left: 0; padding-right: 0; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .doc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
  .doc-head { grid-column: 1 / 6; position: sticky; top: 32px; }
  .doc-body { grid-column: 6 / 13; padding-top: .6em; }
}
@media (max-width: 640px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc tr:first-child { display: none; }
  .doc tr { padding: 20px 0; border-bottom: 1px solid var(--line); }
  .doc td { border: 0; padding: 4px 0; width: auto !important; white-space: normal !important; }
  .doc td:first-child { margin-bottom: 6px; }
  .doc td:last-child { margin-top: 8px; }
}

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  .actions > button { flex: 1 1 100%; }
  .product button { align-self: stretch; }
  .card.product { padding: 26px 22px 24px; }
  .seg button { font-size: .8rem; padding: 8px 2px; }
  .obj.glow { padding-left: 20px; }
}

/* ---------- reduced motion: static sky, no animation ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
