/* freshies website concept. Local staged design, 5 November 2026.
   No viewport-height units. No html/body/outer background: every ground is painted
   by a section from the brand variables below. One file, no @import, no file url(). */

body { margin: 0; }

.fr-site {
  /* Exact brand tokens (DESIGN.md) */
  --mint: #5EE6B8;
  --abyss: #082237;
  --tide: #0B374C;
  --foam: #D1ECF0;
  --spray: #EEF8FA;
  --surf: #1C8AB0;   /* wave detail only; never on Mint */
  --lagoon: #47A1BD; /* wave detail only; never on Mint */

  --font: "Outfit", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Brand pack easings and durations */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-move: cubic-bezier(.77, 0, .175, 1);
  --t-press: 160ms;
  --t-ui: 240ms;
  --t-reveal: 900ms;

  --header-h: 64px;
  --pad: 32px;
  --wrap: 1200px;

  /* Scene sizing: fixed px steps, see the min-height queries at the end */
  --stage-h: 440px;
  --travel: 2400px;
  --gauge-h: 78px;
  --mark-top: 52px;

  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--abyss);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.fr-site *, .fr-site *::before, .fr-site *::after { box-sizing: border-box; }
.fr-site [hidden] { display: none !important; }
/* :where keeps these resets at zero specificity so component classes always win */
:where(.fr-site) img { max-width: 100%; }
:where(.fr-site) button, :where(.fr-site) input { font: inherit; color: inherit; }
.fr-site :focus-visible { outline: 3px solid var(--focus, currentColor); outline-offset: 3px; }
/* Sections take focus only as the landing point of an in-page link */
.fr-site:focus, .fr-site section:focus, .fr-site section:focus-visible { outline: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--mint); color: var(--abyss); font-weight: 700;
  padding: 10px 16px; border-radius: 999px; text-decoration: none; --focus: var(--foam);
}
.skip:focus { top: 10px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  border: 1.5px solid transparent; background: transparent;
  font-weight: 700; font-size: 16px; line-height: 1.1; text-decoration: none; text-align: center;
  cursor: pointer;
  transition: transform var(--t-press) var(--ease-out), opacity var(--t-ui) var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .42; cursor: not-allowed; }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--wide { width: 100%; }
.btn--mint { background: var(--mint); color: var(--abyss); }
.btn--abyss { background: var(--abyss); color: var(--spray); }
.btn--light { background: var(--foam); color: var(--abyss); }
.btn--line { border-color: currentColor; color: inherit; }
@media (hover: hover) {
  .btn--mint:hover:not([disabled]), .btn--light:hover { background: var(--spray); }
  .btn--abyss:hover { background: var(--tide); }
  .btn--line:hover { background: rgba(127, 190, 200, .16); }
}

.textbtn {
  background: none; border: 0; padding: 10px 0; min-height: 44px; cursor: pointer;
  font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 4px;
}

.tag {
  border: 1.5px solid currentColor; border-radius: 999px; padding: 2px 10px;
  font-size: 12.5px; font-weight: 700; color: var(--mint);
}

.note { font-size: 14.5px; color: var(--muted); margin: 0; max-width: 46em; }
.lede {
  font-size: clamp(22px, 2.5vw, 31px); line-height: 1.24; font-weight: 600;
  letter-spacing: -.015em; margin: 0; max-width: 25em; text-wrap: balance;
}

/* ---------- Header ---------- */

.top {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--abyss); color: var(--foam); --focus: var(--mint);
}
.top__in { height: 100%; display: flex; align-items: center; gap: 28px; }
.top__brand { display: inline-flex; align-items: center; height: 44px; border-radius: 10px; }
.top__brand img { height: 56px; width: auto; display: block; }
.top__nav { display: flex; gap: 4px; margin-left: auto; }
.top__nav a {
  color: inherit; text-decoration: none; font-weight: 600; font-size: 15.5px;
  padding: 10px 14px; border-radius: 999px;
}
@media (hover: hover) { .top__nav a:hover { color: var(--mint); } }

/* ---------- Story (static first: this is what shows without the scene script
   and under reduced motion; the scroll scene is layered on below) ---------- */

.story { position: relative; background: var(--abyss); color: var(--spray); --focus: var(--mint); }
.story__stage { position: relative; isolation: isolate; }

.story__mark { position: relative; z-index: 2; background: var(--mint); padding: 56px 0 52px; }
.story__wordmark { display: block; width: 100%; max-width: 1136px; height: auto; }

