/* Draftboard design system.
   One blue ink on pinkish paper. The trading card is the loud element; everything else stays quiet. */

:root {
  /* Palette (see site-contract.md for roles and contrast) */
  --cobalt: #16399f;      /* dominant */
  --ink: #070ca7;         /* text, deepest band */
  --berry: #a2457e;       /* accent fill: the pick */
  --berry-ink: #8a3468;   /* accent as text on light */
  --sheet: #f5f1ef;       /* surfaces, text on dark */
  --paper: #e8e1de;       /* page */
  --paper-2: #d5c8c5;     /* recessed */
  --rule: #a9a4ac;        /* hairlines on light */
  --muted: #44478a;       /* quiet text on light */
  --blush: #c8aea2;       /* quiet text on dark */
  --sky: #2476bc;         /* graphics only */
  --copper: #b77862;      /* graphics only */
  --teal: #489aaf;        /* graphics only */
  --warn: #7d3e2a;        /* errors, fails, negatives */

  --ink-a08: rgba(7, 12, 167, 0.08);
  --ink-a14: rgba(7, 12, 167, 0.14);
  --ink-a24: rgba(7, 12, 167, 0.24);
  --cobalt-a16: rgba(22, 57, 159, 0.16);
  --cobalt-a28: rgba(22, 57, 159, 0.28);
  --sky-a30: rgba(36, 118, 188, 0.30);
  --sky-a45: rgba(36, 118, 188, 0.45);
  --blush-a35: rgba(200, 174, 162, 0.35);
  --blush-a60: rgba(200, 174, 162, 0.6);
  --berry-a14: rgba(162, 69, 126, 0.14);

  /* Type */
  --f-display: 'Big Shoulders Display', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --f-text: 'Public Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-code: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --t-mega: clamp(6rem, 11.2vw, 10.5rem);
  --t-d1: clamp(4rem, 6.6vw, 6.25rem);
  --t-d2: 3.25rem;
  --t-d3: 2.25rem;
  --t-d4: 1.5rem;
  --t-h5: 1.25rem;
  --t-lede: 1.1875rem;
  --t-body: 0.9375rem;
  --t-small: 0.8125rem;
  --t-micro: 0.75rem;

  --lh-display: 0.9;
  --lh-text: 1.5;
  --measure: 62ch;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Radii: by hierarchy */
  --r-sticker: 22px;
  --r-card: 14px;
  --r-panel: 10px;
  --r-control: 8px;
  --r-stamp: 4px;
  --r-round: 999px;

  /* Shadows: only trading cards, doors and popovers */
  --sh-sticker: 0 1px 0 rgba(7, 12, 167, 0.10), 0 18px 30px -20px rgba(7, 12, 167, 0.55);
  --sh-lift: 0 2px 0 rgba(7, 12, 167, 0.12), 0 28px 40px -22px rgba(7, 12, 167, 0.6);
  --sh-pop: 0 16px 40px -16px rgba(7, 12, 167, 0.5);

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-snap: cubic-bezier(0.3, 1.35, 0.5, 1);
  --d-fast: 120ms;
  --d-base: 200ms;
  --d-slow: 420ms;
  --d-enter: 820ms;

  /* Layout */
  --wrap: 1280px;
  --gutter: 32px;
  --header-h: 68px;

  --dotgrid: radial-gradient(circle at 1px 1px, rgba(7, 12, 167, 0.17) 1px, transparent 1.6px);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-width: 1024px;
  background-color: var(--paper);
  background-image: var(--dotgrid);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--t-body);
  line-height: var(--lh-text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--cobalt); color: var(--sheet); }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -60px;
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--cobalt);
  color: var(--sheet);
  border-radius: var(--r-control);
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: var(--s-3); }

/* Type roles */
.display, h1, h2 {
  font-family: var(--f-display);
  font-weight: 900;
  line-height: var(--lh-display);
  letter-spacing: -0.005em;
}
h3 { font-family: var(--f-display); font-weight: 800; line-height: 1; letter-spacing: 0; }
.t-mega { font-size: var(--t-mega); line-height: 0.8; }
.t-d1 { font-size: var(--t-d1); }
.t-d2 { font-size: var(--t-d2); }
.t-d3 { font-size: var(--t-d3); }
.t-d4 { font-size: var(--t-d4); }
.lede { font-size: var(--t-lede); font-weight: 300; color: var(--muted); max-width: 46ch; line-height: 1.5; }
.quiet { color: var(--muted); font-weight: 300; }
.small { font-size: var(--t-small); }
.micro { font-size: var(--t-micro); }
.prose p { max-width: var(--measure); }
.prose p + p { margin-top: var(--s-3); }

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap--wide { max-width: calc(1440px + 2 * var(--gutter)); }

.band { position: relative; padding: var(--s-9) 0; }
.band--tight { padding: var(--s-7) 0; }
.band--sheet { background-color: var(--sheet); background-image: none; }
.band--ink {
  background-color: var(--ink);
  background-image: radial-gradient(circle at 1px 1px, rgba(36, 118, 188, 0.5) 1px, transparent 1.6px);
  background-size: 22px 22px;
  color: var(--sheet);
}
.band--ink .quiet, .band--ink .lede { color: var(--blush); }

