/* Repêchage. Lake water, chalk, buoy yellow. One family for display (Anybody, a width axis
   we use like stencilled boat lettering), one for reading (Public Sans). */

:root {
  --lake: #0f3b3a;
  --lake-deep: #0a2a29;
  --lake-ink: #d9ebe6;      /* text on lake */
  --lake-soft: #9cc3ba;     /* secondary text on lake, tinted from the hue */
  --chalk: #f6f7f4;
  --surface: #ffffff;
  --ink: #142021;
  --ink-soft: #4a5a5a;
  --rule: #d5ddd9;
  --buoy: #ffcf1f;
  --buoy-ink: #1d1600;
  --alert: #b3261e;
  --ok: #1d6b46;

  --display: 'Anybody', 'Arial Narrow', sans-serif;
  --text: 'Public Sans', system-ui, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --r-s: 6px;
  --r-m: 12px;
  --r-l: 20px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --chalk: #0c1716;
    --surface: #132221;
    --ink: #e8efec;
    --ink-soft: #9fb2ad;
    --rule: #26403e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --chalk: #0c1716; --surface: #132221; --ink: #e8efec; --ink-soft: #9fb2ad; --rule: #26403e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font: 400 1rem/1.55 var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--lake);
  overflow-x: hidden;
}
::selection { background: var(--buoy); color: var(--buoy-ink); }
:focus-visible { outline: 3px solid var(--buoy); outline-offset: 3px; border-radius: 4px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--display); line-height: 1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--ink-soft); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--buoy); color: var(--buoy-ink); padding: 10px 14px; border-radius: var(--r-s); font-weight: 700; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* Buttons: one solid style, one ghost. Press scales, never on hover. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--buoy); color: var(--buoy-ink);
  font: 700 1rem/1 var(--text); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn-wide { width: 100%; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn-dark { background: var(--lake); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #ffd94d; }
  .btn-ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
  .btn-dark:hover { background: var(--lake-deep); }
}
.linkish { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--ink-soft); font: inherit; text-decoration: underline; cursor: pointer; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: var(--lake); color: #fff;
}
.brand {
  font-family: var(--display); font-weight: 800; font-stretch: 140%;
  font-size: 1.35rem; letter-spacing: -0.01em; text-decoration: none;
}
.nav { display: flex; align-items: center; gap: clamp(8px, 2.5vw, 28px); }
.nav a:not(.btn) { color: var(--lake-ink); text-decoration: none; font-weight: 600; padding: 10px 2px; }
.nav-account { background: none; border: 0; color: var(--lake-ink); font: 600 1rem/1 var(--text); padding: 10px 2px; min-height: 44px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .nav-account:hover { color: #fff; text-decoration: underline; } }
.btn:disabled { opacity: .6; cursor: progress; }
/* Google's sign-in button: white, grey outline, the G at full colour (their branding rules). */
.btn-google { background: #fff; color: #1f1f1f; box-shadow: inset 0 0 0 1px #747775; gap: 12px; font-weight: 600; }
.btn-google .g-logo { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .btn-google:hover { background: #f2f2f2; } }
.or { text-align: center; color: var(--ink-soft); font-size: 0.875rem; }
@media (hover: hover) and (pointer: fine) { .nav a:not(.btn):hover { color: #fff; text-decoration: underline; } }
@media (max-width: 520px) { .nav a[href="#safety"] { display: none; } }

/* Hero: the boathouse rack is the one big moment. */
.hero {
  background: var(--lake); color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: end;
  padding: clamp(40px, 7vw, 88px) max(var(--gutter), calc((100% - var(--max)) / 2)) 0;
  overflow: hidden;
}
.hero-inner { padding-bottom: clamp(40px, 6vw, 72px); }
.hero h1 {
  font-weight: 850; font-stretch: 62%;
  font-size: clamp(3.2rem, 8.4vw, 8rem);
  line-height: 0.86; letter-spacing: -0.02em;
  max-width: 11ch;
  text-transform: uppercase;
}
.lede { margin-top: 24px; max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--lake-ink); }
.hero-search {
  margin-top: 28px; display: flex; gap: 8px; max-width: 560px;
  background: #fff; padding: 6px; border-radius: 999px;
}
.hero-search input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 16px;
  font: inherit; font-size: 1.0625rem; color: #142021; caret-color: var(--lake);
}
.hero-search input::placeholder { color: #5d6c6b; }
.hero-search input:focus { outline: none; }
.hero-search:focus-within { box-shadow: 0 0 0 3px var(--buoy); }

.rack-wrap { position: relative; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; }
.rack-caption { color: var(--lake-soft); font-size: 0.9375rem; margin-bottom: 14px; }
.rack {
  display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr));
  gap: clamp(2px, 0.8vw, 10px);
  height: min(68vh, 600px);
  align-items: stretch;
  border-bottom: 10px solid var(--lake-deep);  /* the rack's bar */
}
.rack button {
  position: relative; height: 100%;
  border: 0; padding: 0; background: none; cursor: pointer; color: inherit;
  display: flex; flex-direction: column; align-items: center;
  border-radius: 8px 8px 0 0;
  transition: transform 220ms var(--ease-out);
}
.rack .blade { width: 100%; max-width: 72px; height: auto; flex: none; position: relative; z-index: 1; }
.rack .loom {
  flex: 1; width: 16%; min-width: 4px; max-width: 10px; margin-top: -3px; border-radius: 0 0 2px 2px;
  /* the shaft, with its button and collar about a third of the way down */
  background: linear-gradient(#d8cfb8 0 38%, #f2efe6 38% 46%, #d8cfb8 46%);
}
.rack .blade-line { fill: none; stroke: rgba(0,0,0,.35); stroke-width: 1.2; }
.rack button[aria-pressed="true"] { transform: translateY(-14px); }
.rack button[aria-pressed="true"]::after {
  content: ''; position: absolute; left: 50%; bottom: -24px; width: 10px; height: 10px;
  translate: -50% 0; border-radius: 50%; background: var(--buoy);
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 0; }
  .hero-inner { padding-bottom: 0; }
  .rack-wrap { margin-top: 40px; }
  .rack { height: clamp(220px, 60vw, 340px); }
}
@media (hover: hover) and (pointer: fine) { .rack button:hover { transform: translateY(-8px); } .rack button[aria-pressed="true"]:hover { transform: translateY(-14px); } }

/* Blades rise into the rack once, staggered unevenly, when the page opens. */
@media (prefers-reduced-motion: no-preference) {
  .rack button { animation: rise 900ms var(--ease-drawer) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
  @keyframes rise { from { translate: 0 75%; opacity: 0; } to { translate: 0 0; opacity: 1; } }
}

/* Sections */
.shop, .how, .safety, .sell { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 112px) var(--gutter) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
h2 { font-weight: 800; font-stretch: 75%; font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.015em; text-transform: uppercase; }

/* Filters */
.filters { display: grid; gap: 14px; margin-bottom: 28px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--rule); background: var(--surface); color: var(--ink);
  font: 600 0.9375rem/1 var(--text); cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--lake); border-color: var(--lake); color: #fff; }
.filter-row { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 10px; }
@media (max-width: 860px) { .filter-row { grid-template-columns: 1fr 1fr; } .filter-row .field-inline:first-child { grid-column: 1 / -1; } }
.field-inline { display: grid; gap: 4px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--rule); border-radius: var(--r-s);
  min-height: 44px; padding: 8px 12px; width: 100%;
  transition: border-color 160ms ease;
}
textarea { resize: vertical; min-height: 110px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--lake); box-shadow: 0 0 0 3px color-mix(in srgb, var(--buoy) 70%, transparent); }
:root[data-theme="dark"] input:focus-visible { border-color: var(--buoy); }
.colour-filter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.swatch { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }

/* Listing cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: clamp(14px, 2vw, 24px); }
.card {
  position: relative; display: flex; flex-direction: column; width: 100%;
  background: var(--surface); border-radius: var(--r-m);
  border: 1px solid var(--rule);
  text-align: left; color: inherit; font: inherit; padding: 0; cursor: pointer;
  overflow: hidden;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.card:active { transform: scale(0.985); }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(10, 42, 41, .35); }
}
.card-art {
  position: relative; aspect-ratio: 4 / 5; display: grid; place-items: center;
  background: var(--tint, #e6ece9);
}
.card-art .kit { width: 62%; height: auto; filter: drop-shadow(0 8px 10px rgba(0,0,0,.18)); }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.kit-line { fill: none; stroke: rgba(0,0,0,.4); stroke-width: 1.2; }
/* The size, as a bow number: white card, black numeral. */
.bow {
  position: absolute; top: 12px; left: 12px;
  min-width: 44px; height: 44px; padding: 0 8px; border-radius: 22px;
  display: grid; place-items: center;
  background: #fff; color: #000;
  font: 800 1.1rem/1 var(--display); font-stretch: 80%;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.flag {
  position: absolute; top: 14px; right: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #142021; font-size: 0.75rem; font-weight: 700;
}
.card-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.card-title { font-weight: 700; font-size: 1.0625rem; line-height: 1.25; }
.card-club { font-size: 0.875rem; }
.card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 8px; }
.price { font-family: var(--display); font-weight: 800; font-stretch: 90%; font-size: 1.5rem; }
.card-cond { font-size: 0.8125rem; color: var(--ink-soft); }
.empty { padding: 48px 0; display: grid; justify-items: start; gap: 16px; font-size: 1.125rem; }

/* How a sale works: a real sequence, so it's numbered. */
.how-def { margin-top: 16px; max-width: 56ch; font-size: 1.125rem; color: var(--ink-soft); }
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; border-top: 2px solid var(--ink); }
.steps li { counter-increment: step; padding: 24px 24px 0 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 20px;
  font: 850 4.5rem/0.8 var(--display); font-stretch: 60%; color: var(--lake);
}
:root[data-theme="dark"] .steps li::before { color: var(--buoy); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps li::before { color: var(--buoy); } }
.steps h3 { font-size: 1.5rem; font-weight: 750; font-stretch: 90%; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); max-width: 34ch; }
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .steps li::before { font-size: 3.5rem; margin-bottom: 12px; }
}

