/* Parium. Deep teal background, one accent, few boxes: a panel is only for a thing you can act on.
 * Type: Host Grotesk throughout (its digits are tabular). Glass is used once, on the nav. No glow on controls;
 * the mark glows, in the nav and as the line drawing behind the home page (sun.svg). */
@import url("./tokens.css");
@import url("./base.css");

/* shared */
.fig { font-variant-numeric: tabular-nums; }
.num, td.fig { text-align: right; }
.sub { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.note { margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--color-muted); }
.note a, .sub a, .plain a { color: var(--color-text-2); }
.panel { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-panel); }

.chip { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 26px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--color-raised); font-size: var(--text-sm); font-weight: 500; color: var(--color-text-2); white-space: nowrap; }
.chip--done { background: var(--color-accent-wash); color: var(--color-accent-hi); }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 var(--space-lg); border: 1px solid transparent; border-radius: var(--radius-pill); font-size: 0.9375rem; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), transform var(--dur-short) var(--ease-out); }
.btn--sm { min-height: 38px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.btn--primary { background: var(--color-text); color: var(--color-accent-ink); font-weight: 600; }
.btn--primary:hover { background: oklch(100% 0 0); }
.btn--ghost { background: transparent; border-color: var(--color-line-2); color: var(--color-text); }
.btn--ghost:hover { background: var(--color-raised); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

label, legend { display: block; padding: 0; margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
input[type="text"], input[type="number"], input[type="email"] { width: 100%; min-width: 0; min-height: 46px; padding: 0 var(--space-md); border: 1px solid var(--color-line-2); border-radius: var(--radius-input); background: var(--color-bg); color: var(--color-text); outline: 2px solid transparent; outline-offset: -1px; transition: border-color var(--dur-short) var(--ease-out); }
input:hover { border-color: var(--color-muted); }
input:focus-visible { outline-color: var(--color-focus); }
input[aria-invalid] { border-color: var(--color-error); }

/* nav */
.nav { position: sticky; top: var(--space-sm); z-index: var(--z-nav); margin-top: var(--space-sm); padding-inline: var(--gutter); }
.nav__in { display: flex; align-items: center; gap: var(--space-xl); max-width: var(--container); margin-inline: auto; min-height: 60px; padding-inline: var(--space-lg) var(--space-sm); border: 1px solid var(--color-line); border-radius: var(--radius-pill); background: oklch(17% 0.026 205 / 0.72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 1.0625rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1; text-decoration: none; }
.brand img { width: 30px; filter: drop-shadow(0 0 5px oklch(86% 0.11 187 / 0.75)) drop-shadow(0 0 16px oklch(80% 0.125 187 / 0.55)); }
.nav__links { display: flex; gap: var(--space-2xs); margin-right: auto; font-size: var(--text-sm); font-weight: 500; }
.nav__links a { padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-pill); color: var(--color-muted); text-decoration: none; transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.nav__links a:hover { color: var(--color-text); }
.nav__links a[aria-current="page"] { background: var(--color-raised); color: var(--color-text); }

/* every page: a teal haze and ribbons behind the top of it */
.page { position: relative; isolation: isolate; padding-block: var(--space-3xl) var(--section-gap); }
.page::before { content: ""; position: absolute; inset: calc(-1 * var(--nav-h) - var(--space-lg)) 0 auto; height: 600px; z-index: -1; background: radial-gradient(50% 70% at 26% 18%, oklch(36% 0.075 195 / 0.5), transparent 72%), url("waves.svg") center / cover no-repeat; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); pointer-events: none; }
.page__head h1 { font-weight: 600; }
.page__head .lead { margin-top: var(--space-md); max-width: 46ch; }
.page__body { margin-top: var(--space-2xl); }
.plain h2 { font-size: var(--text-xl); }
.plain p { margin-top: var(--space-xs); max-width: 52ch; color: var(--color-muted); }

/* home: one screen */
.hero { display: grid; align-items: center; min-height: calc(100svh - var(--nav-h)); padding-block: var(--space-2xl) var(--space-3xl); }
.hero::before { inset: calc(-1 * var(--nav-h) - var(--space-lg)) 0 0; height: auto; background: url("sun.svg") 50.5% 44% / auto 84% no-repeat; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: var(--space-3xl); align-items: center; }
.hero h1 { max-width: 10ch; font-size: clamp(2.75rem, 4.4vw + 1rem, 5.25rem); font-weight: 600; letter-spacing: -0.045em; line-height: 0.98; }
.hero .lead { margin-top: var(--space-lg); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xl); }

/* the Open card (peak-chart.js draws it) and the sample bid beside it */
.peak { display: flex; justify-content: center; min-width: 0; }
.bid { padding: var(--space-lg); }
.bid__row { display: flex; gap: var(--space-xs); }
.bid__row input { flex: 1 1 6rem; font-variant-numeric: tabular-nums; }
.bid__help { min-height: 2lh; margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.bid + .plain { margin-top: var(--space-2xl); }

/* opens and launch pages */
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); column-gap: var(--space-3xl); align-items: start; }
.cols--card { grid-template-columns: minmax(0, 420px) minmax(0, 28rem); align-items: center; }
.open-live { align-items: start; }
.composer { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-lg); padding: var(--space-lg); }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.groove { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xs); padding: var(--space-2xs); border: 1px solid var(--color-line-2); border-radius: var(--radius-input); background: var(--color-bg); }
.groove input { position: absolute; opacity: 0; pointer-events: none; }
.groove label { display: flex; align-items: center; justify-content: center; min-height: 38px; margin: 0; border-radius: 6px; color: var(--color-muted); cursor: pointer; transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.groove label:hover { color: var(--color-text); }
.groove input:checked + label { background: var(--color-raised); color: var(--color-text); }
.groove input:focus-visible + label { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.preview { padding-top: var(--space-lg); border-top: 1px solid var(--color-line); }
.preview__label { font-size: var(--text-sm); color: var(--color-muted); }
.preview__name { margin-top: var(--space-2xs); font-size: var(--text-2xl); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: anywhere; }
.preview__name .fig { font-size: 0.55em; font-weight: 400; letter-spacing: -0.01em; color: var(--color-muted); margin-left: var(--space-xs); }
.preview p:last-child { margin-top: var(--space-2xs); color: var(--color-text-2); }
.composer__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.composer__end p { font-size: var(--text-sm); color: var(--color-muted); }
.terms dt { font-size: var(--text-sm); color: var(--color-muted); }
.terms dd { margin-top: var(--space-2xs); font-size: var(--text-lg); font-weight: 500; letter-spacing: -0.015em; }
.terms div { padding-block: var(--space-md); border-top: 1px solid var(--color-line); }
.terms div:first-child { padding-top: 0; border-top: 0; }

/* live pages: the list of Opens, one Open, the wallet */
.banner { max-width: var(--container); margin: var(--space-sm) auto 0; padding: var(--space-sm) var(--space-lg); border: 1px solid var(--color-line-2); border-radius: var(--radius-input); font-size: var(--text-sm); color: var(--color-text-2); }
.chip.net { min-height: 22px; font-size: var(--text-xs); }
.board th, .board td { padding-block: var(--space-md); border-top: 1px solid var(--color-line); white-space: nowrap; }
.board thead th { padding-block: var(--space-sm); border-top: 0; font-size: var(--text-sm); color: var(--color-muted); }
.board th + th, .board td { padding-left: var(--space-lg); }
.board tbody th { font-size: var(--text-lg); font-weight: 500; letter-spacing: -0.015em; }
.board tbody th a { text-decoration: none; }
.board tbody th a:hover { text-decoration: underline; }
.board .tkr, .board .when { margin-left: var(--space-xs); font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.coin-head h1 { font-size: var(--text-section); font-weight: 600; }
.act { margin-top: var(--space-lg); padding: var(--space-lg); }
.act > * + * { margin-top: var(--space-md); }
.act h2 { font-size: var(--text-xl); }
.act hr { border: 0; border-top: 1px solid var(--color-line); margin-block: var(--space-lg); }
.act form { display: grid; gap: var(--space-md); justify-items: start; }
.act form .field { width: 100%; }
.act__row { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.act .pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
.act .pairs dt { font-size: var(--text-sm); color: var(--color-muted); }
.act .pairs dd { margin-top: var(--space-2xs); font-size: var(--text-lg); font-weight: 500; }
.msg { min-height: 1lh; margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-text-2); }
.msg.is-bad { color: var(--color-error); }
.open-live .terms { margin-top: var(--space-xl); }
select { width: 100%; min-height: 46px; padding: 0 var(--space-md); border: 1px solid var(--color-line-2); border-radius: var(--radius-input); background: var(--color-bg); color: var(--color-text); font: inherit; }
select:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -1px; }

/* docs: a document, not a dashboard */
.docs__grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-3xl); align-items: start; margin-top: var(--space-2xl); }
.toc { position: sticky; top: calc(var(--nav-h) + var(--space-md)); display: grid; border-left: 1px solid var(--color-line); }
.toc a { margin-left: -1px; padding: 7px var(--space-md); border-left: 1px solid transparent; font-size: var(--text-sm); color: var(--color-muted); text-decoration: none; transition: color var(--dur-short) var(--ease-out); }
.toc a:hover { color: var(--color-text); }
.toc a[aria-current] { border-left-color: var(--color-accent); color: var(--color-text); }
.docs__body { max-width: 760px; }
.doc { padding-block: var(--space-2xl); border-top: 1px solid var(--color-line); scroll-margin-top: calc(var(--nav-h) + var(--space-md)); }
.doc:first-child { padding-top: 0; border-top: 0; }
.doc > * + * { margin-top: var(--space-lg); }
.doc h2 { font-size: var(--text-2xl); }
.doc > p, .doc > ul { max-width: 64ch; color: var(--color-text-2); }
.doc > h2 + p { margin-top: var(--space-md); }
.doc ul { padding-left: 1.15em; }
.doc li + li { margin-top: var(--space-xs); }
.doc li::marker { color: var(--color-muted); }
.figures { display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; gap: var(--space-md) var(--space-lg); padding-block: var(--space-md); border-block: 1px solid var(--color-line); }
.figures dt { font-size: var(--text-xl); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.figures dd { margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
.steps { list-style: none; margin-inline: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: var(--space-sm); }
.steps li + li { margin-top: var(--space-lg); }
.steps li::before { content: counter(step); grid-row: span 2; font-weight: 500; line-height: 1.25; font-variant-numeric: tabular-nums; color: var(--color-muted); }
.steps p { margin-top: var(--space-2xs); color: var(--color-muted); max-width: 52ch; }
.sheet__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding-bottom: var(--space-sm); }
.sheet__name { font-weight: 500; }
.sheet__bids th { padding-block: var(--space-sm); border-top: 1px solid var(--color-line); font-size: var(--text-sm); color: var(--color-muted); }
.sheet__bids td { padding-block: var(--space-sm); border-top: 1px solid var(--color-line); }
.sheet__bids th + th, .sheet__bids td + td { padding-left: var(--space-md); }
.sheet__bids td.fig { white-space: nowrap; }
.scroll { overflow-x: auto; }
.sheet__bids .is-out td { color: var(--color-muted); }
.sheet__bids .is-out td:nth-child(-n+3) { text-decoration: line-through; text-decoration-color: var(--color-line-2); }
.sheet__pool { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xs) var(--space-lg); padding-top: var(--space-sm); border-top: 1px solid var(--color-line-2); font-weight: 500; }
.sheet .sub { margin-top: var(--space-sm); }
.fees th, .fees td { padding-block: var(--space-sm); border-top: 1px solid var(--color-line); font-weight: 400; }
.fees th { color: var(--color-text-2); padding-right: var(--space-md); }
.fees tr:last-child th, .fees tr:last-child td { border-bottom: 1px solid var(--color-line); }
.versus thead th { padding-block: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.versus tbody th, .versus tbody td { padding-block: var(--space-sm); padding-right: var(--space-lg); border-top: 1px solid var(--color-line); vertical-align: baseline; }
.versus tbody th { width: 30%; }
.versus tbody td { width: 35%; color: var(--color-muted); }
.versus tbody td:last-child { color: var(--color-text); font-weight: 500; }
.qa h3 { margin-top: var(--space-lg); }
.qa h3:first-child { margin-top: 0; }
.qa p { margin-top: var(--space-2xs); color: var(--color-muted); max-width: 60ch; }

/* footer, with the one waitlist form */
.foot { padding-block: var(--space-xl); border-top: 1px solid var(--color-line); font-size: var(--text-sm); color: var(--color-muted); }
.signup { max-width: 30rem; scroll-margin-top: calc(var(--nav-h) + var(--space-xl)); }
.signup label { color: var(--color-text-2); }
.signup__row { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.signup__row input { flex: 1 1 12rem; }
.signup__help { margin-top: var(--space-sm); }
.signup__help:empty { display: none; }
.foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md) var(--space-xl); margin-top: var(--space-xl); }
.foot .brand { font-size: 0.9375rem; color: var(--color-text); }
.foot .brand img { width: 26px; }
.foot__legal { flex: 1 1 22rem; max-width: 52ch; }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); margin-left: auto; font-weight: 500; }
.foot__links a { padding-block: var(--space-xs); text-decoration: none; }
.foot__links a:hover { color: var(--color-text); }