.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-5); align-items: start; }
.grid-side { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-5); align-items: start; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack--tight { gap: var(--s-2); }
.row { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--d-base) var(--ease-out), background-color var(--d-base) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); background: var(--sheet); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: var(--header-h);
  max-width: 1504px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  flex: none;
  text-decoration: none;
  border-radius: var(--r-control);
}
.brand__logo { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.brand__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.nav { display: flex; align-items: center; gap: 2px; flex: none; }
.nav__link {
  position: relative;
  padding: 8px 8px;
  border-radius: var(--r-control);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--d-fast) var(--ease-out), background-color var(--d-fast) var(--ease-out);
}
.nav__link:hover { color: var(--ink); background: var(--ink-a08); }
.nav__link:active { background: var(--ink-a14); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 8px; right: 8px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--cobalt);
}

/* Contract address slot: sized for 44 base58 characters */
.ca {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: none;
  height: 40px;
  padding: 0 4px 0 10px;
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: var(--sheet);
}
.ca__label { font-size: var(--t-micro); font-weight: 600; color: var(--muted); white-space: nowrap; }
.ca__label-full { display: none; }
.ca__code, .ca-inline {
  font-family: var(--f-code);
  font-size: 10.5px;
  letter-spacing: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ca__code {
  display: block;
  width: calc(44ch + 12px);
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--paper);
}
.ca-inline { padding: 2px 6px; border-radius: 5px; background: var(--paper-2); font-size: var(--t-small); }
.ca__copy {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--cobalt);
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out);
}
.ca__copy svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; }
.ca__copy:hover:not([disabled]) { background: var(--ink-a08); }
.ca__copy:active:not([disabled]) { background: var(--ink-a14); }
.ca__copy[disabled] { color: var(--rule); cursor: not-allowed; }
.ca__icon-done { opacity: 0; transform: scale(0.6); transition: opacity var(--d-base), transform var(--d-base) var(--ease-snap); }
.ca__icon-copy { transition: opacity var(--d-base); }
.ca__copy[data-copied] { background: var(--cobalt); color: var(--sheet); }
.ca__copy[data-copied] .ca__icon-copy { opacity: 0; }
.ca__copy[data-copied] .ca__icon-done { opacity: 1; transform: scale(1); }

/* Wallet button: both buttons share one cell, kit.js shows one */
.wallet { display: grid; flex: none; width: 124px; }
.wallet__btn {
  grid-area: 1 / 1;
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--cobalt);
  border-radius: var(--r-control);
  background: var(--cobalt);
  color: var(--sheet);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out), border-color var(--d-fast);
}
.wallet__btn:hover { background: var(--ink); border-color: var(--ink); }
.wallet__btn:active { transform: translateY(1px); }
.wallet__btn[disabled] { opacity: 0.55; cursor: progress; }
.wallet__btn--off { background: var(--sheet); color: var(--ink); border-color: var(--rule); }
.wallet__btn--off:hover { background: var(--paper-2); border-color: var(--muted); }
.wallet[data-state="connecting"] .wallet__btn { cursor: progress; }

@media (min-width: 1180px) {
  .site-header__inner { padding: 0 24px; gap: var(--s-5); }
  .nav__link { padding: 8px 12px; }
  .nav__link[aria-current="page"]::after { left: 12px; right: 12px; }
  .ca__code { font-size: 12px; }
  .wallet { width: 136px; }
}
@media (min-width: 1360px) {
  .site-header__inner { padding: 0 var(--gutter); }
  .ca__label-full { display: inline; }
  .ca__label-short { display: none; }
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--sheet);
  padding-top: var(--s-8);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: start;
  gap: var(--s-6);
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.site-footer__brand { display: flex; gap: var(--s-3); align-items: center; }
.site-footer__brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-footer__name { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.site-footer__line { margin-top: 4px; color: var(--blush); font-size: var(--t-small); font-weight: 300; }
.site-footer__nav { display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }
.site-footer__nav a {
  color: var(--sheet);
  font-size: var(--t-small);
  text-decoration: none;
  border-radius: 4px;
  transition: color var(--d-fast);
}
.site-footer__nav a:hover { color: var(--blush); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__note { justify-self: end; color: var(--blush); font-size: var(--t-small); }
.site-footer__mark {
  margin: var(--s-7) 0 0;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 23.5vw;
  line-height: 0.74;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.25px var(--blush-a60);
  margin-bottom: -0.1em;
  user-select: none;
  pointer-events: none;
}

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

.btn {
  --btn-bg: var(--sheet);
  --btn-fg: var(--ink);
  --btn-bd: var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 40px;
  padding: 0 var(--s-4);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-control);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--d-fast) var(--ease-out), border-color var(--d-fast) var(--ease-out), color var(--d-fast) var(--ease-out), transform var(--d-fast) var(--ease-out);
}
.btn svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { background: var(--paper-2); border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.is-pending { opacity: 1; cursor: progress; }

.btn--primary { --btn-bg: var(--cobalt); --btn-fg: var(--sheet); --btn-bd: var(--cobalt); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--accent { --btn-bg: var(--berry); --btn-fg: var(--sheet); --btn-bd: var(--berry); }
.btn--accent:hover { background: var(--berry-ink); border-color: var(--berry-ink); }
.btn--ghost { --btn-bg: transparent; --btn-bd: var(--cobalt); --btn-fg: var(--cobalt); }
.btn--ghost:hover { background: var(--cobalt-a16); border-color: var(--cobalt); }
.btn--quiet { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--muted); padding: 0 var(--s-3); }
.btn--quiet:hover { background: var(--ink-a08); border-color: transparent; color: var(--ink); }
.btn--on-dark { --btn-bg: var(--sheet); --btn-fg: var(--ink); --btn-bd: var(--sheet); }
.btn--on-dark:hover { background: var(--paper-2); border-color: var(--paper-2); }
.btn--sm { height: 32px; padding: 0 var(--s-3); font-size: var(--t-small); gap: 6px; }
.btn--lg { height: 52px; padding: 0 var(--s-5); font-size: 1rem; border-radius: 10px; }
.btn--icon { width: 40px; padding: 0; }
.btn--sm.btn--icon { width: 32px; }
.btn--block { width: 100%; }

.linkbtn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cobalt);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkbtn:hover { color: var(--ink); }