/* Safety: a definition list on a lake panel, not a wall of cards. */
.safety { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 5vw, 72px); }
.safety-intro p { margin-top: 16px; color: var(--ink-soft); max-width: 32ch; font-size: 1.125rem; }
.safety-list { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.safety-list div { padding: 18px 0; border-top: 1px solid var(--rule); }
.safety-list dt { font-weight: 700; font-size: 1.0625rem; margin-bottom: 4px; }
.safety-list dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .safety { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .safety-list { grid-template-columns: 1fr; } }

/* Sell */
.sell { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; padding-bottom: clamp(56px, 9vw, 112px); }
.sell-form > .muted { margin: 12px 0 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 0.9375rem; position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
.field small { font-weight: 400; color: var(--ink-soft); }
.field[aria-invalid="true"] input, .field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--alert); }
.colours { display: flex; flex-wrap: wrap; gap: 16px; }
.colours legend { margin-bottom: 6px; padding: 0; }
.colours label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.colours input[type="color"] { width: 52px; height: 44px; padding: 3px; cursor: pointer; }
.counter { justify-self: end; font-size: 0.8125rem; }
.drop {
  display: flex; align-items: center; justify-content: center; min-height: 72px;
  border: 1.5px dashed var(--rule); border-radius: var(--r-m); cursor: pointer;
  font-weight: 600; color: var(--ink-soft);
  transition: border-color 160ms ease;
}
.drop:focus-within { border-color: var(--lake); box-shadow: 0 0 0 3px color-mix(in srgb, var(--buoy) 70%, transparent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
@media (hover: hover) and (pointer: fine) { .drop:hover { border-color: var(--ink-soft); } }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; width: 76px; height: 76px; border-radius: var(--r-s); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); color: #fff; cursor: pointer; font-size: 1rem; line-height: 1; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; flex: none; accent-color: var(--lake); }
.form-error { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r-s); background: color-mix(in srgb, var(--alert) 10%, transparent); color: var(--alert); font-weight: 600; }
.sell-form .btn-wide { margin-top: 20px; }
.sell-preview { position: sticky; top: 88px; }
.card-preview { cursor: default; }
@media (max-width: 860px) { .sell { grid-template-columns: 1fr; } .sell-preview { position: static; order: -1; max-width: 320px; } }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }

/* Footer */
.foot { margin-top: 24px; padding: 40px var(--gutter); background: var(--lake-deep); color: var(--lake-ink); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot .muted { color: var(--lake-soft); }

/* Dialogs: a sheet from the bottom on phones, centred on wider screens. */
.sheet {
  border: 0; padding: 0; margin: auto; width: min(960px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  border-radius: var(--r-l); background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.5);
  opacity: 1; transform: none;
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), overlay 240ms allow-discrete, display 240ms allow-discrete;
}
.sheet-small { width: min(520px, calc(100% - 32px)); }
.sheet[open] { display: block; }
.sheet::backdrop { background: rgba(6, 26, 25, .6); transition: background-color 240ms ease, overlay 240ms allow-discrete, display 240ms allow-discrete; }
@starting-style { .sheet[open] { opacity: 0; transform: translateY(16px) scale(0.98); } .sheet[open]::backdrop { background: rgba(6, 26, 25, 0); } }
@media (prefers-reduced-motion: reduce) { @starting-style { .sheet[open] { transform: none; } } }
@media (max-width: 640px) {
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; max-height: 92dvh; }
  @starting-style { .sheet[open] { transform: translateY(40px); } }
}
.sheet-inner { padding: clamp(20px, 3vw, 32px); overflow: auto; max-height: inherit; }
.sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: color-mix(in srgb, var(--ink) 8%, var(--surface)); color: var(--ink); cursor: pointer;
  display: grid; place-items: center;
}
.sheet-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; fill: none; }
.detail { display: grid; grid-template-columns: 1fr 1fr; }
.detail-art { position: relative; background: var(--tint); display: grid; place-items: center; padding: 32px; min-height: 360px; border-radius: var(--r-l) 0 0 var(--r-l); }
.detail-art .kit { width: 70%; max-width: 300px; height: auto; filter: drop-shadow(0 12px 16px rgba(0,0,0,.2)); }
.detail-art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.detail-info { padding: clamp(20px, 3vw, 36px); display: grid; gap: 18px; align-content: start; }
.detail-info h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); text-transform: none; font-stretch: 85%; padding-right: 40px; }
.detail-price { font-family: var(--display); font-weight: 850; font-stretch: 85%; font-size: 2.4rem; line-height: 1; }
.facts { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 4px 24px; margin: 0; }
.facts dt { font-size: 0.8125rem; color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 700; grid-row: 2; }
.fit { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.fit caption { text-align: left; font-weight: 700; margin-bottom: 6px; }
.fit th, .fit td { text-align: left; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.fit th { font-weight: 600; color: var(--ink-soft); }
.seller { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: var(--r-m); background: color-mix(in srgb, var(--lake) 7%, var(--surface)); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--lake); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); font-weight: 700; font-size: 0.8125rem; }
.verified svg { width: 14px; height: 14px; fill: currentColor; }
.unverified { color: var(--ink-soft); font-size: 0.8125rem; }
:root[data-theme="dark"] .verified { color: #6fd3a1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .verified { color: #6fd3a1; } }
.actions { display: grid; gap: 10px; }
.actions .row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.note { font-size: 0.875rem; color: var(--ink-soft); }
@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  .detail-art { min-height: 280px; border-radius: var(--r-l) var(--r-l) 0 0; }
}