.story__artifacts { display: none; }
.story__gauge { display: none; }

.story__chapters { position: relative; z-index: 3; background: var(--abyss); padding: 28px 0 40px; }
.chapters { list-style: none; margin: 0 auto; display: grid; }
.chapter {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px 64px; align-items: end;
  padding: 36px 0; border-top: 1px solid rgba(209, 236, 240, .18);
}
.chapter:first-child { border-top: 0; }
.chapter__say {
  margin: 0; font-weight: 800; letter-spacing: -.042em; line-height: .98; text-wrap: balance;
  font-size: clamp(32px, 4.6vw, 60px);
}
h1.chapter__say { font-size: min(clamp(40px, 6.4vw, 88px), calc(var(--stage-h) * .118)); }
.chapter__more p { margin: 0; font-size: 18px; line-height: 1.45; color: var(--foam); max-width: 26em; }
.chapter__more .btn { margin-top: 20px; }

/* ---------- Story, scroll scene (scroll-scene.js sets data-freshies-motion="scroll") ---------- */

.story[data-freshies-motion="scroll"] { height: calc(var(--stage-h) + var(--travel)); }
/* Page cannot scroll (auto-height preview frame): drop the runway, the depth control drives the scene */
.story[data-freshies-motion="scroll"][data-freshies-fit="frame"] { height: var(--stage-h); }

.story[data-freshies-motion="scroll"] .story__stage {
  position: sticky; top: var(--header-h); height: var(--stage-h); overflow: hidden;
}

/* Mint surface over the script's canvas. It thins as the camera goes down. */
.story[data-freshies-motion="scroll"] .story__stage::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 62%; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, var(--mint) 0%, var(--mint) 56%, rgba(94, 230, 184, 0) 100%);
  opacity: clamp(0, calc(1 - var(--freshies-depth, 0) * 3.4), 1);
}

.story[data-freshies-motion="scroll"] .story__mark {
  position: absolute; inset: 0 0 auto 0; background: none; padding: var(--mark-top) 0 0; pointer-events: none;
}
/* The script owns translate, scale, rotate, opacity, transition and animation on this image.
   The rim light below is the only extra: Mint glow that grows with depth so the Abyss mark
   keeps its outline in dark water. */
.story[data-freshies-motion="scroll"] .story__wordmark {
  width: min(100%, calc(var(--stage-h) * 1.62));
  filter: drop-shadow(0 0 calc(var(--freshies-depth, 0) * 16px) rgba(94, 230, 184, calc(var(--freshies-depth, 0) * 1.7)));
}

.story[data-freshies-motion="scroll"] .story__artifacts {
  display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none;
}
.story__artifacts .wrap { position: relative; height: 100%; }
.artifact {
  position: absolute; left: var(--pad); top: 25%; margin: 0; white-space: nowrap;
  opacity: 0; transform: translateY(28px);
  transition: opacity var(--t-ui) var(--ease-out), transform var(--t-reveal) var(--ease-out);
}
.artifact--inbox {
  font-family: var(--mono); font-weight: 700; color: var(--mint); letter-spacing: -.02em; line-height: 1;
  font-size: min(clamp(64px, 17vw, 220px), calc(var(--stage-h) * .3));
}
.artifact--shop {
  font-weight: 800; color: var(--foam); letter-spacing: -.055em; line-height: 1;
  font-size: min(clamp(72px, 19vw, 260px), calc(var(--stage-h) * .34));
}
.artifact--vault {
  font-family: var(--mono); font-weight: 700; color: var(--mint); line-height: 1; top: 32%;
  font-size: min(clamp(20px, 5.6vw, 76px), calc(var(--stage-h) * .12));
}
[data-freshies-chapter="inbox"] .artifact--inbox,
[data-freshies-chapter="shop"] .artifact--shop,
[data-freshies-chapter="vault"] .artifact--vault,
[data-freshies-chapter="release"] .artifact--vault {
  opacity: 1; transform: none;
  transition: opacity var(--t-reveal) var(--ease-out), transform var(--t-reveal) var(--ease-out);
}