.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin 700ms linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: var(--t-small); font-weight: 600; color: var(--ink); }
.hint { font-size: var(--t-micro); color: var(--muted); }
.field__error { display: none; font-size: var(--t-micro); font-weight: 600; color: var(--warn); }
.field.is-invalid .field__error { display: block; }
.field.is-invalid .input, .field.is-invalid .select { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); }

.input, .select, textarea.input {
  width: 100%;
  height: 40px;
  padding: 0 var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: var(--sheet);
  color: var(--ink);
  font-size: var(--t-body);
  transition: border-color var(--d-fast), box-shadow var(--d-fast);
}
textarea.input { height: auto; min-height: 88px; padding: var(--s-2) var(--s-3); resize: vertical; }
.input::placeholder { color: var(--muted); opacity: 0.8; }
.input:hover, .select:hover { border-color: var(--muted); }
.input:focus, .select:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-a28); }
.input[disabled], .select[disabled] { background: var(--paper-2); cursor: not-allowed; opacity: 0.7; }
.select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
input[type="number"].input { font-variant-numeric: tabular-nums; }

.input-group { display: flex; align-items: stretch; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-addon {
  display: inline-flex;
  align-items: center;
  padding: 0 var(--s-3);
  border: 1px solid var(--rule);
  border-left: 0;
  border-radius: 0 var(--r-control) var(--r-control) 0;
  background: var(--paper-2);
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
}

.search { position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.search .input { padding-left: 38px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); }
.form-grid .field--full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: var(--s-3); padding-top: var(--s-2); }

/* Segmented control and tabs */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-2);
}
.seg__opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 var(--s-3);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: var(--t-small);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--d-fast), color var(--d-fast);
}
.seg__opt:hover { color: var(--ink); background: var(--ink-a08); }
.seg__opt[aria-checked="true"], .seg__opt[aria-selected="true"], .seg__opt[aria-pressed="true"] {
  background: var(--sheet);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--ink-a14), 0 0 0 1px var(--ink-a08);
}

.tabs { display: flex; gap: var(--s-5); border-bottom: 1px solid var(--rule); }
.tab {
  position: relative;
  padding: var(--s-3) 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--cobalt); }

/* Toggle */
.toggle { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-small); font-weight: 600; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: var(--r-round);
  background: var(--rule);
  transition: background-color var(--d-base) var(--ease-out);
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--sheet);
  transition: transform var(--d-base) var(--ease-snap);
}
.toggle input:checked + .toggle__track { background: var(--cobalt); }
.toggle input:checked + .toggle__track::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--cobalt); outline-offset: 2px; }

/* ---------- Product shell ---------- */

.app-section { padding: var(--s-6) 0 0; }
.app-section:last-of-type { padding-bottom: var(--s-9); }
.app-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-6);
  padding: var(--s-7) 0 var(--s-5);
}
.app-title { font-size: var(--t-d2); line-height: 0.9; }
.app-lede { margin-top: var(--s-2); max-width: 60ch; color: var(--muted); }
.app-tools { display: flex; align-items: center; gap: var(--s-2); flex: none; }

.panel {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  min-width: 0;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 56px;
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--ink-a14);
}
.panel__title { font-family: var(--f-display); font-weight: 800; font-size: var(--t-d4); line-height: 1; display: flex; align-items: center; gap: var(--s-2); }
.panel__sub { font-size: var(--t-small); color: var(--muted); }
.panel__tools { display: flex; align-items: center; gap: var(--s-2); }
.panel__body { padding: var(--s-5); }
.panel--flush .panel__body { padding: 0; }
.panel--dark { background: var(--cobalt); border-color: var(--cobalt); color: var(--sheet); }
.panel--dark .panel__head { border-bottom-color: var(--blush-a35); }
.panel--dark .panel__sub, .panel--dark .muted { color: var(--blush); }

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--r-round);
  background: var(--paper-2);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: var(--t-micro);
  font-weight: 700;
}

.meta { display: grid; gap: var(--s-2); }
.meta > div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 6px 0; border-bottom: 1px dashed var(--ink-a14); }
.meta > div:last-child { border-bottom: 0; }
.meta dt { color: var(--muted); font-size: var(--t-small); }
.meta dd { font-weight: 600; text-align: right; }

.list { display: flex; flex-direction: column; }
.list__row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--ink-a14);
}
.list__row:last-child { border-bottom: 0; }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 600; }
.list__sub { font-size: var(--t-small); color: var(--muted); }

.muted { color: var(--muted); }
.strong { font-weight: 700; }

/* Numbers */
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.num.is-pos { color: var(--ink); }
.num.is-neg { color: var(--warn); }
.num.is-fail { color: var(--warn); font-weight: 700; }
.fig { font-family: var(--f-display); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }

/* ---------- Tables ---------- */

.table { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.table th {
  position: sticky;
  top: 0;
  padding: var(--s-2) var(--s-4);
  background: var(--paper-2);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--rule);
}
.table th.num { text-align: right; }
.table td { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--ink-a14); vertical-align: middle; }
.table tbody tr { transition: background-color var(--d-fast); }
.table tbody tr:hover { background: var(--ink-a08); }
.table tr.is-selected { background: var(--cobalt-a16); }
.table tr.is-dim td { opacity: 0.45; }
.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.th-sort:hover { color: var(--ink); }
th[aria-sort] .th-sort { color: var(--ink); }
th[aria-sort="ascending"] .th-sort svg { transform: rotate(180deg); }

