:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --ink: #0e1330;
  --ink-2: #454b6b;
  --muted: #6b7190;
  --line: #e1e4ef;
  --brand: #5b5bf7;
  --brand-ink: #ffffff;
  --brand-soft: #ecebff;
  --accent: #ff5a7a;
  --up: #0f8a5f;
  --down: #c2334d;
  --warn: #b26a00;
  --hot: #e0335b;
  --warm: #f07a1a;
  --mild: #c79a00;
  --cool: #7a8199;
  --chart: #5b5bf7;
  --chart-area: rgba(91, 91, 247, 0.12);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 19, 48, 0.05), 0 6px 20px rgba(14, 19, 48, 0.06);
  --hero: radial-gradient(1200px 400px at 10% -10%, #dcdcff 0%, transparent 60%), radial-gradient(800px 400px at 100% 0%, #ffe0e8 0%, transparent 55%);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --surface: #131a31;
    --surface-2: #1b2340;
    --ink: #eef0fb;
    --ink-2: #c3c7de;
    --muted: #9aa0bd;
    --line: #262f52;
    --brand: #8383ff;
    --brand-ink: #0b1020;
    --brand-soft: #22285a;
    --up: #3ccf95;
    --down: #ff7189;
    --warn: #ffb547;
    --hot: #ff5c7f;
    --warm: #ff9a4d;
    --mild: #e7c64a;
    --cool: #8a91ad;
    --chart: #8b8bff;
    --chart-area: rgba(139, 139, 255, 0.16);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --hero: radial-gradient(1200px 400px at 10% -10%, #1e2466 0%, transparent 60%), radial-gradient(800px 400px at 100% 0%, #3a1630 0%, transparent 55%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 0.8em; }
small, .small { font-size: 0.86rem; }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700; color: var(--brand); display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.fineprint { font-size: 0.78rem; color: var(--muted); margin-top: 0.75rem; }
.up { color: var(--up); } .down { color: var(--down); } .warn { color: var(--warn); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
main:focus, main:focus-visible { outline: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main { min-height: 70vh; padding-top: 1.5rem; padding-bottom: 3rem; outline: none; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin: 0.35rem 0; }
address { font-style: normal; }
blockquote { margin: 0.5rem 0; padding-left: 0.8rem; border-left: 3px solid var(--brand); color: var(--ink-2); font-style: italic; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; letter-spacing: 0.04em; color: var(--brand); font-size: 1.15rem; }
.logo span { color: var(--ink); }
.logo:hover { text-decoration: none; }
.search-top { flex: 1; max-width: 340px; }
.search-top input { width: 100%; }
.nav { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; flex-wrap: wrap; }
.nav a[data-nav] { color: var(--ink-2); padding: 0.45rem 0.6rem; border-radius: 8px; font-weight: 500; font-size: 0.92rem; white-space: nowrap; }
.nav a[data-nav]:hover { background: var(--surface-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
#account { margin-left: 0.35rem; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; font-size: 1.2rem; padding: 0.3rem 0.6rem; cursor: pointer; }
@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .search-top { max-width: none; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 0.5rem 16px 1rem; }
  body.nav-open .nav { display: flex; }
  #account { margin: 0.5rem 0 0; }
}
@media (max-width: 560px) { .search-top { display: none; } }

/* Forms */
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.55rem 0.7rem; min-width: 0; font-weight: 400;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 1.05rem; height: 1.05rem; padding: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.86rem; font-weight: 600; color: var(--ink-2); }
label.inline { flex-direction: row; align-items: center; gap: 0.5rem; }
label.inline input { width: 5rem; }
label.check { flex-direction: row; align-items: center; gap: 0.45rem; font-weight: 500; cursor: pointer; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 0.86rem; font-weight: 600; color: var(--ink-2); margin-bottom: 0.4rem; }
.checks { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.err { color: var(--down); font-size: 0.8rem; font-weight: 500; min-height: 0; }
.err:empty { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; border-radius: 10px; padding: 0.6rem 1rem; font: inherit; font-weight: 600; cursor: pointer; border: 1px solid transparent; white-space: nowrap; transition: transform 0.05s, background 0.15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: var(--line); }
.btn-sm { padding: 0.38rem 0.7rem; font-size: 0.86rem; }
.btn-lg { padding: 0.8rem 1.3rem; font-size: 1.02rem; }
.save-btn[aria-pressed="true"] { color: var(--warm); }

/* Layout */
.section { margin-top: 2.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.page-head { margin-bottom: 1.25rem; }
.page-head.narrow { max-width: 560px; }
.grid { display: grid; gap: 1rem; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.features { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.categories { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid.factories { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.plans { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: stretch; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 1rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 2rem; align-items: center; }
.row-end { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); min-width: 0; }

/* Hero */
.hero { background: var(--hero), var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(1.5rem, 5vw, 3.5rem); text-align: center; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); max-width: 20ch; margin: 0.4rem auto 1rem; }
.hero .eyebrow { justify-content: center; }
.hero .lead { margin: 0 auto 1.5rem; }
.accent { background: linear-gradient(90deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.search-hero { display: flex; gap: 0.5rem; max-width: 640px; margin: 0 auto 1.2rem; }
.search-hero input { flex: 1; padding: 0.9rem 1.1rem; font-size: 1.05rem; border-radius: 12px; }
.search-inline { display: flex; gap: 0.5rem; max-width: 560px; }
.search-inline input { flex: 1; }
.hero-ctas { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.flow { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.flow li { background: var(--surface-2); border-radius: 999px; padding: 0.35rem 0.8rem; color: var(--ink-2); }
.flow li:not(:last-child)::after { content: " →"; color: var(--brand); }

/* Product cards */
.product-card { display: flex; flex-direction: column; gap: 0.5rem; }
.pc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.pc-icon, .ph-icon { font-size: 2rem; width: 56px; height: 56px; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; flex: none; }
.pc-score { text-align: right; line-height: 1; }
.pc-score b { font-size: 1.8rem; font-weight: 800; }
.pc-score small { color: var(--muted); }
.tier-hot { color: var(--hot); } .tier-warm { color: var(--warm); } .tier-mild { color: var(--mild); } .tier-cool { color: var(--cool); }
.pc-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.pc-name { margin: 0; font-size: 1.08rem; }
.pc-name a { color: var(--ink); }
.pc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 1rem; margin: 0.25rem 0; }
.pc-stats dt { font-size: 0.74rem; color: var(--muted); }
.pc-stats dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-actions { display: flex; gap: 0.5rem; margin-top: auto; padding-top: 0.5rem; }
.pc-actions .btn-primary { flex: 1; }

/* Badges & chips */
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; letter-spacing: 0.01em; text-transform: none; }
.badge-ok { background: color-mix(in srgb, var(--up) 15%, transparent); color: var(--up); }
.badge-info { background: var(--brand-soft); color: var(--brand); }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.status-exploding { background: color-mix(in srgb, var(--hot) 16%, transparent); color: var(--hot); }
.status-viral { background: color-mix(in srgb, var(--warm) 16%, transparent); color: var(--warm); }
.status-rising { background: color-mix(in srgb, var(--up) 15%, transparent); color: var(--up); }
.status-stable { background: var(--surface-2); color: var(--muted); }
.status-declining { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down); }
.badges { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.3rem 0; }
.chip { display: inline-block; background: var(--surface-2); color: var(--ink-2); border-radius: 8px; padding: 0.15rem 0.5rem; font-size: 0.82rem; margin: 0.1rem 0; }
a.chip:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.pill { display: inline-block; min-width: 2.2rem; text-align: center; font-weight: 800; }
.stars { color: var(--warm); font-weight: 700; white-space: nowrap; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.filters .checks { flex-basis: 100%; }
.result-count { margin: 1rem 0 0.5rem; }

/* Product page */
.crumbs { font-size: 0.86rem; color: var(--muted); margin-bottom: 1rem; }
.product-hero { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; background: var(--hero), var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow); }
.ph-main { display: flex; gap: 1.2rem; flex: 1 1 480px; min-width: 0; }
.ph-main .ph-icon { width: 84px; height: 84px; font-size: 3rem; border-radius: 20px; }
.ph-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ph-scores { display: flex; gap: 1.5rem; align-items: center; }
.growth { font-size: 1.05rem; }
.score-ring { --deg: 0deg; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center; background: radial-gradient(closest-side, var(--surface) 80%, transparent 81%), conic-gradient(currentColor var(--deg), var(--surface-2) 0); }
.score-ring.score-md { width: 96px; height: 96px; }
.score-num { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.score-cap { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); max-width: 80px; font-weight: 700; margin-top: 0.2rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin: 1.25rem 0 0; }
.kpis > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; }
.kpis dt { font-size: 0.76rem; color: var(--muted); }
.kpis dd { margin: 0.15rem 0 0; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.explain { font-size: 1.02rem; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 0.8rem 1rem; }

/* Chart */
.chart { position: relative; margin: 0.5rem 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .line { fill: none; stroke: var(--chart); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--chart-area); }
.chart .window { fill: var(--surface-2); opacity: 0.6; }
.chart .crosshair { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .dot { fill: var(--chart); stroke: var(--surface); stroke-width: 2; }
.chart .hit { cursor: crosshair; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.8rem; line-height: 1.3; transform: translateY(-100%); white-space: nowrap; }
.tooltip .muted { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.table-view summary { cursor: pointer; font-size: 0.85rem; color: var(--brand); }
.table-view table { max-height: 240px; display: block; overflow: auto; }
.bars { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.bars li { display: grid; grid-template-columns: 120px 1fr 56px; align-items: center; gap: 0.6rem; padding: 0.35rem 0; }
.bar-label { font-size: 0.9rem; font-weight: 600; }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--chart); border-radius: 0 4px 4px 0; }
.bar-fill.neg { background: var(--down); }
.bar-value { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; border-bottom-width: 2px; }
tbody th { font-weight: 600; }
caption { text-align: left; font-weight: 700; font-size: 1.15rem; margin-bottom: 0.6rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-left: 1rem; }
.compare th[scope="row"] { min-width: 200px; }
.factors th small { display: block; font-weight: 400; font-size: 0.76rem; }
.factors tfoot th, .factors tfoot td { border-bottom: 0; font-size: 1rem; }
.scroll-x { overflow-x: auto; }
.mini-track { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.mini-fill { display: block; height: 100%; background: currentColor; border-radius: 3px; }
.specs th { width: 40%; color: var(--muted); font-weight: 500; }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; }
.checklist li { padding: 0.3rem 0 0.3rem 1.6rem; position: relative; }
.checklist li.yes::before { content: "✔"; position: absolute; left: 0; color: var(--up); font-weight: 700; }
.checklist li.no::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

/* Calculator */
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1.5rem; }
.calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; align-content: start; }
.calc .fineprint { grid-column: 1 / -1; margin: 0; }
.ledger td, .ledger th { padding: 0.4rem 0; }
.ledger th { font-weight: 500; color: var(--ink-2); }
.ledger tr.sum th, .ledger tr.sum td { font-weight: 800; color: var(--ink); border-top: 2px solid var(--ink); }
.ledger tr.sum.up td, .ledger tr.sum.up th { color: var(--up); border-top-color: var(--line); }
.ledger tr.sum.down td, .ledger tr.sum.down th { color: var(--down); border-top-color: var(--line); }
.calc-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; margin: 1rem 0; }
.calc-kpis dt { font-size: 0.76rem; color: var(--muted); }
.calc-kpis dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.verdict { border-radius: 10px; padding: 0.6rem 0.8rem; font-weight: 600; margin: 0; }
.verdict-good { background: color-mix(in srgb, var(--up) 12%, transparent); color: var(--up); }
.verdict-ok { background: var(--brand-soft); color: var(--brand); }
.verdict-warning { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.verdict-critical { background: color-mix(in srgb, var(--down) 12%, transparent); color: var(--down); }

/* Forms (find / rfq / signin) */
.find-form, .rfq-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.find-form .full, .rfq-form .full { grid-column: 1 / -1; }
.signin { display: grid; gap: 1rem; }
.factory-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.5rem; }
.pick { align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem; }
.pick input { margin-top: 0.2rem; }
.identified { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.5rem; }
.upload-preview { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; background: var(--surface-2); flex: none; }
.found { color: var(--brand); text-transform: uppercase; letter-spacing: 0.02em; }
.notice { background: var(--brand-soft); color: var(--ink-2); border-radius: 10px; padding: 0.6rem 0.9rem; font-size: 0.9rem; }
.notice.ok { background: color-mix(in srgb, var(--up) 12%, transparent); }

/* Misc blocks */
.empty { text-align: center; padding: 2.5rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.list li { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.category { color: var(--ink); display: block; }
.category:hover { text-decoration: none; border-color: var(--brand); }
.cat-icon { font-size: 2rem; }
.factory-card h3 { margin-bottom: 0.2rem; }
.alert-card { border-left: 4px solid var(--brand); }
.alert-form { margin-bottom: 1rem; display: grid; gap: 1rem; }
.insight { border-left: 4px solid var(--accent); font-size: 1.02rem; }
.insight p:last-child { margin: 0; }
.opp { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.plan { display: flex; flex-direction: column; }
.plan .price b { font-size: 2rem; font-weight: 800; }
.plan .checklist { flex: 1; }
.plan.featured { border: 2px solid var(--brand); }
.flywheel { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; counter-reset: fw; }
.flywheel li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.8rem; font-weight: 600; font-size: 0.9rem; }
.flywheel li:not(:last-child)::after { content: " ↓"; color: var(--brand); }
.audiences li { padding: 0.4rem 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 2rem 0 1.5rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.footer h4 { margin: 0 0 0.5rem; font-size: 0.9rem; }
.logo-foot { font-weight: 800; letter-spacing: 0.06em; color: var(--brand); font-size: 1.2rem; margin: 0; }

@media (max-width: 640px) {
  .ph-main { flex-direction: column; }
  .ph-scores { justify-content: center; width: 100%; }
  .score-ring { width: 112px; height: 112px; }
  .calc-inputs { grid-template-columns: 1fr; }
  .bars li { grid-template-columns: 96px 1fr 50px; }
  .search-hero { flex-direction: column; }
  .identified { flex-direction: column; align-items: flex-start; }
  .factors .mini-track, .factors th:nth-child(4), .factors td:nth-child(4) { display: none; }
  .factors tfoot th[colspan] { display: table-cell; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Auth, toasts, supplier profile */
.tabs { display: flex; gap: 0.25rem; margin: 0 0 0.75rem; border-bottom: 1px solid var(--line); }
.tab { padding: 0.5rem 0.9rem; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { text-decoration: none; color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.form-msg { margin: 0; font-size: 0.9rem; font-weight: 500; }
.form-msg:empty { display: none; }
.form-msg.err { color: var(--down); }
.form-msg.ok { color: var(--up); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--bg); padding: 0.7rem 1rem; border-radius: 10px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-size: 0.92rem; }
.own-factory { margin-bottom: 1.25rem; }
.own-factory summary { cursor: pointer; display: flex; gap: 0.6rem; align-items: center; }
.own-factory form { margin-top: 1rem; }
.source-tag { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--surface-2); }
