/* Taskyard: the yard board. Warm card-stock canvas, graphite ink, safety orange, tool-steel as the one dark surface.
   Core: tokens, type, header/footer, buttons, forms, chips, job cards (.ticket), job sheets (.slip), empty states, motion helpers.
   Page styles live in /css/home.css, /css/pages.css and /css/work.css. See docs/DESIGN.md. */
@font-face { font-family: "Big Shoulders Stencil Display"; src: url("/fonts/stencil.woff2") format("woff2"); font-weight: 600 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url("/fonts/public-sans-italic.woff2") format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("/fonts/redhat-mono.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  --bg: #f3ecdf;
  --bg-2: #e9e0cf;
  --surface: #fffbf3;
  --ink: #201d1a;
  --ink-2: #4a443c;
  --muted: #7a7264;
  --line: #ddd2bf;
  --line-2: #c8bba3;
  --orange: #f25c05;
  --orange-ink: #b84300;
  --orange-soft: #ffe3cf;
  --steel: #2b3a42;
  --steel-2: #36474f;
  --steel-line: rgba(255, 251, 243, 0.14);
  --steel-ink: #fffbf3;
  --steel-dim: rgba(255, 251, 243, 0.66);
  --tape: #f6c445;
  --good: #2f7d4a;
  --bad: #c2362b;
  --star: #a8670a;
  /* categories */
  --c-research: #1f5fae;
  --c-trading: #a86800;
  --c-markets: #6b3fa0;
  --c-onchain: #17784a;
  --c-content: #c22f22;
  /* legacy names still used by page stylesheets, mapped onto the new palette */
  --violet: var(--orange);
  --violet-ink: var(--orange-ink);
  --violet-soft: var(--orange-soft);
  --citron: var(--tape);
  --night: var(--steel);
  --night-2: var(--steel-2);
  --night-line: var(--steel-line);
  --night-ink: var(--steel-ink);
  --night-dim: var(--steel-dim);
  --paper: var(--bg);
  --paper-2: var(--bg-2);
  --paper-3: #dfd5c1;
  --card: var(--surface);
  --line-soft: #e8dfcd;
  --stamp: var(--orange);
  --stamp-ink: var(--orange-ink);
  --green: var(--good);
  --ochre: var(--star);
  --board: var(--steel);
  --board-2: var(--steel-2);
  --board-line: var(--steel-line);
  --board-ink: var(--steel-ink);
  --board-dim: var(--steel-dim);
  --flap: var(--tape);
  --r: 6px;
  --r-in: 8px;
  --shadow: 0 1px 0 rgba(32, 29, 26, 0.08), 0 10px 22px -14px rgba(32, 29, 26, 0.35);
  --shadow-lift: 0 1px 0 rgba(32, 29, 26, 0.1), 0 20px 30px -16px rgba(32, 29, 26, 0.42);
  --display: "Big Shoulders Stencil Display", "Arial Narrow", Impact, sans-serif;
  --sans: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "Cascadia Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --perf: radial-gradient(circle at 7px 0, transparent 4.5px, #000 5px) 0 0 / 14px 100% repeat-x;
  /* signature fills */
  --hazard: repeating-linear-gradient(-45deg, var(--orange) 0 8px, var(--ink) 8px 16px);
  --pegs: radial-gradient(circle, rgba(32, 29, 26, 0.13) 1.5px, transparent 1.9px) 0 0 / 22px 22px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100svh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.05; margin: 0; text-wrap: balance; font-weight: 700; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: 0.005em; line-height: 0.95; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-family: var(--sans); font-weight: 750; letter-spacing: -0.01em; line-height: 1.15; font-size: clamp(1.15rem, 2vw, 1.35rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.005em; font-weight: 700; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--orange-ink); }
p { margin: 0 0 0.8em; }
.h-mid { font-size: clamp(2rem, 5.4vw, 3.2rem); }
.h-small { font: 500 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); margin: 1.8rem 0 0.7rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.85em; }
.num-tab { font-variant-numeric: tabular-nums; }
.stencil { font-family: var(--display); font-weight: 800; letter-spacing: 0.01em; line-height: 0.95; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--surface); padding: 8px 12px; border-radius: var(--r-in); z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--orange-ink); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--tape); color: var(--ink); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--orange-ink); margin: 0 0 0.8rem; font-variant-numeric: tabular-nums; }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); flex: none; }
.lede { font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: var(--ink-2); max-width: 38rem; text-wrap: pretty; }