/* ---------- Patterns (each encodes a trading style) ---------- */

.pat-rings {
  background-color: var(--paper-2);
  background-image: repeating-radial-gradient(circle at 50% 62%, var(--sky-a30) 0 9px, transparent 9px 18px);
}
.pat-stripes {
  background-color: var(--paper-2);
  background-image: repeating-linear-gradient(135deg, var(--cobalt-a16) 0 9px, transparent 9px 18px);
}
.pat-grid {
  background-color: var(--sheet);
  background-image:
    linear-gradient(var(--sky-a30) 1px, transparent 1px),
    linear-gradient(90deg, var(--sky-a30) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: -1px -1px;
}
.pat-dots {
  background-color: var(--paper-2);
  background-image: radial-gradient(circle, var(--cobalt-a28) 1.8px, transparent 2.2px);
  background-size: 11px 11px;
}
.pat-hatch {
  background-color: var(--paper-2);
  background-image:
    repeating-linear-gradient(45deg, var(--cobalt-a16) 0 1.5px, transparent 1.5px 10px),
    repeating-linear-gradient(-45deg, var(--cobalt-a16) 0 1.5px, transparent 1.5px 10px);
}
.pat--dark.pat-rings { background-color: var(--cobalt); background-image: repeating-radial-gradient(circle at 50% 62%, rgba(72, 154, 175, 0.45) 0 9px, transparent 9px 18px); }
.pat--dark.pat-stripes { background-color: var(--cobalt); background-image: repeating-linear-gradient(135deg, var(--sky-a45) 0 9px, transparent 9px 18px); }
.pat--dark.pat-grid { background-color: var(--cobalt); background-image: linear-gradient(rgba(72, 154, 175, 0.5) 1px, transparent 1px), linear-gradient(90deg, rgba(72, 154, 175, 0.5) 1px, transparent 1px); }
.pat--dark.pat-dots { background-color: var(--cobalt); background-image: radial-gradient(circle, rgba(72, 154, 175, 0.6) 1.8px, transparent 2.2px); }
.pat--dark.pat-hatch { background-color: var(--cobalt); background-image: repeating-linear-gradient(45deg, var(--sky-a45) 0 1.5px, transparent 1.5px 10px), repeating-linear-gradient(-45deg, var(--sky-a45) 0 1.5px, transparent 1.5px 10px); }

/* ---------- Seal, stamps, tags ---------- */

.seal {
  --size: 40px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--sheet);
  color: var(--ink);
  font-family: var(--f-display);
  font-weight: 800;
  font-size: calc(var(--size) * 0.4);
  line-height: 1;
  border: 1.5px dashed var(--rule);
}
.seal::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 1.5px dotted transparent;
}
.seal[data-verified] { border: 2px solid var(--ink); }
.seal[data-verified]::before { border-color: var(--ink); }
.seal--s { --size: 32px; }
.seal--m { --size: 44px; }
.seal--l { --size: 68px; border-width: 2.5px; }
.seal--l::before { inset: 5px; border-width: 2px; }

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 7px;
  border: 1.5px solid currentColor;
  border-radius: var(--r-stamp);
  font-size: var(--t-micro);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: transparent;
}
.stamp--applied { color: var(--muted); }
.stamp--shortlisted { color: var(--cobalt); background: var(--cobalt-a16); }
.stamp--declined { color: var(--warn); border-style: dashed; }
.stamp--closed { color: var(--muted); border-style: dashed; }
.stamp--invited { color: var(--berry-ink); background: var(--berry-a14); }
.stamp--joined { color: var(--sheet); background: var(--berry); border-color: var(--berry); }
.stamp--verified { color: var(--cobalt); }
.stamp--unverified { color: var(--muted); border-style: dashed; }
.stamp svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.styletag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px 0 3px;
  border-radius: var(--r-stamp);
  background: var(--sheet);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-size: var(--t-micro);
  font-weight: 600;
  white-space: nowrap;
}
.swatch { width: 16px; height: 16px; border-radius: 3px; flex: none; border: 1px solid var(--ink-a14); }

.fitmark {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--r-stamp);
  background: var(--berry);
  color: var(--sheet);
  font-size: var(--t-micro);
  font-weight: 700;
  white-space: nowrap;
}
.fitmark svg { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

/* Requirement checks */
.checks { display: flex; flex-direction: column; border-top: 1px solid var(--ink-a14); }
.check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--ink-a14);
  font-size: var(--t-small);
}
.check svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.check__icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.check--pass .check__icon { background: var(--cobalt); color: var(--sheet); }
.check--fail .check__icon { background: transparent; color: var(--warn); border: 1.5px solid var(--warn); }
.check__label { font-weight: 600; }
.check__need { color: var(--muted); text-align: right; }
.check__have { min-width: 72px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.check--fail .check__have { color: var(--warn); }
.check__gap { grid-column: 2 / -1; margin-top: -4px; color: var(--warn); font-size: var(--t-micro); font-weight: 600; }

/* ---------- Trading card (the bold element) ---------- */

.tcard-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-5); align-items: stretch; }

