:root {
  --page: #efeee9;
  --surface: #ffffff;
  --tile: #f3f3f0;
  --tile-2: #ebebe6;
  --ink: #111412;
  --text: #2b2f2c;
  --muted: #7b807b;
  --faint: #b3b7b2;
  --line: #e6e6e0;
  --green: #2f9e62;
  --green-2: #1f7a49;
  --green-soft: #e5f4ec;
  --red: #c8372d;
  --red-soft: #fbe9e7;
  --amber: #c98a12;
  --amber-soft: #fbf1dc;
  --display: "Inter Tight", "Inter", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: radial-gradient(1200px 500px at 50% -120px, rgba(47, 158, 98, .16), transparent 70%), var(--page);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }

.shell { max-width: 1440px; margin: 24px auto 40px; padding: 0 24px; }
.shell > * { background: var(--surface); }

/* ── Nav ─────────────────────────────────────────────── */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 76px; padding: 0 32px; border-radius: 28px 28px 0 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); display: grid; place-items: center; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-mark path { fill: var(--green); }
.brand-mark .stem { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.brand-name { font: 700 24px/1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.brand-name .dot { color: var(--green); }
.brand-product { font-size: 14px; color: var(--muted); padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--line); line-height: 20px; white-space: nowrap; }
.links { display: flex; gap: 28px; }
.links a { font-size: 15px; color: var(--muted); padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s; }
.links a:hover { color: var(--ink); }
.links a.on { color: var(--ink); font-weight: 600; border-color: var(--ink); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--green); color: #fff; font-size: 11.5px; font-weight: 600; }
.count:empty { display: none; }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--green-2); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(47, 158, 98, .5); animation: pulse 2s infinite; }
.live.off { color: var(--faint); }
.live.off i { background: var(--faint); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(47, 158, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 158, 98, 0); } }
.account { display: inline-block; height: 40px; line-height: 37px; padding: 0 16px; border: 1.5px solid var(--ink); border-radius: 12px; font-weight: 600; font-size: 14px; color: var(--ink); max-width: 240px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.api-link { font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.api-link:hover { text-decoration: underline; }

main { border-radius: 0 0 28px 28px; padding-bottom: 48px; min-height: 70vh; }

/* ── Hero: the wordmark, cropped by the edge ─────────────────────── */
.hero { position: relative; overflow: hidden; background: #f7f7f4; height: clamp(150px, 19vw, 270px); display: flex; align-items: flex-end; justify-content: center; }
.hero h1 { margin: 0 0 calc(clamp(110px, 17vw, 250px) * -0.28); font: 800 clamp(110px, 17vw, 250px)/1 var(--display); letter-spacing: -.055em; color: var(--ink); user-select: none; }
.hero h1 span { color: var(--green); }
.hero-sub { position: absolute; left: 32px; top: 24px; max-width: 360px; font-size: 14px; color: var(--muted); }
.hero-sub b { color: var(--ink); font-weight: 600; }
.sim { position: absolute; right: 32px; top: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; background: var(--amber-soft); color: #8a5d05; font-size: 12.5px; font-weight: 600; }

/* ── Shop: filters + grid ────────────────────────────── */
.shop { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 40px; padding: 40px 32px 0; }
.filters { position: sticky; top: 20px; align-self: start; }
.filters > summary { display: none; }
.f-group { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.f-group h4 { margin: 0 0 12px; font: 600 18px/1.2 var(--display); color: var(--ink); display: flex; justify-content: space-between; }
.f-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 15px; color: var(--text); cursor: pointer; }
.f-row small { display: block; font-size: 12px; color: var(--muted); }
.f-row input { appearance: none; width: 22px; height: 22px; border: 1.5px solid var(--faint); border-radius: 7px; display: grid; place-items: center; margin: 0; cursor: pointer; transition: background .15s, border-color .15s; }
.f-row input:checked { background: var(--ink); border-color: var(--ink); }
.f-row input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.toolbar .hint { flex: 1; min-width: 200px; font-size: 13.5px; color: var(--muted); }
.tbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink); transition: transform .2s var(--spring), background .2s, border-color .2s; }
.tbtn:hover { transform: translateY(-1px); border-color: var(--faint); }
.tbtn svg { width: 16px; height: 16px; }
.sim-tools { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; border-radius: 15px; background: var(--tile); }
.sim-k { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.sim-tools .tbtn { height: 36px; padding: 0 14px; }
.tbtn.warn { color: var(--red); }
.tbtn.on { background: var(--red-soft); border-color: #f1c2bc; color: var(--red); }
.tbtn:disabled { opacity: .6; cursor: progress; transform: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.tile { position: relative; min-width: 0; display: flex; flex-direction: column; min-height: 330px; padding: 18px; border-radius: var(--r); background: var(--tile); border: 1px solid transparent; transition: transform .3s var(--spring), box-shadow .3s, border-color .3s; cursor: pointer; text-align: left; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(17, 20, 18, .45); }
.tile:focus-visible { outline: 3px solid rgba(47, 158, 98, .4); outline-offset: 2px; }
.tile.malicious { background: #fff4f2; border-color: #f3c8c2; }
.tile-top { display: flex; justify-content: space-between; gap: 6px; min-width: 0; }
.tile-top .pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tile-top .pill:first-child { flex: none; }
.pill { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(17, 20, 18, .14); font-size: 12.5px; color: var(--text); background: rgba(255, 255, 255, .6); white-space: nowrap; }
.pill.cond-refurbished { color: #6a4fb5; }
.pill.cond-imported { color: #8a5d05; }
.art { flex: 1; display: grid; place-items: center; padding: 10px 0; }
.art svg { width: 62%; max-height: 150px; filter: drop-shadow(0 16px 18px rgba(17, 20, 18, .18)); transition: transform .4s var(--spring); }
.tile:hover .art svg { transform: scale(1.04) rotate(-1.5deg); }
.t-name { font: 600 18px/1.25 var(--display); color: var(--ink); letter-spacing: -.01em; }
.t-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 6px; }
.t-seller { font-size: 13px; color: var(--muted); }
.t-price { font: 600 18px/1 var(--display); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.move { font-size: 12px; font-weight: 600; margin-top: 4px; }
.move.down { color: var(--green-2); }
.move.up { color: var(--red); }
.warning { margin-top: 10px; padding: 8px 10px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 12.5px; line-height: 1.35; }

/* The dark tile: what agents are asking Orchard, live */
.tile.feed { background: radial-gradient(120% 90% at 50% 120%, #2f9e62 0%, #154c30 38%, #0e1410 75%); color: #fff; cursor: default; }
.tile.feed:hover { transform: none; box-shadow: none; }
.feed-k { align-self: center; display: inline-flex; height: 30px; align-items: center; gap: 8px; padding: 0 12px; border-radius: 99px; background: rgba(255, 255, 255, .12); font-size: 12.5px; font-weight: 500; }
.feed-k i { width: 7px; height: 7px; border-radius: 50%; background: #5fd49a; box-shadow: 0 0 0 0 rgba(95, 212, 154, .5); animation: pulse 2s infinite; }
.feed h3 { margin: 18px 0 14px; font: 600 26px/1.15 var(--display); text-align: center; letter-spacing: -.02em; }
.feed-list { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.feed-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: 13px; animation: in .5s var(--spring); }
.feed-row b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-row span { color: rgba(255, 255, 255, .6); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.feed-empty { color: rgba(255, 255, 255, .6); font-size: 13.5px; text-align: center; margin: auto 0; }
.feed-cta { align-self: center; margin-top: 14px; height: 40px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--green); color: #fff; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; }
@keyframes in { from { opacity: 0; transform: translateY(-6px); } }

.dchip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.dchip.ok { background: var(--green-soft); color: var(--green-2); }
.dchip.bad { background: var(--red-soft); color: var(--red); }
.dchip.info { background: #eef0ec; color: var(--muted); }
.tile.feed .dchip.ok { background: rgba(47, 158, 98, .3); color: #b9f2d2; }
.tile.feed .dchip.bad { background: rgba(200, 55, 45, .3); color: #ffc7c1; }
.tile.feed .dchip.info { background: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .75); }

/* ── Requests page ───────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 40px 32px 24px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font: 800 clamp(40px, 6vw, 72px)/.95 var(--display); letter-spacing: -.045em; color: var(--ink); }
.page-head p { margin: 10px 0 0; color: var(--muted); max-width: 520px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 0 32px 24px; }
.stat { padding: 16px 18px; border-radius: 18px; background: var(--tile); }
.stat b { display: block; font: 700 28px/1.1 var(--display); color: var(--ink); letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }
.table { margin: 0 32px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.tr { display: grid; grid-template-columns: 88px minmax(0, 1.1fr) 92px minmax(0, 1.6fr) 110px 150px; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.tr:last-child { border-bottom: 0; }
.tr.head { background: var(--tile); font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tr.row { cursor: pointer; transition: background .15s; }
.tr.row:hover { background: #fafaf7; }
.tr.row.fresh { animation: flash 1.6s var(--ease); }
@keyframes flash { from { background: var(--green-soft); } }
.tr .time { font: 12px var(--mono); color: var(--muted); }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t { display: grid; min-width: 0; line-height: 1.25; }
.who-t small { font-size: 12px; color: var(--faint); font-family: "JetBrains Mono", monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av { width: 26px; height: 26px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; background: var(--ink); }
.av.rogue { background: var(--red); }
.kind { font-size: 12.5px; color: var(--muted); }
.tr.head .kind, .tr.head .amt { font: inherit; color: inherit; }
.item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.amt { font: 600 14px var(--display); text-align: right; color: var(--ink); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

/* ── Side panel (a product, or one request) ─────────── */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(17, 20, 18, .28); backdrop-filter: blur(3px); }
.panel { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 21; width: min(560px, calc(100vw - 24px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 26px; box-shadow: 0 40px 80px -20px rgba(17, 20, 18, .4); transform: translateX(110%); transition: transform .45s var(--ease); }
.panel.open { transform: none; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; padding: 24px 24px 8px; }
.panel-head h3 { margin: 2px 0 0; font: 700 26px/1.15 var(--display); letter-spacing: -.02em; color: var(--ink); }
.panel-k { font-size: 12.5px; color: var(--muted); }
.icon { width: 40px; height: 40px; flex: none; border-radius: 12px; border: 0; background: var(--tile); font-size: 15px; }
.panel-body { flex: 1; overflow-y: auto; padding: 8px 24px 28px; }
.sec { margin-top: 22px; }
.sec-k { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.verdict { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; }
.verdict.ok { background: var(--green-soft); }
.verdict.bad { background: var(--red-soft); }
.verdict .vi { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; color: #fff; font-weight: 700; }
.verdict.ok .vi { background: var(--green); }
.verdict.bad .vi { background: var(--red); }
.verdict b { display: block; font: 600 18px/1.2 var(--display); color: var(--ink); }
.verdict span { font-size: 13.5px; color: var(--text); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.checks i { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; flex: none; }
.checks .pass i { background: var(--green-soft); color: var(--green-2); }
.checks .fail { color: var(--red); }
.checks .fail i { background: var(--red); color: #fff; }
.checks em { margin-left: auto; font: 11.5px var(--mono); color: var(--muted); font-style: normal; }
.code { margin: 0; padding: 16px; border-radius: 16px; background: #111412; color: #e3e7e2; font: 12px/1.6 var(--mono); overflow: auto; max-height: 360px; white-space: pre; }
.jk { color: #9fe0bb; } .js { color: #f1d38a; } .jn { color: #f6a77b; }
.copy { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; }

.price-big { font: 800 54px/1 var(--display); letter-spacing: -.04em; color: var(--ink); }
.history { width: 100%; height: 110px; margin: 10px 0 4px; }
.history polyline { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.history .area { fill: url(#hg); stroke: none; }
.history circle { fill: var(--green); }
.slider { width: 100%; margin: 18px 0 6px; accent-color: var(--ink); height: 28px; }
.row-price { display: flex; gap: 10px; align-items: center; }
.row-price .field { flex: 1; display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; font: 600 18px var(--display); }
.row-price input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; color: var(--ink); background: transparent; }
.primary { height: 46px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.primary:disabled { opacity: .55; cursor: default; }
.note { font-size: 13px; color: var(--muted); margin-top: 10px; }
.kv { display: grid; grid-template-columns: 120px 1fr; border-radius: 16px; overflow: hidden; background: var(--tile); }
.kv dt, .kv dd { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--ink); word-break: break-all; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translateX(-50%); display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast { padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 16px 40px -12px rgba(17, 20, 18, .5); animation: in .4s var(--spring), out .4s var(--ease) 3.6s forwards; }
@keyframes out { to { opacity: 0; transform: translateY(8px); } }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: rot .7s linear infinite; }
.tbtn .spin { border-color: rgba(17, 20, 18, .15); border-top-color: var(--ink); }
@keyframes rot { to { transform: rotate(360deg); } }

/* ── Smaller screens ─────────────────────────────────── */
@media (max-width: 1100px) {
  .shop { grid-template-columns: 1fr; gap: 20px; }
  .filters { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .f-group { border-bottom: 0; margin: 0; padding: 0; }
  .tr { grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.4fr) 100px 140px; }
  .tr .kind { display: none; }
}
@media (max-width: 760px) {
  .shell { margin: 0 auto 24px; padding: 0; }
  .nav { grid-template-columns: 1fr auto; grid-template-areas: "brand right" "links links"; height: auto; padding: 14px 16px 0; border-radius: 0; row-gap: 10px; }
  .brand { grid-area: brand; }
  .nav-right { grid-area: right; }
  .links { grid-area: links; justify-content: flex-start; gap: 20px; }
  .brand-product { display: none; }
  .sim-tools { width: 100%; overflow-x: auto; }
  .live { display: none; }
  .account { height: 36px; line-height: 33px; padding: 0 12px; font-size: 13px; max-width: 150px; }
  main { border-radius: 0; }
  .hero-sub, .sim { position: static; }
  .hero { flex-direction: column; align-items: flex-start; height: auto; padding: 16px 16px 0; gap: 8px; }
  .hero h1 { align-self: center; margin-top: 8px; }
  .shop, .page-head { padding: 20px 16px 0; }
  .filters { display: block; }
  .filters > summary { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; font-weight: 600; color: var(--ink); list-style: none; cursor: pointer; }
  .filters > summary::-webkit-details-marker { display: none; }
  .filters[open] > summary { margin-bottom: 14px; }
  .filters .f-group { margin-bottom: 14px; }
  .hero h1 { font-size: 27vw; margin-bottom: -7.5vw; }
  .shell, main, .shop { overflow-x: clip; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 12px; }
  .tile { min-height: 260px; padding: 14px; }
  .tile.feed { grid-column: 1 / -1; min-height: 0; }
  .t-name { font-size: 16px; }
  .tile-top .pill:first-child { display: none; }
  .pill { height: 26px; padding: 0 10px; font-size: 11.5px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 16px; }
  .table { margin: 0 16px; border-radius: 16px; }
  .tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who amt" "item dec"; row-gap: 6px; }
  .tr.head { display: none; }
  .tr .time, .tr .kind { display: none; }
  .tr .who { grid-area: who; }
  .tr .item { grid-area: item; }
  .tr .amt { grid-area: amt; }
  .tr .dec { grid-area: dec; justify-self: end; }
  .panel { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
