/* Origin — site styles
   Layout concept: a provenance archive. Charcoal ground, off-white paper records,
   orange "thread" that connects work → source → creator. Mono for record metadata. */
:root {
  color-scheme: dark;
  --ink: #121211;          /* page ground */
  --ink-2: #191917;        /* raised band */
  --ink-3: #22211e;        /* inputs, cards */
  --line: #33322d;
  --line-strong: #4a4840;
  --paper: #efebe2;        /* off-white */
  --paper-2: #e3ded2;
  --paper-ink: #161513;
  --paper-muted: #6c685d;
  --fg: #efebe2;
  --muted: #a5a194;
  --orange: #ff5b22;
  --orange-hi: #ff7a48;
  --orange-ink: #ff9a70;   /* orange text on charcoal */

  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --gutter: clamp(18px, 4vw, 56px);
  --radius: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, dl, dd, blockquote, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
::selection { background: var(--orange); color: var(--paper-ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--paper); color: var(--paper-ink); padding: 10px 14px; border-radius: 6px; font-weight: 600; }
.skip:focus { top: 12px; }
.mono { font-family: var(--mono); }

.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- shared type ---------- */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-ink);
  display: flex; align-items: center; gap: 10px;
}
.kicker::before { content: ''; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; flex: none; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
h2 {
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.02;
  font-weight: 650;
  font-variation-settings: 'wdth' 108;
  letter-spacing: -.035em;
}
h2 em { font-size: 1.08em; letter-spacing: -.02em; color: var(--orange); }
h3 { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; font-variation-settings: 'wdth' 104; }
.field-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--paper); --fg-btn: var(--paper-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--bg); color: var(--fg-btn);
  font-family: var(--display); font-weight: 600; font-size: 15.5px; letter-spacing: -.005em;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn .arrow { transition: transform .25s var(--ease); font-family: var(--mono); font-weight: 400; }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }
.btn-orange { --bg: var(--orange); --fg-btn: var(--paper-ink); }
.btn-orange:hover { --bg: var(--orange-hi); }
.btn-light:hover { --bg: #fff; }
.btn-ghost { --bg: transparent; --fg-btn: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 17px; }
.link-quiet {
  font-weight: 500; color: var(--fg);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color .2s, background-size .3s var(--ease);
}
.link-quiet:hover { color: var(--orange-ink); }
.link-quiet.small { font-size: 14px; color: var(--muted); }
.link-quiet.small:hover { color: var(--fg); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted);
  white-space: nowrap;
}
.pill-live { border-color: var(--orange); color: var(--orange-ink); }
.pill-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.pill-soon { border-color: var(--orange); color: var(--orange-ink); }
.pill-draft { border-color: var(--orange); color: var(--orange-ink); }

/* ---------- brand ---------- */
.ring { width: 22px; height: 22px; border: 6px solid var(--orange); border-radius: 50%; display: inline-block; flex: none; }
.ring-sm { width: 12px; height: 12px; border-width: 3.5px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 750; font-size: 27px; letter-spacing: -.055em; line-height: 1;
  font-variation-settings: 'wdth' 100;
}
.wordmark-sm { font-size: 22px; }
.wordmark-sm .ring { width: 18px; height: 18px; border-width: 5px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(18 18 17 / .94);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 72px; display: flex; align-items: center; gap: 28px; }
.site-nav { display: flex; gap: 26px; margin-left: auto; font-size: 14.5px; color: var(--muted); }
.site-nav a { transition: color .2s; }
.site-nav a:hover { color: var(--fg); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); place-items: center; }
.menu-lines, .menu-lines::before, .menu-lines::after { display: block; width: 16px; height: 1.5px; background: var(--fg); position: relative; transition: transform .25s var(--ease), background-color .2s; }
.menu-lines::before, .menu-lines::after { content: ''; position: absolute; left: 0; }
.menu-lines::before { top: -5px; }
.menu-lines::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-lines::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-lines::after { transform: translateY(-5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 96px) clamp(56px, 8vw, 112px);
}
.hero h1 {
  margin: 22px 0 24px;
  font-size: clamp(50px, 6.6vw, 98px);
  line-height: .9;
  font-weight: 700;
  font-variation-settings: 'wdth' 112;
  letter-spacing: -.05em;
}
.hero h1 em { color: var(--orange); font-size: 1.1em; letter-spacing: -.03em; font-variation-settings: normal; }
.lede { max-width: 33em; font-size: clamp(16.5px, 1.35vw, 19px); line-height: 1.55; color: var(--muted); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 34px; }