.tcard {
  --tilt: 0deg;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-width: 0;
  padding: 10px;
  border-radius: var(--r-sticker);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--sh-sticker);
  transform: rotate(var(--tilt));
  transition: transform var(--d-slow) var(--ease-out), box-shadow var(--d-slow) var(--ease-out);
}
.tcard__face {
  position: relative;
  display: grid;
  place-items: center;
  height: 128px;
  border-radius: var(--r-card);
  overflow: hidden;
}
.tcard__face .styletag { position: absolute; left: 10px; bottom: 10px; }
.tcard__rank {
  position: absolute;
  top: 8px;
  left: 10px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
}
.tcard__body { padding: 0 6px; display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.tcard__name { font-size: 1.75rem; line-height: 0.95; overflow-wrap: anywhere; }
.tcard__wallet { margin-top: 2px; font-size: var(--t-micro); color: var(--muted); }
.tcard__foot { display: flex; gap: var(--s-2); padding: 0 6px 6px; margin-top: auto; }
.tcard__foot .btn { flex: 1; }

.statgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px var(--s-3); }
.statgrid > div { min-width: 0; border-top: 1px solid var(--ink-a14); padding-top: 6px; }
.statgrid dt { font-size: var(--t-micro); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statgrid dd { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.statgrid dd small { font-family: var(--f-text); font-size: var(--t-micro); font-weight: 600; color: var(--muted); margin-left: 2px; }
.statgrid dd.is-neg { color: var(--warn); }

.tcard--dark { background: var(--cobalt); color: var(--sheet); }
.tcard--dark .tcard__wallet, .tcard--dark .statgrid dt, .tcard--dark .statgrid dd small { color: var(--blush); }
.tcard--dark .statgrid > div { border-top-color: var(--blush-a35); }
.tcard--dark .statgrid dd.is-neg { color: var(--blush); }
.tcard--dark .tcard__rank { color: var(--sheet); }
.tcard--dark .seal { background: var(--sheet); }
.tcard.is-picked { box-shadow: 0 0 0 3px var(--berry), var(--sh-lift); }

/* ---------- Applicant rows (desk) ---------- */

.rank-list {
  --rank-cols: 34px minmax(230px, 1.7fr) repeat(6, minmax(66px, 0.8fr)) 196px;
  display: flex;
  flex-direction: column;
}
.rank-head, .appcard {
  display: grid;
  grid-template-columns: var(--rank-cols);
  align-items: center;
  column-gap: var(--s-3);
  padding: 0 var(--s-4);
}
.rank-head {
  height: 38px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: var(--t-micro);
  font-weight: 600;
  border-bottom: 1px solid var(--rule);
  border-radius: var(--r-panel) var(--r-panel) 0 0;
}
.rank-head .num { text-align: right; }
.appcard {
  position: relative;
  min-height: 84px;
  padding-top: var(--s-3);
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--ink-a14);
  background: var(--sheet);
  font-size: var(--t-small);
  cursor: pointer;
  transition: background-color var(--d-fast), opacity var(--d-base) var(--ease-out);
}
.appcard:last-child { border-bottom: 0; border-radius: 0 0 var(--r-panel) var(--r-panel); }
.appcard:hover { background: #efe9e7; }
.appcard:focus-visible { outline-offset: -2px; }
.appcard.is-dim { opacity: 0.42; }
.appcard.is-dim:hover { opacity: 0.7; }
.appcard.is-compared { box-shadow: inset 3px 0 0 var(--cobalt); background: #eceaf0; }
.appcard.is-new { animation: flash 1.2s var(--ease-out); }
.appcard__rank { font-family: var(--f-display); font-weight: 900; font-size: 1.6rem; line-height: 1; color: var(--cobalt); }
.appcard__who { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.appcard__who > div { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.appcard__name { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appcard__sub { display: flex; align-items: center; gap: var(--s-2); color: var(--muted); font-size: var(--t-micro); white-space: nowrap; }
.appcard__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.appcard__actions .btn { height: 30px; padding: 0 10px; font-size: var(--t-micro); }
@keyframes flash { 0% { background: var(--cobalt-a28); } 100% { background: var(--sheet); } }

/* ---------- Slots bar, roster, compare ---------- */

.slots-bar { display: flex; gap: var(--s-3); overflow-x: auto; padding-bottom: 2px; }
.slotchip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 200px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--rule);
  border-radius: var(--r-panel);
  background: var(--sheet);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--d-fast), background-color var(--d-fast), box-shadow var(--d-fast);
}
.slotchip:hover { border-color: var(--cobalt); }
.slotchip[aria-pressed="true"] { border-color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt); background: #eef0f6; }
.slotchip__title { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; line-height: 1; }
.slotchip__meta { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-micro); color: var(--muted); }
.slotchip--filled { opacity: 0.7; }
.slotchip--new {
  align-items: center;
  justify-content: center;
  flex-direction: row;
  min-width: 150px;
  border-style: dashed;
  border-color: var(--cobalt);
  color: var(--cobalt);
  background: transparent;
  font-weight: 600;
}
.slotchip--new svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.slotchip--new:hover { background: var(--cobalt-a16); }

.roster { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--s-2); }
.seat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 112px;
  padding: var(--s-3) var(--s-2);
  border-radius: var(--r-panel);
  text-align: center;
  font-size: var(--t-micro);
}
.seat__name { font-family: var(--f-display); font-weight: 800; font-size: 1.05rem; line-height: 1; }
.seat__sub { color: var(--muted); }
.seat--member, .seat--captain { background: var(--sheet); border: 1px solid var(--rule); }
.seat--captain { background: var(--cobalt); border-color: var(--cobalt); color: var(--sheet); }
.seat--captain .seat__sub { color: var(--blush); }
.seat--open { border: 1.5px dashed var(--cobalt); color: var(--cobalt); background: rgba(245, 241, 239, 0.5); }
.seat--open .seat__sub { color: var(--cobalt); }
.seat--free { border: 1.5px dashed var(--rule); color: var(--muted); }
.seat--joined { animation: stampin 640ms var(--ease-snap); }
.seat--joined::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--r-panel) + 3px);
  border: 2px solid var(--berry);
  pointer-events: none;
}
@keyframes stampin { 0% { transform: scale(1.12) rotate(-4deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

.compare__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); align-items: stretch; }
.compare__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 360px;
  padding: var(--s-5);
  border: 1.5px dashed var(--rule);
  border-radius: var(--r-sticker);
  color: var(--muted);
  text-align: center;
  font-size: var(--t-small);
}
.compare__chart { margin-top: var(--s-6); }