/* signature helpers: pin, hazard tape, pegboard */
.pin { position: absolute; top: -7px; left: 50%; margin-left: -8px; width: 16px; height: 16px; border-radius: 50%; z-index: 2; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #ff9a55 0 2px, var(--orange) 3.5px); box-shadow: 0 0 0 3px rgba(32, 29, 26, 0.08), 0 3px 4px rgba(32, 29, 26, 0.35); }
.tape-rule { display: block; height: 4px; border: 0; margin: 0; background: var(--hazard); }
.pegboard { background: var(--bg-2) var(--pegs); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6em; min-height: 46px; padding: 0.6em 1.3em;
  border: 1.5px solid var(--ink); border-radius: var(--r-in); background: var(--orange); color: var(--ink);
  font-weight: 700; letter-spacing: 0; text-decoration: none; cursor: pointer;
  transition: transform 0.16s var(--ease), background-color 0.16s, box-shadow 0.16s, color 0.16s, border-color 0.16s;
  box-shadow: 0 3px 0 var(--ink); touch-action: manipulation; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); background: #ff6d1c; }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { background: transparent; color: var(--muted); border-color: var(--line-2); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 var(--line-2); }
.btn-ghost:hover { background: var(--bg-2); box-shadow: 0 4px 0 var(--line-2); color: var(--ink); }
.btn-small { min-height: 40px; padding: 0.35em 1em; font-size: 0.88rem; box-shadow: 0 2px 0 var(--ink); }
.btn-small:hover { box-shadow: 0 3px 0 var(--ink); }
.btn-big { min-height: 54px; padding: 0.7em 1.6em; font-size: 1.04rem; }
.btn-block { width: 100%; }
.btn-invert { background: var(--surface); color: var(--ink); border-color: var(--surface); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }
.btn-invert:hover { background: var(--tape); border-color: var(--tape); color: var(--ink); }
.btn-citron { background: var(--tape); color: var(--ink); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.btn-citron:hover { background: #ffd460; color: var(--ink); }
.btn-stamp, .btn-send { background: var(--orange); border-color: var(--ink); }
.btn-send { justify-content: space-between; }
.btn-price { font: 600 0.84rem var(--mono); background: rgba(32, 29, 26, 0.14); padding: 0.15em 0.6em; border-radius: 4px; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.link-arrow { font-weight: 700; text-decoration: none; color: var(--orange-ink); background: linear-gradient(var(--tape), var(--tape)) 0 100% / 100% 3px no-repeat; position: relative; padding-bottom: 2px; transition: background-size 0.2s var(--ease); }
.link-arrow:hover { background-size: 100% 100%; }
.link-arrow::before { content: ""; position: absolute; inset: -10px -4px; } /* 40px+ touch target without changing the look */
.link-arrow::after { content: "→"; display: inline-block; margin-left: 0.3em; transition: transform 0.2s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- header: pin-logo, stencil wordmark, thin hazard-tape edge ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(243, 236, 223, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line-2); }
.top-in { max-width: 1440px; margin: 0 auto; padding: 6px 24px; display: flex; align-items: center; gap: 20px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1.6rem; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }
.brand .mark { width: 32px; height: 32px; transition: transform 0.3s var(--spring); }
.brand:hover .mark { transform: rotate(-6deg); }
.brand-word { padding-top: 2px; }
.nav { display: flex; gap: 2px; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.nav a { position: relative; text-decoration: none; padding: 7px 14px; border-radius: 7px; font-weight: 650; font-size: 0.9rem; color: var(--ink-2); transition: color 0.15s, background-color 0.15s, box-shadow 0.15s; }
.nav a:hover { color: var(--ink); background: rgba(255, 251, 243, 0.6); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 0 rgba(32, 29, 26, 0.08), 0 2px 6px -3px rgba(32, 29, 26, 0.3); }
.nav a[aria-current="page"]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); margin-right: 7px; vertical-align: 1px; }
/* phones: the four places as a bottom tab bar */
.tabbar { display: none; }
.me { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 6px 12px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: var(--r-in); transition: background-color 0.15s; }
.balance::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2.5px var(--orange-soft); flex: none; }
.balance:hover { background: var(--orange-soft); }
.cr { font: 500 0.92rem var(--mono); font-variant-numeric: tabular-nums; }
.cr-u { color: var(--muted); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 6px; background: var(--steel); color: var(--steel-ink); font-family: var(--display); font-size: 1.35rem; font-weight: 800; line-height: 1; flex: none; }
.avatar-xl { width: 76px; height: 76px; font-size: 2.6rem; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 8px; }
.menu summary::-webkit-details-marker { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2.5px; background: var(--ink); position: relative; transition: transform 0.2s var(--ease); }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; } .burger::after { top: 6px; }
.menu[open] .burger { background: transparent; }
.menu[open] .burger::before { transform: translateY(6px) rotate(45deg); }
.menu[open] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.menu-pop { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--line-2); border-top: 4px solid var(--orange); border-radius: var(--r); box-shadow: var(--shadow-lift); padding: 8px; min-width: 220px; display: grid; animation: pop 0.18s var(--ease); transform-origin: top right; }
.menu-pop a { padding: 11px 12px; border-radius: 4px; text-decoration: none; font-weight: 600; }
.menu-pop a:hover { background: var(--bg-2); }
.menu-who { margin: 4px 12px 6px; font: 500 0.76rem var(--mono); color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 40px 20px 88px; }
.wrap.wide { max-width: 1440px; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.page-head { position: relative; margin: 8px 0 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line-2); }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 4px; background: var(--orange); }
.page-head .lede { margin: 14px 0 0; }
.section { margin-top: 80px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); margin-bottom: 14px; min-height: 32px; }
.back:hover { color: var(--orange-ink); }
.glyph { width: 28px; height: 28px; }
.glyph-s { width: 18px; height: 18px; }
.note { font-size: 0.88rem; color: var(--muted); margin: 10px 0 0; }
.badge { display: inline-block; font: 500 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 4px; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.house { font-weight: 700; color: var(--orange-ink); }

/* ---------- footer: the steel band ---------- */
.foot { position: relative; margin-top: 24px; background: var(--steel); color: var(--steel-ink); overflow: hidden; }
.foot-in { max-width: 1440px; margin: 0 auto; padding: 32px 24px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 26px 32px; align-items: center; }
.foot-word { display: none; grid-column: 1 / -1; margin: 0 0 6px; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(3.5rem, 21.5vw, 19rem); line-height: 0.8; letter-spacing: 0.01em; color: transparent; -webkit-text-stroke: 1.5px rgba(255, 251, 243, 0.22); user-select: none; white-space: nowrap; text-align: center; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand .mark { width: 48px; height: 48px; flex: none; }
.foot-brand p { margin: 0; font-size: 0.95rem; color: var(--steel-dim); }
.foot-brand strong { color: var(--steel-ink); font-size: 1.05rem; }
.foot-sign { grid-column: 1 / -1; margin: 0; padding-top: 14px; border-top: 1px solid var(--steel-line); font: 500 0.72rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel-dim); }
.foot-sign::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); margin-right: 10px; }
.foot-clock { justify-self: end; display: inline-flex; align-items: center; gap: 9px; font: 500 0.72rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel-dim); }
.foot-clock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tape); animation: node-pulse 2.4s ease-in-out infinite; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 24px; padding-top: 18px; border-top: 1px solid var(--steel-line); }
.foot-nav a { text-decoration: none; color: rgba(255, 251, 243, 0.82); font-size: 0.97rem; padding: 10px 0; transition: color 0.15s; }
.foot-nav a:hover { color: var(--tape); }
.foot-in > .x-btn { justify-self: end; margin-top: 18px; }
.x-btn { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 6px; background: var(--steel-ink); color: var(--steel); transition: transform 0.2s var(--spring); }
.x-btn svg { width: 18px; height: 18px; }
.x-btn.x-top { width: 38px; height: 38px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.x-btn.x-top svg { width: 15px; height: 15px; }
.x-btn:hover { transform: rotate(-6deg) scale(1.05); }
@keyframes node-pulse { 50% { opacity: 0.35; } }

/* ---------- forms ---------- */
input[type="text"], input[type="search"], input:not([type]), input[inputmode], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-in);
  transition: border-color 0.15s, box-shadow 0.15s; font-size: 16px;
}
select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23201d1a' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E") right 14px center / 12px 8px no-repeat; }
textarea { resize: vertical; line-height: 1.5; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(242, 92, 5, 0.28); }
input::placeholder, textarea::placeholder { color: #988f7e; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.75; cursor: default; }
.mono-input { font: 0.9rem/1.55 var(--mono); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label, fieldset legend { font-weight: 700; font-size: 0.92rem; }
.opt { font-weight: 400; color: var(--muted); font-size: 0.82rem; }
.hint { color: var(--muted); font-size: 0.8rem; }
.form-error { color: #9c2b21; background: rgba(194, 54, 43, 0.08); border-left: 4px solid var(--bad); border-radius: 4px; padding: 10px 12px; font-size: 0.92rem; margin: 0 0 12px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 650; font-size: 0.92rem; min-height: 40px; }
.switch input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 4px; background: var(--line-2); position: relative; cursor: pointer; transition: background-color 0.2s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 3px; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.22s var(--spring); }
.switch input:checked { background: var(--orange); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: var(--r-in); border: 1.5px solid var(--line-2); text-decoration: none; font-weight: 650; font-size: 0.92rem; background: var(--surface); transition: border-color 0.15s, transform 0.15s var(--ease), background-color 0.15s; }
.chip span { font: 500 0.72rem var(--mono); color: var(--muted); }
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.chip.on { background: var(--steel); color: var(--steel-ink); border-color: var(--steel); }
.chip.on span { color: var(--tape); }

/* ---------- job cards (agent cards, .ticket) ----------
   Card stock pinned to the board: orange pin at top centre, stencil hand number top-right, emblem tile on the category colour,
   name, tagline, price, rating and runs. Hangs a little crooked (--tilt), straightens and lifts on hover. */
.rack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 22px; padding-top: 12px; }
.ticket {
  --cat: var(--c-research); --tilt: 0deg;
  position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 176px; padding: 34px 20px 16px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow);
  transform: rotate(var(--tilt)); transform-origin: 50% 0;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.ticket:hover, .ticket:focus-visible { transform: translateY(-3px) rotate(0deg); box-shadow: var(--shadow-lift); border-color: var(--ink-2); }
.rc-tab {
  position: absolute; right: 14px; top: 8px; font-family: var(--display); font-weight: 800; font-size: 1.2rem; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rc-tab::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 1px; background: var(--cat); margin-right: 8px; vertical-align: 1px; }
.is-pick .rc-tab::before { background: var(--tape); box-shadow: 0 0 0 1.5px var(--ink); }
.ticket .pin { transition: transform 0.25s var(--ease); }
.ticket:hover .pin { transform: translateY(-1px) scale(1.08); }
.rc-top { display: flex; gap: 14px; align-items: center; min-width: 0; }
.rc-portrait { position: relative; display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 6px; background: var(--cat); color: var(--surface); overflow: hidden; transition: transform 0.3s var(--spring); }
.rc-portrait::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 251, 243, 0.2) 1px, transparent 1.4px) 0 0 / 8px 8px; opacity: 0.7; pointer-events: none; }
.ticket:hover .rc-portrait { transform: rotate(-3deg) scale(1.04); }
.rc-id { min-width: 0; flex: 1; }
.rc-id h3 { font-size: 1.14rem; overflow-wrap: anywhere; }
.rc-by { display: block; font-size: 0.82rem; margin-top: 3px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-price { flex: none; align-self: flex-start; font: 600 1.1rem/1 var(--mono); font-variant-numeric: tabular-nums; padding: 7px 9px; border-radius: 4px; background: var(--orange-soft); color: var(--orange-ink); border: 1px dashed var(--orange-ink); }
.rc-price small { font-size: 0.66rem; font-weight: 500; margin-left: 2px; letter-spacing: 0.04em; }
.ticket > p { color: var(--ink-2); font-size: 0.93rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ticket-meta { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line-2); display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.82rem; align-items: center; }
.rc-cat { display: inline-flex; align-items: center; gap: 6px; font: 500 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.rc-cat i { width: 8px; height: 8px; border-radius: 1px; background: var(--cat); }
.ticket-go { margin-left: auto; font-weight: 700; color: var(--orange-ink); opacity: 0; transform: translateX(-6px); transition: opacity 0.2s, transform 0.2s var(--ease); }
.ticket:hover .ticket-go, .ticket:focus-visible .ticket-go { opacity: 1; transform: none; }
@media (hover: none) { .ticket-go { opacity: 1; transform: none; } }
.stars { color: var(--star); font-weight: 700; white-space: nowrap; }
.stars .dim { color: var(--line-2); }
.cat-research { --cat: var(--c-research); --cat-hi: var(--c-research); --cat-on: #fff; } .cat-trading { --cat: var(--c-trading); --cat-hi: #f2b200; --cat-on: #201d1a; } .cat-markets { --cat: var(--c-markets); --cat-hi: var(--c-markets); --cat-on: #fff; } .cat-onchain { --cat: var(--c-onchain); --cat-hi: var(--c-onchain); --cat-on: #fff; } .cat-content { --cat: var(--c-content); --cat-hi: var(--c-content); --cat-on: #fff; }
.pick-stamp { font: 600 0.62rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); background: var(--tape); border-radius: 3px; padding: 4px 7px; }
/* legacy stub pieces (still used by a few page layouts) */
.ticket-stub { --cat: var(--c-research); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px 8px; background: var(--cat); color: var(--surface); border-radius: var(--r) 0 0 var(--r); }
.ticket-stub .glyph { width: 24px; height: 24px; }
.stub-price { font: 500 1.5rem/1 var(--mono); text-align: center; font-variant-numeric: tabular-nums; }
.stub-price small { display: block; font-size: 0.62rem; letter-spacing: 0.1em; opacity: 0.8; margin-top: 4px; text-transform: uppercase; }
.stub-cat { font: 500 0.58rem/1.25 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; text-align: center; opacity: 0.92; }
.ticket-body { position: relative; padding: 18px 20px 16px; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: 0 var(--r) var(--r) 0; }

/* ---------- job sheets (run output, .slip) ----------
   Card stock with a hazard-tape band on top: header with hand, job number and status; the work order; tool steps on a line; the sheet. */
.slip { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); margin: 12px 0; font-size: 0.97rem; overflow: hidden; }
.slip::before { content: ""; display: block; height: 4px; background: var(--cat, var(--orange)); }
.slip-head { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; padding: 14px 22px; background: var(--bg); border-bottom: 1px solid var(--line-2); }
.slip-no { order: 2; font: 500 0.72rem var(--mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.slip-agent { order: 1; font-weight: 800; font-size: 1.05rem; }
.slip-head .stamp { order: 3; margin-left: auto; }
/* status stamp; the tape dot marks a live job */
.stamp { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font: 600 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; padding: 7px 11px 7px 9px; border-radius: 4px; border: 1.5px solid currentColor; background: transparent; color: var(--ink-2); white-space: nowrap; }
.stamp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.stamp-done { background: #e2f1e6; color: var(--good); }
.stamp-failed { background: #fae4e1; color: #a82d23; }
.stamp-running { background: var(--steel); color: var(--steel-ink); border-color: var(--steel); }
.stamp-running::before { background: var(--tape); animation: node-pulse 1.2s ease-in-out infinite; }
.stamp-s { margin-left: 0; padding: 5px 8px 5px 7px; font-size: 0.62rem; }
.stamp-big { margin: 0 0 14px; font-size: 0.78rem; padding: 10px 14px 10px 12px; transform: rotate(-2deg); }
.stamp.thump { animation: pop-in 0.4s var(--ease); }
@keyframes pop-in { 0% { transform: scale(0.8); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
.slip-inputs { margin: 0; padding: 16px 22px 4px; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; font: 400 0.82rem/1.45 var(--mono); }
.slip-inputs:empty { display: none; }
.slip-inputs div { display: contents; }
.slip-inputs dt { color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.68rem; padding-top: 2px; }
.slip-inputs dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; max-height: 8.5em; overflow: hidden; }
/* tool steps: a vertical line with a square rivet per step */
.slip-log { list-style: none; margin: 0; padding: 14px 22px 6px; display: grid; gap: 0; font: 400 0.82rem var(--mono); }
.slip-log[hidden] { display: none; }
.slip-log li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 0 0 12px 26px; animation: slide-in 0.3s var(--ease); }
.slip-log li::before { content: ""; position: absolute; left: 0; top: 0.28em; width: 10px; height: 10px; border-radius: 2px; background: var(--surface); border: 2px solid var(--ink); z-index: 1; }
.slip-log li::after { content: ""; position: absolute; left: 4px; top: calc(0.28em + 12px); bottom: -0.28em; width: 2px; background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 7px); }
.slip-log li:last-child { padding-bottom: 8px; }
.slip-log li:last-child::after { display: none; }
.slip-log li.ok::before { background: var(--ink); }
.slip-log li.bad::before { border-color: var(--bad); background: var(--bad); }
.slip-log li.pending::before { background: var(--tape); animation: node-pulse 1s ease-in-out infinite; }
.log-tool { font-weight: 500; }
.log-arg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.log-mark { color: var(--good); }
.slip-log li.bad .log-mark { color: var(--bad); }
.slip-log li.pending .log-mark { color: var(--muted); }
@keyframes slide-in { from { opacity: 0; transform: translateX(-6px); } }
.slip-body { padding: 18px 22px 22px; min-height: 1.5em; border-top: 1px solid var(--line-2); margin-top: 6px; }
.slip-body:empty { display: none; }
.slip-wait { margin: 6px 22px 0; padding: 16px 0 6px; border-top: 1px solid var(--line-2); display: grid; gap: 9px; }
.slip-wait i { display: block; height: 10px; border-radius: 2px; background: var(--bg-2); transform-origin: 0 50%; animation: sw-write 1.6s var(--ease) infinite; }
.slip-wait i:nth-of-type(2) { width: 82%; animation-delay: 0.2s; }
.slip-wait i:nth-of-type(3) { width: 58%; animation-delay: 0.4s; }
.sw-label { display: inline-flex; align-items: center; gap: 8px; font: 500 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange-ink); }
.sw-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); animation: node-pulse 1.2s ease-in-out infinite; }
@keyframes sw-write { 0% { transform: scaleX(0); opacity: 0.4; } 60%, 100% { transform: scaleX(1); opacity: 1; } }
.rts { padding: 6px 0; }
.rts p { margin: 0; color: var(--ink-2); max-width: 32rem; }
.slip-foot { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; padding: 12px 22px; background: var(--bg); border-top: 1px dashed var(--line-2); font: 400 0.74rem var(--mono); color: var(--muted); }
.slip-foot:empty { display: none; }
.slip-foot .sample-stamp { margin-left: auto; color: var(--orange-ink); background: var(--orange-soft); border-radius: 3px; padding: 3px 8px; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.06em; }
.slip-share { display: flex; gap: 12px; align-items: center; padding: 12px 22px 16px; flex-wrap: wrap; border-top: 1px solid var(--line-2); }
.cursor::after { content: ""; display: inline-block; width: 0.5em; height: 1em; background: var(--orange); vertical-align: -0.12em; margin-left: 2px; animation: blink 0.9s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

/* preview band */
.pv-band { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 20px; background: var(--steel); color: var(--steel-ink); font: 400 0.8rem/1.4 var(--mono); text-align: center; }
.pv-band p { margin: 0; }
.pv-band strong { color: var(--tape); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem; }
.pv-ico { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tape); animation: node-pulse 2s ease-in-out infinite; }
.pv-ico i { display: none; }
.pv-sep { color: var(--tape); }

/* markdown inside job sheets: made for reading */
.md { line-height: 1.65; color: var(--ink); }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--sans); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin: 1.5em 0 0.5em; }
.md h2 { font-size: 1.2rem; padding-top: 0.2em; }
.md h3 { font-size: 1.05rem; }
.md h4 { font-size: 0.95rem; }
.md h2:first-child, .md h3:first-child { margin-top: 0; }
.md p, .md ul, .md ol { margin: 0 0 0.8em; }
.md ul, .md ol { padding-left: 1.35em; }
.md li { margin: 0.25em 0; }
.md li::marker { color: var(--orange-ink); }
.md strong { font-weight: 700; }
.md code { font: 0.84em var(--mono); background: var(--bg-2); padding: 0.12em 0.4em; border-radius: 3px; overflow-wrap: anywhere; }
.md pre { background: var(--steel); color: var(--steel-ink); padding: 14px; border-radius: var(--r); overflow-x: auto; }
.md pre code { background: none; padding: 0; color: inherit; }
.md blockquote { margin: 0 0 0.8em; padding: 2px 0 2px 14px; border-left: 4px solid var(--orange); color: var(--ink-2); }
.md a { color: var(--orange-ink); overflow-wrap: anywhere; }
.md hr { border: 0; border-top: 1px dashed var(--line-2); margin: 1.2em 0; }
.md-table { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line-2); border-radius: var(--r); }
.md table { border-collapse: collapse; font-size: 0.88rem; min-width: 100%; }
.md th, .md td { text-align: left; padding: 8px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md tr:last-child td { border-bottom: 0; }
.md th { font: 500 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--bg); }

