:root {
  --red: #bf3330;
  --red-deep: #9e2623;
  --tag: #d4a440;
  --ink: #1b1b1b;
  --paper: #f7f1e6;
  --card: #fffdf8;
  --line: #1b1b1b;
  --muted: #6b645a;
  --green: #2f8a4f;
  --amber: #d4a440;
  --bad: #bf3330;
  --grey: #b9b2a6;
  --display: "Anton", Impact, sans-serif;
  --body: "Archivo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--body);
}
h1, h2 { margin: 0; }
button, input, select { font: inherit; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 48px);
  background: var(--red);
  border-bottom: 3px solid var(--ink);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.tag-icon { width: 34px; height: 34px; }
.tag-icon rect { fill: var(--tag); stroke: var(--ink); stroke-width: 2.5; }
.tag-icon circle { fill: var(--red); stroke: var(--ink); stroke-width: 2; }
.brand-name { font: 26px/1 var(--display); letter-spacing: .04em; }
.brand-sub { font-size: 13px; opacity: .9; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs button {
  border: 2px solid var(--ink); background: #fff; color: var(--ink);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 14px;
}
.tabs button.on { background: var(--tag); }
.tabs button:focus-visible, .btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Layout */
main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 48px; }
.panel { display: none; }
.panel.on { display: block; }
.hero { padding: 40px 0 24px; }
.hero h1 { font: clamp(36px, 6vw, 64px)/1 var(--display); letter-spacing: .01em; }
.hero p { max-width: 640px; margin: 12px 0 0; color: var(--muted); font-size: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 2.5px solid var(--line); border-radius: 14px;
  padding: 20px; box-shadow: 5px 5px 0 var(--ink); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 18px; }
.section-title { font: 30px/1.1 var(--display); margin: 40px 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 14px; margin: 0 0 16px; }
.hidden { display: none !important; }