/* ---------- Spots page blocks ---------- */

.walletbar {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-panel);
  background: var(--cobalt);
  color: var(--sheet);
}
.walletbar__who { display: flex; align-items: center; gap: var(--s-3); min-width: 0; }
.walletbar__name { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }
.walletbar__sub { color: var(--blush); font-size: var(--t-micro); }
.walletbar .stamp--verified, .walletbar .stamp--unverified { color: var(--sheet); }
.walletbar__end { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }
.balance { display: flex; flex-direction: column; gap: 2px; padding-left: var(--s-5); border-left: 1px solid var(--blush-a35); }
.balance__label { font-size: var(--t-micro); color: var(--blush); }
.balance__value { font-family: var(--f-display); font-weight: 800; font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.balance__value.is-changed { animation: tick 900ms var(--ease-out); }
@keyframes tick { 0% { color: var(--blush); transform: translateY(-3px); } 100% { color: inherit; transform: none; } }

.spotlist { display: flex; flex-direction: column; }
.spotrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-2) var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--ink-a14);
  background: var(--sheet);
  cursor: pointer;
  text-align: left;
  transition: background-color var(--d-fast);
}
.spotrow:last-child { border-bottom: 0; }
.spotrow:hover { background: #efe9e7; }
.spotrow[aria-selected="true"] { background: #eef0f6; box-shadow: inset 3px 0 0 var(--cobalt); }
.spotrow__title { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; line-height: 1; }
.spotrow__squad { font-size: var(--t-small); color: var(--muted); }
.spotrow__reqs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--t-micro); color: var(--muted); }
.spotrow__reqs b { color: var(--ink); font-weight: 700; }
.spotrow__end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.spotrow__fee { font-weight: 700; font-size: var(--t-small); }

.spotdetail { position: sticky; top: calc(var(--header-h) + 16px); }

.paychoice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); }
.paychoice__opt { position: relative; cursor: pointer; }
.paychoice__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.paychoice__opt > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--s-3);
  border: 1px solid var(--rule);
  border-radius: var(--r-control);
  background: var(--sheet);
  transition: border-color var(--d-fast), box-shadow var(--d-fast), background-color var(--d-fast);
}
.paychoice__opt:hover > span { border-color: var(--muted); }
.paychoice__opt input:checked + span { border-color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt); background: #eef0f6; }
.paychoice__opt input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.paychoice__opt input:disabled + span { opacity: 0.5; cursor: not-allowed; }
.paychoice__token { font-size: var(--t-micro); color: var(--muted); font-weight: 600; }
.paychoice__amount { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; line-height: 1; }

/* ---------- States ---------- */

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-8) var(--s-6);
  text-align: center;
}
.state__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--s-2);
  border-radius: 50%;
  border: 1.5px dashed var(--cobalt);
  color: var(--cobalt);
}
.state__icon svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.state__title { font-family: var(--f-display); font-weight: 800; font-size: var(--t-d4); line-height: 1; }
.state__body { max-width: 44ch; color: var(--muted); font-size: var(--t-small); }
.state .btn { margin-top: var(--s-3); }
.state--error .state__icon { border-color: var(--warn); color: var(--warn); border-style: solid; }
.state--compact { padding: var(--s-6) var(--s-5); }