.story[data-freshies-motion="scroll"] .story__chapters {
  position: absolute; left: 0; right: 0; bottom: var(--gauge-h);
  padding: 120px 0 26px;
  background: linear-gradient(to top, rgba(8, 34, 55, .9) 0%, rgba(8, 34, 55, .62) 55%, rgba(8, 34, 55, 0) 100%);
}
.story[data-freshies-motion="scroll"] .chapter {
  grid-area: 1 / 1; align-self: end; padding: 0; border: 0;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity var(--t-ui) var(--ease-out), transform var(--t-ui) var(--ease-out), visibility 0s linear var(--t-ui);
}
.story[data-freshies-motion="scroll"][data-freshies-chapter="surface"] .chapter--surface,
.story[data-freshies-motion="scroll"][data-freshies-chapter="inbox"] .chapter--inbox,
.story[data-freshies-motion="scroll"][data-freshies-chapter="shop"] .chapter--shop,
.story[data-freshies-motion="scroll"][data-freshies-chapter="vault"] .chapter--vault,
.story[data-freshies-motion="scroll"][data-freshies-chapter="release"] .chapter--vault {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 480ms var(--ease-out), transform 480ms var(--ease-out), visibility 0s;
}
.story[data-freshies-motion="scroll"] h2.chapter__say {
  font-size: min(clamp(34px, 5.4vw, 76px), calc(var(--stage-h) * .105));
}

/* Depth control */
.story[data-freshies-motion="scroll"] .story__gauge {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  height: var(--gauge-h); background: var(--abyss);
}
.gauge {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 4ch; gap: 20px; align-items: start;
  padding-top: 12px; position: relative;
}
.gauge::before {
  content: ""; position: absolute; left: var(--pad); right: var(--pad); top: 0;
  border-top: 1px solid rgba(209, 236, 240, .2);
}
.gauge__track, .inbox__boxes { min-width: 0; }
.gauge__label, .gauge__readout {
  font-size: 13.5px; font-weight: 600; color: var(--foam); line-height: 24px;
}
.gauge__readout { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gauge__range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 24px; margin: 0;
  background: transparent; cursor: pointer; border-radius: 999px;
}
.gauge__range::-webkit-slider-runnable-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(to right, var(--mint) calc(var(--freshies-progress, 0) * 100%), rgba(209, 236, 240, .32) 0);
}
.gauge__range::-moz-range-track {
  height: 2px; border-radius: 2px;
  background: linear-gradient(to right, var(--mint) calc(var(--freshies-progress, 0) * 100%), rgba(209, 236, 240, .32) 0);
}
.gauge__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -8px;
  border-radius: 50%; background: var(--mint); border: 3px solid var(--abyss); box-shadow: 0 0 0 1.5px var(--mint);
}
.gauge__range::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: var(--mint);
  border: 3px solid var(--abyss); box-shadow: 0 0 0 1.5px var(--mint);
}
.gauge__ticks { display: grid; grid-template-columns: 52fr 24fr 14fr 10fr; padding: 0 9px; }
.tick {
  background: none; border: 0; padding: 4px 0 6px; cursor: pointer; text-align: left; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: rgba(209, 236, 240, .74); border-radius: 6px;
  transition: color var(--t-ui) var(--ease-out);
}
.tick--vault { justify-self: end; }

/* Touch: the slider and the depth stops get finger-sized hit areas */
@media (max-width: 699.98px), (pointer: coarse) {
  .fr-site { --gauge-h: 98px; }
  .gauge__range { height: 40px; }
  .gauge__label, .gauge__readout { line-height: 40px; }
  .tick { min-height: 40px; min-width: 44px; padding: 8px 0 10px; }
  .tick--vault { text-align: right; }
}
[data-freshies-chapter="surface"] .tick--surface,
[data-freshies-chapter="descent"] .tick--surface,
[data-freshies-chapter="inbox"] .tick--inbox,
[data-freshies-chapter="shop"] .tick--shop,
[data-freshies-chapter="vault"] .tick--vault,
[data-freshies-chapter="release"] .tick--vault { color: var(--mint); }

/* ---------- Bands and the rail ---------- */

.band { position: relative; padding: 120px 0; scroll-margin-top: var(--header-h); }
.band--abyss { background: var(--abyss); color: var(--spray); --muted: rgba(209, 236, 240, .8); --rule: rgba(209, 236, 240, .2); --focus: var(--mint); }
.band--tide  { background: var(--tide);  color: var(--spray); --muted: rgba(209, 236, 240, .84); --rule: rgba(209, 236, 240, .22); --focus: var(--mint); }
.band--mint  { background: var(--mint);  color: var(--abyss); --muted: rgba(8, 34, 55, .82); --rule: rgba(8, 34, 55, .24); --focus: var(--abyss); }
.band--spray { background: var(--spray); color: var(--abyss); --muted: rgba(8, 34, 55, .76); --rule: rgba(8, 34, 55, .18); --focus: var(--abyss); }