.hero-visual { position: relative; padding: 10px 6px 0; }
.sheet {
  position: absolute; inset: 22px -6px 34px 30px;
  background: var(--paper-2); opacity: .16; border-radius: var(--radius);
  transform: rotate(4.5deg);
}
.record-hero { transform: rotate(-1.6deg); transition: transform .5s var(--ease); animation: settle 1s var(--ease) both; }
.hero-visual:hover .record-hero { transform: rotate(0deg) translateY(-4px); }
.visual-note { margin-top: 18px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .02em; text-align: center; }
@keyframes settle { from { transform: rotate(-5deg) translateY(16px); } to { transform: rotate(-1.6deg); } }

/* ---------- record (signature component) ---------- */
.record {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: var(--radius);
  padding: clamp(18px, 2.2vw, 26px);
  box-shadow: 0 1px 0 rgb(255 255 255 / .5) inset, 0 30px 60px -20px rgb(0 0 0 / .65);
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  overflow-wrap: anywhere;
}
.record-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid #cfc9bb;
}
.record-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.record-status {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--paper-muted); color: var(--paper-muted);
}
.record-status.status-draft { border-color: var(--orange); color: #c43e0c; }
.record-work { display: grid; grid-template-columns: minmax(96px, 38%) minmax(0, 1fr); gap: 18px; align-items: end; }
.record-art {
  aspect-ratio: 1; max-width: 100%; border-radius: 6px; overflow: hidden;
  background: var(--orange); position: relative;
  display: grid; place-items: center;
}
.record-art svg, .record-art img { width: 100%; height: 100%; object-fit: cover; }
.art-initials { font-family: var(--display); font-weight: 800; font-variation-settings: 'wdth' 118; font-size: clamp(44px, 6vw, 72px); letter-spacing: -.06em; line-height: 1; color: var(--paper-ink); }
.record-title .field-label { color: var(--paper-muted); margin-bottom: 6px; }
.record-name {
  font-family: var(--display); font-weight: 700; font-variation-settings: 'wdth' 110;
  font-size: clamp(26px, 2.6vw, 36px); line-height: 1; letter-spacing: -.04em;
  text-wrap: balance;
}
.record-meta { display: block; margin-top: 8px; font-size: 13px; color: var(--paper-muted); }

.record-thread { position: relative; margin: 22px 0 0; padding-left: 30px; display: grid; gap: 18px; }
.record-thread::before {
  content: ''; position: absolute; left: 6px; top: -22px; bottom: 8px; width: 2px;
  background: var(--orange); transform-origin: top;
}
.record-hero .record-thread::before { animation: draw 1.1s .35s var(--ease) both; }
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.record-thread li { position: relative; }
.record-thread .node {
  position: absolute; left: -30px; top: 1px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 3.5px solid var(--orange);
}
.record-thread .field-label { color: var(--paper-muted); }
.field-value { display: block; margin-top: 3px; font-weight: 600; font-size: 17px; line-height: 1.3; }
.field-value.mono { font-family: var(--mono); font-size: 14.5px; font-weight: 500; }
.field-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--paper-muted); }
.record-quote {
  margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.3; color: #2c2a25;
  white-space: pre-line;
}
.record-foot {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 22px; padding-top: 14px; border-top: 1px dashed #bdb7a8;
  font-size: 13px; font-weight: 500;
}
.record-foot .field-label { color: var(--paper-muted); font-size: 10px; margin-bottom: 2px; }
.is-empty { color: #a39e90 !important; font-weight: 500; }

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 24px 64px; }
.section-head.split > div { display: grid; gap: 18px; }
.section-intro { color: var(--muted); max-width: 34em; font-size: 16.5px; }

