  :root {
    --bg: oklch(98% 0.005 90);
    --panel: #ffffff;
    --panel-2: oklch(96.5% 0.006 90);
    --line: oklch(92% 0.006 90);
    --line-strong: oklch(86% 0.008 90);
    --ink: oklch(22% 0.01 260);
    --ink-2: oklch(45% 0.012 260);
    --ink-3: oklch(62% 0.012 260);
    --accent: oklch(55% 0.18 255);
    --accent-ink: #ffffff;
    --accent-tint: oklch(96% 0.04 255);
    --ok: oklch(58% 0.14 150);
    --ok-tint: oklch(95% 0.05 150);
    --warn: oklch(68% 0.14 75);
    --warn-tint: oklch(96% 0.06 85);
    --bad: oklch(58% 0.19 25);
    --bad-tint: oklch(96% 0.04 25);

    /* density */
    --row-h: 44px;
    --pad: 16px;
    --pad-lg: 24px;
    --gap: 14px;
    --radius: 10px;
    --radius-sm: 6px;
    --font-ui: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
    --shadow-card: 0 1px 0 oklch(92% 0.006 90), 0 1px 2px oklch(85% 0.01 90 / 0.35);
  }
  [data-density="compact"] {
    --row-h: 36px; --pad: 12px; --pad-lg: 16px; --gap: 10px;
  }
  [data-density="roomy"] {
    --row-h: 52px; --pad: 20px; --pad-lg: 32px; --gap: 18px;
  }

  * { box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    margin: 0;
    font-family: var(--font-ui);
    font-feature-settings: "ss01", "cv11";
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
  }
  button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
  input, textarea, select { font: inherit; color: inherit; }
  a { color: var(--accent); text-decoration: none; }
  a:hover { text-decoration: underline; }
  .mono { font-family: var(--font-mono); font-feature-settings: "zero"; }

  /* ===== App shell ===== */
  .app {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
  }
  [data-density="compact"] .app { grid-template-columns: 232px 1fr; }

  /* Rail */
  .rail {
    border-right: 1px solid var(--line);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
  }
  .brand {
    display: flex; align-items: center; gap: 10px;
    padding: 18px var(--pad-lg);
    border-bottom: 1px solid var(--line);
  }
  .brand-mark {
    width: 32px; height: 32px; border-radius: 50%;
    background: #fff url(../images/logo.png) center/cover no-repeat;
    box-shadow: 0 0 0 1px var(--line), 0 1px 2px oklch(85% 0.01 90 / 0.4);
    flex-shrink: 0;
  }
  .brand-name { font-weight: 600; letter-spacing: -0.01em; font-size: 15px; }
  .brand-sub { color: var(--ink-3); font-size: 11px; margin-top: 1px; }

  .steps {
    padding: 14px 12px;
    display: flex; flex-direction: column; gap: 2px;
  }
  .step {
    display: grid; grid-template-columns: 28px 1fr auto; align-items: center;
    gap: 10px; padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-2);
    text-align: left;
    width: 100%;
    transition: background .12s ease, color .12s ease;
    position: relative;
  }
  .step:hover { background: var(--panel-2); color: var(--ink); }
  .step[aria-current="true"] { background: var(--accent-tint); color: var(--ink); }
  .step[aria-current="true"] .step-num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .step-num {
    width: 22px; height: 22px; border-radius: 999px;
    display: grid; place-items: center;
    border: 1px solid var(--line-strong);
    font-size: 11px; font-weight: 600;
    background: var(--panel);
    color: var(--ink-2);
  }
  .step.done .step-num { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .step-label { font-weight: 500; font-size: 13.5px; }
  .step-meta { font-size: 11px; color: var(--ink-3); }
  /* Disabled step (cart / checkout when cart is empty) */
  .step.is-disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
  .step.is-disabled:hover { background: transparent; color: var(--ink-2); }
  /* 'Готово' step is only relevant on the thanks view */
  .step-thanks { display: none; }
  body[data-view="thanks"] .step-thanks { display: flex; }
  /* Thanks view: full-width layout, no sidebar rail */
  body[data-view="thanks"] .rail { display: none; }
  body[data-view="thanks"] .app { grid-template-columns: 1fr; }
  body[data-view="thanks"] .main { max-width: 1200px; width: 100%; margin: 0 auto; }

  /* ===== THANKS view ===== */
  .thanks-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
  @media (max-width: 1060px) { .thanks-wrap { grid-template-columns: 1fr; } }
  .thx-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
  @media (max-width: 1060px) { .thx-side { position: static; } }
  .thx-hero {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 32px 26px;
    display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start;
  }
  .thx-mark {
    width: 48px; height: 48px; border-radius: 999px;
    background: color-mix(in oklch, var(--accent) 10%, var(--panel));
    color: var(--accent);
    border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--line));
    display: grid; place-items: center;
  }
  .thx-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
  .thx-title { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 4px 0 6px; }
  .thx-order-num { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
  .thx-order-num b { color: var(--ink); font-weight: 600; }
  .thx-wait { font-size: 13.5px; color: var(--ink-2); margin-top: 10px; max-width: 56ch; }

  .thx-eta {
    display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
    padding: 20px 24px;
    background: color-mix(in oklch, var(--accent) 6%, var(--panel));
    border: 1px solid color-mix(in oklch, var(--accent) 25%, var(--line));
    border-radius: var(--radius);
  }
  .thx-eta-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--panel);
    border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--line));
    display: grid; place-items: center; color: var(--accent);
  }
  .thx-eta-kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; }
  .thx-eta-date { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; margin-top: 3px; }
  .thx-eta-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
  .thx-eta-days { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); text-align: right; line-height: 1.3; }
  .thx-eta-days b { font-family: var(--mono); color: var(--ink); font-size: 22px; font-weight: 600; display: block; letter-spacing: -0.01em; }

  .thx-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
  .thx-timeline li {
    display: grid; grid-template-columns: 28px 1fr auto; gap: 14px; align-items: start;
    padding: 14px 0;
    border-top: 1px solid var(--line);
  }
  .thx-timeline li:first-child { border-top: 0; }
  .thx-dot {
    width: 22px; height: 22px; border-radius: 999px;
    background: var(--panel-2); border: 1px solid var(--line);
    display: grid; place-items: center; color: var(--ink-3);
    font-family: var(--mono); font-size: 11px; font-weight: 600;
    margin-top: 1px;
  }
  .thx-timeline li.is-done .thx-dot { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .thx-timeline li.is-done .thx-step-title { color: var(--ink); }
  .thx-timeline li:not(.is-done) .thx-step-title { color: var(--ink-2); }
  .thx-step-title { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
  .thx-step-meta { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
  .thx-step-time { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; margin-top: 2px; }

  .thx-mgr { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
  .thx-mgr-avatar {
    width: 44px; height: 44px; border-radius: 999px;
    background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 30%, var(--panel-2)), var(--panel-2));
    display: grid; place-items: center; color: var(--ink);
    font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
    border: 1px solid var(--line);
  }
  .thx-mgr-name { font-size: 13.5px; font-weight: 600; }
  .thx-mgr-role { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
  .thx-mgr-links { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
  .thx-mgr-links .btn { height: 32px; padding: 0 12px; font-size: 12.5px; }

  .thx-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
  .thx-btn-call-label { display: none; }

  /* detailed-only bits */
  body[data-thanks="compact"] .thanks-detailed-only { display: none; }

  .step[aria-current="true"] .step-meta { color: var(--accent); }

  .rail-foot {
    margin-top: auto;
    padding: 14px var(--pad-lg);
    border-top: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 6px;
    font-size: 12px; color: var(--ink-3);
  }
  .rail-foot a { color: var(--ink-2); }
  .rail-foot .link-row { display: flex; gap: 14px; flex-wrap: wrap; }
  .rail-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink-2);
    padding: 4px 0;
    line-height: 1.3;
    text-decoration: none;
  }
  .rail-link:hover { color: var(--ink); text-decoration: none; }
  .rail-link svg { color: var(--ink-3); flex-shrink: 0; }
  .rail-link:hover svg { color: var(--accent); }

  /* Main */
  .main {
    display: flex; flex-direction: column;
    min-width: 0;
  }
  .topbar {
    height: 56px;
    border-bottom: 1px solid var(--line);
    padding: 0 var(--pad-lg);
    display: flex; align-items: center; gap: 16px;
    background: var(--panel);
    position: sticky; top: 0; z-index: 10;
  }
  .crumbs { color: var(--ink-3); font-size: 13px; display: flex; align-items: center; gap: 8px; }
  .mobile-brand { display: none; }
  .bottom-nav { display: none; }
  .crumbs b { color: var(--ink); font-weight: 500; }
  .crumbs .sep { color: var(--line-strong); }
  .topbar-spacer { flex: 1; }
  .top-actions { display: flex; align-items: center; gap: 10px; }
  .pill {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 10px; border-radius: 999px;
    background: var(--panel-2); border: 1px solid var(--line);
    color: var(--ink-2); font-size: 12.5px;
  }
  .pill .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ok); }

  .view {
    padding: var(--pad-lg);
    display: none;
  }
  .view.active { display: block; }

  .h1 {
    font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 4px;
  }
  .sub {
    color: var(--ink-2); font-size: 13.5px; margin: 0 0 20px;
    max-width: 62ch;
  }

  /* ===== Common ===== */
  .card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .card-pad { padding: var(--pad-lg); }
  .card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px var(--pad-lg);
    border-bottom: 1px solid var(--line);
  }
  .card-title { font-weight: 600; font-size: 14px; letter-spacing: -0.005em; }
  .card-meta { color: var(--ink-3); font-size: 12px; }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 14px;
    border-radius: var(--radius-sm);
    background: var(--panel);
    border: 1px solid var(--line-strong);
    color: var(--ink);
    font-weight: 500; font-size: 13px;
    transition: background .12s, border-color .12s, transform .06s;
  }
  .btn:hover { background: var(--panel-2); }
  .btn:active { transform: translateY(1px); }
  .btn-primary {
    background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
  }
  .btn-primary:hover { filter: brightness(1.06); background: var(--accent); }
  .btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
  .btn-ghost:hover { background: var(--panel-2); color: var(--ink); }
  .btn-sm { height: 28px; font-size: 12.5px; padding: 0 10px; border-radius: 6px; }
  .btn-lg { height: 44px; font-size: 14px; padding: 0 18px; }

  .input {
    display: flex; align-items: center; gap: 10px;
    height: 44px;
    padding: 0 14px;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    transition: border-color .12s, box-shadow .12s;
  }
  .input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px oklch(55% 0.18 255 / 0.15);
  }
  .input input {
    flex: 1; border: 0; outline: 0; background: transparent;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.01em;
  }
  .input input::placeholder { color: var(--ink-3); font-family: var(--font-ui); letter-spacing: 0; }
  .input-lg { height: 56px; padding: 0 18px; }
  .input-lg input { font-size: 17px; font-weight: 500; }

  .label { font-size: 12px; font-weight: 500; color: var(--ink-2); text-transform: none; letter-spacing: 0; margin-bottom: 6px; display: block; }

  .chip {
    display: inline-flex; align-items: center; gap: 6px;
    white-space: nowrap;
    height: 24px; padding: 0 8px; border-radius: 999px;
    background: var(--panel-2); border: 1px solid var(--line);
    font-size: 12px; color: var(--ink-2);
  }
  .chip.ok { background: var(--ok-tint); border-color: transparent; color: oklch(38% 0.12 150); }
  .chip.warn { background: var(--warn-tint); border-color: transparent; color: oklch(42% 0.12 75); }
  .chip.bad { background: var(--bad-tint); border-color: transparent; color: oklch(42% 0.16 25); }
  .chip.accent { background: var(--accent-tint); border-color: transparent; color: oklch(38% 0.16 255); }

  .kbd {
    display: inline-grid; place-items: center;
    min-width: 20px; height: 20px; padding: 0 5px;
    border: 1px solid var(--line-strong); border-bottom-width: 2px;
    border-radius: 4px;
    background: var(--panel);
    font-family: var(--font-mono); font-size: 11px;
    color: var(--ink-2);
  }

  .divider { height: 1px; background: var(--line); margin: 20px 0; }

  /* ===== SEARCH view ===== */
  .search-hero {
    padding: 36px var(--pad-lg) 28px;
    border-bottom: 1px solid var(--line);
    background:
      linear-gradient(to bottom, var(--panel) 0%, var(--panel) 60%, var(--panel-2) 100%);
  }
  [data-density="compact"] .search-hero { padding: 24px var(--pad-lg) 20px; }
  .search-title {
    font-size: 28px; font-weight: 600; letter-spacing: -0.022em;
    margin: 0 0 6px;
  }
  .search-kicker {
    color: var(--ink-2); font-size: 14px; margin: 0 0 20px;
    max-width: 60ch;
  }
  .search-row {
    display: grid; grid-template-columns: 1fr auto; gap: 10px;
    max-width: 760px;
    align-items: stretch;
  }
  .search-row .input-lg,
  .search-row .btn-lg { height: 56px; min-height: 56px; }
  .search-help {
    display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
    margin-top: 12px; font-size: 12.5px; color: var(--ink-3);
  }
  .search-help .kbd-hint { display: inline-flex; align-items: center; gap: 6px; }

  .brands-strip {
    display: flex; gap: 0; flex-wrap: wrap; align-items: stretch;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--panel);
    max-width: 760px;
  }
  .brands-label {
    padding: 10px 14px;
    color: var(--ink-3); font-size: 11.5px;
    font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
    border-right: 1px solid var(--line);
    display: flex; align-items: center;
    background: var(--panel-2);
  }
  .brands-list {
    flex: 1; display: flex; flex-wrap: wrap;
    padding: 6px 8px;
    gap: 2px;
  }
  .brand-tag {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-2);
    padding: 4px 8px;
    border-radius: 4px;
  }
  .brand-tag:hover { background: var(--panel-2); color: var(--ink); cursor: pointer; }

  .search-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    padding: var(--pad-lg);
  }
  [data-density="compact"] .search-grid { grid-template-columns: 1fr 1fr 1fr; }
  [data-search="searched"] .recent-searches { display: none; }
  [data-search="idle"] .result-strip,
  [data-search="idle"] #candidates-stack { display: none; }

  .tile {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    display: flex; flex-direction: column; gap: 10px;
  }
  .tile h3 { margin: 0; font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; }
  .tile p { margin: 0; color: var(--ink-2); font-size: 12.5px; }
  .tile-head { display: flex; align-items: center; justify-content: space-between; }
  .tile-icon {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--panel-2); border: 1px solid var(--line);
    display: grid; place-items: center;
    color: var(--ink-2);
  }

  .hist-list { display: flex; flex-direction: column; }
  .hist {
    display: grid; grid-template-columns: 1fr auto auto;
    align-items: center; gap: 14px;
    padding: 10px 4px;
    border-top: 1px dashed var(--line);
    font-size: 13px;
  }
  .hist:first-child { border-top: 0; }
  .hist .mono { color: var(--ink); }
  .hist .hname { color: var(--ink-2); font-size: 12.5px; }
  .hist .hprice { color: var(--ink-2); font-size: 12.5px; }
  .hist .hbtn { color: var(--accent); font-size: 12px; }

  /* ===== RESULT view ===== */
  .result-top {
    display: grid; grid-template-columns: 1fr 320px; gap: 20px;
    align-items: start;
  }
  .candidates { display: flex; flex-direction: column; gap: 16px; }
  .candidate {
    display: grid; grid-template-columns: 1fr 300px; gap: 0;
    overflow: hidden; align-items: stretch;
  }
  .candidate-body { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; min-width: 0; border-right: 1px solid var(--line); }
  .candidate-buy { padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; background: var(--panel-2); }
  .candidate.best { border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); box-shadow: 0 0 0 1px color-mix(in oklch, var(--accent) 25%, transparent), var(--shadow-sm); }
  .candidate.best .candidate-buy { background: color-mix(in oklch, var(--accent) 5%, var(--panel)); }
  .candidate-flag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--accent); padding: 2px 0;
  }
  .candidate-flag::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  }
  @media (max-width: 980px) {
    .candidate { grid-template-columns: 1fr; }
    .candidate-body { border-right: 0; border-bottom: 1px solid var(--line); }
  }
  .part-card {
    display: grid; grid-template-columns: 180px 1fr; gap: 0;
    overflow: hidden;
  }
  [data-card="spec"] .part-card { grid-template-columns: 220px 1fr; }
  [data-card="compact"] .part-card { grid-template-columns: 120px 1fr; }

  .part-img {
    aspect-ratio: 1; background:
      repeating-linear-gradient(45deg, var(--panel-2) 0 8px, var(--panel) 8px 16px);
    border-right: 1px solid var(--line);
    display: grid; place-items: center;
    color: var(--ink-3);
    font-family: var(--font-mono);
    font-size: 11px;
    position: relative;
  }
  .part-img::after {
    content: "part image"; position: absolute; bottom: 10px; left: 10px;
    background: var(--panel); padding: 2px 6px; border-radius: 4px;
    border: 1px solid var(--line);
  }
  [data-card="compact"] .part-img::after { display: none; }
  .part-body { padding: var(--pad-lg); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .part-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .part-oem { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--ink); letter-spacing: 0.02em; }
  .part-brand { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.1em; }
  .part-name { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin: 0; line-height: 1.2; }
  [data-card="compact"] .part-name { font-size: 18px; }
  .part-desc { color: var(--ink-2); font-size: 13px; margin: 0; max-width: 60ch; }

  .spec-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
  }
  .spec-grid > div {
    background: var(--panel);
    padding: 10px 12px;
  }
  .spec-k { font-size: 11px; color: var(--ink-3); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.06em; }
  .spec-v { font-size: 13px; color: var(--ink); font-family: var(--font-mono); }
  [data-card="compact"] .spec-grid { display: none; }

  .compat {
    display: flex; flex-direction: column; gap: 6px;
    padding: 12px 14px;
    background: var(--panel-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
  }
  [data-card="compact"] .compat { display: none; }
  .compat-title {
    font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em;
    font-weight: 500;
  }
  .compat-list { display: flex; flex-wrap: wrap; gap: 6px; }

  /* Buy box */
  .buybox { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
  .price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .price {
    font-family: var(--font-mono);
    font-size: 28px; font-weight: 600; letter-spacing: -0.02em;
    color: var(--ink);
  }
  .price .cur { font-size: 14px; color: var(--ink-2); margin-left: 4px; font-weight: 500; }
  .price-sub { font-size: 12px; color: var(--ink-3); }

  .eta {
    display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center;
    padding: 10px 12px;
    background: var(--warn-tint);
    border-radius: var(--radius-sm);
    color: oklch(35% 0.1 75);
  }
  .eta-icon { width: 28px; height: 28px; border-radius: 999px; background: var(--warn); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
  .eta-title { font-weight: 600; font-size: 13px; }
  .eta-sub { font-size: 11.5px; opacity: 0.85; }

  .qty {
    display: inline-grid; grid-template-columns: 32px 40px 32px;
    height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--panel);
  }
  .qty button { font-size: 14px; color: var(--ink-2); }
  .qty button:hover { background: var(--panel-2); color: var(--ink); }
  .qty input {
    border: 0; outline: 0; text-align: center;
    background: transparent;
    font-family: var(--font-mono); font-size: 13px;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .cta-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }

  /* Suppliers table */
  .suppliers {
    border-top: 1px solid var(--line);
  }
  .tbl {
    width: 100%; border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
  }
  .tbl th, .tbl td { white-space: nowrap; }
  .tbl td:first-child, .tbl td:nth-child(2) { white-space: normal; }
  .tbl th {
    text-align: left; font-weight: 500; font-size: 11px;
    color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em;
    padding: 10px var(--pad-lg);
    border-bottom: 1px solid var(--line);
    background: var(--panel-2);
    white-space: nowrap;
  }
  .tbl td {
    padding: 12px var(--pad-lg);
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
  }
  .tbl td:first-child, .tbl td:nth-child(2) { white-space: normal; }
  .tbl tr:last-child td { border-bottom: 0; }
  .tbl tr.best td { background: oklch(99% 0.02 255); }
  .tbl td.num { font-family: var(--font-mono); }
  .tbl td.price-td { font-family: var(--font-mono); font-weight: 600; font-size: 14px; white-space: nowrap; }
  .tbl .row-brand { display: flex; align-items: center; gap: 10px; }
  .tbl .sup-mark {
    width: 26px; height: 26px; border-radius: 6px;
    background: var(--panel-2); border: 1px solid var(--line);
    display: grid; place-items: center;
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    color: var(--ink-2);
  }
  .sup-name { font-weight: 500; }
  .sup-sub { font-size: 11.5px; color: var(--ink-3); }
  .tag-best {
    background: var(--accent); color: var(--accent-ink);
    font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
    padding: 2px 6px; border-radius: 4px;
    text-transform: uppercase;
    margin-left: 8px;
  }

  /* ===== CART view ===== */
  .cart-wrap {
    display: grid; grid-template-columns: 1fr 340px; gap: 20px;
    align-items: start;
  }
  [data-cart="lines"] .cart-wrap { grid-template-columns: 1fr 320px; }
  [data-cart="stepper"] .cart-wrap { grid-template-columns: 1fr; max-width: 960px; }

  .line {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px var(--pad-lg);
    border-bottom: 1px solid var(--line);
  }
  .line-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
  .line-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .line:last-child { border-bottom: 0; }
  .line-img {
    width: 64px; height: 64px; border-radius: var(--radius-sm);
    background:
      repeating-linear-gradient(45deg, var(--panel-2) 0 6px, var(--panel) 6px 12px);
    border: 1px solid var(--line);
  }
  .line-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; line-height: 1.3; max-width: 52ch; }
  .line-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
  .line-meta .mono { color: var(--ink-2); }
  .line-price { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }
  .line-total { font-family: var(--font-mono); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
  .line-remove { color: var(--ink-3); width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; }
  .line-remove:hover { background: var(--bad-tint); color: var(--bad); }

  .summary { padding: 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
  .summary h3 { margin: 0; font-size: 14px; font-weight: 600; }
  .sum-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
  .sum-row .mono { font-family: var(--font-mono); }
  .sum-row.muted { color: var(--ink-2); }
  .sum-total { font-size: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
  .sum-total .v { font-family: var(--font-mono); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }

  .promo {
    display: grid; grid-template-columns: 1fr auto; gap: 8px;
  }
  .promo .input { height: 36px; padding: 0 10px; }
  .promo .input input { font-size: 12.5px; }

  /* Cart variant: stepper */
  .stepper-steps {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
  }
  .stepper-step {
    padding: 14px 18px;
    display: flex; align-items: center; gap: 10px;
    border-right: 1px solid var(--line);
    color: var(--ink-3);
    font-size: 13px;
  }
  .stepper-step:last-child { border-right: 0; }
  .stepper-step.active { color: var(--ink); background: var(--panel); }
  .stepper-step.done { color: var(--ink-2); }
  .stepper-step .num {
    width: 22px; height: 22px; border-radius: 999px;
    border: 1px solid var(--line-strong);
    display: grid; place-items: center; font-size: 11px; font-weight: 600;
    background: var(--panel);
  }
  .stepper-step.active .num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .stepper-step.done .num { background: var(--ink); color: var(--bg); border-color: var(--ink); }

  /* ===== CHECKOUT view ===== */
  .co-wrap {
    display: grid; grid-template-columns: 1fr 340px; gap: 20px;
    align-items: start;
  }
  .co-section {
    padding: var(--pad-lg);
    border-bottom: 1px solid var(--line);
  }
  .co-section:last-child { border-bottom: 0; }
  .co-section h3 {
    font-size: 13px; font-weight: 600; margin: 0 0 14px;
    display: flex; align-items: center; gap: 10px;
    color: var(--ink);
  }
  .co-section h3 .num {
    width: 22px; height: 22px; border-radius: 999px;
    background: var(--ink); color: var(--bg);
    display: grid; place-items: center; font-size: 11px;
  }
  .field-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .field-grid .full { grid-column: 1 / -1; }
  .field { display: flex; flex-direction: column; }
  .field .input { height: 42px; }
  .field .input input { font-family: var(--font-ui); font-size: 14px; letter-spacing: 0; }
  .field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }

  .radio-group { display: grid; gap: 8px; }
  .radio {
    display: grid; grid-template-columns: 22px 1fr auto; gap: 12px;
    padding: 14px 16px; align-items: center;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--panel);
    cursor: pointer;
  }
  .radio:hover { border-color: var(--line-strong); }
  .radio.sel { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 3px oklch(55% 0.18 255 / 0.08); }
  .radio-dot {
    width: 18px; height: 18px; border-radius: 999px;
    border: 1.5px solid var(--line-strong);
    display: grid; place-items: center;
    background: var(--panel);
  }
  .radio.sel .radio-dot { border-color: var(--accent); }
  .radio.sel .radio-dot::after {
    content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--accent);
  }
  .radio-title { font-size: 13.5px; font-weight: 500; }
  .radio-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
  .radio-aside { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }

  .co-review { padding: 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }

  /* ===== Tweaks panel ===== */
  .tweaks {
    position: fixed; right: 20px; bottom: 20px;
    width: 280px;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    box-shadow: 0 10px 30px oklch(20% 0.02 260 / 0.15), 0 2px 6px oklch(20% 0.02 260 / 0.08);
    padding: 14px;
    z-index: 100;
    display: none;
  }
  .tweaks.show { display: block; }
  .tweaks h4 {
    margin: 0 0 12px; font-size: 12px; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
    display: flex; align-items: center; justify-content: space-between;
  }
  .tw-row { margin-bottom: 12px; }
  .tw-row:last-child { margin-bottom: 0; }
  .tw-label { font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; display: block; }
  .seg {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 2px;
    gap: 2px;
  }
  .seg button {
    padding: 6px 8px;
    border-radius: 5px;
    font-size: 12px;
    color: var(--ink-2);
  }
  .seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px oklch(20% 0.02 260 / 0.08); font-weight: 500; }

  /* Cart cart mini */
  .mini-cart-btn {
    position: relative;
  }
  .mini-cart-btn .count {
    position: absolute; top: -4px; right: -4px;
    width: 16px; height: 16px; border-radius: 999px;
    background: var(--accent); color: var(--accent-ink);
    display: grid; place-items: center;
    font-size: 10px; font-weight: 600;
  }

  /* icons */
  .ic { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  .ic-sm { width: 14px; height: 14px; }
  .ic-lg { width: 20px; height: 20px; }

  @media (max-width: 1060px) {
    .result-top, .cart-wrap, .co-wrap { grid-template-columns: 1fr; }
    .summary, .co-review { position: static; }
  }

/* === MOBILE (merged from Redesign mobile.html in Task 16) === */
@media (max-width: 768px) {

  /* ---- layout ---- */
  .app { grid-template-columns: 1fr !important; }
  .rail { display: none; }
  .main { min-width: 0; }

  /* ---- topbar ---- */
  .topbar { padding: 0 16px; }
  .mini-cart-btn { padding: 0 10px; }

  /* ---- views ---- */
  .view { padding: 16px; }

  /* ---- search screen ---- */
  .search-hero { padding: 24px 16px 20px; }
  .search-title { font-size: 22px; }
  .search-row { grid-template-columns: 1fr; gap: 10px; }
  .search-row .btn-lg { width: 100%; }

  /* ---- result / candidates ---- */
  .candidate { grid-template-columns: 1fr; }
  .candidate-body {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px 20px;
  }
  .candidate-buy { padding: 18px 20px; }
  .part-name { font-size: 18px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }

  /* ---- cart ---- */
  .cart-wrap { grid-template-columns: 1fr !important; }
  .line { padding: 14px 16px !important; gap: 10px !important; }
  .line-head { gap: 10px !important; }
  .line-name { font-size: 14px; line-height: 1.3; max-width: none; }
  .line-meta { gap: 4px 10px; font-size: 11.5px; }
  .line-controls {
    gap: 10px !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .line-total { margin-left: auto; font-size: 16px; text-align: right; }
  .card-head { flex-wrap: wrap; gap: 8px; padding: 12px 16px !important; }
  .card-head .card-title { font-size: 13px; }
  .card-head .btn-sm { font-size: 12px; padding: 0 8px; height: 26px; }
  .summary { padding: 16px !important; }

  /* ---- thanks view mobile order & block styling ---- */
  .thanks-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .thanks-wrap > div,
  .thanks-wrap > aside { display: contents; }
  .thx-hero { order: 1; }
  .thx-eta { order: 2; }
  .thx-timeline-card { order: 3; width: 100%; box-sizing: border-box; }
  .thx-manager-card { order: 4; width: 100%; box-sizing: border-box; }
  .thx-order-summary { order: 5; width: 100%; box-sizing: border-box; }
  .thx-actions { order: 6; width: 100%; }
  .thx-hero, .thx-eta { width: 100%; box-sizing: border-box; }
  .thx-actions .btn { width: 100%; min-height: 48px; }
  .thx-mgr { grid-template-columns: 40px 1fr; gap: 12px; padding: 0 !important; }
  .thx-manager-card .thx-mgr-links {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    grid-column: 1 / -1;
    margin-top: 12px;
  }
  .thx-mgr-links .btn {
    height: 40px; padding: 0 8px;
    font-size: 12.5px; font-weight: 500;
    background: var(--panel-2);
    border: 1px solid var(--line);
    justify-content: center;
  }
  .thx-mgr-links .btn svg { display: none; }
  .thx-mgr-links .btn .thx-btn-phone { display: none; }
  .thx-mgr-links .btn .thx-btn-call-label { display: inline; }

  /* ---- checkout / thanks ---- */
  .co-wrap { grid-template-columns: 1fr !important; }
  .co-section { padding: 16px !important; }
  .co-section h3 { font-size: 14px; }
  .field-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  /* Bottom co-section (footer with submit button): stack vertically */
  .co-section[style*="space-between"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  .co-section[style*="space-between"] .btn-lg { width: 100%; }
  .thanks-wrap { grid-template-columns: 1fr !important; }
  .thx-hero {
    grid-template-columns: 1fr !important;
    padding: 20px 20px !important;
  }
  .thx-title { font-size: 22px; }
  .thx-eta {
    grid-template-columns: auto 1fr !important;
    padding: 16px 18px !important;
  }
  .thx-eta-days { display: none; }

  /* ---- brands strip ---- */
  .brands-strip { flex-direction: column; }
  .brands-label {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  /* ---- touch targets & buttons ---- */
  .btn-lg { min-height: 48px; }
  input, select, textarea { min-height: 44px; }
  /* qty widget on mobile — keep its own height, don't inherit input min-height */
  .qty { height: 48px !important; }
  .qty input { min-height: auto !important; height: 100%; }
  .qty button { min-height: auto !important; }
  .cta-row { align-items: stretch !important; }
  .cta-row .btn { min-height: 48px; }

  /* ---- topbar — mobile: brand kicker instead of crumbs ---- */
  .topbar { height: auto; min-height: 56px; padding: 10px 16px; }
  .crumbs { display: none; }
  .mobile-brand {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink-3);
    text-decoration: none;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
  }
  .mobile-brand img {
    width: 22px; height: 22px; border-radius: 999px;
    box-shadow: 0 0 0 1px var(--line);
    flex-shrink: 0;
  }
  .mini-cart-btn .count { margin-left: 4px; }

  /* ---- horizontal safety: prevent page overflow ---- */
  html, body { overflow-x: hidden; }
  .app { max-width: 100vw; overflow-x: hidden; }
  .main { min-width: 0; padding-bottom: 84px; }
  .view { padding: 16px; max-width: 100%; }
  .card { max-width: 100%; }
  .input input, .input { max-width: 100%; }
  textarea, input[type="text"], input[type="email"], input[type="tel"] { max-width: 100%; width: 100%; }

  /* ---- bottom tab nav ---- */
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 16px));
    z-index: 200;
  }
  .bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 4px 4px;
    color: var(--ink-3);
    font-size: 10.5px; font-weight: 500;
    text-decoration: none;
    background: none; border: 0; cursor: pointer;
    min-height: 44px;
  }
  .bottom-nav-item.is-active { color: var(--accent); font-weight: 600; }
  .bottom-nav-item.is-disabled { opacity: 0.4; pointer-events: none; }
  .bottom-nav-item .bn-icon { position: relative; display: block; line-height: 0; }
  .bottom-nav-item .bn-badge {
    position: absolute; top: -4px; right: -7px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--accent); color: #fff;
    border: 2px solid var(--panel);
    border-radius: 999px;
    font-size: 10px; font-weight: 600; line-height: 1;
    display: grid; place-items: center;
    box-sizing: content-box;
  }
  .bottom-nav-item .bn-badge[hidden] { display: none; }
  .bottom-nav-item .bn-label { font-size: 10.5px; letter-spacing: 0.01em; }

}
