/* CodeHeirs: grey grid, chunky Tektur display type, orange accent, black terminal panels.
   Ported from the approved design prototype (design/forkline-design.dc.html). */
:root {
  --ground: #E6E6E3; --panel: #F2F2EF; --line: #C4C4BF; --ink: #111111; --muted: #55554F;
  --accent: #FF6A13; --accent-hover: #FF8233; --black: #0D0D0D; --on-black: #E6E6E3; --on-black-muted: #A9A9A3;
  --good: #1E9E5A; --warn: #FFB020; --bad: #C2410C; --skip: #9C9C96; --idea: #8C8CFF;
  --display: "Tektur", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--mono); font-size: 15px; line-height: 1.55; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
button { cursor: pointer; font-family: inherit; color: inherit; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 800; line-height: 1.05; margin: 0; }
h2 { font-size: 24px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.caret { animation: blink 1s steps(1) infinite; }
.accent { color: var(--accent); }
.label { font-weight: 600; letter-spacing: .06em; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- Motion (from the design) ---------- */
@keyframes marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blinkEye { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.08); } }
@keyframes look { 0%, 100% { transform: rotate(0) translateY(0); } 25% { transform: rotate(-2.5deg) translateY(-3px); } 55% { transform: rotate(2deg) translateY(0); } 80% { transform: rotate(-1deg) translateY(-2px); } }
@keyframes scanDown { from { top: -25%; } to { top: 110%; } }
@keyframes antGlow { 0%, 100% { box-shadow: 0 0 0 rgba(255,106,19,0); } 50% { box-shadow: 0 0 18px rgba(255,106,19,.9); } }
@keyframes hopA { 0% { transform: translateY(0); } 35% { transform: translateY(-16px) rotate(-3deg); } 70% { transform: translateY(0) rotate(1deg); } 100% { transform: none; } }
@keyframes hopB { 0% { transform: translateY(0); } 35% { transform: translateY(-16px) rotate(3deg); } 70% { transform: translateY(0) rotate(-1deg); } 100% { transform: none; } }
@keyframes type { from { width: 0; } to { width: calc(var(--n) * 1ch); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.marq { display: flex; width: max-content; animation: marq 38s linear infinite; }
.marqwrap:hover .marq, .marqwrap:focus-within .marq { animation-play-state: paused; }
.pop { animation: popIn .3s cubic-bezier(.2,.8,.2,1) both; }
.spin { animation: spin .9s linear infinite; }
.pulse { animation: pulseDot 1.6s ease-in-out infinite; }

/* ---------- Chamfered shapes and buttons ---------- */
.cut { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.cut:focus-visible { outline-offset: -6px; }
.cutsm { clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px)); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 26px; border: none; font: inherit; font-size: 15px; font-weight: 600; letter-spacing: .04em; text-decoration: none; cursor: pointer; text-align: center; white-space: nowrap; }
.btn.sm { height: 44px; padding: 0 18px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn-or { background: var(--accent); color: var(--ink); transition: background .15s, transform .1s; }
.btn-or:hover { background: var(--accent-hover); color: var(--ink); }
.btn-blk { background: var(--ink); color: var(--panel); transition: background .15s, transform .1s; }
.btn-blk:hover { background: #2A2A2A; color: var(--panel); }
.btn-or:active, .btn-blk:active { transform: scale(.98); }
.btn-line { background: transparent; border: 1px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--panel); color: var(--ink); }
.btn-or, .btn-blk { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px)); }
.btn-or:focus-visible, .btn-blk:focus-visible { outline-offset: -6px; }
.btn[disabled], .btn.off { background: #D2D2CD; color: #3A3A36; cursor: not-allowed; border: none; }
.btn-own { background: #D8EEDD; color: var(--ink); }
.linkbtn { background: none; border: none; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; color: var(--ink); min-height: 44px; }
.inline-form { display: inline; margin: 0; }
.hov { transition: background .15s; }
.hov:hover { background: #FAFAF8 !important; }

/* ---------- Header ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.hdr { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: var(--ground); position: sticky; top: 0; z-index: 20; }
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-right: 1px solid var(--line); min-height: 72px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 42px; height: 42px; background: var(--accent); display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.brand-kicker { font-size: 12px; font-weight: 500; color: var(--muted); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: .02em; }
.nav { flex: 1 1 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; padding: 10px 16px; }
.nav a { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; font-size: 15px; text-decoration: none; color: var(--ink); }
.nav a:hover { background: var(--panel); color: var(--ink); }
.nav a.on { background: var(--ink); color: var(--panel); }
.hdr-right { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-left: 1px solid var(--line); margin-left: auto; }
.login-link { display: flex; align-items: center; gap: 8px; font-size: 15px; min-height: 44px; padding: 0 6px; text-decoration: none; }
.four { display: grid; grid-template-columns: 5px 5px; gap: 3px; }
.four span { width: 5px; height: 5px; background: var(--accent); }
.signup-btn { height: 52px; padding: 0 18px; }
.acct { position: relative; }
.acct > summary { list-style: none; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--panel); padding: 5px 12px 5px 5px; min-height: 44px; cursor: pointer; font-weight: 600; font-size: 14px; }
.acct > summary::-webkit-details-marker { display: none; }
.acct > summary:hover { background: #FAFAF8; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 280px; background: var(--ground); border: 1px solid var(--ink); box-shadow: 8px 8px 0 var(--accent); padding: 16px; display: flex; flex-direction: column; gap: 8px; animation: popIn .2s cubic-bezier(.2,.8,.2,1) both; }
.acct-menu .who { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.acct-menu .who strong { display: block; font-family: var(--display); font-weight: 800; font-size: 20px; overflow-wrap: anywhere; }
.acct-menu a.item { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; }
.acct-menu a.item:hover { background: #FAFAF8; color: var(--ink); }

/* ---------- Shell: rails, main, footer ---------- */
.body { flex: 1; display: flex; align-items: stretch; }
.rail-l { flex: 0 0 64px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding-top: 16px; gap: 10px; }
.rail-box { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; }
a.rail-box:hover { background: #FAFAF8; }
.main { flex: 1 1 auto; min-width: 0; }
.rail-r { flex: 0 0 64px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.rail-r a { width: 64px; height: 60px; border-bottom: 1px solid var(--line); display: grid; place-items: center; }
.rail-r a:hover, .rail-r a.on { background: var(--panel); }
.rail-r a:focus-visible { outline-offset: -4px; }
.foot { border-top: 1px solid var(--line); padding: 16px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }

/* Messages */
.messages { list-style: none; margin: 0; padding: 0; }
.messages li { padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); border-left: 4px solid var(--ink); font-size: 14px; }
.messages li.success { border-left-color: var(--good); }
.messages li.error { border-left-color: var(--bad); background: #FBE9E0; }
.messages li.warning, .messages li.verify { border-left-color: var(--accent); background: #FFF1E7; }

/* ---------- Page heads and shared blocks ---------- */
.head { padding: 26px 24px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.head.tight { padding: 22px 24px; }
.kicker { font-size: 13px; color: var(--muted); }
.title { margin: 2px 0 0; font-family: var(--display); font-weight: 800; font-stretch: 85%; font-size: clamp(34px, 4.5vw, 56px); line-height: 1; overflow-wrap: anywhere; }
.title.md { font-size: clamp(32px, 4vw, 50px); }
.title .caret { color: var(--accent); }
.lede { margin-top: 8px; color: var(--muted); font-size: 14px; max-width: 64ch; }
.bar { padding: 12px 24px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bar.count { padding: 10px 24px; font-size: 13px; color: var(--muted); }
.sec { padding: 14px 24px; border-bottom: 1px solid var(--line); font-weight: 600; letter-spacing: .06em; }
.pad { padding: 24px; }
.cell { border-bottom: 1px solid var(--line); }
.row { display: flex; flex-wrap: wrap; }
.row > * { min-width: 0; }
.empty { padding: 36px 24px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.empty p { font-size: 17px; max-width: 60ch; }
.empty p.muted { font-size: 15px; }
.chip { padding: 4px 10px; border: 1px solid var(--ink); font-size: 13px; }
a.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--ink); }
a.chip:hover { background: var(--panel); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.note-bar { display: flex; gap: 10px; align-items: center; padding: 10px 14px; background: var(--panel); border-left: 4px solid var(--accent); font-size: 14px; }
.note-bar.warn { background: #FFF1E7; }
.dots-tl, .dots-tr { position: absolute; top: 14px; width: 9px; height: 9px; background: var(--accent); }
.dots-tl { left: 14px; } .dots-tr { right: 14px; }

/* Search box */
.search { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 1 280px; max-width: 420px; height: 54px; border: 1px solid var(--ink); background: var(--panel); padding: 0 4px 0 14px; margin: 0; }
.search input { flex: 1; min-width: 0; height: 100%; border: none; background: transparent; font: inherit; color: var(--ink); outline: none; }
.search:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.search button { height: 44px; padding: 0 12px; border: 1px solid var(--line); background: transparent; font-size: 13px; }

/* Pills and switches */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; font-size: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.on { background: var(--ink); border-color: var(--ink); color: var(--panel); }
.sw { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; background: #9C9C96; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--ink); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.sw.on { background: var(--accent); }
.sw.on::after { transform: translateX(20px); }
.switch-row { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; text-decoration: none; }
.switch-row:hover { color: var(--ink); border-color: var(--ink); }
.switch-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; border: none; background: transparent; padding: 0; min-height: 44px; font-size: 13px; font-weight: 600; }
input.sw-input { appearance: none; -webkit-appearance: none; margin: 0; width: 44px; height: 24px; flex-shrink: 0; background: #9C9C96; position: relative; cursor: pointer; transition: background .2s; }
input.sw-input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--ink); transition: transform .2s cubic-bezier(.2,.8,.2,1); }
input.sw-input:checked { background: var(--accent); }
input.sw-input:checked::after { transform: translateX(20px); }

/* Select */
.select { height: 44px; border: 1px solid var(--line); background: var(--panel); font: inherit; font-size: 14px; padding: 0 10px; color: var(--ink); }

/* Status and derive badges */
.st { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--ink); font-size: 12px; font-weight: 500; line-height: 1.4; }
.st i { width: 8px; height: 8px; display: inline-block; }
.st i.developed, .dot.developed { background: var(--good); }
.st i.wip, .dot.wip { background: var(--warn); }
.st i.idea, .dot.idea { background: var(--idea); }
.dv { padding: 3px 8px; font-size: 12px; font-weight: 600; line-height: 1.4; background: #D2D2CD; color: #3A3A36; }
.dv.on { background: var(--accent); color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; }

/* ---------- Identicons (5x5, ported from the design's cells()) ---------- */
.idc { display: grid; grid-template-columns: repeat(5, 1fr); flex-shrink: 0; }
.idc > span { aspect-ratio: 1; display: block; }
.idc-thumb { width: 100%; gap: 6px; }
.idc-big { width: min(300px, 70%); gap: 10px; }
.idc-mini { width: 44px; height: 44px; gap: 2px; padding: 5px; background: var(--black); }
.idc-rank { width: 40px; height: 40px; gap: 2px; padding: 5px; background: var(--black); }
.idc-avatar { width: 32px; height: 32px; gap: 1px; padding: 4px; background: var(--black); }
.idc-md { width: 56px; height: 56px; gap: 2px; padding: 7px; background: var(--black); }
.idc-lg { width: 64px; height: 64px; gap: 3px; padding: 8px; background: var(--black); }
.idc-xl { width: 120px; height: 120px; gap: 5px; padding: 14px; background: #1A1A1A; outline: 3px solid var(--accent); }

/* ---------- Product tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); text-decoration: none; color: var(--ink); }
.tile:hover { color: var(--ink); }
.tile .corner { position: absolute; top: 8px; width: 8px; height: 8px; background: var(--accent); opacity: 0; transition: opacity .15s; z-index: 1; }
.tile .corner.l { left: 8px; } .tile .corner.r { right: 8px; }
.tile:hover .corner, .tile:focus-visible .corner { opacity: 1; }
.tile:focus-visible { outline-offset: -4px; }
.thumb { display: block; background: var(--black); padding: 22px; overflow: hidden; }
.thumb .idc { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.tile:hover .thumb .idc { transform: scale(1.06); }
.tile .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tile .t { font-weight: 600; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.tile .s { font-size: 13px; color: var(--muted); }
.tile .foot-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: auto; }
.price { font-family: var(--display); font-weight: 800; font-size: 24px; }

/* Rows with a mini thumb (built on it, dashboard, purchases) */
.mrow { width: 100%; display: flex; gap: 14px; align-items: center; padding: 12px 24px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
a.mrow:hover { background: #FAFAF8; color: var(--ink); }
.mrow .grow { flex: 1; min-width: 0; }
.mrow .t { display: block; font-weight: 600; }
.mrow .s { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Terminal ---------- */
.term { background: var(--black); color: var(--on-black); padding: 16px; font-size: 13px; line-height: 1.6; overflow-x: auto; }
.term .cmd { color: #F2F2EF; }
.term .dim { color: var(--on-black-muted); }
.term .ok { color: #7FD9A6; }
.term pre { margin: 0; white-space: pre; font: inherit; }
.term a { color: var(--on-black); }
.termrow { display: flex; gap: 8px; align-items: center; width: 100%; min-height: 44px; padding: 2px 6px; border: none; background: transparent; color: var(--on-black); text-align: left; font-size: 13px; text-decoration: none; }
a.termrow:hover, a.termrow:focus-visible { background: #1F1F1F; color: #FFFFFF; }
.termrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.termrow.sel { background: #2A1A10; box-shadow: inset 3px 0 0 var(--accent); color: #FFFFFF; }
.termrow .pre { white-space: pre; color: #8C8C85; }
.termrow .d { color: var(--on-black-muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list th:first-child, table.list td:first-child { padding-left: 24px; }
table.list th:last-child, table.list td:last-child { padding-right: 24px; }
table.list td { padding: 12px; border-bottom: 1px solid var(--line); background: var(--panel); vertical-align: middle; }
.tag { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #E2E2DE; color: #3A3A36; }
.tag.good { background: #D8EEDD; color: #0E4D29; } .tag.warn { background: #FFE7B3; color: #5A3B00; } .tag.bad { background: #FBE0D3; color: #8A2E05; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > legend, .flabel { font-weight: 600; font-size: 14px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=search], .field input[type=number],
.field select, .field textarea, .field input:not([type]) {
  font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--ink); padding: 0 14px; height: 50px; border-radius: 0; width: 100%; }
.field select { padding: 0 12px; }
.field textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
.help { font-size: 13px; color: var(--muted); }
.errorlist { list-style: none; margin: 0; padding: 10px 12px; border-left: 4px solid var(--bad); background: #FBE9E0; font-size: 14px; }
.errorlist ul { list-style: none; margin: 0; padding: 0; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check-row input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex-shrink: 0; }
.affix { display: flex; align-items: center; border: 1px solid var(--ink); background: var(--panel); }
.affix:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.affix .pre { padding-left: 14px; color: var(--muted); }
.affix input { flex: 1; min-width: 0; height: 48px !important; border: none !important; background: transparent !important; outline: none !important; padding: 0 14px 0 4px !important; }
.affix.pw input { padding-left: 14px !important; }
.affix .show { width: 70px; align-self: stretch; border: none; border-left: 1px solid var(--line); background: transparent; font-size: 13px; }
.rules { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.rules li { display: flex; align-items: center; gap: 6px; }
.rules li i { width: 10px; height: 10px; flex-shrink: 0; border: 1px solid var(--muted); }
.rules li.ok i { background: var(--good); border-color: var(--good); }
.kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.kind { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px; min-height: 64px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kind .k { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.kind .ks { font-size: 12px; opacity: .85; }
.kind:has(input:checked) { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.kind:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.oses { display: flex; flex-wrap: wrap; gap: 6px; }
.os { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; cursor: pointer; }
.os input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.os:has(input:checked) { border-color: var(--ink); }
.drop { position: relative; border: 2px dashed var(--ink); background: var(--panel); padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; cursor: pointer; }
.drop:hover, .drop.over { background: #FAFAF8; }
.drop:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop .big { font-weight: 600; font-size: 17px; }
.drop .file { font-size: 14px; padding: 4px 10px; background: var(--ink); color: var(--panel); }

/* Numbered section bar (sell form) */
.steps { margin: 0; padding: 0; list-style: none; display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.steps li { flex: 1 1 0; }
.steps a { width: 100%; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border-right: 1px solid var(--line); font-size: 14px; white-space: nowrap; text-decoration: none; color: var(--muted); }
.steps a:hover { color: var(--ink); background: var(--panel); }
.steps a .n { width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; border: 1px solid currentColor; }
.steps a.on { background: var(--ink); color: var(--panel); }
.steps a.on .n { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.fsec { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.fsec-h { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .06em; }
.fsec-h .n { width: 24px; height: 24px; display: grid; place-items: center; font-size: 12px; background: var(--ink); color: var(--panel); }
.bigprice { font-family: var(--display); font-weight: 900; font-size: 48px; line-height: 1; }

/* ---------- Checks / scan rows ---------- */
.scanrow { display: flex; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.scanrow .ic { width: 28px; height: 28px; display: grid; place-items: center; flex-shrink: 0; background: #D2D2CD; }
.scanrow .ic.pass { background: var(--good); }
.scanrow .ic.pass i { width: 12px; height: 7px; border-left: 3px solid #FFFFFF; border-bottom: 3px solid #FFFFFF; transform: rotate(-45deg) translate(1px, -1px); }
.scanrow .ic.warn { background: var(--warn); }
.scanrow .ic.warn i, .scanrow .ic.fail i { width: 4px; height: 12px; background: #111111; }
.scanrow .ic.fail { background: var(--bad); }
.scanrow .ic.fail i { background: #FFFFFF; }
.scanrow .ic.skip i { width: 6px; height: 6px; background: #9C9C96; }
.scanrow .grow { flex: 1; min-width: 0; }
.scanrow .n { display: block; font-weight: 600; }
.scanrow .d { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.done-bar { margin: 18px 24px; padding: 20px; background: var(--ink); color: var(--panel); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.done-bar strong { display: block; font-family: var(--display); font-weight: 800; font-size: 24px; }
.done-bar span.d { display: block; font-size: 14px; color: var(--on-black-muted); }

/* ---------- Home ---------- */
.home { height: max(640px, calc(100vh - 77px)); display: flex; flex-direction: column; overflow: hidden; }
.hero-marq { position: relative; flex: 0 0 auto; border-bottom: 1px solid var(--line); overflow: hidden; padding: 2.4vh 0 1.4vh; }
.hero-marq .sq { position: absolute; top: 12px; width: 11px; height: 11px; background: var(--accent); z-index: 1; }
.hero-marq .sq.l { left: 20px; } .hero-marq .sq.r { right: 20px; }
.hero-words { font-family: var(--display); font-weight: 900; font-stretch: 80%; font-size: min(12vw, 15vh); line-height: .9; white-space: nowrap; }
.hero-words span { padding-right: .35em; }
.hero-words .o { color: var(--accent); }
.hero-sub { display: flex; flex-wrap: wrap; gap: 28px; padding: 1.4vh 24px 0; font-size: 13px; letter-spacing: .06em; }
.hero-sub .k { display: flex; align-items: center; gap: 10px; }
.hero-sub .k i { width: 11px; height: 11px; background: var(--accent); }
.hero-sub .testmode { margin-left: auto; padding: 0 8px; background: #FFF1E7; border: 1px solid var(--accent); letter-spacing: 0; }
.hero-sub .testmode + .live { margin-left: 0; }
.hero-sub .live { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.hero-sub .live i { width: 8px; height: 8px; background: var(--good); }
.hero-mid { flex: 1 1 auto; min-height: 0; display: flex; border-bottom: 1px solid var(--line); }
.hero-left { flex: 0 1 30%; min-width: 260px; padding: 3vh 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.hero-left .blurb { font-size: clamp(15px, 2.1vh, 19px); line-height: 1.5; max-width: 32ch; }
.hero-ctas { display: flex; flex-direction: column; gap: 10px; max-width: 330px; }
.hero-ctas .btn { height: 54px; }
.hero-links { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.hero-links a { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; min-height: 44px; text-decoration: none; }
.hero-links a:hover { background: #FAFAF8; color: var(--ink); }

.stage { --bs: min(29vh, 25vw); position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; border-left: 1px solid var(--line); border-right: 1px solid var(--line); background-color: var(--ground); background-image: linear-gradient(rgba(17,17,17,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(17,17,17,.06) 1px, transparent 1px); background-size: 40px 40px; background-position: center bottom; overflow: hidden; }
.bubble { position: absolute; top: 4.5vh; left: 50%; transform: translateX(-50%); z-index: 3; width: max-content; max-width: min(92%, 440px); padding: 12px 16px; border: none; background: var(--ink); color: var(--panel); font-size: 13.5px; text-align: left; display: flex; gap: 10px; align-items: flex-start; box-shadow: 6px 6px 0 var(--accent); min-height: 44px; }
.bubble:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bubble .gt { color: var(--accent); }
.botidle { position: relative; z-index: 2; margin-bottom: -2px; animation: look 9s ease-in-out infinite; transform-origin: 50% 100%; }
.bot { --ex: 0px; --ey: 0px; position: relative; display: block; width: var(--bs); height: calc(var(--bs) * 1.1); border: none; padding: 0; background: transparent; }
.bot.hopA { animation: hopA .55s cubic-bezier(.3,.7,.3,1); }
.bot.hopB { animation: hopB .55s cubic-bezier(.3,.7,.3,1); }
.bot:focus-visible { outline: 3px solid var(--ink); outline-offset: 6px; }
.bot > span, .bot span { position: absolute; display: block; }
.bot .side { right: -2%; top: 5%; width: 10%; height: 54%; border-radius: 0 30% 30% 0; background: linear-gradient(90deg, #BDBDB8, #D9D9D4); box-shadow: inset -3px 0 6px rgba(0,0,0,.12); }
.bot .head { left: 3%; top: 0; width: 90%; height: 64%; border-radius: 10%; background: linear-gradient(160deg, #FFFFFF 0%, #E9E9E5 55%, #C7C7C2 100%); box-shadow: inset -10px -14px 26px rgba(0,0,0,.12), 0 30px 44px -22px rgba(0,0,0,.4); }
.bot .face { left: 7%; top: 8%; width: 86%; height: 72%; border-radius: 12%; background: linear-gradient(145deg, #FFE066 0%, #FFA126 50%, #FF6A13 100%); box-shadow: 0 0 46px rgba(255,140,30,.6), inset 0 0 12px rgba(255,255,255,.55); transform: translate(calc(var(--ex) * .35), calc(var(--ey) * .35)); transition: transform .14s ease-out; }
.bot .screen { inset: 9%; border-radius: 9% / 13%; background-color: #200B07; background-image: repeating-linear-gradient(rgba(255,160,90,.07) 0 2px, transparent 2px 4px), linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: auto, 20% 25%, 20% 25%; overflow: hidden; box-shadow: inset 0 0 24px rgba(0,0,0,.8); }
.bot .scan { left: 0; right: 0; height: 26%; background: linear-gradient(transparent, rgba(255,106,19,.22), transparent); animation: scanDown 3.6s linear infinite; }
.bot .eyes { inset: 0; display: flex; align-items: center; justify-content: center; gap: 17%; padding-bottom: 6%; transform: translate(var(--ex), var(--ey)); transition: transform .12s ease-out; }
.bot .eyes .eye { position: relative; width: 13%; aspect-ratio: .9; animation: blinkEye 5.5s infinite; }
.bot .eyes .eye + .eye { animation-delay: .04s; }
.bot .ball { position: relative; inset: auto; width: 100%; height: 100%; border-radius: 3px; background: #FFFFFF; box-shadow: 0 0 16px rgba(255,255,255,.85); transition: clip-path .2s; }
.bot:hover .ball, .bot:focus-visible .ball { clip-path: inset(0 0 52% 0 round 50%); }
.bot .mouth { left: 45%; bottom: 14%; width: 10%; height: 6%; background: var(--accent); box-shadow: 0 0 10px var(--accent); transform: translate(calc(var(--ex) * .6), calc(var(--ey) * .6)); animation: blink 1s steps(1) infinite; }
.bot .ant { right: 8%; bottom: 7%; width: 4%; aspect-ratio: 1; border-radius: 50%; background: var(--accent); animation: antGlow 2.2s ease-in-out infinite; }
.bot .vent1 { left: 8%; bottom: 8%; width: 22%; height: 3%; background: #C7C7C2; }
.bot .vent2 { left: 8%; bottom: 13%; width: 14%; height: 3%; background: #D3D3CE; }
.bot .neck { left: 39%; top: 64%; width: 18%; height: 8%; background: linear-gradient(90deg, #BDBDB8, #E4E4E0); }
.bot .kbd { left: -4%; top: 72%; width: 104%; height: 22%; border-radius: 7%; background: linear-gradient(180deg, #F6F6F3 0%, #D6D6D1 100%); box-shadow: inset 0 -6px 10px rgba(0,0,0,.08), 0 16px 24px -14px rgba(0,0,0,.4); display: grid; grid-template-columns: repeat(10, 1fr); gap: 5%; padding: 4% 5%; }
.bot .kbd i { display: block; background: #E2E2DE; border-radius: 2px; box-shadow: 0 2px 0 #BDBDB8; }
.bot .kbd i.or { background: var(--accent); box-shadow: 0 2px 0 #C24A00; }
.bot .kbd i.bk { background: var(--ink); box-shadow: 0 2px 0 #000000; }
.bot .kbd i.space { grid-column: span 6; }
.pedestal { position: relative; z-index: 1; width: calc(var(--bs) * 1.5); height: 10vh; background: linear-gradient(180deg, #F4F4F1 0%, #D3D3CE 100%); border-top: 1px solid #FFFFFF; box-shadow: inset 0 10px 20px -10px rgba(0,0,0,.25); }
.pedestal i { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(0,0,0,.08); }
.pedestal i.a { left: 33%; } .pedestal i.b { left: 66%; }

.hero-term { flex: 0 1 31%; min-width: 300px; display: flex; flex-direction: column; background: var(--black); color: var(--on-black); overflow: hidden; }
.hero-term .tbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #2A2A2A; font-size: 12px; color: var(--on-black-muted); }
.hero-term .tbar i { width: 9px; height: 9px; background: #4A4A47; }
.hero-term .tbar i:first-child { background: var(--accent); }
details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.acct > summary { display: flex; }
.hero-term .tbody { flex: 1 1 auto; min-height: 0; padding: 14px; font-size: 12.5px; line-height: 1.75; overflow: auto; scrollbar-width: thin; scrollbar-color: #3A3A38 transparent; }
.ty { display: block; overflow: hidden; white-space: nowrap; width: 0; max-width: 100%; text-overflow: clip; color: var(--on-black-muted); animation-name: type; animation-duration: var(--d); animation-timing-function: steps(var(--n)); animation-fill-mode: forwards; }
.ty.cmd { color: #F2F2EF; } .ty.ok { color: #7FD9A6; } .ty.warn { color: #FFB020; }
.late { display: flex; flex-direction: column; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #3A3A38; animation: fadeIn .5s 6.2s both; }
.lbtabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.lbtabs a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 12px; white-space: nowrap; border: 1px solid #3A3A38; background: transparent; color: var(--on-black); text-decoration: none; }
.lbtabs a:hover { border-color: #8C8C85; color: #FFFFFF; }
.lbtabs a[aria-selected="true"] { border-color: var(--accent); background: var(--accent); color: var(--ink); }
.lbtabs a:focus-visible { outline: 2px solid #F2F2EF; outline-offset: 1px; }
.lbcol { display: flex; gap: 10px; padding: 2px 4px; color: #8C8C85; font-size: 11.5px; }
.lbrow { display: flex; gap: 10px; align-items: center; width: 100%; padding: 3px 4px; min-height: 44px; color: var(--on-black); text-align: left; font-size: 12.5px; text-decoration: none; }
.lbrow:hover, .lbrow:focus-visible { background: #1F1F1F; color: #FFFFFF; }
.lbrow:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.lbrow .r { color: var(--accent); }
.lbrow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbrow .st2 { color: var(--on-black-muted); white-space: nowrap; }
.lball { display: flex; justify-content: space-between; gap: 10px; width: 100%; margin-top: 6px; padding: 6px 4px; min-height: 44px; border: 1px dashed #3A3A38; color: #FF8A3D; text-align: left; font-size: 12.5px; text-decoration: none; align-items: center; }
.lball:hover, .lball:focus-visible { background: #1F1F1F; color: #FFB27A; }
.lbnote { display: block; margin-top: 6px; color: #8C8C85; font-size: 11.5px; line-height: 1.5; }
.lbempty { display: block; padding: 3px 4px; color: var(--on-black-muted); }

.strip { flex: 0 0 62px; display: flex; overflow: hidden; background: var(--panel); }
.strip .lab { flex: 0 0 auto; display: flex; align-items: center; padding: 0 22px; border-right: 1px solid var(--line); font-size: 13px; font-weight: 600; letter-spacing: .06em; background: var(--ground); position: relative; z-index: 2; }
.strip .track { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.strip .marq { height: 100%; animation-duration: 60s; }
.strip a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 26px; border-right: 1px solid var(--line); font-size: 15px; white-space: nowrap; text-decoration: none; }
.strip a:hover { background: #FAFAF8; color: var(--ink); }
.strip a:focus-visible { outline-offset: -4px; }
.strip a i { width: 9px; height: 9px; flex-shrink: 0; }

/* ---------- Shop ---------- */
.shop { display: flex; flex-wrap: wrap; align-items: stretch; }
.side { flex: 0 0 260px; border-right: 1px solid var(--line); background: var(--ground); }
.side .h { padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 600; letter-spacing: .06em; }
.side .h.tree { border-top: 1px solid var(--ink); margin-top: 18px; }
.side a { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 12px 18px; min-height: 44px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; text-decoration: none; }
.side a:hover { background: #FAFAF8; color: var(--ink); }
.side a .c { color: var(--muted); white-space: nowrap; }
.side a.on { background: var(--ink); color: var(--panel); font-weight: 600; }
.side a.on .c { color: #C9C9C3; }
.side a.all.on { background: var(--accent); color: var(--ink); }
.side a.all.on .c { color: var(--ink); }
.side .sub { background: var(--panel); border-bottom: 1px solid var(--line); padding: 4px 0; }
.side .sub a { padding: 8px 18px 8px 30px; min-height: 44px; border-bottom: none; }
.side .sub a.on { background: var(--accent); color: var(--ink); }
.side .sub a.on .c { color: var(--ink); }
.shop-main { flex: 1 1 520px; min-width: 0; }

/* ---------- Product ---------- */
.prod { display: flex; flex-wrap: wrap; align-items: stretch; }
.prod-l { flex: 1 1 420px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.prod-r { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; }
.hero-art { position: relative; background: var(--black); padding: clamp(36px, 7vw, 80px); display: grid; place-items: center; }
.hero-art .br { position: absolute; width: 16px; height: 16px; border: 0 solid #F2F2EF; }
.hero-art .br.tl { left: 16px; top: 16px; border-left-width: 2px; border-top-width: 2px; }
.hero-art .br.tr { right: 16px; top: 16px; border-right-width: 2px; border-top-width: 2px; }
.hero-art .br.bl { left: 16px; bottom: 16px; border-left-width: 2px; border-bottom-width: 2px; }
.hero-art .br.brr { right: 16px; bottom: 16px; border-right-width: 2px; border-bottom-width: 2px; }
.hero-art .oid { position: absolute; left: 44px; bottom: 18px; font-size: 13px; color: var(--on-black-muted); }
.frow { display: flex; justify-content: space-between; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); font-size: 14px; }
.frow span:first-child { overflow-wrap: anywhere; }
.prod-head { padding: 26px 28px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.crumb { align-self: flex-start; font-size: 13px; color: var(--muted); text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }
.devchip { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--panel); padding: 6px 12px 6px 6px; min-height: 44px; text-decoration: none; }
.devchip:hover { background: #FAFAF8; color: var(--ink); }
.devchip .u { font-weight: 600; }
.buybox { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.buybox .pr { flex: 1 1 200px; padding: 22px 28px; border-right: 1px solid var(--line); }
.buybox .pr .big { font-family: var(--display); font-weight: 900; font-size: 54px; line-height: 1; }
.buybox .acts { flex: 1 1 240px; padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; }
.buybox .acts .btn, .buybox .acts form .btn { width: 100%; height: 50px; }
.buybox .acts form { margin: 0; }
.tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; height: 50px; padding: 0 20px; border-right: 1px solid var(--line); font-size: 14px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { background: var(--panel); color: var(--ink); }
.tabs a.on { background: var(--ink); color: var(--panel); }
.tabs a:focus-visible { outline-offset: -4px; }
.tabs.big a { flex: 1 1 160px; justify-content: center; height: 56px; font-size: 15px; font-weight: 600; }
.tabpanel { padding: 24px 28px; flex: 1; }
.statgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.statgrid > div { padding: 12px; border-right: 1px solid var(--line); }
.statgrid > div:last-child { border-right: none; }
.statgrid .v { font-family: var(--display); font-weight: 800; font-size: 28px; }
.trace { border: 1px solid var(--ink); background: var(--panel); }
.trace .th { padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.trace .step { display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.trace .step:last-child { border-bottom: none; }
.trace .step i { width: 10px; height: 10px; flex-shrink: 0; margin-top: 4px; background: var(--ink); }
.trace .step i.o { background: var(--accent); }
.private { margin: 0 28px 22px; border: 1px dashed var(--muted); padding: 12px 14px; font-size: 14px; }
.private table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.private td { padding: 4px 0; }
.private td + td { text-align: right; font-weight: 600; }

/* ---------- Developer page and directory ---------- */
.dev-hero { position: relative; background: var(--black); color: #F2F2EF; padding: 36px 28px; display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-end; }
.dev-hero .sqr { position: absolute; right: 22px; top: 22px; width: 12px; height: 12px; background: var(--accent); }
.dev-hero h1 { font-weight: 900; font-stretch: 80%; font-size: clamp(40px, 6vw, 84px); line-height: .95; overflow-wrap: anywhere; }
.dev-hero .meta { font-size: 14px; color: var(--on-black-muted); }
.dev-hero .bio { max-width: 60ch; color: #D6D6D0; }
.dev-stats { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.dev-stats > div { flex: 1 1 160px; padding: 18px 24px; border-right: 1px solid var(--line); }
.dev-stats > div.wide { flex: 2 1 260px; display: flex; flex-wrap: wrap; gap: 6px; align-content: center; border-right: none; }
.dev-stats .v { font-family: var(--display); font-weight: 800; font-size: 34px; }
.treerow { width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--panel); text-decoration: none; }
.treerow:hover { background: #FAFAF8; color: var(--ink); }
.devgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.devcard { position: relative; display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); text-decoration: none; color: var(--ink); }
.devcard:hover { background: #FAFAF8; color: var(--ink); }
.devcard .corner { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; background: var(--accent); opacity: 0; transition: opacity .15s; }
.devcard:hover .corner, .devcard:focus-visible .corner { opacity: 1; }
.devcard .u { font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.1; overflow-wrap: anywhere; }
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.catbox { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; }
.catbox .g { display: flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--display); font-weight: 700; font-size: 20px; text-decoration: none; }
.catbox .g i { width: 10px; height: 10px; background: var(--accent); flex-shrink: 0; }
.catbox .g .c { margin-left: auto; font-family: var(--mono); font-weight: 400; font-size: 13px; color: var(--muted); }
.catbox .s { display: flex; justify-content: space-between; gap: 10px; padding: 6px 4px; min-height: 44px; align-items: center; font-size: 14px; text-decoration: none; }
.catbox .s:hover { background: #FAFAF8; color: var(--ink); }
.catbox .s .c { color: var(--muted); }

/* ---------- Rankings ---------- */
.rk-wrap { overflow-x: auto; }
.rk { min-width: 820px; }
.rk-h, .rk-r { display: flex; gap: 14px; align-items: center; padding: 10px 24px; }
.rk-h { border-bottom: 1px solid var(--ink); font-size: 12px; color: var(--muted); }
.rk-h span { font-weight: 400 !important; }
.rk-r { position: relative; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 14px; text-decoration: none; color: var(--ink); }
.rk-r:hover { background: #FAFAF8; color: var(--ink); }
.rk-r .corner { position: absolute; left: 8px; top: 50%; width: 6px; height: 6px; margin-top: -3px; background: var(--accent); opacity: 0; transition: opacity .15s; }
.rk-r:hover .corner, .rk-r:focus-visible .corner { opacity: 1; }
.rk-r:focus-visible { outline-offset: -4px; }
.rk .c-n { flex: 0 0 34px; }
.rk-r .c-n { font-family: var(--display); font-weight: 800; font-size: 20px; }
.rk .c-t { flex: 0 0 40px; }
.rk .c-0 { flex: 2.2 1 0; min-width: 0; }
.rk .c-1 { flex: 1.3 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk .c-2 { flex: 1 1 0; }
.rk .c-3 { flex: 1 1 0; font-weight: 600; }
.rk .c-4 { flex: 1.2 1 0; }
.rk-r .c-0 .t { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-r .c-0 .s { display: block; font-size: 13px; color: var(--muted); }

/* ---------- Dashboard ---------- */
.dash { display: flex; flex-wrap: wrap; align-items: stretch; }
.dash-nav { flex: 0 0 230px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dash-nav .me { padding: 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.dash-nav .me .u { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.dash-nav .new { padding: 14px 14px 6px; }
.dash-nav .new .btn { width: 100%; height: 50px; }
.dash-nav nav a { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 18px; border-top: 1px solid var(--line); font-size: 15px; text-decoration: none; }
.dash-nav nav a:hover { background: #FAFAF8; color: var(--ink); }
.dash-nav nav a.on { background: var(--ink); color: var(--panel); }
.dash-nav nav a .b { color: var(--muted); font-size: 13px; }
.dash-nav nav a.on .b { color: #C9C9C3; }
.dash-nav nav a:last-child { border-bottom: 1px solid var(--line); }
.dash-main { flex: 1 1 560px; min-width: 0; }
.checklist { padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.progress { height: 6px; background: #D2D2CD; }
.progress div { height: 100%; background: var(--accent); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.chk { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); background: #FFFFFF; min-height: 56px; text-decoration: none; }
a.chk:hover { background: #FAFAF8; color: var(--ink); }
.chk.done { background: var(--panel); }
.chk .box { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 1px solid var(--ink); }
.chk.done .box { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.chk .t { display: block; font-weight: 600; font-size: 14px; }
.chk .s { display: block; font-size: 12px; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-bottom: 1px solid var(--line); }
.kpi { padding: 18px 22px; border-right: 1px solid var(--line); }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .v { font-family: var(--display); font-weight: 900; font-size: 38px; line-height: 1.1; overflow-wrap: anywhere; }
.kpi.dark { background: var(--ink); color: var(--panel); }
.kpi.dark .l { color: var(--on-black-muted); }
.kpi.dark a { color: var(--panel); }
.split2 { display: flex; flex-wrap: wrap; }
.split2 > div { flex: 1 1 320px; min-width: 0; }
.split2 > div:first-child { border-right: 1px solid var(--line); }
.prow { display: flex; gap: 16px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--panel); }
.prow.h { background: transparent; font-size: 12px; color: var(--muted); padding: 10px 24px; }
.prow .c-t { flex: 0 0 44px; }
.prow .c-p { flex: 2 1 0; min-width: 0; }
.prow .c-p a { display: block; font-weight: 600; text-decoration: none; }
.prow .c-p a:hover { text-decoration: underline; }
.prow .c-p .s { display: block; font-size: 13px; color: var(--muted); }
.prow .c-x { flex: 1 1 0; font-size: 14px; }
.prow .c-d { flex: 0 0 170px; }
.earn-chart svg { display: block; width: 100%; height: 160px; }
.earn-chart .base { stroke: var(--line); stroke-width: 1; }
.earn-chart .mark { fill: var(--ink); }
.earn-chart .hit { fill: transparent; }
.earn-chart .bar:hover .hit { fill: rgba(17, 17, 17, .06); }
.earn-chart .bar:hover .mark { fill: var(--accent); }
.payout-box { padding: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 40px 16px; background-image: linear-gradient(rgba(17,17,17,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(17,17,17,.05) 1px, transparent 1px); background-size: 40px 40px; }
.auth { position: relative; width: 100%; max-width: 460px; background: var(--ground); border: 1px solid var(--ink); box-shadow: 10px 10px 0 var(--accent); animation: popIn .3s cubic-bezier(.2,.8,.2,1) both; }
.auth .sqr { position: absolute; left: 10px; top: 10px; width: 9px; height: 9px; background: var(--accent); }
.auth-h { padding: 16px 16px 14px 28px; border-bottom: 1px solid var(--line); }
.auth-h h1 { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); }
.auth-tabs a { flex: 1; height: 50px; display: grid; place-items: center; font-weight: 600; text-decoration: none; }
.auth-tabs a + a { border-left: 1px solid var(--line); }
.auth-tabs a:hover { background: var(--panel); color: var(--ink); }
.auth-tabs a.on { background: var(--ink); color: var(--panel); }
.auth-tabs a:focus-visible { outline-offset: -4px; }
.auth-b { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.auth-f { padding: 12px 24px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.soc { display: flex; flex-direction: column; gap: 8px; }
.soc form { margin: 0; }
.soc button { width: 100%; height: 50px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid var(--ink); background: #FFFFFF; font-weight: 600; font-size: 15px; }
.soc button.apple { border: none; background: var(--ink); color: var(--panel); }
.soc button span { width: 22px; height: 22px; border: 2px solid currentColor; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 13px; }
.or-line { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Legal pages ---------- */
.legal-draft { margin: 0; padding: 10px 24px; border-bottom: 1px solid var(--line); background: #FFF1E7; border-left: 4px solid var(--accent); font-size: 14px; }
.legal-body { display: flex; flex-wrap: wrap; align-items: flex-start; }
.legal-toc { flex: 0 0 240px; position: sticky; top: 90px; padding: 22px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.legal-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.legal-toc li { counter-increment: toc; }
.legal-toc a { display: flex; gap: 8px; align-items: center; min-height: 36px; font-size: 14px; text-decoration: none; }
.legal-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--accent); font-size: 12px; }
.legal-toc a:hover { text-decoration: underline; }
.legal-text { flex: 1 1 480px; min-width: 0; padding: 8px 28px 32px; max-width: 820px; counter-reset: sec; }
.legal-text section { padding: 18px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.legal-text section:last-child { border-bottom: none; }
.legal-text h2 { counter-increment: sec; font-size: 22px; margin: 0 0 10px; display: flex; gap: 12px; align-items: baseline; }
.legal-text h2::before { content: counter(sec, decimal-leading-zero); font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--panel); background: var(--ink); padding: 1px 6px; }
.legal-text p { margin: 0 0 10px; max-width: 72ch; }
.legal-text ul { margin: 0; padding-left: 20px; max-width: 72ch; }
.legal-text li { margin: 0 0 8px; }
.legal-text li::marker { color: var(--accent); }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }

/* ---------- Seller checks page: changes needed ---------- */
.changes-box { margin: 18px 24px; padding: 20px; border: 1px solid var(--ink); background: #FFF1E7; box-shadow: 8px 8px 0 var(--accent); display: flex; flex-direction: column; gap: 12px; }
.changes-box h2 { font-size: 24px; }
.findings { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.findings li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); }
.findings li strong { display: block; overflow-wrap: anywhere; }
.findings li .d { display: block; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- Staff Ops page ---------- */
.ops-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.ops-status i { width: 8px; height: 8px; background: var(--good); }
.ops-status.bad i { background: var(--bad); animation: none; }
.ops-body { display: flex; flex-wrap: wrap; align-items: stretch; }
.ops-line { position: relative; flex: 999 1 640px; min-width: 0; padding: 40px 18px 24px; background-image: linear-gradient(rgba(17,17,17,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(17,17,17,.06) 1px, transparent 1px); background-size: 40px 40px; border-right: 1px solid var(--line); }
.desks { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.desk { --bs: clamp(64px, 7vw, 96px); position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.desk + .desk::before { content: ""; position: absolute; left: -12px; top: calc(var(--bs) * .75); width: 12px; height: 2px; background: var(--ink); }
.desk-bot { display: flex; justify-content: center; height: calc(var(--bs) * 1.1); }
.desk .botidle { display: block; animation: none; transform-origin: 50% 100%; }
.desk.idle .botidle { animation: look 9s ease-in-out infinite; }
.desk:nth-child(2).idle .botidle { animation-delay: -2s; } .desk:nth-child(3).idle .botidle { animation-delay: -4s; }
.desk:nth-child(4).idle .botidle { animation-delay: -6s; } .desk:nth-child(5).idle .botidle { animation-delay: -8s; }
.desk .bot { pointer-events: none; }
.desk .bot .face { box-shadow: 0 0 22px rgba(255,140,30,.45), inset 0 0 8px rgba(255,255,255,.55); }
.desk .bot .eyes .eye { width: 14%; }
.desk .bot .ball { border-radius: 2px; }
.desk .bot .kbd { gap: 6%; }
.desk .bot .kbd i { box-shadow: 0 1px 0 #BDBDB8; }
.desk.busy .bot .scan { animation-duration: 1.1s; }
.desk.busy .bot .ant { animation-duration: .8s; }
.desk.idle .bot .ball { clip-path: inset(0 0 45% 0 round 50%); }
.desk[data-stage="sweeper"] .bot .face { background: linear-gradient(145deg, #FFF2A8 0%, #FFB020 60%, #E08A00 100%); }
.desk[data-stage="lena"] .bot .face { background: linear-gradient(145deg, #E4E4FF 0%, #A9A9FF 50%, #8C8CFF 100%); box-shadow: 0 0 22px rgba(140,140,255,.5), inset 0 0 8px rgba(255,255,255,.55); }
.desk[data-stage="gate"] .bot .face { background: linear-gradient(145deg, #FFFFFF 0%, #C9C9C3 60%, #8C8C85 100%); box-shadow: 0 0 18px rgba(17,17,17,.25), inset 0 0 8px rgba(255,255,255,.55); }
.desk-table { width: 100%; height: 10px; background: linear-gradient(180deg, #F4F4F1 0%, #D3D3CE 100%); border-top: 1px solid #FFFFFF; box-shadow: 0 6px 10px -6px rgba(0,0,0,.35); }
.desk-label { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.25; min-width: 0; }
.desk-name { font-family: var(--display); font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.desk-sub { font-size: 11.5px; color: var(--muted); }
.tray { width: 100%; min-height: 96px; padding: 8px 6px; border: 1px dashed var(--line); background: rgba(242,242,239,.75); display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.desk.busy .tray { border-color: var(--ink); border-style: solid; }
.desk-count { font-size: 12px; color: var(--muted); }
.desk.busy .desk-count { color: var(--ink); font-weight: 600; }
.folder { position: relative; display: flex; align-items: center; min-height: 30px; padding: 8px 8px 4px; background: #FFE7B3; border: 1px solid #5A3B00; font-size: 12px; line-height: 1.2; transition: transform .7s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.folder .tab { position: absolute; left: -1px; top: -7px; width: 40%; height: 7px; background: #FFE7B3; border: 1px solid #5A3B00; border-bottom: none; clip-path: polygon(0 0, 80% 0, 100% 100%, 0 100%); }
.folder .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.folder.arrive { animation: popIn .35s cubic-bezier(.2,.8,.2,1) both; }
.desk[data-stage="gate"] .folder { background: var(--accent); border-color: var(--ink); }
.desk[data-stage="gate"] .folder .tab { background: var(--accent); border-color: var(--ink); }
.tray .more { font-size: 12px; text-align: center; color: var(--muted); }
.ops-empty { margin: 16px 0 0; text-align: center; }
.ops-card { flex: 1 1 320px; min-width: 0; background: var(--black); color: var(--on-black); display: flex; flex-direction: column; }
.ops-card .tbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #2A2A2A; font-size: 12px; color: var(--on-black-muted); }
.ops-card .tbar i { width: 9px; height: 9px; background: #4A4A47; }
.ops-card .tbar i:first-child { background: var(--accent); }
.ops-card .tbar span { margin-left: 8px; }
.ops-card section { padding: 12px 16px; border-bottom: 1px dashed #3A3A38; }
.ops-h { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #F2F2EF; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ops-key { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--on-black-muted); }
.ops-key i { width: 8px; height: 8px; display: inline-block; }
.ops-key i.human, .ops-timeline i.human { background: #F2F2EF; }
.ops-key i.auto, .ops-timeline i.auto { background: var(--accent); }
.ops-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ops-list li { display: flex; flex-direction: column; padding: 4px 0 4px 10px; border-left: 2px solid #3A3A38; min-width: 0; }
.ops-list li.needs { border-left-color: var(--accent); }
.ops-list li.none { color: var(--on-black-muted); border-left-color: transparent; padding-left: 0; }
.ops-list .t { color: #F2F2EF; font-weight: 600; overflow-wrap: anywhere; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ops-list a { color: #FFB27A; min-height: 32px; display: inline-flex; align-items: center; }
.ops-list a:hover { color: #FFFFFF; }
.ops-list .d { color: var(--on-black-muted); font-size: 12px; overflow-wrap: anywhere; }
.ops-card .tag.auto { background: var(--accent); color: var(--ink); font-size: 11px; padding: 0 6px; }
.ops-timeline { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; height: 64px; align-items: end; border-bottom: 1px solid #3A3A38; }
.ops-timeline .tl-bar { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; background: rgba(255,255,255,.04); }
.ops-timeline .tl-bar i { display: block; width: 100%; }
.ops-log { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 12px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3A3A38 transparent; }
.ops-log li { display: flex; gap: 8px; padding: 3px 0; min-width: 0; }
.ops-log li.needs .msg { color: #FFB27A; }
.ops-log li.none { color: var(--on-black-muted); }
.ops-log .tm { flex: 0 0 auto; color: #8C8C85; }
.ops-log .ag { flex: 0 0 76px; color: var(--accent); }
.ops-log .ag.lena { color: var(--idea); } .ops-log .ag.sweeper { color: var(--warn); } .ops-log .ag.gate { color: #F2F2EF; }
.ops-log .msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; color: var(--on-black); }
.ops-log .msg .tag { margin-left: 6px; }

/* ---------- Phones (from the design's media query) ---------- */
@media (max-width: 760px) {
  .rail-l, .rail-r, .hidesm { display: none !important; }
  .hdr .brand { border-right: none; min-height: 64px; padding: 10px 16px; }
  .hdr-right { border-left: none; padding: 10px 16px; gap: 8px; }
  .hdr-right .btn-or { height: 44px; padding: 0 16px; font-size: 14px; }
  .nav { order: 3; flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 0 8px; border-top: 1px solid var(--line); scrollbar-width: none; }
  .nav a { flex-shrink: 0; padding: 0 12px; }
  .acct-menu { position: fixed; left: 16px; right: 16px; top: 76px; width: auto; }
  .home { height: auto !important; min-height: calc(100vh - 73px); overflow: visible; }
  .hero-sub .testmode { margin-left: 0; }
  .hero-sub .live { margin-left: 0; }
  .hero-mid { flex-direction: column; }
  .hero-left { order: 2; min-width: 0; flex: 0 0 auto; padding: 22px 16px; border-top: 1px solid var(--line); }
  .hero-left .blurb { max-width: none; }
  .hero-ctas { max-width: none; }
  .stage { order: 1; --bs: min(46vw, 34vh); min-height: 400px; flex: 0 0 auto; border-left: none; border-right: none; }
  .hero-term { order: 3; min-width: 0; flex: 0 0 auto; min-height: 420px; }
  .head, .bar, .bar.count, .sec, .pad, .empty { padding-left: 16px; padding-right: 16px; }
  .side { flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--line); }
  .prod-l, .dash-nav { border-right: none; border-bottom: 1px solid var(--line); }
  .dash-nav { flex-basis: 100%; }
  .tabpanel { padding: 20px 16px; }
  .prod-head { padding: 22px 16px; }
  .buybox .pr { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .split2 > div:first-child { border-right: none; }
  .mrow { padding: 12px 16px; }
  table.list th:first-child, table.list td:first-child { padding-left: 16px; }
  .private { margin: 0 16px 20px; }
  .done-bar { margin: 16px; }
  .kinds { grid-template-columns: 1fr; }
  .legal-toc { position: static; flex-basis: 100%; border-right: none; border-bottom: 1px solid var(--line); padding: 16px; }
  .legal-text { padding: 4px 16px 24px; }
  .legal-draft { padding-left: 16px; padding-right: 16px; }
  .changes-box { margin: 16px; }
  .ops-line { flex-basis: 100%; border-right: none; padding: 32px 16px 20px; }
  .desks { grid-template-columns: 1fr; gap: 10px; }
  .desk { --bs: 64px; display: grid; grid-template-columns: 76px 1fr; grid-template-areas: "bot label" "bot tray" "table count"; align-items: start; gap: 4px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .desk + .desk::before { display: none; }
  .desk-bot { grid-area: bot; height: calc(var(--bs) * 1.1); }
  .desk-table { grid-area: table; }
  .desk-label { grid-area: label; align-items: flex-start; text-align: left; }
  .tray { grid-area: tray; min-height: 46px; flex-direction: row; flex-wrap: wrap; }
  .tray .folder { flex: 1 1 120px; min-width: 0; }
  .desk-count { grid-area: count; }
}

/* ---------- Reduced motion (from the design) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ty { width: auto !important; }
  .late { opacity: 1 !important; }
  .marq { width: auto; flex-wrap: nowrap; }
}
