/* DECENT UI: shared styles for the mock screens under ui/.

   Ported from the UI lab (decentalliance/DECENT-ui-lab, src/styles.css, Sep 2026):
   the same tokens, the same three grounds, the same components. Lab-only parts
   (mosaics, the request board) are left out; a short block at the end adds what the
   mock screens need that the lab does not have. Keep the lab's class names so a
   change there ports here by translation, not invention. */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600;700&display=swap');

/* ---- grounds: ink (the reference), navy (brand), paper (the demo's white) ---- */
:root, [data-theme="ink"] {
  --bg: #0E0E14;
  --bg-2: #1A1A23;
  --bg-3: #24242F;
  --text: #FFFFFF;
  --muted: #A9A9BA;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #F6A44B;
  --navy: #202050;
  --on-accent: #202050;
  --ok: #7FD19A;
  --ok-line: rgba(127, 209, 154, 0.4);
  --ok-tint: rgba(127, 209, 154, 0.14);
  --warn: #E8A24C;
  --warn-line: rgba(232, 162, 76, 0.45);
  --warn-tint: rgba(246, 164, 75, 0.14);
  --bad: #F09A8A;
  --bad-line: rgba(240, 154, 138, 0.45);
  --bad-tint: rgba(240, 154, 138, 0.14);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
[data-theme="navy"] {
  --bg: #1B1B47;
  --bg-2: #262660;
  --bg-3: #31316E;
  --text: #FFFFFF;
  --muted: #C2C2DA;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 40px rgba(10, 10, 40, 0.5);
}
[data-theme="paper"] {
  --bg: #FFFFFF;
  --bg-2: #F3F3F8;
  --bg-3: #E9E9F1;
  --text: #202050;
  --muted: #5C5C7A;
  --line: #E4E4EE;
  --ok: #2E6B45;
  --ok-line: #BFDDC8;
  --ok-tint: #E7F1E9;
  --warn: #B06A1E;
  --warn-line: #F1D3AE;
  --warn-tint: #FBF0DF;
  --bad: #B0432E;
  --bad-line: #EFC3B8;
  --bad-tint: #FBE8E3;
  --shadow: 0 18px 40px rgba(32, 32, 80, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .head { font-family: "Space Grotesk", "Inter", sans-serif; font-weight: 700; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
a { color: inherit; }
b, strong { font-weight: 700; }
s { text-decoration: line-through; }

.page { max-width: 880px; margin: 0 auto; padding: 0 20px 80px; }

/* ---- header ---- */
.top { display: flex; align-items: center; gap: 14px; padding: 18px 0 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 17px; text-decoration: none; }
.brand .d {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--text); color: var(--bg); font-size: 15px; line-height: 1;
}
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a, .nav button {
  background: none; border: none; padding: 6px 10px; border-radius: 999px; text-decoration: none;
  color: var(--muted); font-weight: 500; font-size: 13.5px;
}
.nav a[aria-current="page"], .nav button[aria-current="page"] { color: var(--text); background: var(--bg-2); }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.top .who { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 10px; }
  .nav { order: 3; flex-basis: 100%; margin-left: -10px; overflow-x: auto; }
  .brand span { display: none; }
  .hello { font-size: 21px; }
  .top .who { display: none; }
}

/* ---- page style control, pinned to the corner of the screen ---- */
.style-menu { position: fixed; top: 10px; right: 10px; z-index: 30; }
.style-btn {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--muted); display: grid; place-items: center; opacity: 0.75;
}
.style-btn:hover, .style-btn[aria-expanded="true"] { opacity: 1; color: var(--text); }
.style-pop {
  position: absolute; right: 0; top: 36px; min-width: 128px; display: grid; gap: 2px; padding: 6px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.style-pop button { display: flex; align-items: center; gap: 9px; border: none; background: none; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--text); text-align: left; }
.style-pop button:hover { background: var(--bg-3); }
.style-pop button[aria-checked="true"] { background: var(--bg-3); font-weight: 600; }
.style-pop .sw { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }
.style-pop .sw[data-t="ink"] { background: #0E0E14; }
.style-pop .sw[data-t="navy"] { background: #1B1B47; }
.style-pop .sw[data-t="paper"] { background: #FFFFFF; }
@media (max-width: 940px) { .top { padding-right: 36px; } }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 500; text-decoration: none;
}
.pill.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.pill.small { padding: 5px 11px; font-size: 12.5px; }
.pill .count { background: var(--text); color: var(--bg); border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 700; line-height: 18px; }
.pill.accent .count { background: var(--on-accent); color: #fff; }
.pill .sum { font-variant-numeric: tabular-nums; }

/* ---- prompt-style search ---- */
.hello { font-size: 26px; margin: 22px 0 14px; letter-spacing: -0.01em; max-height: 120px; overflow: hidden; transition: max-height 220ms ease, margin 220ms ease, opacity 160ms ease; }
.topbar.scrolled .hello { max-height: 0; margin: 10px 0 0; opacity: 0; }
@media (prefers-reduced-motion: reduce) { .hello { transition: none; } }

.prompt {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 28px;
  padding: 8px 8px 8px 14px; position: relative;
}
.prompt:focus-within { border-color: var(--muted); }
.prompt .icon { color: var(--muted); display: flex; }
.prompt input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  color: var(--text); font-size: 16px; padding: 8px 4px;
}
.prompt input::placeholder { color: var(--muted); }
.prompt .vr { width: 1px; height: 22px; background: var(--line); flex: 0 0 auto; margin: 0 4px; }
.prompt .ctx { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.prompt select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: none; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 6px 20px 6px 8px; border-radius: 999px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 9px) 55%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.prompt select:hover { background-color: var(--bg-3); }
.prompt select option { color: #202050; background: #fff; }
.prompt .go {
  width: 38px; height: 38px; border-radius: 50%; border: none; flex: 0 0 auto;
  background: var(--text); color: var(--bg); display: grid; place-items: center;
}
.prompt .go:disabled { background: var(--bg-3); color: var(--muted); cursor: default; }
@media (max-width: 640px) {
  .prompt { flex-wrap: wrap; border-radius: 24px; }
  .prompt input { flex: 1 1 200px; }
  .prompt .ctx { margin-left: auto; }
  .prompt .vr { display: none; }
}

/* ---- chips ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none;
}
.chip:hover { color: var(--text); background: var(--bg-2); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.chips .gap { flex: 0 0 1px; background: var(--line); margin: 6px 4px; }
.chips.sub { padding-top: 6px; }
.chips.sub .chip { font-size: 12px; padding: 4px 11px; }
.chip.offer { border-color: rgba(246,164,75,0.55); color: var(--accent); font-weight: 600; }
.chip.offer[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #202050; }
.chip .n { opacity: 0.7; margin-left: 4px; }

/* ---- tiles ---- */
.tile {
  position: relative; overflow: hidden; border-radius: 22px; border: none; padding: 0; cursor: pointer;
  text-align: left; color: #fff; display: block; width: 100%;
  transition: transform 180ms ease, box-shadow 180ms ease;
  isolation: isolate;
}
.tile:hover, .tile:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); outline: none; }
.tile:focus-visible { box-shadow: var(--shadow), 0 0 0 3px var(--accent); }
.tile.held { --ring: 0 0 0 5px var(--text); box-shadow: var(--ring); }
.tile.held:hover { box-shadow: var(--ring), var(--shadow); }
.tile .scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(10, 10, 20, 0.72) 0%, rgba(10, 10, 20, 0.35) 24%, rgba(10, 10, 20, 0) 46%);
}
.tile .cap { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; }
.tile .cap .name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 15px; line-height: 1.25; }
.tile .cap .sub { font-size: 12px; opacity: 0.86; margin-top: 3px; display: block; }
.tile .cap .sub b { font-weight: 600; opacity: 1; }
.tile .cap .sub s { opacity: 0.7; font-weight: 400; margin: 0 4px 0 5px; }
/* The lab's flag is an emoji; here it names the seller's platform in words, so it needs ink. */
.tile .flag { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 11.5px; font-weight: 600; color: #202050; background: rgba(255,255,255,0.85); border-radius: 999px; padding: 5px 9px; line-height: 1; }
.tile .add {
  position: absolute; right: 12px; top: 12px; z-index: 3;
  border: none; border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 700;
  background: rgba(255,255,255,0.92); color: #202050;
  opacity: 0; transform: translateY(-4px); transition: opacity 150ms ease, transform 150ms ease;
}
.tile:hover .add, .tile:focus-within .add, .tile .add.on { opacity: 1; transform: none; }
.tile .add.on { background: #202050; color: #fff; }
.tile.dim::after { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(10, 10, 20, 0.45); pointer-events: none; transition: opacity 180ms ease; }
.tile.dim:hover::after, .tile.dim:focus-within::after { opacity: 0; }
.grid .tile:not(.dim) .scrim { background: none; }
.grid .tile.one:not(.dim) .scrim { background: linear-gradient(to top, rgba(10, 10, 20, 0.6) 0%, rgba(10, 10, 20, 0) 32%); }
.grid .tile.big:not(.dim) .scrim, .hero .scrim { background: linear-gradient(to top, rgba(10, 10, 20, 0.6) 0%, rgba(10, 10, 20, 0) 20%); }
.grid .tile.held:not(.dim) .scrim { background: linear-gradient(to top, rgba(32, 32, 80, 0.97) 0%, rgba(32, 32, 80, 0.8) 26%, rgba(32, 32, 80, 0) 58%); }
.grid .tile.big.held:not(.dim) .scrim { background: linear-gradient(to top, rgba(32, 32, 80, 0.97) 0%, rgba(32, 32, 80, 0.8) 16%, rgba(32, 32, 80, 0) 40%); }
.grid .tile:not(.dim) .cap { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6), 0 0 2px rgba(0, 0, 0, 0.5); }
.tile.dim .cap { opacity: 0.85; }
/* The lab multiplies a painting over the ground. The mock screens have no art library,
   so the ground carries a large faint glyph where the painting would sit, as the lab's
   request tiles do when no picture matches. */
.tile .noart { position: absolute; inset: 0; display: grid; place-items: center; font-size: 96px; color: rgba(32, 32, 80, 0.35); z-index: 0; }
.grid .tile.one .noart { font-size: 44px; }
.tile .state { position: absolute; left: 12px; top: 44px; z-index: 3; border-radius: 999px; padding: 5px 10px; font-size: 11.5px; font-weight: 700; line-height: 1; }
.tile .state.offer { background: var(--accent); color: #202050; }
.tile .state.lock { background: rgba(32, 32, 80, 0.85); color: #fff; }
.tile .state.can { background: rgba(255,255,255,0.92); color: #2E6B45; }
.tile .cert { position: absolute; right: 12px; top: 12px; z-index: 3; background: rgba(255,255,255,0.92); color: #2E6B45; border-radius: 999px; padding: 6px 10px; font-size: 11.5px; font-weight: 700; line-height: 1; }
.tile .pname { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 0 18px; text-align: center; pointer-events: none; }
.tile .pname span { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 23px; line-height: 1.15; letter-spacing: -0.01em; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.4); }

@keyframes reveal { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
.tile.reveal { animation: reveal 240ms ease backwards; animation-delay: calc(var(--i, 0) * 55.6ms); }
@media (prefers-reduced-motion: reduce) { .tile.reveal { animation: none; } }

.section { container-type: inline-size; }
.grid { --n: 6; --gap: 12px; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: var(--gap); margin-top: 16px;
  grid-auto-rows: calc((100cqw - (var(--n) - 1) * var(--gap)) / var(--n) * 1.25); grid-auto-flow: dense; }
.grid .tile.big { grid-column: span 2; grid-row: span 2; }
@media (max-width: 640px) { .grid { --n: 4; --gap: 8px; } }
/* single-cell tiles */
.grid .tile.one { border-radius: 14px; }
.grid .tile.one .cap { left: 9px; right: 9px; bottom: 8px; }
.grid .tile.one .cap .name { font-size: 11.5px; line-height: 1.2; }
.grid .tile.one .cap .sub { font-size: 10px; margin-top: 2px; }
.grid .tile.one .flag { top: 7px; left: 7px; font-size: 9.5px; padding: 3px 6px; }
/* A held one-cell tile shows its stepper where the flag sits; the flag gives way. */
.grid .tile.one.held .flag { display: none; }
.grid .tile.one.dim .scrim { background: linear-gradient(to top, rgba(10, 10, 20, 0.78) 0%, rgba(10, 10, 20, 0.4) 34%, rgba(10, 10, 20, 0) 60%); }
.grid .tile.one .add { right: 7px; top: 7px; width: 26px; height: 26px; padding: 0; display: grid; place-items: center; font-size: 17px; line-height: 1; }
.grid .tile.one .add.on, .grid .tile.one .add.ask { width: auto; height: 26px; }
.grid .tile.one .add.ask { padding: 0 9px; font-size: 11px; }
.grid .tile.one .state { left: 7px; top: 34px; font-size: 10px; padding: 4px 7px; }
.grid .tile.one .pname { padding: 0 6px; }
.grid .tile.one .pname span { font-size: 15.5px; line-height: 1.12; overflow-wrap: anywhere; }
.grid .tile.one .step button { padding: 0 7px; font-size: 13px; height: 26px; }
.grid .tile.one .step span { min-width: 16px; font-size: 11.5px; }

.hero { aspect-ratio: auto; height: 300px; margin-top: 18px; }
.hero .cap .sub { font-size: 13.5px; max-width: 60%; }
.hero .try { position: absolute; top: 16px; left: 16px; z-index: 2; background: rgba(255,255,255,0.22); backdrop-filter: blur(8px); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,0.25); }
.hero .pname { place-items: center start; padding: 0 16px; text-align: left; }
.hero .pname span { max-width: 58%; font-size: 36px; line-height: 1.1; letter-spacing: -0.015em; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.4); }
.hero .noart { place-items: center end; padding-right: 40px; font-size: 150px; }
.hero.click { cursor: pointer; }
@media (max-width: 640px) { .hero { height: 240px; } .hero .pname span { font-size: 24px; } }
/* The list's hero: a third of the height, the title larger, the pictures a strip at the right. */
.hero.compact { height: 52px; }
.hero.compact .scrim { inset: 0 300px 0 0; background: linear-gradient(to right, rgba(10, 10, 20, 0.5) 0%, rgba(10, 10, 20, 0.5) 78%, rgba(10, 10, 20, 0) 100%); }
.hero.compact .pname { display: flex; align-items: center; gap: 16px; padding: 0 300px 0 16px; }
.hero.compact .pname span { font-size: 22px; max-width: none; white-space: nowrap; flex: 0 0 auto; }
.hero.compact .pname .sub { font-size: 11.5px; line-height: 1.2; font-family: "Inter", sans-serif; font-weight: 400; letter-spacing: 0; text-shadow: none; opacity: 0.88; white-space: normal; flex: 0 1 auto; min-width: 0; max-height: 42px; overflow: hidden; }
.hero.compact .try, .hero.compact .noart { display: none; }
.hero.compact .strip { position: absolute; top: 0; bottom: 0; right: 16px; display: flex; align-items: center; gap: 8px; z-index: 1; }
.hero.compact .strip .art, .lines .prod .art { position: relative; width: 36px; height: 36px; border-radius: 8px; overflow: hidden; isolation: isolate; flex: 0 0 auto; display: grid; place-items: center; font-size: 20px; }
@media (max-width: 640px) {
  .hero.compact .strip .art:nth-child(n+4) { display: none; }
  .hero.compact .pname { padding-right: 150px; }
  .hero.compact .scrim { inset: 0 150px 0 0; }
  .hero.compact .pname span { font-size: 17px; line-height: 1.1; white-space: normal; flex: 1 1 auto; min-width: 0; }
  .hero.compact .pname .sub { display: none; }
}

.section { margin-top: 34px; }
.section .h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section h2 { font-size: 18px; }
.section .n { color: var(--muted); font-size: 13px; }
.section .note { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.section .h .pill.small { margin-left: auto; }
.phead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pgroup .phead { margin-top: 26px; }
.pgroup:first-child .phead { margin-top: 20px; }
.pgroup .grid { margin-top: 10px; }
.phead .pname { background: none; border: none; padding: 0; color: var(--text); font: inherit; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.phead a.pname:hover { text-decoration: underline; }
.phead .flag { font-size: 13px; }
.phead .n { color: var(--muted); font-size: 12.5px; }

.empty { margin-top: 24px; padding: 40px 20px; border: 1px dashed var(--line); border-radius: 22px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); display: block; margin-bottom: 4px; font-size: 15px; }

.foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.foot .tag { color: var(--accent); font-weight: 600; }

/* ---- side sheets ---- */
.veil { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 40; }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 50;
  background: var(--bg); color: var(--text); overflow-y: auto; box-shadow: -20px 0 60px rgba(0,0,0,0.35);
  border-left: 1px solid var(--line); padding: 18px 22px 40px; animation: slide 200ms ease;
}
@keyframes slide { from { transform: translateX(30px); } to { transform: none; } }
.sheet .x { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); font-size: 16px; line-height: 1; z-index: 2; }
.sheet .art { position: relative; border-radius: 20px; overflow: hidden; height: 200px; isolation: isolate; display: grid; place-items: center; font-size: 110px; color: rgba(32, 32, 80, 0.35); }
.sheet h2 { font-size: 22px; margin-top: 16px; line-height: 1.2; }
.sheet .by { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.sheet .by a { text-underline-offset: 2px; }
.sheet .price { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.sheet .price b { font-family: "Space Grotesk", sans-serif; font-size: 24px; }
.sheet .price s { color: var(--muted); font-size: 15px; font-weight: 500; margin-left: -2px; }
.sheet .price span { color: var(--muted); font-size: 13px; }
.sheet .row, .about .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tagc { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tagc.ok { color: var(--ok); border-color: var(--ok-line); }
.tagc.where, .tagc.warn { color: var(--warn); border-color: var(--warn-line); }
.tagc.bad { color: var(--bad); border-color: var(--bad-line); }
.tagc.offer { color: var(--accent); border-color: rgba(246,164,75,0.5); font-weight: 600; }
.tagc.fill { background: var(--bg-2); color: var(--text); }
.cta { margin-top: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* The lab scopes .big to .cta and .about .meta; a bare .big would also catch .tile.big. */
.cta .big, .about .meta .big { border: none; border-radius: 999px; padding: 13px 18px; font-weight: 700; font-size: 14.5px; background: var(--accent); color: var(--on-accent); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.sheet .cta .big { flex: 1; }
.cta .big.secondary, .about .meta .big { background: var(--bg-2); color: var(--text); border: 1px solid var(--line); }
.cta .big.small { padding: 9px 14px; font-size: 13px; }
.cta .big:disabled { opacity: 0.5; cursor: default; }
.sheet p, .about p { color: var(--muted); font-size: 13.5px; margin: 12px 0 0; }
.sheet dl, .about dl, dl.kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 16px 0 0; font-size: 13px; }
.sheet dt, .about dt, dl.kv dt { color: var(--muted); }
.sheet dd, .about dd, dl.kv dd { margin: 0; }
.sheet .h3, .h3 { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 22px; }
.chain { margin-top: 8px; display: grid; gap: 6px; }
.chain .cstep { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.chain .cstep .r { width: 74px; flex: 0 0 auto; color: var(--muted); text-transform: capitalize; }
.chain .cstep .gap { color: var(--accent); font-style: italic; }

.step { display: inline-flex; align-items: center; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; }
.step button { background: none; border: none; padding: 6px 12px; font-weight: 700; font-size: 15px; line-height: 1; }
.step span { min-width: 26px; text-align: center; font-weight: 700; font-size: 13.5px; }

/* basket sheet */
.vendor { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.vendor .vh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vendor .vh b { font-family: "Space Grotesk", sans-serif; font-size: 15px; }
.vendor .vh span { font-size: 12px; color: var(--muted); }
.line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.line .thumb { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: 0 0 auto; position: relative; isolation: isolate; display: grid; place-items: center; font-size: 24px; }
.line .l { flex: 1; min-width: 0; }
.line .l .nm { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.line .l .u { display: block; font-size: 12px; color: var(--muted); }
.line .l .u s { opacity: 0.75; margin-left: 5px; }
.line .tot { font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.totals { margin-top: 16px; display: grid; gap: 4px; font-size: 13.5px; }
.totals .t { display: flex; justify-content: space-between; gap: 12px; }
.totals .t.m { color: var(--muted); }
.totals .t.big { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 17px; margin-top: 4px; }
.sim { margin-top: 12px; font-size: 12px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 10px; }
.lockbox { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: rgba(246,164,75,0.14); color: var(--text); font-size: 13.5px; line-height: 1.45; }
.lockbox b { color: var(--accent); }
.sentbox { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--ok-tint); color: var(--text); font-size: 13.5px; line-height: 1.45; }
.compose { display: grid; gap: 10px; margin-top: 14px; }
.compose label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.compose label.check { grid-template-columns: auto 1fr; align-items: center; color: var(--text); font-size: 13px; }
.compose input:not([type="checkbox"]):not([type="radio"]), .compose select, .compose textarea { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; color: var(--text); font-size: 14px; outline: none; }
.compose textarea { border-radius: 12px; line-height: 1.45; resize: vertical; }
.compose input:focus, .compose select:focus, .compose textarea:focus { border-color: var(--muted); }
.compose select option { color: #202050; background: #fff; }
.compose .row { display: flex; gap: 8px; flex-wrap: wrap; }
.compose .row .chip { font-size: 12px; padding: 5px 11px; }

/* ---- producer page ---- */
.crumb { margin-top: 18px; }
.crumb .pill { padding: 6px 12px; font-size: 12.5px; }
.crumb + .hero { margin-top: 12px; }
.about { margin-top: 18px; max-width: 720px; }
.about p { font-size: 14px; line-height: 1.55; }
.about .meta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px 28px; margin-top: 18px; }
.about .meta .big { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; font-weight: 700; font-size: 14px; background: var(--bg-2); color: var(--text); }
.about .meta dl { margin: 0; grid-template-columns: 90px 1fr; }

/* ---- pinned top: header, headline, bar and filters ---- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-bottom: 10px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -18px; height: 18px; background: linear-gradient(to bottom, var(--bg), transparent); pointer-events: none; }
.topbar .crumb { margin-top: 10px; }
.crumb + .hero, .topbar + .hero { margin-top: 12px; }

/* ---- list layout: the catalogue as a business orders it ---- */
.switch { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; align-self: center; }
.switch button, .switch a { background: none; border: none; color: var(--muted); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 600; text-decoration: none; }
.switch button[aria-pressed="true"], .switch a[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.lines-wrap { margin-top: 0; overflow-x: auto; }
.lines { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.lines th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 6px 10px; white-space: nowrap; box-shadow: 0 1px 0 var(--line); position: sticky; top: calc(var(--topbar-h, 0px) + var(--stick-h, 0px)); z-index: 14; background: var(--bg); }
.lines td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines tbody tr.row-open { cursor: pointer; }
.lines tbody tr.row-open:hover { background: var(--bg-2); }
.lines .num { text-align: right; }
.lines .prod { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.lines .prod .nm { font-weight: 600; display: block; }
.lines .prod .sub { display: block; font-size: 11.5px; color: var(--muted); }
.lines .who { color: var(--muted); }
.lines .pack { color: var(--muted); }
.lines .price b { white-space: nowrap; }
.lines .price .was { display: block; font-size: 11px; color: var(--muted); }
.lines .price .was s { margin-right: 4px; }
.lines .total { min-width: 80px; font-weight: 600; }
.lines .act { width: 1%; white-space: nowrap; }
.lines .ask { border: 1px solid var(--line); background: var(--bg-2); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; }
.lines .ask:hover { border-color: var(--muted); }
.lines.dim .prod .art { filter: saturate(0.4); opacity: 0.7; }
.lines.dim .nm { color: var(--muted); }
.lines tr.prow td { padding: 16px 10px 6px; }
.lines tbody tr.prow:hover { background: none; }
.lines tr.sum td { font-weight: 700; border-bottom: none; border-top: 1px solid var(--line); }
.lines tr.muted td { color: var(--muted); }
.lines td .tagc { font-size: 11px; padding: 3px 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { background: none; border: none; color: var(--text); padding: 4px 9px; font-weight: 700; font-size: 14px; line-height: 1; }
.qty button:disabled { opacity: 0.3; }
.qty input { width: 44px; text-align: center; background: none; border: none; color: var(--text); font: inherit; font-weight: 600; padding: 4px 0; outline: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input::placeholder { color: var(--muted); font-weight: 400; }
.qty:focus-within { border-color: var(--accent); }
.sumbar { display: flex; align-items: baseline; gap: 14px; margin-top: 8px; padding: 8px 0 2px; border-top: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.sumbar .l { font-weight: 700; }
.sumbar .u { color: var(--muted); }
.sumbar .m { font-weight: 700; margin-left: auto; }
.sumbar .rest { color: var(--muted); font-size: 12px; }
.section .stick { position: sticky; top: var(--topbar-h, 0px); z-index: 15; background: var(--bg); padding: 8px 0 12px; }
@media (max-width: 860px) { .lines th, .lines td { padding: 6px 6px; } .qty input { width: 30px; } .qty button { padding: 4px 6px; } }
@media (max-width: 640px) { .lines .prod { min-width: 0; } .sumbar { gap: 10px; flex-wrap: wrap; } }

/* ==== Added for the mock screens: not in the lab ==== */

/* The ribbon under the header names the screen and the decision it comes from. */
.ribbon { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 12px; color: var(--muted); padding: 2px 0 6px; }
.ribbon b { color: var(--text); font-weight: 600; }
.ribbon a { margin-left: auto; white-space: nowrap; }

/* Stat tiles: the number in Space Grotesk, a label, a line under it. */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.stat .v { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px; line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.stat .d { font-size: 12px; color: var(--ok); margin-top: 4px; }
.stat .d.warn { color: var(--warn); }
.stat .d.m { color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr 1fr; } }

/* Progress to a minimum: a thin bar in the lab's line colour. */
.bar { height: 5px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ok); border-radius: 999px; }
.bar.short > span { background: var(--accent); }
.bar.bad > span { background: var(--bad); }
.barrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); }

/* Status track for an order: four steps, done, now, to come. */
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.steps li { flex: 1; font-size: 12px; color: var(--muted); }
.steps li::before { content: ""; display: block; height: 4px; border-radius: 999px; background: var(--bg-3); margin-bottom: 6px; }
.steps li.done::before { background: var(--ok); }
.steps li.now::before { background: var(--accent); }
.steps li.now { color: var(--text); font-weight: 600; }

/* A notice: the lab's lockbox, in the semantic colours. */
.box { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); color: var(--text); font-size: 13.5px; line-height: 1.45; }
.box.warn { background: var(--warn-tint); } .box.warn b { color: var(--warn); }
.box.ok { background: var(--ok-tint); } .box.ok b { color: var(--ok); }
.box.bad { background: var(--bad-tint); } .box.bad b { color: var(--bad); }
.box .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

/* A card: bg-2 on the ground, as the lab's stat-like surfaces are. */
.card { margin-top: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.card .h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card h3 { font-size: 15px; }
.card .n { color: var(--muted); font-size: 12.5px; }
.card .h .tagc, .card .h .pill { margin-left: auto; }
.card p { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.card .lines th { position: static; background: transparent; }
.card.dark { background: var(--bg-3); }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.timeline li { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: none; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Member initials */
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bg-3); color: var(--text); font-size: 10px; font-weight: 700; border: 2px solid var(--bg); }
.people { display: inline-flex; }
.people .av { margin-left: -6px; }
.people .av:first-child { margin-left: 0; }

/* A drop zone for the seller's workbook */
.drop { margin-top: 12px; border: 1px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.drop b { color: var(--text); }

/* Generic helpers */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.mt { margin-top: 12px; }
.hide { display: none !important; }
.sheet form { margin: 0; }
.note { color: var(--muted); font-size: 12.5px; }

/* Entry page */
.tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.tracks .tile { height: 180px; cursor: default; }
.tracks .tile:hover { transform: none; box-shadow: none; }
.tracks ul { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.tracks li { margin: 4px 0; }
.tracks li a { color: var(--text); }
@media (max-width: 640px) { .tracks { grid-template-columns: 1fr; } }