.skeleton { display: flex; flex-direction: column; gap: 0; }
.skeleton__row {
  display: grid;
  grid-template-columns: 40px 1.6fr repeat(4, 1fr);
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--ink-a14);
}
.skeleton__bar, .skeleton__dot, .skeleton__card {
  background: linear-gradient(90deg, var(--paper-2) 0%, #e2d8d5 50%, var(--paper-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
.skeleton__bar { height: 12px; border-radius: 4px; }
.skeleton__bar--wide { height: 16px; width: 70%; }
.skeleton__dot { width: 32px; height: 32px; border-radius: 50%; }
.skeleton--cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); }
.skeleton__card { height: 360px; border-radius: var(--r-sticker); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* Notices */
.notice {
  display: flex;
  align-items: flex-start;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-control);
  font-size: var(--t-small);
  line-height: 1.4;
}
.notice svg { flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.notice--error { background: rgba(183, 120, 98, 0.16); color: var(--warn); border: 1px solid rgba(125, 62, 42, 0.35); }
.notice--info { background: var(--cobalt-a16); color: var(--ink); border: 1px solid var(--cobalt-a28); }
.notice--ok { background: var(--berry-a14); color: var(--berry-ink); border: 1px solid rgba(162, 69, 126, 0.35); }
.notices { display: flex; flex-direction: column; gap: var(--s-2); }

/* Toasts */
.toasts {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--s-2);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  max-width: 420px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-panel);
  background: var(--ink);
  color: var(--sheet);
  box-shadow: var(--sh-pop);
  font-size: var(--t-small);
  font-weight: 500;
  pointer-events: auto;
  animation: toastin var(--d-slow) var(--ease-snap);
}
.toast svg { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toast--ok svg { color: var(--blush); }
.toast--error { background: var(--warn); }
.toast.is-leaving { animation: toastout var(--d-base) var(--ease-out) forwards; }
@keyframes toastin { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastout { to { transform: translateY(8px); opacity: 0; } }

/* Modal */
.modal {
  width: min(560px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  border-radius: var(--r-sticker);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--sh-pop);
}
.modal--wide { width: min(760px, calc(100vw - 48px)); }
.modal::backdrop { background: rgba(7, 12, 167, 0.42); }
.modal[open] { animation: modalin var(--d-slow) var(--ease-snap); }
@keyframes modalin { from { transform: translateY(10px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) var(--s-5) 0; }
.modal__title { font-family: var(--f-display); font-weight: 900; font-size: var(--t-d3); line-height: 0.95; }
.modal__body { padding: var(--s-4) var(--s-5); color: var(--muted); }
.modal__body > * + * { margin-top: var(--s-3); }
.modal__foot { display: flex; justify-content: flex-end; gap: var(--s-3); padding: 0 var(--s-5) var(--s-5); }

/* ---------- Charts ---------- */

.chart { display: flex; flex-direction: column; gap: var(--s-2); }
.chart__plot { width: 100%; min-height: 120px; }
.chart__plot svg { width: 100%; height: auto; overflow: visible; }
.chart__cap { font-size: var(--t-micro); color: var(--muted); }
.chart-grid { stroke: var(--ink-a14); stroke-width: 1; }
.chart-zero { stroke: var(--muted); stroke-width: 1; }
.chart-axis { fill: var(--muted); font-family: var(--f-text); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-title { fill: var(--muted); font-family: var(--f-text); font-size: 11px; font-weight: 600; }
.chart-value { fill: var(--ink); font-family: var(--f-text); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chart-label { fill: var(--ink); font-family: var(--f-text); font-size: 12px; font-weight: 600; }
.chart-line { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { opacity: 0.12; }
.chart-dot { stroke: var(--sheet); stroke-width: 2; }
.tone-cobalt { stroke: var(--cobalt); fill: var(--cobalt); }
.tone-sky { stroke: var(--sky); fill: var(--sky); }
.tone-copper { stroke: var(--copper); fill: var(--copper); }
.tone-berry { stroke: var(--berry); fill: var(--berry); }
.chart-line.tone-cobalt, .chart-line.tone-sky, .chart-line.tone-copper, .chart-line.tone-berry { fill: none; }
.chart-bar-bg { fill: var(--ink-a08); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--t-micro); color: var(--muted); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__key { width: 14px; height: 4px; border-radius: 2px; }
.legend__key.tone-cobalt { background: var(--cobalt); }
.legend__key.tone-sky { background: var(--sky); }
.legend__key.tone-copper { background: var(--copper); }
.legend__key.tone-berry { background: var(--berry); }

/* ---------- Pictures (spots) ---------- */

img[data-spot] { max-width: 100%; height: auto; }
img[data-kind="framed"] { object-fit: cover; border-radius: var(--r-card); background: var(--paper-2); }
img[data-kind="free"] { object-fit: contain; }

/* =========================================================
   Landing page
   ========================================================= */

.hero { padding: var(--s-8) 0 var(--s-9); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr); align-items: end; gap: var(--s-5); }
.hero__title { font-size: var(--t-mega); line-height: 0.92; color: var(--cobalt); }
.hero__title span { display: block; }
.hero__title span:nth-child(-n+2) { display: inline-block; margin-right: 0.25em; }
.hero__lede { margin-top: var(--s-6); max-width: 44ch; font-size: var(--t-lede); font-weight: 300; color: var(--muted); }
.hero__actions { margin-top: var(--s-6); }
.hero__figure { justify-self: end; align-self: stretch; width: 100%; height: auto; min-height: 0; object-fit: contain; object-position: right bottom; margin-right: calc(var(--s-5) * -1); }

.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-5); align-items: end; margin-bottom: var(--s-7); }
.section-head h2 { font-size: var(--t-d1); }
.section-head p { font-size: var(--t-lede); font-weight: 300; color: var(--muted); max-width: 42ch; }
.band--ink .section-head p { color: var(--blush); }

/* Problem: split slogan */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.split__side h2 { font-size: var(--t-d1); color: var(--ink); }
.split__side h2 span { display: block; }
.split__side p { margin-top: var(--s-4); max-width: 40ch; font-size: var(--t-lede); font-weight: 300; color: var(--muted); }
.split__side + .split__side { padding-left: var(--s-5); border-left: 1px solid var(--rule); }
.problem__picture { margin-top: var(--s-7); }
.problem__picture img { width: 100%; border-radius: var(--r-sticker); }

/* Traders: stations */
.traders__path { margin: 0 0 var(--s-2); }
.traders__path img { width: 100%; }
.stations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); align-items: stretch; counter-reset: station; }
.station {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-5);
  border-radius: var(--r-sticker);
  background: var(--sheet);
  border: 1px solid var(--rule);
}
.station__num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-control);
  background: var(--cobalt);
  color: var(--sheet);
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 1.25rem;
  line-height: 1;
}
.station h3 { font-size: 2rem; line-height: 0.95; margin-top: var(--s-2); }
.station p { color: var(--muted); font-weight: 300; font-size: 1rem; }
.station--dark { background: var(--cobalt); border-color: var(--cobalt); color: var(--sheet); }
.station--dark .station__num { background: var(--sheet); color: var(--cobalt); }
.station--dark p { color: var(--blush); }
.cardback { display: flex; flex-direction: column; margin-top: var(--s-2); border-top: 1px solid var(--blush-a35); }
.cardback li { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 7px 0; border-bottom: 1px solid var(--blush-a35); font-size: var(--t-small); color: var(--sheet); }
.cardback li::after { content: ''; flex: none; width: 46px; height: 8px; border-radius: 2px; background: var(--blush-a35); }
.traders__end { display: flex; justify-content: flex-end; margin-top: var(--s-5); }
.traders__end p { font-family: var(--f-display); font-weight: 800; font-size: var(--t-d4); line-height: 1; color: var(--cobalt); }