/* ---------- empty states: an empty spot on the pegboard ---------- */
.empty { position: relative; text-align: center; padding: 48px 20px 44px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--bg-2) var(--pegs); }
.empty svg { width: 190px; margin: 0 auto 18px; overflow: visible; }
.e-peg circle { fill: rgba(32, 29, 26, 0.2); }
.e-card { fill: var(--surface); stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; }
.e-back { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 1.5; }
.e-tile { fill: var(--orange-soft); stroke: var(--orange-ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.e-line { stroke: var(--line-2); stroke-width: 3; stroke-linecap: butt; fill: none; }
.e-node { fill: var(--orange); stroke: var(--ink); stroke-width: 1.5; }
.e-wire { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 4; fill: none; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 30rem; margin: 0 auto 18px; }
.js .empty .e-float { animation: e-float 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes e-float { 50% { transform: rotate(1.4deg); } }
.empty-inline { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r); }
.empty-inline p { margin: 0; }

/* ---------- loading skeleton ---------- */
.skel { display: block; height: 0.9em; border-radius: 2px; background: linear-gradient(90deg, var(--bg-2) 25%, var(--paper-3) 50%, var(--bg-2) 75%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--steel); color: var(--steel-ink); padding: 11px 18px; border-radius: var(--r-in); border-left: 5px solid var(--orange); font-size: 0.92rem; z-index: 40; animation: toast 0.25s var(--ease); max-width: calc(100vw - 32px); box-shadow: var(--shadow-lift); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 8px); } }

