/* Faint Fuzzy. One neutral scale, one accent, Archivo at two weights. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --sunk: #f4f4f5;
  --ink: #0a0a0a;
  --ink-2: #3f3f46;
  --ink-3: #6b6b72;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --line-3: #a1a1aa;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --error: #b42318;
  --error-soft: #fef3f2;
  --ok: #157f3c;
  --ok-soft: #effaf3;
  --r: 10px;
  --r-sm: 7px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t1: 13px; --t2: 14px; --t3: 16px; --t4: 19px; --t5: 23px; --t6: 28px; --t7: 34px;
  color-scheme: light;
  accent-color: var(--accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 450 var(--t3)/1.5 "Archivo", system-ui, sans-serif;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
  caret-color: var(--accent);
}
main { flex: 1; padding-block: 40px 80px; }
::selection { background: var(--accent-soft); color: var(--ink); }
html { scrollbar-color: var(--line-3) var(--bg); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t7); letter-spacing: -0.03em; }
h2 { font-size: var(--t4); }
h3 { font-size: var(--t4); }
p { margin: 0; }
a { color: inherit; text-decoration-color: var(--line-3); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { top: 12px; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: 40px; }

/* Top bar */
.top { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 40px; height: 64px; }
.wordmark { font-weight: 700; font-size: var(--t4); letter-spacing: -0.03em; text-decoration: none; }
.main-nav { display: flex; gap: 28px; }
.main-nav a, .account a, .account .link { text-decoration: none; color: var(--ink-2); font-size: var(--t2); }
.main-nav a:hover, .account a:hover, .account .link:hover { color: var(--ink); }
.main-nav a[aria-current], .cart-link[aria-current] { color: var(--ink); font-weight: 700; }
.account { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: var(--t2); }
.account form { margin: 0; }
.who { color: var(--ink-3); }
.cart-link { display: inline-flex; align-items: center; gap: 6px; }
.cart-link .num { min-width: 22px; height: 22px; padding-inline: 6px; border-radius: 11px; background: var(--sunk); border: 1px solid var(--line); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); }

.foot { border-top: 1px solid var(--line); padding-block: 28px; color: var(--ink-3); font-size: var(--t1); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: var(--t2); line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--line-3); background: var(--sunk); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.wide { width: 100%; height: 46px; font-size: var(--t3); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.link:hover { color: var(--ink); text-decoration-color: currentColor; }

/* Catalog */
.shop { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: "rail head" "rail list"; column-gap: 48px; align-items: start; }
.shop .rail-wrap { grid-area: rail; } .shop .catalog-head { grid-area: head; } .shop .grid, .shop .empty { grid-area: list; }
.rail-wrap { position: sticky; top: 104px; }
.rail-wrap > summary { display: none; }
.rail { display: grid; gap: 28px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: var(--t1); font-weight: 700; color: var(--ink); padding: 0; margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: var(--t2); color: var(--ink-2); padding: 5px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; }
.check:hover { color: var(--ink); }
.catalog-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 28px; }
.sub { color: var(--ink-2); font-size: var(--t3); margin-top: 10px; max-width: 62ch; }
.sortbar { display: flex; align-items: center; gap: 20px; flex: none; }
.count { color: var(--ink-3); font-size: var(--t2); }
.sort { display: flex; align-items: center; gap: 8px; font-size: var(--t2); color: var(--ink-3); }
select, input[type=text], input[type=email], input[type=password], input[type=number] {
  font: inherit; font-size: var(--t3); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r-sm); height: 42px; padding: 0 12px;
  transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 32px; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%233f3f46' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