/* Captains: the fanned hand */
.captains { overflow: hidden; }
.captains__grid { display: grid; grid-template-columns: minmax(0, 4.4fr) minmax(0, 7.6fr); gap: var(--s-7); align-items: center; }
.captains h2 { font-size: var(--t-d1); color: var(--sheet); }
.captains__steps { margin-top: var(--s-6); display: flex; flex-direction: column; border-top: 1px solid var(--blush-a35); }
.captains__steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--blush-a35); }
.captains__steps b { font-family: var(--f-display); font-weight: 900; font-size: 1.5rem; line-height: 1; color: var(--sheet); }
.captains__steps p { color: var(--blush); font-weight: 300; font-size: 1.0625rem; line-height: 1.45; }
.captains__seat { margin-top: var(--s-5); display: flex; justify-content: center; }

.fan { position: relative; height: 470px; }
.fan__card {
  --rot: 0deg;
  --x: 0px;
  --y: 0px;
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 210px;
  height: 300px;
  margin-left: -105px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-sticker);
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--sh-sticker);
  transform-origin: 50% 120%;
  transform: translate(var(--x), var(--y)) rotate(var(--rot));
}
.fan__face { flex: 1; border-radius: var(--r-card); display: grid; place-items: center; }
.fan__face .seal { --size: 64px; }
.fan__name { padding: 0 6px; font-family: var(--f-display); font-weight: 800; font-size: 1.6rem; line-height: 1; }
.fan__blurb { padding: 0 6px 6px; font-size: var(--t-micro); color: var(--muted); line-height: 1.35; min-height: 3.3em; }
.fan__card:nth-child(1) { --rot: -22deg; --x: -196px; --y: 30px; }
.fan__card:nth-child(2) { --rot: -11deg; --x: -102px; --y: 6px; }
.fan__card:nth-child(4) { --rot: 11deg; --x: 102px; --y: 6px; }
.fan__card:nth-child(5) { --rot: 22deg; --x: 196px; --y: 30px; }
.fan__card--hero {
  z-index: 2;
  width: 236px;
  height: 336px;
  margin-left: -118px;
  --y: -46px;
  background: var(--cobalt);
  color: var(--sheet);
  box-shadow: var(--sh-lift);
}
.fan__card--hero .fan__face { background-color: var(--ink); }
.fan__card--hero .fan__blurb { color: var(--blush); }
.fan__card:nth-child(2), .fan__card:nth-child(4) { z-index: 1; }
.fan__card:nth-child(n+4) { text-align: right; }
.fan__seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: var(--sheet);
  box-shadow: 0 0 0 6px var(--ink), 0 0 0 8px var(--blush);
}
.fan__seal::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; border: 2px dotted var(--ink); }
.fan__seal img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }

/* Doors */
.doors__head { text-align: center; margin-bottom: var(--s-7); }
.doors__head h2 { font-size: var(--t-d1); }
.doors__head p { margin: var(--s-4) auto 0; max-width: 44ch; font-size: var(--t-lede); font-weight: 300; color: var(--muted); }
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8); align-items: stretch; padding: 0 var(--s-6); }
.door {
  --tilt: -2.5deg;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: 14px 14px var(--s-5);
  border-radius: 28px;
  background: var(--sheet);
  box-shadow: var(--sh-lift);
  transform: rotate(var(--tilt));
  transition: transform var(--d-slow) var(--ease-out);
}
.door + .door { --tilt: 2.5deg; }
.door:hover, .door:focus-within { transform: rotate(0deg) translateY(-4px); }
.door__face { display: flex; align-items: flex-end; justify-content: center; height: 320px; border-radius: 20px; overflow: hidden; }
.door__face img { width: 360px; }
.door__body { display: flex; flex-direction: column; gap: var(--s-3); padding: 0 var(--s-3); flex: 1; }
.door h3 { font-size: 2.75rem; line-height: 0.9; font-weight: 900; }
.door p { color: var(--muted); font-weight: 300; font-size: 1.0625rem; max-width: 40ch; }
.door .btn { align-self: flex-start; margin-top: auto; }
.door--captain { background: var(--cobalt); color: var(--sheet); }
.door--captain p { color: var(--blush); }

/* ---------- Page-load entrance (one per page) ---------- */

.enter { animation: rise var(--d-enter) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms); }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.enter-tilt { animation: settle 1000ms var(--ease-snap) both; animation-delay: 300ms; }
@keyframes settle { from { opacity: 0; transform: translateY(24px) rotate(6deg); } to { opacity: 1; transform: none; } }

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

/* ---------- 1024 to 1179 ---------- */

@media (max-width: 1179px) {
  :root { --gutter: 24px; }
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .fan { transform: scale(0.8); transform-origin: 50% 70%; }
  .captains__grid { gap: var(--s-5); }
  .doors { gap: var(--s-6); padding: 0; }
  .rank-list { --rank-cols: 30px minmax(200px, 1.6fr) repeat(6, minmax(58px, 0.8fr)) 176px; }
  .roster .seat__sub { font-size: 11px; }
}