/* Wave line where the water changes colour */
.band--mint::before, .band--tide::before, .band--spray::before {
  content: ""; position: absolute; left: 0; right: 0; top: 28px; height: 24px; pointer-events: none;
  background-repeat: repeat-x; background-size: 240px 24px;
}
.band--mint::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='24' viewBox='0 0 240 24'%3E%3Cpath d='M0 12c30 0 30-8 60-8s30 8 60 8 30-8 60-8 30 8 60 8' fill='none' stroke='%23082237' stroke-opacity='.3' stroke-width='1.5'/%3E%3C/svg%3E"); }
.band--tide::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='24' viewBox='0 0 240 24'%3E%3Cpath d='M0 12c30 0 30-8 60-8s30 8 60 8 30-8 60-8 30 8 60 8' fill='none' stroke='%2347A1BD' stroke-opacity='.55' stroke-width='1.5'/%3E%3C/svg%3E"); }
.band--spray::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='24' viewBox='0 0 240 24'%3E%3Cpath d='M0 12c30 0 30-8 60-8s30 8 60 8 30-8 60-8 30 8 60 8' fill='none' stroke='%231C8AB0' stroke-opacity='.45' stroke-width='1.5'/%3E%3C/svg%3E"); }

.rail { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.rail__head { position: sticky; top: calc(var(--header-h) + 40px); }
.rail__title {
  margin: 0; font-size: clamp(40px, 4.6vw, 64px); font-weight: 800; letter-spacing: -.045em; line-height: .95;
}
.rail__note { margin: 18px 0 0; font-size: 15px; color: var(--muted); max-width: 18em; }
.rail__cart { display: block; width: 120px; height: auto; margin-top: 22px; }
.rail__body { min-width: 0; }

/* ---------- Inbox ---------- */

.inbox {
  display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 36px; align-items: start;
  margin-top: 52px; padding-top: 32px; border-top: 1px solid var(--rule);
}
.inbox__h { margin: 0 0 10px; font-size: 15px; font-weight: 700; color: var(--muted); }
.boxes { list-style: none; margin: 0; padding: 0; }
.box {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center;
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 14px 14px; border-top: 1px solid var(--rule); border-radius: 0;
  transition: background-color var(--t-ui) var(--ease-out);
}
.boxes li:first-child .box { border-top-color: transparent; }
.box[aria-pressed="true"] { background: var(--tide); border-radius: 14px; border-top-color: transparent; box-shadow: inset 3px 0 0 var(--mint); }
.boxes li:has(.box[aria-pressed="true"]) + li .box { border-top-color: transparent; }
.box__addr { font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; grid-column: 1 / -1; }
.box__meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip { border: 1px solid currentColor; border-radius: 999px; padding: 0 8px; font-size: 12.5px; font-weight: 700; line-height: 20px; }
.box__unread { background: var(--mint); color: var(--abyss); border-radius: 999px; padding: 0 9px; font-size: 12.5px; font-weight: 800; line-height: 22px; }

.follow { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 12px; font-weight: 600; font-size: 15.5px; cursor: pointer; }
.follow input, .ack input { width: 20px; height: 20px; margin: 0; accent-color: var(--mint); flex: none; }
.inbox__hint { margin: 8px 0 0; font-size: 14px; color: var(--muted); }

.inbox__main { min-width: 0; display: grid; gap: 20px; }

.watch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; }
.watch__addr { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.watch__state { margin: 0; grid-column: 1; font-size: 15px; font-weight: 600; color: var(--mint); font-variant-numeric: tabular-nums; }
.watch__state::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px;
  background: currentColor; vertical-align: 1px;
}
.watch__state[data-live="true"]::before { animation: fr-pulse 1.8s var(--ease-move) infinite; }
.watch__state[data-live="false"] { color: var(--muted); }
.watch__state[data-live="false"]::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.watch__actions { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@keyframes fr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* The code: first thing you see, on Mint */
.code {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: end;
  background: var(--mint); color: var(--abyss); border-radius: 22px; padding: 22px 26px 24px; --focus: var(--abyss);
}
.code__from { grid-column: 1 / -1; margin: 0; font-size: 14.5px; font-weight: 600; }
.code__value {
  margin: 0; font-family: var(--mono); font-weight: 700; line-height: 1; letter-spacing: .01em;
  font-size: clamp(42px, 6.4vw, 78px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.code__actions { display: flex; gap: 8px; }
.code[data-state="none"], .code[data-state="empty"] {
  background: none; color: var(--spray); box-shadow: inset 0 0 0 1.5px var(--rule); --focus: var(--mint);
}
.code[data-state="none"] .code__value, .code[data-state="empty"] .code__value {
  font-family: var(--font); font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; padding: 6px 0 2px;
}
/* Held mail: the dots stay on one line and the unlock button drops underneath */
.code[data-state="locked"] { grid-template-columns: minmax(0, 1fr); }
.code[data-state="locked"] .code__value { white-space: nowrap; overflow: hidden; font-size: clamp(34px, 4.4vw, 54px); letter-spacing: -.06em; padding: 4px 0; }
.code[data-state="locked"] .code__actions { margin-top: 12px; }
.code.is-new { animation: fr-arrive var(--t-reveal) var(--ease-out); }
@keyframes fr-arrive { from { opacity: .35; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

.reader { min-width: 0; }
.reader__nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.arrow {
  width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; cursor: pointer;
  background: none; border: 1.5px solid var(--rule); border-radius: 50%;
  transition: transform var(--t-press) var(--ease-out);
}
.arrow:active { transform: scale(.94); }
.arrow[aria-disabled="true"] { opacity: .35; cursor: not-allowed; }
.arrow[aria-disabled="true"]:active { transform: none; }
.reader__count { margin: 0; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 7.5em; text-align: center; }
.newmail {
  margin-left: auto; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--mint); color: var(--abyss); font-weight: 800; font-size: 14px;
}

.reader__paper { background: var(--spray); color: var(--abyss); border-radius: 22px; padding: 26px 28px; --focus: var(--abyss); --rule: rgba(8, 34, 55, .16); }
.reader__subject { margin: 0 0 14px; font-size: 23px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.reader__meta { margin: 0; font-size: 14.5px; }
.reader__meta div { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; padding: 2px 0; }
.reader__meta dt { color: rgba(8, 34, 55, .72); }
.reader__meta dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.reader__body {
  margin-top: 16px; padding: 16px 12px 4px 0; border-top: 1px solid var(--rule);
  max-height: 300px; overflow: auto; font-size: 16.5px; line-height: 1.58; overflow-wrap: anywhere;
}
.reader__body p { margin: 0 0 12px; }
.reader__link {
  display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap;
  margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14.5px;
}
.reader__link p { margin: 0; overflow-wrap: anywhere; min-width: 0; flex: 1 1 220px; }

.inbox__controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.inbox__status { margin: 0; font-size: 14.5px; color: var(--muted); flex: 1 1 200px; }

/* ---------- Shop ---------- */

.shelf { list-style: none; margin: 56px 0 0; padding: 0; border-bottom: 1px solid var(--rule); }
.shelf__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--rule);
}
.shelf__row--open { display: block; padding: 30px 0 40px; }
.shelf__line { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.shelf__name {
  margin: 0; font-weight: 800; letter-spacing: -.04em; line-height: 1;
  font-size: clamp(28px, 4vw, 50px); color: rgba(8, 34, 55, .58);
}
.shelf__name--in { font-size: clamp(60px, 10vw, 128px); letter-spacing: -.055em; line-height: .88; color: var(--abyss); }
.stock { margin: 0; font-size: 15px; font-weight: 600; white-space: nowrap; }
.stock--in { background: var(--abyss); color: var(--mint); border-radius: 999px; padding: 6px 14px; font-weight: 700; }

.tiers fieldset { border: 0; margin: 30px 0 0; padding: 0; min-width: 0; }
.tier {
  position: relative; display: grid; grid-template-columns: 22px 76px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center;
  padding: 17px 20px; cursor: pointer; border-top: 1px solid var(--rule);
  transition: background-color var(--t-ui) var(--ease-out), color var(--t-ui) var(--ease-out);
}
.tier input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tier__icon { display: inline-grid; place-items: center; }
.tier__name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.tier__what { font-size: 16px; }
.tier__price { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tier:has(input:checked) { background: var(--abyss); color: var(--spray); border-radius: 16px; border-top-color: transparent; }
.tier:has(input:checked) .tier__price { color: var(--mint); }
.tier:has(input:checked) + .tier { border-top-color: transparent; }
.tier:has(input:focus-visible) { outline: 3px solid var(--abyss); outline-offset: 3px; }

.tier-detail { margin: 26px 0 0; padding-left: 20px; border-left: 3px solid var(--abyss); font-size: 18px; line-height: 1.45; max-width: 34em; min-height: 4.35em; }
.tiers__go { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 28px; }

/* ---------- Vault ---------- */

.keyline {
  display: flex; flex-wrap: wrap; gap: .1em .42em; margin: 56px 0 0;
  font-family: var(--mono); font-weight: 700; line-height: 1.1; color: var(--mint);
  font-size: clamp(24px, 4.6vw, 54px);
}
.keyline span + span { color: var(--foam); }
.keyline__cap { margin: 12px 0 0; font-size: 14.5px; color: var(--muted); }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 56px 0 0; }
.facts--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.facts div { border-top: 1px solid var(--rule); padding-top: 16px; }
.facts dt { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.facts dd { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.warn {
  margin: 44px 0; padding: 20px 24px; border-left: 4px solid var(--mint);
  background: rgba(8, 34, 55, .45); border-radius: 0 16px 16px 0; font-size: 18px; max-width: 40em;
}
.warn strong { color: var(--mint); }

.vault__go { display: flex; flex-wrap: wrap; gap: 12px; margin: 44px 0 16px; }

/* ---------- About this page ---------- */

.ledger { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; margin-top: 52px; }
.ledger h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { padding: 12px 0; border-top: 1px solid var(--rule); font-size: 16px; }
.colophon { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--rule); }
.colophon img { width: 190px; height: auto; display: block; }
.colophon p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------- Sheets (native dialog) ---------- */

.payment-choice { border:0; padding:0; margin:20px 0; }
.payment-choice legend { font-weight:700; margin-bottom:10px; }
.payment-choice label { display:flex; align-items:center; gap:10px; min-height:44px; padding:8px 0; border-top:1px solid rgba(209,236,240,.2); }
.payment-choice input { width:18px; height:18px; accent-color:var(--mint); margin:0; }
.coin-choice { margin-bottom:20px; }
.coin-choice select { display:block; width:100%; min-height:48px; padding:10px 12px; border:1px solid rgba(209,236,240,.3); border-radius:12px; background:var(--tide); color:var(--spray); font:inherit; }

.sheet {
  width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto;
  padding: 24px 28px 26px; border: 1px solid rgba(209, 236, 240, .22); border-radius: 26px;
  background: var(--abyss); color: var(--spray);
  --muted: rgba(209, 236, 240, .82); --rule: rgba(209, 236, 240, .2); --focus: var(--mint);
}
.sheet::backdrop { background: rgba(8, 34, 55, .72); }
.sheet[open] { animation: fr-sheet var(--t-ui) var(--ease-out); }
@keyframes fr-sheet { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* Auto-height preview frames: the script anchors the sheet near its trigger instead of the middle of a very tall frame */
.sheet.is-framed { position: absolute; inset: auto 0 auto 0; top: var(--sheet-top, 24px); margin: 0 auto; max-height: none; }

.sheet__head { display: flex; align-items: center; gap: 12px; }
.sheet__head img { height: 21px; width: auto; display: block; }
.sheet__x {
  margin: -6px -10px -6px auto; width: 44px; height: 44px; display: inline-grid; place-items: center;
  background: none; border: 0; border-radius: 50%; cursor: pointer;
}
.sheet__title { margin: 22px 0 14px; font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; outline: none; }
/* headings that only receive focus from script, so a screen reader starts in the right place */
.fr-site .sheet__title:focus, .fr-site .sheet__title:focus-visible,
.fr-site [data-vt="pair-who"]:focus, .fr-site [data-vt="pair-who"]:focus-visible { outline: none; }
.sheet [data-vt="pair-who"] { font-weight: 600; margin-bottom: 8px; }
.sheet p { margin: 0 0 14px; }
.sheet__small { font-size: 14.5px; color: var(--muted); }
.sheet .btn--wide { margin: 4px 0 14px; }
.sheet__status { background: var(--tide); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.sheet__row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; align-items: center; }
.sheet__alt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 20px; border-top: 1px solid var(--rule); padding-top: 4px; }
.sheet__aside { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.sheet__aside h3, .sheet__sec h3 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.sheet__aside p { font-size: 14.5px; color: var(--muted); margin: 0; }
.sheet__sec { border-top: 1px solid var(--rule); padding: 16px 0 6px; }
.sheet__keep { margin: 20px 0 0 !important; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--muted); }
.sheet__keep strong { color: var(--mint); }

.order { margin: 0 0 18px; }
.order div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--rule); }
.order div:last-child { border-bottom: 1px solid var(--rule); }
.order dt { color: var(--muted); }
.order dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- Access (vault key entry, creation, Telegram linking). Restyle here without touching the rest. ---------- */

.field { display: block; font-weight: 700; margin: 0 0 8px; }
.keyfield {
  display: flex; align-items: stretch; min-width: 0; background: var(--tide);
  border: 1.5px solid rgba(209, 236, 240, .5); border-radius: 14px; margin-bottom: 12px;
}
.keyfield:focus-within { border-color: var(--mint); }
.keyfield__input {
  flex: 1 1 auto; min-width: 0; width: 100%; background: none; border: 0; border-radius: 12px 0 0 12px;
  padding: 14px 16px; font-family: var(--mono); font-size: 17px; letter-spacing: .02em; color: var(--spray);
}
.keyfield__input.is-masked { -webkit-text-security: disc; text-security: disc; }
.keyfield__reveal {
  flex: none; min-width: 68px; background: none; border: 0; border-left: 1.5px solid rgba(209, 236, 240, .3);
  border-radius: 0 12px 12px 0; font-weight: 700; font-size: 14.5px; cursor: pointer; padding: 0 14px;
}
.field__error { border: 1.5px solid var(--foam); border-radius: 12px; padding: 10px 14px; font-size: 15px; font-weight: 600; }

.keybox__label, .pair__label { margin: 0 0 8px !important; font-weight: 700; font-size: 15px; }
.keybox {
  background: var(--mint); color: var(--abyss); border-radius: 16px; padding: 20px;
  font-family: var(--mono); font-weight: 700; font-size: clamp(17px, 4.6vw, 23px); line-height: 1.35;
  overflow-wrap: anywhere; user-select: all; --focus: var(--foam);
}
.ack { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 14px; cursor: pointer; }
.ack input { margin-top: 3px; }
.leave { border: 1.5px solid var(--foam); border-radius: 14px; padding: 14px 16px 2px; margin-top: 6px; }

.vaultid { font-size: 15px; }
.vaultid strong { font-family: var(--mono); margin: 0 10px 0 4px; }
.vaultid span { color: var(--muted); }
.vaultlist, .links, .switch { list-style: none; margin: 0 0 10px; padding: 0; }
.vaultlist li, .links li, .switch li {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px;
  padding: 10px 0; border-top: 1px solid var(--rule); font-size: 15.5px;
}
.vaultlist li:first-child, .links li:first-child, .switch li:first-child { border-top: 0; }
.vaultlist span:first-child, .links span:first-child { font-weight: 700; overflow-wrap: anywhere; min-width: 0; }
.vaultlist small, .links small { display: block; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.switch { display: flex; flex-wrap: wrap; gap: 8px; }
.switch li { border: 0; padding: 0; }
.switch button {
  font-family: var(--mono); font-size: 14.5px; font-weight: 700; min-height: 40px; padding: 0 14px;
  background: none; border: 1.5px solid var(--rule); border-radius: 999px; cursor: pointer;
}
.switch button[aria-pressed="true"] { background: var(--mint); color: var(--abyss); border-color: var(--mint); }
.pair { background: var(--tide); border-radius: 16px; padding: 16px 18px 4px; margin: 12px 0 14px; }
.pair__code { margin: 0 0 8px !important; font-family: var(--mono); font-weight: 700; font-size: 34px; letter-spacing: .08em; color: var(--mint); line-height: 1.1; }

/* ---------- Narrow layouts ---------- */

@media (max-width: 1099.98px) {
  .inbox { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 959.98px) {
  .rail { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .rail__head { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 20px; }
  .rail__title { grid-column: 1; }
  .rail__note { grid-column: 1; margin-top: 12px; max-width: 30em; }
  .rail__cart { grid-column: 2; grid-row: 1 / span 2; width: 104px; margin: 0; }
  .band { padding: 96px 0; }
}

@media (max-width: 699.98px) {
  .fr-site { --pad: 20px; --header-h: 56px; --travel: 1900px; --gauge-h: 98px; --mark-top: 36px; font-size: 16.5px; }
  .top__nav { display: none; }
  .top__cta { margin-left: auto; }
  .band { padding: 76px 0; }
  .band--mint::before, .band--tide::before, .band--spray::before { top: 20px; }

  .story__mark { padding: 40px 0 36px; }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 28px 0; }
  h1.chapter__say { font-size: min(44px, calc(var(--stage-h) * .085)); }
  .chapter__more p { font-size: 16px; }
  .chapter__more .btn { margin-top: 16px; }
  .story[data-freshies-motion="scroll"] .story__stage::before { height: 42%; }
  .story[data-freshies-motion="scroll"] .story__chapters { padding: 80px 0 18px; }
  .story[data-freshies-motion="scroll"] h2.chapter__say { font-size: min(38px, calc(var(--stage-h) * .075)); }
  .artifact { top: 22%; }
  .artifact--vault { top: 28%; }
  .gauge { grid-template-columns: minmax(0, 1fr) 4ch; gap: 12px; padding-top: 8px; }
  .gauge__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .gauge__ticks { display: flex; justify-content: space-between; padding: 0; }
  .tick { font-size: 12.5px; }

  .inbox { margin-top: 40px; padding-top: 24px; }
  .watch { grid-template-columns: minmax(0, 1fr); }
  .watch__actions { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 8px; }
  .code { grid-template-columns: minmax(0, 1fr); padding: 20px; border-radius: 20px; }
  .code__actions { margin-top: 12px; flex-wrap: wrap; }
  .code__actions .btn { flex: 1 1 auto; }
  .reader__paper { padding: 22px 20px; border-radius: 20px; }
  .reader__count { min-width: 0; flex: 1; }

  .shelf { margin-top: 44px; }
  .tier { grid-template-columns: 22px minmax(0, 1fr) auto; padding: 15px 16px; }
  .tier__what { grid-column: 2 / -1; grid-row: 2; font-size: 15px; }
  .tier__price { grid-column: 3; grid-row: 1; }
  .tier-detail { font-size: 17px; min-height: 0; }

  .facts, .facts--two, .ledger { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .facts--two { margin-top: 0; }
  .ledger { gap: 36px; }
  .warn { margin: 36px 0; padding: 18px 18px; font-size: 17px; }
  .vault__go .btn { flex: 1 1 100%; }

  .sheet { padding: 20px 20px 22px; border-radius: 22px; }
  .sheet__title { font-size: 27px; }
  .sheet__row .btn { flex: 1 1 auto; }
}

/* ---------- Stage height: fixed px steps keyed to the window height, never viewport units ---------- */

@media (min-height: 540px) { .fr-site { --stage-h: 476px; } }
@media (min-height: 600px) { .fr-site { --stage-h: 536px; } }
@media (min-height: 660px) { .fr-site { --stage-h: 596px; } }
@media (min-height: 720px) { .fr-site { --stage-h: 656px; } }
@media (min-height: 780px) { .fr-site { --stage-h: 716px; } }
@media (min-height: 840px) { .fr-site { --stage-h: 776px; } }
@media (min-height: 880px) { .fr-site { --stage-h: 812px; } }
@media (min-height: 920px) { .fr-site { --stage-h: 848px; } }
/* A window this tall is almost always an auto-height preview frame, not a monitor */
@media (min-height: 1600px) { .fr-site { --stage-h: 700px; } }

/* ---------- Reduced motion ---------- */

.fr-site .deposit-invoice { border-block: 1px solid rgba(94,230,184,.25); padding-block: 18px; margin-block: 18px; }
.fr-site .deposit-invoice > div { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; flex-wrap: wrap; }
.fr-site .deposit-invoice strong { overflow-wrap: anywhere; }
.fr-site .deposit-invoice label { display: block; margin-top: 18px; margin-bottom: 6px; }
.fr-site .deposit-invoice input { box-sizing: border-box; width: 100%; min-width: 0; padding: 12px; font-family: monospace; }
.fr-site .deposit-invoice[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .fr-site *, .fr-site *::before, .fr-site *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important;
  }
  .fr-site .btn:active, .fr-site .arrow:active { transform: none; }
}