/* how */
.how { background: var(--ink-2); border-block: 1px solid var(--line); }
.thread-steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 34px; }
.thread-steps::before { content: ''; position: absolute; top: 6px; left: 7px; right: 0; height: 2px; background: linear-gradient(90deg, var(--orange) 0 66%, var(--line) 66%); }
.thread-steps li { position: relative; }
.thread-steps .node { position: absolute; top: -35px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); border: 4px solid var(--orange); }
.thread-steps .field-label { color: var(--orange-ink); margin-bottom: 14px; }
.thread-steps h3 { font-size: clamp(22px, 2vw, 27px); margin-bottom: 10px; }
.thread-steps p { color: var(--muted); max-width: 30em; }
.how-note { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; max-width: 48em; }

/* categories */
.categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.categories li {
  position: relative; padding: 30px 28px 32px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background-color .3s var(--ease);
}
.categories svg { width: 30px; height: 30px; fill: none; stroke: var(--fg); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 40px; transition: stroke .25s, transform .35s var(--ease); }
.categories h3 { margin-bottom: 6px; }
.categories p { color: var(--muted); font-size: 15px; }
.categories li:hover { background: var(--ink-2); }
.categories li:hover svg { stroke: var(--orange); transform: translateY(-3px); }

/* tokens */
.tokens { background: var(--ink-2); border-block: 1px solid var(--line); }
.token-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.token-card { border-radius: var(--radius); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; }
.token-card h3 { font-size: clamp(26px, 2.6vw, 34px); font-variation-settings: 'wdth' 110; letter-spacing: -.035em; }
.token-card > p { max-width: 34em; }
.token-project { background: var(--paper); color: var(--paper-ink); }
.token-project .field-label { color: #c43e0c; }
.token-project > p { color: #3d3a33; }
.token-creator { border: 1px solid var(--line-strong); }
.token-creator .field-label { color: var(--orange-ink); }
.token-creator > p { color: var(--muted); }
.token-facts { margin-top: auto; padding-top: 10px; display: grid; gap: 0; }
.token-facts div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.token-project .token-facts div { border-top-color: #cfc9bb; }
.token-facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.token-project dt { color: var(--paper-muted); }
.token-creator dt { color: var(--muted); }

/* roadmap */
.stages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stage { padding: 26px 24px 28px; border-radius: var(--radius); border: 1px solid var(--line); display: grid; gap: 22px; align-content: start; }
.stage.is-live { border-color: var(--orange); }
.stage .pill { justify-self: start; }
.stage h3 { margin-bottom: 8px; }
.stage p { color: var(--muted); font-size: 15px; }
.funding-note { margin-top: 28px; color: var(--muted); font-size: 15px; max-width: 52em; }
.funding-note strong { color: var(--fg); font-weight: 600; }

/* faq */
.faq { padding-top: 0; }
.faq-list { border-top: 1px solid var(--line); max-width: 920px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px 0; font-family: var(--display); font-size: clamp(17px, 1.6vw, 20px); font-weight: 550; letter-spacing: -.01em;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 12px; height: 12px;
  background: linear-gradient(var(--orange), var(--orange)) center / 100% 2px no-repeat, linear-gradient(var(--orange), var(--orange)) center / 2px 100% no-repeat;
  transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--orange-ink); }
.faq details p { padding: 0 48px 24px 0; color: var(--muted); max-width: 46em; }

/* closing */
.closing { text-align: center; padding-block: clamp(56px, 8vw, 110px) clamp(72px, 10vw, 130px); display: grid; justify-items: center; gap: 34px; }
.closing h2 { font-size: clamp(44px, 7.4vw, 108px); font-weight: 700; font-variation-settings: 'wdth' 112; letter-spacing: -.05em; line-height: .95; }
.closing h2 em { font-size: 1.08em; }

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 20px 36px; flex-wrap: wrap; padding-block: 30px calc(30px + env(safe-area-inset-bottom, 0px)); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.footer-nav a:hover { color: var(--fg); }
.footer-line { margin-left: auto; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--muted); }

/* ---------- builder dialog ---------- */
body.modal-open { overflow: hidden; }
.builder {
  width: min(1040px, 100% - 32px);
  max-height: min(860px, 100% - 32px);
  padding: 0; border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--ink-2); color: var(--fg);
  box-shadow: 0 40px 120px rgb(0 0 0 / .6);
  overflow: hidden;
}
.builder[open] { display: flex; flex-direction: column; animation: rise .35s var(--ease); }
.builder::backdrop { background: rgb(8 8 7 / .78); }
@keyframes rise { from { transform: translateY(14px); opacity: .4; } to { transform: none; opacity: 1; } }
.builder-bar { display: flex; align-items: center; gap: 20px; padding: 16px 18px 16px 26px; border-bottom: 1px solid var(--line); flex: none; }
.builder-title { font-family: var(--display); font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.builder-steps { display: flex; gap: 6px; margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.builder-steps li { padding: 5px 10px; border-radius: 999px; border: 1px solid transparent; }
.builder-steps li.done { color: var(--fg); }
.builder-steps li[aria-current="step"] { color: var(--orange-ink); border-color: var(--orange); }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; flex: none; transition: border-color .2s; }
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--fg); stroke-width: 1.8; stroke-linecap: round; }