.mode {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  border: 2px solid var(--ink); white-space: nowrap;
}
.mode.live { background: #cfe9d6; }
.mode.demo { background: #f3e2b8; }

/* Inputs */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 2.5px dashed var(--ink); border-radius: 12px; padding: 26px 12px; text-align: center;
  cursor: pointer; background: #fff;
}
.drop.over { background: #fbf0d6; }
.drop input { display: none; }
.drop span { color: var(--muted); font-size: 14px; }
.small-drop { padding: 18px 12px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.field select { padding: 10px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 400; }
.btn {
  border: 2.5px solid var(--ink); background: var(--tag); color: var(--ink);
  padding: 9px 18px; border-radius: 999px; font-weight: 700; cursor: pointer;
}
.btn.ghost { background: #fff; margin-top: 12px; }
.btn:active { transform: translate(1px, 1px); }

/* Trend scan */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 16px; }
.thumb { border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; background: #fff; font-size: 12px; }
.thumb .pic { aspect-ratio: 1; display: grid; place-items: center; background: #f2e9da; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb svg { width: 70%; height: 70%; }
.thumb .lab { padding: 5px 6px; font-weight: 700; line-height: 1.2; }
.thumb .gar { padding: 0 6px 6px; color: var(--muted); line-height: 1.2; }
.garment svg path, .garment svg rect, .garment svg circle,
.thumb svg path, .thumb svg rect, .thumb svg circle {
  fill: #fff; stroke: var(--ink); stroke-width: 3.5; stroke-linejoin: round;
}
.thumb svg [fill="none"] { fill: none; }

.tally { display: flex; flex-direction: column; gap: 12px; }
.tally-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; }
.tally-row b { font-size: 14px; }
.tally-bar { height: 22px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; position: relative; overflow: hidden; }
.tally-bar i { position: absolute; inset: 0 auto 0 0; background: var(--red); }
.tally-bar em { position: absolute; right: 8px; top: 0; font-style: normal; font-size: 12px; font-weight: 700; line-height: 18px; }
.tally-note { border-top: 2px solid var(--ink); padding-top: 12px; font-size: 15px; }

.trend-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
@media (max-width: 400px) { .trend-cards { grid-template-columns: 1fr; } }
.trend { display: grid; grid-template-columns: 64px 1fr; gap: 14px; }
.trend .garment svg { width: 64px; height: 64px; }
.trend h3 { margin: 0; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dir { font-size: 12px; font-weight: 700; border: 2px solid var(--ink); border-radius: 999px; padding: 1px 9px; }
.dir.up { background: #cfe9d6; }
.dir.steady { background: #eee4d2; }
.dir.down { background: #f4c9c6; }
.trend dl { margin: 8px 0 0; font-size: 14px; }
.trend dt { font-weight: 700; margin-top: 6px; }
.trend dd { margin: 0; color: var(--muted); }
.trend .act { margin-top: 10px; background: var(--tag); border: 2px solid var(--ink); border-radius: 8px; padding: 6px 10px; font-size: 14px; font-weight: 700; }
.trend.seen { outline: 4px solid var(--tag); outline-offset: 2px; }

/* Stock check */
.rack-view { margin-top: 16px; position: relative; }
.rack-view canvas, .rack-view svg { width: 100%; height: auto; display: block; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.result-big { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.light { width: 54px; height: 54px; border-radius: 50%; border: 3px solid var(--ink); flex: none; }
.light.green, .dot.green { background: var(--green); }
.light.amber, .dot.amber { background: var(--amber); }
.light.red, .dot.red { background: var(--bad); }
.dot.grey { background: var(--grey); }
.result-big h3 { margin: 0; font: 26px/1.1 var(--display); }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.nums div { border: 2px solid var(--ink); border-radius: 10px; padding: 10px; background: #fff; }
.nums b { display: block; font: 32px/1 var(--display); }
.nums span { font-size: 13px; color: var(--muted); }
.advice { border-left: 5px solid var(--tag); padding: 6px 12px; background: #fff; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; margin: 8px 0 12px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); vertical-align: -2px; margin-right: 6px; }
.table-wrap { overflow-x: auto; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--card); box-shadow: 5px 5px 0 var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 680px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1.5px solid #e2d8c6; }
th { background: var(--ink); color: #fff; font-weight: 700; }
tr:last-child td { border-bottom: 0; }
td.n { font-variant-numeric: tabular-nums; }
tr.flash td { background: #fbf0d6; }

/* Chat */
.chat-card { max-width: 760px; }
.bp-frame { width: 100%; height: 600px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 240px; max-height: 420px; overflow-y: auto; padding: 4px; }
.msg { max-width: 85%; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 14px; white-space: pre-line; }
.msg.bot { background: #fff; align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--tag); align-self: flex-end; border-bottom-right-radius: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chips button { border: 2px solid var(--ink); background: #fff; border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; min-width: 0; padding: 10px 14px; border: 2.5px solid var(--ink); border-radius: 999px; }

/* How it works */
.flow { display: flex; flex-direction: column; gap: 18px; }
.lane { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.lane > i { align-self: center; font-style: normal; font-weight: 700; font-size: 22px; }
.lane-name { width: 100%; font: 18px/1 var(--display); letter-spacing: .03em; color: var(--red); }
.step {
  flex: 1 1 130px; border: 2.5px solid var(--ink); border-radius: 10px; padding: 10px 12px;
  background: #fff; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.step small { font-weight: 400; color: var(--muted); font-size: 13px; }
.step.ai { background: #fbf0d6; }
.step.decide { background: var(--tag); }
.step .dot { margin-right: 4px; }
.join { text-align: center; font-weight: 700; color: var(--muted); }
.lane.end { justify-content: center; }
.lane.end .step { flex: 0 1 260px; }
@media (max-width: 640px) { .lane > i { transform: rotate(90deg); width: 100%; text-align: center; } .lane.end .step { flex: 1 1 100%; } }
@media (max-width: 820px) { .top { position: static; } }
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 22px; }
.tool { border: 2.5px solid var(--ink); border-radius: 12px; padding: 14px; background: #fff; }
.tool b { display: block; }
.tool span { font-size: 14px; color: var(--muted); }

.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 24px 16px 40px; }