.sort select { height: 36px; font-size: var(--t2); }
input:hover, select:hover { border-color: var(--line-3); }
input:focus-visible, select:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--ink-3); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px 22px 22px; display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .25s var(--ease);
}
.card:hover, .card:focus-within { border-color: var(--line-3); box-shadow: 0 6px 24px -8px rgb(10 10 10 / .12); }
.card-link { text-decoration: none; display: block; }
.card-link:hover h2 { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 4px; }
.drawing { display: block; width: 100%; height: auto; aspect-ratio: 240 / 150; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; background: var(--sunk); border-radius: var(--r-sm); margin-bottom: 18px; padding: 8px 16px; }
.card h2 { font-size: var(--t4); margin-top: 2px; }
.kind { color: var(--ink-3); font-size: var(--t2); margin-top: 2px; }
.claim { margin-top: 14px; font-size: var(--t2); font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.proof { font-weight: 450; color: var(--ink-3); }
.reach { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.reach li { height: 5px; border-radius: 3px; background: var(--line); position: relative; }
.reach li.on { background: var(--accent); }
.reach span { position: absolute; top: 10px; left: 0; font-size: 11px; line-height: 1.2; color: var(--ink-3); white-space: nowrap; display: none; }
.reach li:first-child span, .reach li:last-child span { display: block; }
.reach li:last-child span { left: auto; right: 0; }
.card-foot { margin-top: auto; padding-top: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-foot form { margin: 0; }
.price { font-size: var(--t4); font-weight: 700; letter-spacing: -0.01em; }

.empty { background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 48px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.empty p { color: var(--ink-2); max-width: 52ch; }
.empty p:last-child { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.empty.quiet { border-style: solid; background: var(--sunk); }
.empty h1 { font-size: var(--t6); }

/* Detail */
.crumbs { font-size: var(--t2); color: var(--ink-3); margin-bottom: 24px; }
.crumbs a { color: var(--ink-2); }
.detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.detail-art { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 32px 32px 52px; position: sticky; top: 104px; }
.drawing .solid { fill: var(--sunk); }
.drawing.big .solid { fill: var(--surface); }
.drawing.big { background: none; margin: 0 0 28px; padding: 0; stroke-width: 1.1; }
.detail-art .reach span { display: block; }
.detail-art .reach li:last-child span { left: 0; right: auto; }
.detail-buy .kind { margin-top: 6px; }
.lede { font-size: var(--t4); color: var(--ink-2); margin-top: 14px; max-width: 46ch; line-height: 1.45; }
.price.big { font-size: var(--t6); margin-top: 24px; }
.buy { display: flex; align-items: end; gap: 12px; margin-top: 18px; }
.qty { display: grid; gap: 6px; font-size: var(--t1); font-weight: 700; color: var(--ink-2); }
.qty input { width: 84px; height: 46px; }
.buy .btn { height: 46px; padding-inline: 28px; font-size: var(--t3); }
.ship { margin-top: 12px; font-size: var(--t2); color: var(--ink-3); }
.fit { margin-top: 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.fit > div { background: var(--surface); padding: 18px 20px; }
.fit h2 { font-size: var(--t1); color: var(--ink-3); margin-bottom: 6px; }
.fit p { font-size: var(--t2); }

.proofs { margin-top: 72px; }
.proofs h2, .specs h2 { font-size: var(--t5); margin-bottom: 20px; }
.proof-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.proof-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 18px 0; border-bottom: 1px solid var(--line); animation: rise .6s var(--ease) both; }
.proof-list li:nth-child(2) { animation-delay: .05s; } .proof-list li:nth-child(3) { animation-delay: .1s; }
.proof-list li:nth-child(4) { animation-delay: .15s; } .proof-list li:nth-child(n+5) { animation-delay: .2s; }
.proof-list .c { font-size: var(--t4); font-weight: 700; letter-spacing: -0.01em; }
.proof-list .pr { color: var(--ink-2); align-self: center; }
@keyframes rise { from { transform: translateY(8px); opacity: .35; } }
.specs { margin-top: 64px; max-width: 880px; }
table { width: 100%; border-collapse: collapse; font-size: var(--t2); }
.specs th, .specs td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: 450; color: var(--ink-3); width: 40%; }

/* Finder */
.finder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.quiz { display: grid; gap: 28px; }
.quiz .sub { margin-top: -18px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-size: var(--t2); color: var(--ink-2); transition: border-color .15s, background-color .15s, color .15s; }
.opt:hover span { border-color: var(--line-3); color: var(--ink); }
.opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); font-weight: 700; box-shadow: inset 0 0 0 1px var(--accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.results { position: sticky; top: 104px; }
#results { display: grid; gap: 12px; }
.match { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.match.first { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.match .drawing { margin: 0; padding: 6px 10px; }
.match h3 a { text-decoration: none; }
.match h3 a:hover { text-decoration: underline; }
.best { color: var(--accent); }
.fits, .warns { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; font-size: var(--t2); }
.fits li { display: flex; gap: 6px; align-items: start; }
.fits .icon { width: 16px; height: 16px; color: var(--ok); margin-top: 2px; }
.warns li { color: var(--ink-3); padding-left: 22px; position: relative; }
.warns li::before { content: ""; position: absolute; left: 5px; top: .62em; width: 7px; height: 1.5px; background: var(--line-3); }

/* Cart, checkout, orders */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; margin-top: 28px; }
.lines { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto 100px; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.drawing.small { margin: 0; padding: 4px 8px; }
.line-name { display: grid; gap: 2px; }
.line-name a { font-weight: 700; text-decoration: none; }
.line-name a:hover { text-decoration: underline; }
.line-name .muted { font-size: var(--t2); }
.line-qty { display: flex; align-items: center; gap: 10px; margin: 0; }
.line-qty input { width: 64px; height: 36px; }
.line-qty .btn { height: 36px; }
.line-qty .link { font-size: var(--t2); }
.line-total { text-align: right; font-weight: 700; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: grid; gap: 16px; position: sticky; top: 104px; }
.panel h2 { font-size: var(--t3); }
.panel h2:not(:first-child) { margin-top: 8px; }
.sum-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: var(--t2); }
.sum-lines li, .totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals { margin: 0; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: var(--t2); }
.totals dt { color: var(--ink-3); } .totals dd { margin: 0; }
.totals .total { font-size: var(--t4); font-weight: 700; }
.totals .total dt { color: var(--ink); }
.hint { font-size: var(--t1); color: var(--ink-3); }
.panel p { font-size: var(--t2); }
.addr { line-height: 1.6; }

.auth { max-width: 420px; margin: 24px auto 0; display: grid; gap: 24px; }
.auth form { display: grid; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t2); font-weight: 700; }
.field input, .field select { width: 100%; }
.field .hint { margin-top: -2px; }
.has-error input, .has-error select { border-color: var(--error); }
.error { color: var(--error); font-size: var(--t2); }
.error.banner { background: var(--error-soft); border: 1px solid #fecdca; border-radius: var(--r-sm); padding: 12px 14px; margin-top: 20px; }
.auth .error.banner { margin-top: 0; }

.checkout { display: grid; gap: 36px; }
.checkout fieldset { display: grid; gap: 16px; }
.checkout legend { font-size: var(--t4); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.demo-note { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; font-size: var(--t2); color: var(--ink-2); }
.demo-note strong { color: var(--ink); }

.placed { display: flex; gap: 12px; align-items: start; background: var(--ok-soft); border: 1px solid #b7e4c7; border-radius: var(--r); padding: 16px 18px; margin-bottom: 28px; font-size: var(--t2); }
.placed .icon { color: var(--ok); width: 20px; height: 20px; }
.timeline { list-style: none; padding: 0; margin: 20px 0 16px; }
.timeline li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; column-gap: 14px; padding-bottom: 28px; position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li.done:not(:last-child)::after { background: var(--accent); }
.dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); grid-row: span 2; }
.done .dot { background: var(--accent); border-color: var(--accent); }
.now .dot { border-color: var(--accent); box-shadow: inset 0 0 0 5px var(--surface), inset 0 0 0 12px var(--accent); }
.step-name { font-weight: 700; padding-top: 1px; }
.next .step-name { color: var(--ink-3); font-weight: 450; }
.step-when { font-size: var(--t2); color: var(--ink-3); padding-top: 2px; }
.step-note { grid-column: 2 / -1; font-size: var(--t2); color: var(--ink-2); }

table.orders { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: var(--t3); }
.orders th, .orders td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.orders tr:last-child td { border-bottom: 0; }
.orders th { font-size: var(--t1); color: var(--ink-3); font-weight: 700; background: var(--sunk); }
.orders .r { text-align: right; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t2); font-weight: 700; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.status.s4::before { background: var(--ok); }

/* Responsive */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder { grid-template-columns: 1fr; }
  .results { position: static; }
  .line { grid-template-columns: 100px minmax(0, 1fr) auto; row-gap: 10px; }
  .line .drawing.small { grid-row: span 2; }
  .line-qty { grid-column: 2 / -1; }
  .line-total { grid-row: 1; grid-column: 3; }
}
@media (max-width: 900px) {
  .wrap { padding-inline: 20px; }
  main { padding-block: 28px 64px; }
  h1 { font-size: var(--t6); }
  .top-in { gap: 20px; height: auto; min-height: 56px; flex-wrap: wrap; padding-block: 12px; }
  .main-nav { order: 3; width: 100%; gap: 20px; overflow-x: auto; }
  .who { display: none; }
  .shop { grid-template-columns: 1fr; grid-template-areas: "head" "rail" "list"; }
  .catalog-head { margin-bottom: 20px; }
  .shop .rail-wrap { position: static; margin-bottom: 20px; }
  .rail-wrap > summary { display: inline-flex; list-style: none; }
  .rail-wrap > summary::-webkit-details-marker { display: none; }
  .rail { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .rail fieldset { flex: 1 1 260px; }
  .rail fieldset:first-child .check { display: inline-flex; margin-right: 14px; }
  .rail fieldset:nth-child(2) .check { display: inline-flex; margin-right: 14px; }
  .catalog-head { flex-direction: column; align-items: start; gap: 16px; }
  .detail, .two-col { grid-template-columns: 1fr; gap: 32px; }
  .detail-art, .panel { position: static; }
  .proof-list li { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .card .drawing { aspect-ratio: 240 / 120; }
  .fit, .row { grid-template-columns: 1fr; }
  .detail-art .reach span { display: none; }
  .detail-art .reach li:first-child span, .detail-art .reach li:last-child span { display: block; }
  .detail-art .reach li:last-child span { left: auto; right: 0; }
  .match { grid-template-columns: 1fr; }
  .match .drawing { max-width: 220px; }
  .buy { flex-wrap: wrap; }
  .buy .btn { flex: 1; }
  .orders th, .orders td { padding: 12px; }
  .empty { padding: 32px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