/* scroll reveals: 12px rise + fade, staggered 60ms via --i (only when JS marks the page ready, so no-JS shows everything) */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .ticket.reveal { transform: translateY(12px) rotate(var(--tilt)); }
.js .ticket.reveal.in { opacity: 1; transform: rotate(var(--tilt)); transition: opacity 0.6s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s; transition-delay: calc(var(--i, 0) * 60ms), 0s, 0s, 0s; }
.js .ticket.reveal.in:hover, .js .ticket.reveal.in:focus-visible { transform: translateY(-3px) rotate(0deg); }

/* Agent emblems (built-in agents) and desk badges. Drawn in src/art.ts. */
.emblem { width: 50px; height: 50px; flex: none; overflow: visible; position: relative; }
svg.avatar.desk-badge { padding: 0; background: none; border-radius: 0; }
svg.avatar-xl.desk-badge { width: 76px; height: 76px; }

/* focus ring on steel surfaces */
.foot :focus-visible { outline-color: var(--tape); }
.ticket-meta { flex-wrap: wrap; }
.ticket-meta > * { flex: none; }
.ticket-meta > .rc-run { flex: none; white-space: nowrap; }
.ticket-go { margin-left: auto; }

/* ---------- responsive (core) ---------- */
@media (max-width: 860px) {
  .nav a { padding: 7px 10px; font-size: 0.86rem; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .foot { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 0 4px env(safe-area-inset-bottom);
    background: rgba(255, 251, 243, 0.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line-2); }
  .tabbar a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 60px; text-decoration: none; color: var(--muted); font: 600 0.7rem/1 var(--sans); -webkit-tap-highlight-color: transparent; }
  .tabbar svg { width: 22px; height: 22px; transition: transform 0.2s var(--spring); }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--orange); }
  .tabbar a[aria-current="page"] svg { color: var(--orange-ink); }
  .tabbar a:active svg { transform: scale(0.9); }
  .rack { grid-template-columns: 1fr; }
  .foot-in { padding-top: 44px; gap: 20px 16px; }
  .foot-clock { grid-column: 1 / -1; justify-self: start; grid-row: 3; }
  .foot-nav { grid-column: 1; gap: 0 18px; }
  .foot-in > .x-btn { align-self: start; }
}
@media (max-width: 520px) {
  .wrap, .wrap.wide { padding: 20px 16px 40px; }
  .top-in { padding: 6px 16px; gap: 10px; min-height: 54px; }
  .brand { font-size: 1.5rem; }
  .brand .mark { width: 30px; height: 30px; }
  .me .btn-small { padding: 0.35em 0.85em; font-size: 0.85rem; }
  .balance { padding: 5px 10px; }
  .slip-head, .slip-inputs, .slip-log, .slip-foot, .slip-share { padding-left: 16px; padding-right: 16px; }
  .slip-body { padding: 16px 16px 18px; }
  .slip-wait { margin-left: 16px; margin-right: 16px; }
  .slip-inputs { grid-template-columns: 1fr; gap: 0; }
  .slip-inputs dd { margin-bottom: 8px; }
  .page-head { margin-bottom: 24px; padding-bottom: 18px; }
  .section { margin-top: 64px; }
  .rc-portrait { width: 56px; height: 56px; }
  .emblem { width: 44px; height: 44px; }
  .pv-band { padding: 6px 14px; min-height: 30px; font-size: 0.7rem; line-height: 1.35; justify-content: flex-start; text-align: left; }
  .pv-band p { text-wrap: balance; }
  .pv-more { display: none; }
}
@media (max-width: 420px) {
  .ticket-meta { flex-wrap: wrap; }
  .ticket-meta > .rc-run { flex: none; overflow: visible; white-space: nowrap; }
}
@media (max-width: 340px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top-in { padding-left: 12px; padding-right: 12px; }
  .ticket { padding: 32px 14px 14px; }
  .rc-price { font-size: 1rem; padding: 6px 7px; }
  .rc-portrait { width: 48px; height: 48px; }
  .emblem { width: 38px; height: 38px; }
  .me .btn-small { font-size: 0.8rem; padding: 0.3em 0.6em; }
}
@media (max-width: 359px) {
  .brand-word { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .ticket.reveal { transform: rotate(var(--tilt)); }
}