/* narrower screens */
@media (max-width: 60rem) {
  .hero { min-height: 0; padding-top: var(--space-2xl); }
  .hero::before { bottom: auto; height: 560px; opacity: 0.5; background-position: center top; background-size: auto 560px; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .hero__grid, .cols { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-2xl); }
  .docs__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .toc { position: static; display: flex; overflow-x: auto; scrollbar-width: none; border-left: 0; border-bottom: 1px solid var(--color-line); }
  .toc a { flex: none; margin: 0 0 -1px; padding: var(--space-sm) var(--space-sm); border-left: 0; border-bottom: 1px solid transparent; white-space: nowrap; }
  .toc a[aria-current] { border-bottom-color: var(--color-accent); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
}
@media (max-width: 40rem) {
  .bid, .composer, .act { padding: var(--space-md); }
  .board th + th, .board td { padding-left: var(--space-md); }
  .composer { grid-template-columns: minmax(0, 1fr); }
  .bid__row { flex-wrap: wrap; }
  .bid__row .btn { flex: 1 1 100%; }
  .sheet__bids { font-size: var(--text-sm); }
  .sheet__bids th:nth-child(3), .sheet__bids td:nth-child(3) { display: none; }
  .versus, .versus tbody, .versus tr, .versus th, .versus td { display: block; width: auto; }
  .versus thead { display: none; }
  .versus tbody tr { padding-block: var(--space-sm); border-top: 1px solid var(--color-line); }
  .versus tbody th, .versus tbody td { width: auto; border: 0; padding-block: var(--space-2xs); }
  .versus tbody td::before { content: attr(data-label) ": "; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
  .nav__cta { display: none; }
  .nav__in { gap: var(--space-sm); padding-inline: var(--space-md) var(--space-xs); justify-content: space-between; }
  .nav__links { margin-right: 0; }
  .nav__links a { padding-inline: 10px; }
}