.modal-body { display: grid; gap: 16px; }
.modal-body h2 { font-size: 1.9rem; text-transform: none; font-stretch: 85%; padding-right: 48px; }
.ledger { width: 100%; border-collapse: collapse; }
.ledger td { padding: 8px 0; border-bottom: 1px solid var(--rule); }
.ledger td:last-child { text-align: right; font-weight: 600; }
.ledger tr:last-child td { border-bottom: 0; font-weight: 800; font-size: 1.125rem; }
.timeline { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; color: var(--ink-soft); }
.warn { padding: 12px 14px; border-radius: var(--r-s); background: color-mix(in srgb, var(--buoy) 28%, var(--surface)); color: var(--ink); font-weight: 600; font-size: 0.9375rem; }
.radios { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.radios label { display: flex; gap: 10px; align-items: center; min-height: 40px; cursor: pointer; }
.radios input { width: 20px; height: 20px; min-height: 0; accent-color: var(--lake); }

/* Toasts */
.toasts { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 100; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); pointer-events: none; }
.toast {
  background: var(--ink); color: var(--chalk); padding: 14px 18px; border-radius: var(--r-m);
  font-weight: 600; box-shadow: 0 12px 30px -12px rgba(0,0,0,.5);
  transition: opacity 400ms ease, transform 400ms ease;
  @starting-style { opacity: 0; transform: translateY(100%); }
}
.toast.leaving { opacity: 0; transform: translateY(8px); transition-duration: 200ms; }