.builder-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); flex: 1; min-height: 0; }
.builder-form { padding: 30px 32px 26px; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.builder-preview { background: var(--ink); border-left: 1px solid var(--line); padding: 32px; overflow-y: auto; display: grid; align-items: center; }
.builder-preview .record { max-width: 430px; }

.step { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 20px; align-content: start; }
.step > legend, .step-heading {
  padding: 0; margin-bottom: 4px;
  font-family: var(--display); font-weight: 650; font-variation-settings: 'wdth' 108; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.08; letter-spacing: -.03em;
}
.step-heading:focus { outline: none; }
.step-count { display: block; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.step-record .step-count, .step-launch .step-count { margin-bottom: 0; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
label, .label { font-size: 14.5px; font-weight: 550; }
.opt { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
input[type="text"], input:not([type]), input[type="url"], textarea {
  width: 100%; background: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 13px 14px; font-size: 16px; line-height: 1.4; color: var(--fg);
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 132px; }
input::placeholder, textarea::placeholder { color: #77746a; }
input:hover, textarea:hover { border-color: #5f5c52; }
input:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgb(255 91 34 / .2); }
input[aria-invalid="true"] { border-color: #ff6d5e; }
.hint { font-size: 13px; color: var(--muted); }
.counter { text-align: right; font-family: var(--mono); font-size: 12px; }
.error { font-size: 13.5px; color: #ff8a7a; }
.chips legend { margin-bottom: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; transition: background-color .2s, border-color .2s, color .2s; }
.chip:hover span { border-color: var(--muted); }
.chip input:checked + span { background: var(--paper); color: var(--paper-ink); border-color: var(--paper); }
.chip input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.file-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.file-btn { cursor: pointer; }
.file-row input:focus-visible + .file-name, .file-btn:has(+ input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 2px; }
.file-name { font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

.draft-note { display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ink-3); }
.draft-note .pill { justify-self: start; }
.draft-note p { font-size: 14.5px; color: var(--muted); }
.download-row { display: flex; flex-wrap: wrap; gap: 10px; }
.launch-copy { color: var(--muted); }
.launch-list { display: grid; border-top: 1px solid var(--line); }
.launch-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.step-launch .step-heading { color: var(--fg); }
.step-launch .step-heading::after { content: ''; display: block; width: 44px; height: 3px; background: var(--orange); margin-top: 16px; border-radius: 2px; }

.builder-nav { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 28px; }
.builder-nav #btn-next { margin-left: auto; }

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

/* ---------- responsive ---------- */
@media (max-width: 1040px) {
  .site-nav { gap: 18px; font-size: 14px; }
  .categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .menu-toggle { display: grid; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 6px var(--gutter) 14px;
    font-size: 17px; color: var(--fg);
  }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-header:not(.nav-open) .site-nav { display: none; }
  .header-actions { margin-left: auto; }

  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero-visual { max-width: 500px; width: 100%; margin-inline: auto; }
  .section-head.split { grid-template-columns: minmax(0, 1fr); }
  .thread-steps { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 0 0 0 38px; }
  .thread-steps::before { top: 8px; bottom: 8px; left: 7px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--orange) 0 70%, var(--line) 70%); }
  .thread-steps .node { top: 2px; left: -38px; }
  .thread-steps .field-label { margin-bottom: 10px; }
  .token-grid, .stages { grid-template-columns: minmax(0, 1fr); }

  .builder { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: 0; margin: 0; }
  .builder-body { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .builder-form, .builder-preview { overflow: visible; }
  .builder-preview { border-left: 0; border-top: 1px solid var(--line); padding: 24px var(--gutter); }
  .builder-form { padding: 24px var(--gutter) calc(20px + env(safe-area-inset-bottom, 0px)); }
  .builder-bar { padding: 12px 12px calc(12px) var(--gutter); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .builder-steps { display: none; }
  .icon-btn { margin-left: auto; }
  /* on phones, show the record preview only once it's the point of the step */
  .builder[data-step="1"] .builder-preview,
  .builder[data-step="2"] .builder-preview,
  .builder[data-step="3"] .builder-preview,
  .builder[data-step="5"] .builder-preview { display: none; }
  .builder[data-step="4"] .builder-preview { order: -1; border-top: 0; padding-bottom: 0; background: transparent; }
  .builder-nav { position: sticky; bottom: 0; background: var(--ink-2); padding-block: 14px; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); border-top: 1px solid var(--line); }
}

@media (max-width: 600px) {
  .header-inner { height: 64px; gap: 12px; }
  .wordmark { font-size: 24px; }
  .wordmark .ring { width: 19px; height: 19px; border-width: 5px; }
  .header-actions .btn-sm { padding: 0 14px; font-size: 13.5px; min-height: 38px; }
  .hero h1 { font-size: clamp(46px, 14.5vw, 72px); }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-actions .link-quiet { margin-inline: auto; }
  .categories { grid-template-columns: minmax(0, 1fr); }
  .categories li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 18px; padding: 22px 20px; }
  .categories svg { grid-row: 1 / 3; margin: 0; }
  .token-facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .faq details p { padding-right: 0; }
  .footer-line { margin-left: 0; width: 100%; }
  .record-work { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 14px; }
  .record-quote { font-size: 18px; }
  .builder-nav .btn { padding: 0 18px; }
}


/* header CTA appears once the hero CTA has scrolled away (JS adds .cta-away); without JS it stays visible */
main { overflow-x: clip; }
.js .header-cta { transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; }
.js .site-header:not(.cta-away) .header-cta { opacity: 0; visibility: hidden; transform: translateY(-4px); }
@media (max-width: 900px) { .sheet { inset: 22px 4px 34px 26px; } }
.record-name.long { font-size: clamp(22px, 2vw, 28px); line-height: 1.05; }
.record-name.xlong { font-size: clamp(19px, 1.7vw, 23px); }
.builder-nav .link-quiet { white-space: nowrap; }
.step > legend { margin-bottom: 26px; }
.chips > legend { padding: 0; font-size: 14.5px; font-weight: 550; margin-bottom: 10px; }