/* Themed scrollbars, since browsers ship their own otherwise */
html { scrollbar-color: color-mix(in srgb, var(--ink) 35%, transparent) var(--chalk); }

/* Account pages (#/orders, #/selling, #/inbox, #/moderate, #/guardian) */
.nav { flex-wrap: wrap; justify-content: flex-end; }
.view { max-width: 860px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 0; min-height: 60vh; }
.view-inner { display: grid; gap: 20px; }
.view h3 { font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: 1.6rem; margin-top: 16px; }
.panel { display: grid; gap: 12px; justify-items: start; padding: 20px; border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.panel h3 { margin: 0; }
.orders, .msgs, .threads { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.order { display: flex; gap: 16px; padding: 16px; border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.order-photo { flex: none; width: 72px; height: 72px; border-radius: var(--r-s); overflow: hidden; background: var(--rule); }
.order-photo img { width: 100%; height: 100%; object-fit: cover; }
.order-main { display: grid; gap: 6px; min-width: 0; flex: 1; align-content: start; overflow-wrap: anywhere; }
.order-title { font-weight: 700; font-size: 1.0625rem; }
.status { font-weight: 700; color: var(--ok); }
:root[data-theme="dark"] .status { color: #6fd3a1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status { color: #6fd3a1; } }
.label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.inline-form input { flex: 1 1 160px; }
.inline-form select { flex: 0 0 auto; width: auto; }
.address { display: grid; padding: 10px 12px; border-radius: var(--r-s); background: var(--chalk); box-shadow: inset 0 0 0 1px var(--rule); width: fit-content; max-width: 100%; }
.invite { display: grid; gap: 8px; width: 100%; }
.thread { border-radius: var(--r-m); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.thread summary { display: grid; gap: 2px; padding: 14px 16px; cursor: pointer; }
.thread[open] summary { border-bottom: 1px solid var(--rule); }
.thread .msgs, .thread .reply { padding: 14px 16px; }
.reply { display: grid; gap: 10px; justify-items: start; }
.reply textarea { min-height: 80px; }
.msg { display: grid; gap: 2px; max-width: 90%; padding: 10px 12px; border-radius: var(--r-m); background: var(--chalk); box-shadow: inset 0 0 0 1px var(--rule); }
.msg.mine { justify-self: end; background: color-mix(in srgb, var(--buoy) 22%, var(--surface)); }
.view .thumbs { margin: 4px 0; }
@media (max-width: 520px) { .order { flex-direction: column; } .nav { gap: 4px 14px; } }

/* Privacy and terms pages */
.legal { max-width: 72ch; margin: 0 auto; padding: 32px var(--gutter) 64px; }
.legal h1 { font-weight: 800; font-stretch: 75%; font-size: clamp(2.4rem, 6vw, 4rem); text-transform: uppercase; margin-bottom: 8px; }
.legal h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 36px 0 10px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.foot a { color: inherit; }
