/* Layout: app shell — top bar, left rail on desktop, bottom tabs + sticky inquiry bar on phones.
   Look: galvanised-steel neutrals, ink geometry, a single forge-orange accent for Teshi actions,
   drawing-board panels (grid paper, hatched sections, blue dimension lines) for every item. */
:root {
  --bg: #EDF0F2;
  --surface: #FFFFFF;
  --surface-2: #F4F6F8;
  --ink: #0F1C26;
  --muted: #5E6D78;
  --line: #DCE2E7;
  --line-2: #C9D2D9;
  --accent: #CF4F1B;
  --accent-ink: #FFFFFF;
  --accent-soft: #FCEDE5;
  --blue: #1F5C9C;
  --dim: #2A64A2;
  --hatch: #A3B2BD;
  --draw-fill: #E8EEF3;
  --draw-bg: #FBFCFD;
  --grid: #E6ECF1;
  --wa: #1F8F53;
  --good: #1F8F53;
  --warn: #9A5B00;
  --sel: #FFF4DC;
  --shadow: 0 1px 0 rgba(15, 28, 38, .04), 0 12px 32px -20px rgba(15, 28, 38, .28);
  --f-display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --f-body: 'IBM Plex Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  --f-data: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --r: 14px;
  --r-sm: 10px;
  --rail: 256px;
  --top: 64px;
  --tab-h: 62px;
  --bar-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1117; --surface: #111B23; --surface-2: #17232D; --ink: #E4EAEF; --muted: #8FA0AC; --line: #22303B; --line-2: #2E3E4A;
    --accent: #F2743F; --accent-ink: #1B0C04; --accent-soft: #34190E; --blue: #7DB2E6; --dim: #7DB2E6; --hatch: #4B5E6C;
    --draw-fill: #19262F; --draw-bg: #0E171E; --grid: #16222B; --wa: #3DBB78; --good: #3DBB78; --warn: #F2B35A; --sel: #2D2817;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1117; --surface: #111B23; --surface-2: #17232D; --ink: #E4EAEF; --muted: #8FA0AC; --line: #22303B; --line-2: #2E3E4A;
  --accent: #F2743F; --accent-ink: #1B0C04; --accent-soft: #34190E; --blue: #7DB2E6; --dim: #7DB2E6; --hatch: #4B5E6C;
  --draw-fill: #19262F; --draw-bg: #0E171E; --grid: #16222B; --wa: #3DBB78; --good: #3DBB78; --warn: #F2B35A; --sel: #2D2817;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.locked { overflow: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.fill { fill: var(--accent); stroke: var(--accent); }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; height: var(--top);
  display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; flex: none; }
.logo { width: 34px; height: 34px; flex: none; }
.brand-txt { font: 600 18px/1 var(--f-display); letter-spacing: -0.01em; font-stretch: 86%; white-space: nowrap; }
.brand-txt b { font-weight: 800; color: var(--accent); }
.search-btn { flex: 1; max-width: 560px; margin-left: auto; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--muted); min-width: 0; text-align: left; transition: border-color .15s; }
.search-btn:hover { border-color: var(--line-2); }
.search-btn span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
kbd { font: 600 11px var(--f-data); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; color: var(--muted); background: var(--surface); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); flex: none; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; font-weight: 600; font-size: 13px; color: var(--muted); border-radius: 7px; }
.seg button.on { background: var(--ink); color: var(--surface); }
.seg.wide { display: flex; flex-wrap: wrap; }
.seg.wide button { flex: 1 1 auto; padding: 9px 12px; }

.sidenav { display: none; }
main {
  outline: none; max-width: 1120px; margin: 0 auto;
  padding-block: 24px calc(var(--tab-h) + var(--bar-h) + 40px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 24px; position: relative; z-index: 1;
}
.wm { position: fixed; inset: var(--top) 0 0 0; pointer-events: none; z-index: 2; background-repeat: repeat; background-size: 560px 320px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px);
}
.tabbar a { height: var(--tab-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; position: relative; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tabbar a.on .ic { color: var(--accent); }
.inqbar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px)); z-index: 21;
  background: var(--ink); color: var(--surface);
  padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px));
}
.inqbar-in { max-width: 1120px; margin: 0 auto; min-height: var(--bar-h); display: flex; align-items: center; gap: 12px; padding-block: 8px; }
.inq-txt { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; display: flex; flex-direction: column; }
.inq-txt b { font-family: var(--f-display); font-size: 14px; letter-spacing: .01em; }
.inq-ctx { opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent-ink); color: var(--accent); font-size: 12px; font-weight: 700; }

@media (min-width: 1000px) {
  .sidenav {
    display: flex; flex-direction: column; gap: 4px; position: fixed; top: calc(var(--top) + env(safe-area-inset-top, 0px)); bottom: 0; left: 0; width: var(--rail);
    padding: 18px 14px 18px max(14px, env(safe-area-inset-left, 0px)); border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; z-index: 3;
  }
  .nav-group { display: flex; flex-direction: column; gap: 2px; }
  .nav-label { font: 600 11px var(--f-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 16px 12px 6px; }
  .sidenav a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 14px; }
  .sidenav a .ic { color: var(--muted); width: 18px; height: 18px; }
  .sidenav a:hover { background: var(--surface-2); }
  .sidenav a.on { background: var(--ink); color: var(--surface); }
  .sidenav a.on .ic { color: var(--accent); }
  .side-cta { margin-top: auto; padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .side-cta b { color: var(--ink); font-family: var(--f-display); font-size: 15px; }
  .side-cta p { margin: 4px 0 12px; }
  .tabbar { display: none; }
  .inqbar { left: var(--rail); bottom: 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  main { margin-left: calc(var(--rail) + max(0px, (100vw - var(--rail) - 1120px) / 2)); padding-bottom: calc(var(--bar-h) + 48px); padding-top: 32px; }
  .wm { left: var(--rail); }
}
@media (max-width: 720px) {
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn { flex: none; width: 42px; padding: 0; justify-content: center; margin-left: auto; }
  .inqbar .btn { padding: 0 14px; font-size: 13px; }
  .inqbar .btn .lbl { display: none; }
  .inqbar .btn::after { content: "Get quote"; }
}
@media (max-width: 380px) { .brand-txt { font-size: 16px; } }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: -0.02em; }
.phead { display: flex; flex-direction: column; gap: 6px; }
.phead h1, .sku-head h1 { font-size: clamp(26px, 4.2vw, 38px); line-height: 1.06; font-weight: 800; font-stretch: 84%; }
.h2 { font-size: 18px; font-weight: 750; font-stretch: 92%; }
.h3 { font-size: 15px; font-weight: 700; }
.eyebrow { font: 600 11px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.lede { color: var(--muted); max-width: 62ch; margin: 4px 0 0; font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; margin: 0; }
.sel { user-select: all; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .08s, filter .15s, border-color .15s; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .6; }
.link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; color: var(--blue); font-weight: 600; font-size: 14px; }
.link .ic { width: 16px; height: 16px; }
.iconbtn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); color: var(--ink); flex: none; }
.iconbtn:hover { border-color: var(--ink); }
.iconbtn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.iconbtn.on .ic { fill: var(--accent); }
.iconbtn.sm { width: 34px; height: 34px; }
.iconbtn.sm .ic { width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding: 2px 4px 8px; margin-inline: -4px; scrollbar-width: thin; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13.5px; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field label small { font-weight: 500; }
.field input, .field select, .field textarea, input.qty, .rfq select, .switch select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .switch select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.field.inline select { width: auto; min-width: 140px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.span2 { grid-column: 1 / -1; }
.warn { color: var(--warn); }
.err { color: var(--accent); font-weight: 600; min-height: 1em; margin: 0; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; min-width: 0; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.datacard { display: flex; flex-direction: column; gap: 14px; }
.block { display: flex; flex-direction: column; }
.block.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.block.two > div { min-width: 0; }
.block.two .h2 { margin-bottom: 12px; }
.grid { display: grid; gap: 12px; }

/* product & option tiles */
.prod { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.prod-card { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.prod-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.thumb { display: block; background: var(--draw-bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 16px 16px; border-bottom: 1px solid var(--line); }
.thumb svg { display: block; width: 100%; height: 132px; }
.prod-txt { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 16px; }
.prod-txt b { font-family: var(--f-display); font-size: 18px; font-weight: 800; font-stretch: 90%; }
.prod-txt small { color: var(--muted); }
.count { margin-top: 8px; font: 600 11px var(--f-data); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.opts { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.opts.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.opt { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.opt:hover { border-color: var(--ink); transform: translateY(-2px); }
.opt .thumb svg { height: 112px; }
@media (max-width: 640px) {
  .prod-card, .opt { flex-direction: row; align-items: stretch; }
  .prod-card .thumb, .opt .thumb { width: 116px; flex: none; border-bottom: 0; border-right: 1px solid var(--line); }
  .prod-card .thumb svg, .opt .thumb svg { height: 100%; min-height: 96px; }
  .prod-txt, .opt-txt { justify-content: center; }
  .opts { grid-template-columns: 1fr; }
}
.opt-txt { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.opt-txt b { font-family: var(--f-display); font-size: 16px; font-weight: 750; font-stretch: 92%; }
.opt-txt small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.tag { align-self: flex-start; font: 700 10.5px var(--f-data); letter-spacing: .06em; padding: 2px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.opts.wide .opt-txt { padding: 18px; }
.pills { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.pill { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); text-align: left; }
.pill:hover { border-color: var(--ink); }
.pill b { font: 700 22px var(--f-data); letter-spacing: -0.02em; }
.pill small { color: var(--muted); font-weight: 600; }
.sizes { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.size { height: 56px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); font: 700 16px var(--f-data); letter-spacing: -0.02em; }
.size:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* finder */
.finder-head { display: flex; gap: 14px; align-items: flex-end; }
.back { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.back:hover { border-color: var(--ink); }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.stepper li > * { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; min-width: 0; height: 100%; }
.stepper li > * > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.stepper small { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .n { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--f-data); background: var(--surface-2); color: var(--muted); }
.stepper li.done button:hover { border-color: var(--ink); }
.stepper li.done .n { background: var(--ink); color: var(--surface); }
.stepper li.now > * { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.stepper li.now .n { background: var(--accent); color: var(--accent-ink); }
.stepper li:not(.done):not(.now) b { color: var(--muted); font-weight: 500; }
@media (max-width: 760px) {
  .stepper { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 4px; }
  .stepper li:not(.done):not(.now) { display: none; }
  .stepper li > * { max-width: 210px; }
}

/* ---------- SKU sheet ---------- */
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: -12px; }
.crumbs button { border: 0; background: none; padding: 2px 4px; color: var(--muted); font-weight: 600; border-radius: 6px; }
.crumbs button:hover { color: var(--ink); background: var(--surface-2); }
.crumbs .ic { width: 14px; height: 14px; opacity: .6; }
.sku-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.sku-head > div:first-child { min-width: 0; }
.sku-head .eyebrow { font-family: var(--f-data); letter-spacing: .04em; text-transform: none; }
.sku-tools { display: flex; gap: 8px; }
.switchers { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.switch { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.switch label { font-size: 12px; font-weight: 600; color: var(--muted); }
.switch select { width: auto; min-width: 170px; font-weight: 600; }
.switch.grow { flex: 1 1 320px; }
.sheetcard { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.drawpane { background: var(--draw-bg); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 20px 20px; padding: 10px; overflow-x: auto; }
.drawpane svg { display: block; width: 100%; max-width: 920px; height: auto; max-height: 460px; margin: 0 auto; }
@media (max-width: 700px) { .drawpane svg { max-height: 640px; } }
.draw-cap { font: 500 11px var(--f-data); color: var(--muted); padding: 6px 14px; background: var(--draw-bg); border-top: 1px dashed var(--line-2); letter-spacing: .02em; }
.titleblock { display: grid; grid-template-columns: 2.2fr repeat(4, 1fr) 1.3fr; border-top: 1.5px solid var(--ink); }
.tb-cell { padding: 10px 14px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-cell:last-child { border-right: 0; }
.tb-cell small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.tb-cell b { font: 700 14px var(--f-data); overflow-wrap: anywhere; }
.tb-cell b.desc { font-size: 12px; font-weight: 600; line-height: 1.4; }
.brandcell { flex-direction: row; align-items: center; gap: 10px; background: var(--surface-2); }
.brandcell .logo { width: 28px; height: 28px; }
.brandcell span { display: flex; flex-direction: column; }
.brandcell b { font: 800 13px var(--f-display); }
.brandcell small { text-transform: none; letter-spacing: 0; }
@media (max-width: 900px) { .titleblock { grid-template-columns: repeat(2, 1fr); } .tb-cell.wide { grid-column: 1 / -1; } .tb-cell { border-bottom: 1px solid var(--line-2); } .tb-cell:nth-child(odd):not(.wide) { border-right: 1px solid var(--line-2); } }
.sku-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .sku-grid { grid-template-columns: 1fr; } }
.dimcard { display: flex; flex-direction: column; gap: 14px; }
.dimtable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dimtable th, .dimtable td { padding: 11px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.dimtable tr:last-child > * { border-bottom: 0; }
.dimtable .sym { width: 46px; }
.dimtable .sym { font: 700 13px var(--f-data); color: var(--dim); }
.dimtable td:nth-child(2) { color: var(--muted); font-size: 14px; }
.dimtable .val { text-align: right; font: 700 17px var(--f-data); overflow-wrap: anywhere; }
.dimtable { table-layout: fixed; }
.dimtable td:nth-child(2) { width: 46%; }
.dimtable .val small { font: 500 12px var(--f-body); color: var(--muted); margin-left: 4px; }
.side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.order { display: flex; flex-direction: column; gap: 14px; border-color: var(--accent); }
.qtyrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qtyrow label { font-size: 12px; font-weight: 600; color: var(--muted); flex: 1 0 100%; }
.stepper-in { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.stepper-in button { width: 44px; height: 44px; border: 0; background: var(--surface-2); display: grid; place-items: center; }
.stepper-in input { width: 80px; height: 44px; border: 0; text-align: center; font: 700 16px var(--f-data); background: var(--surface); -moz-appearance: textfield; }
.stepper-in input::-webkit-inner-spin-button { -webkit-appearance: none; }
.order-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-card { display: flex; flex-direction: column; gap: 2px; }
.mini-card small { font-size: 12px; font-weight: 600; color: var(--muted); }
.mini-card b { font: 700 28px var(--f-data); letter-spacing: -0.02em; }
.mini-card b span { font: 500 14px var(--f-body); color: var(--muted); }

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 0; }
.kv > div { background: var(--surface-2); padding: 10px 12px; border-radius: var(--r-sm); min-width: 0; }
.kv dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv dd { margin: 2px 0 0; font: 700 16px var(--f-data); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv dd small { font: 500 12px var(--f-body); color: var(--muted); }
.kv.tight { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 10px 0; }
.kv.one { grid-template-columns: 1fr; margin: 0; gap: 0; }
.kv.one > div { background: none; padding: 9px 0; border-bottom: 1px solid var(--line); border-radius: 0; display: flex; justify-content: space-between; gap: 12px; }
.kv.one > div:last-child { border-bottom: 0; }
.kv.one dd { margin: 0; font-size: 14px; text-align: right; }

.notes { background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px 18px; }
.notes ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }

/* ---------- home ---------- */
.hero { padding: 8px 0 0; }
.hero-txt { max-width: 760px; }
.hero h1 { font-size: clamp(32px, 5.6vw, 56px); line-height: 1; font-weight: 800; font-stretch: 78%; margin: 10px 0 0; letter-spacing: -0.03em; }
.hero-search { margin-top: 22px; width: 100%; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 20px; border-radius: 16px; border: 2px solid var(--ink); background: var(--surface); color: var(--muted); text-align: left; box-shadow: var(--shadow); font-size: 15px; }
.hero-search:hover { border-color: var(--accent); }
.hero-search span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--f-data); font-size: 14px; }
.chips.try { margin-top: 12px; }
.tools-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tool-card { display: flex; align-items: flex-start; gap: 14px; text-align: left; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.tool-card:hover { border-color: var(--ink); }
.tool-card .ic { width: 26px; height: 26px; color: var(--accent); stroke-width: 1.6; margin-top: 2px; }
.tool-card span { display: flex; flex-direction: column; }
.tool-card b { font-family: var(--f-display); font-size: 16px; font-stretch: 92%; }
.tool-card small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.ref-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.ref { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.ref:hover { border-color: var(--ink); }
.ref .ic { color: var(--accent); margin-bottom: 8px; }
.ref b { font-size: 14.5px; }
.ref small { color: var(--muted); font-size: 12.5px; }
.teshi-band { display: grid; grid-template-columns: 1.6fr auto; gap: 24px; align-items: center; padding: 26px; border-radius: 18px; background: var(--ink); color: var(--surface); position: relative; overflow: hidden; }
.teshi-band::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 26px solid var(--accent); opacity: .9; pointer-events: none; }
.teshi-band > * { position: relative; z-index: 1; }
.teshi-band h2 { font-size: 26px; margin: 6px 0; font-stretch: 84%; }
.teshi-band p { margin: 0; opacity: .78; max-width: 60ch; }
.teshi-band .btn.ghost { color: var(--surface); border-color: rgba(255, 255, 255, .3); }
.band-actions { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 720px) { .teshi-band { grid-template-columns: 1fr; } }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.list.flat { border: 0; border-radius: 0; background: none; }
.row-link { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; color: var(--ink); }
.row-link:last-child { border-bottom: 0; }
button.row-link:hover { background: var(--surface-2); }
.row-link > span:not(.kind):not(.match) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-link b { font-weight: 600; }
.row-link small { color: var(--muted); font-size: 13px; }
.row-link > .ic:first-child { color: var(--accent); }
.chev { color: var(--muted); width: 18px; height: 18px; }
.kind { flex: none; width: 76px; font: 600 10.5px var(--f-data); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.match { flex: none; width: 58px; text-align: center; font: 700 11px var(--f-data); padding: 3px 0; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.match.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.match.ok { background: var(--sel); color: var(--warn); }
.std-row { flex-wrap: wrap; }
.dsgrid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ds { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.ds:not(.static):hover { border-color: var(--ink); }
.ds .std { font: 600 11px var(--f-data); color: var(--accent); letter-spacing: .02em; }
.ds b { font-family: var(--f-display); font-size: 15px; line-height: 1.3; font-stretch: 94%; }
.ds small { color: var(--muted); }
.empty { padding: 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty p { margin: 0; }
.prose { max-width: 70ch; }
.prose p { margin: 0 0 14px; font-size: 16px; }
.mats { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.mat { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface); }
.mat:hover { border-color: var(--ink); }
.mat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mat small { color: var(--muted); font-size: 12.5px; }
.mat-badge { flex: none; width: 58px; height: 44px; display: grid; place-items: center; border-radius: 8px; background: var(--ink); color: var(--surface); font: 700 12px var(--f-data); overflow: hidden; }
.chem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.el { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); }
.el .sym { font: 800 18px var(--f-display); color: var(--dim); }
.el b { font: 600 13px var(--f-data); }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-sm); border: 1px solid var(--line); }
.tablewrap.tall { max-height: 70vh; overflow-y: auto; }
table.data { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; background: var(--surface); }
.data th, .data td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-family: var(--f-data); font-size: 14px; }
.data thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); font: 600 12px/1.25 var(--f-body); color: var(--muted); white-space: normal; min-width: 60px; vertical-align: bottom; }
.data thead th:first-child, .data tbody th { text-align: left; }
.data.sticky1 tbody th, .data.sticky1 thead th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.data.sticky1 thead th:first-child { z-index: 2; background: var(--surface-2); }
.data tbody th { font-weight: 700; color: var(--ink); }
.data tbody tr:last-child > * { border-bottom: 0; }
.data tbody tr:hover > * { background: var(--surface-2); }
.data tbody tr[data-go] { cursor: pointer; }
.data td.hl { background: var(--sel); font-weight: 700; }
.data.compact th, .data.compact td { padding: 8px 10px; font-size: 13px; }
.data .act { width: 48px; text-align: center; padding: 4px 8px; }
.data.rfq td { text-align: left; white-space: normal; font-family: var(--f-body); }
.data.rfq td.item { min-width: 240px; font-size: 13.5px; }
.data.rfq input { width: 90px; }

.stamp { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line-2); padding-top: 10px; }
.stamp span { display: inline-flex; align-items: center; gap: 6px; }
.stamp .logo { width: 16px; height: 16px; }
.exportbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exp-label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); margin-right: 4px; }
.exp-label .ic { width: 16px; height: 16px; }

/* ---------- calculators ---------- */
.calcpanel { background: var(--surface); }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.res { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.res small { font-size: 12px; color: var(--muted); font-weight: 600; }
.res b { font: 700 22px var(--f-data); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.res span { font-size: 12px; color: var(--muted); }
.res.strong { border-color: var(--accent); background: var(--accent-soft); }
#calcOut { display: flex; flex-direction: column; gap: 12px; }

/* ---------- CTA ---------- */
.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 20px; border-radius: var(--r); border: 1px solid var(--accent); background: var(--accent-soft); }
.cta-card p { margin: 4px 0 0; max-width: 56ch; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.contact { display: flex; flex-direction: column; gap: 4px; }
.crow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.crow .ic { color: var(--accent); }
.crow span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crow small { color: var(--muted); font-size: 12px; }
.crow a { font-weight: 600; overflow-wrap: anywhere; }
.addr { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-top: 10px; }
.addr p { margin: 4px 0 0; }

/* ---------- sheet, search & toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg { position: absolute; inset: 0; background: rgba(6, 12, 17, .55); backdrop-filter: blur(2px); }
.sheet-panel {
  position: relative; width: min(740px, 100%); max-height: 92vh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0;
  padding: 22px max(20px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
}
@media (min-width: 760px) { .sheet { align-items: flex-start; padding-top: 8vh; } .sheet-panel { border-radius: 20px; max-height: 84vh; } }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sheet-head h2 { font-size: 24px; margin-top: 4px; font-stretch: 86%; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-actions .btn.primary { flex: 1 1 200px; }
.search-panel { min-height: 60vh; gap: 10px; }
.search-field { display: flex; align-items: center; gap: 10px; border: 2px solid var(--ink); border-radius: 14px; padding: 0 6px 0 14px; }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; height: 52px; font-size: 17px; outline: none; font-family: var(--f-data); }
.search-hint { padding: 6px 2px; display: flex; flex-direction: column; gap: 8px; }
.search-hint p { margin: 0; }
.best { display: flex; flex-direction: column; gap: 8px; padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.best-card { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border-radius: var(--r); border: 1.5px solid var(--accent); background: var(--accent-soft); text-align: left; }
.best-card.alt { border-color: var(--line); background: var(--surface); }
.best-card:hover { border-color: var(--ink); }
.best-card .thumb { width: 96px; flex: none; border-radius: 10px; border: 1px solid var(--line); }
.best-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.best-card b { font-family: var(--f-display); font-size: 16px; font-stretch: 92%; }
.best-card small { color: var(--muted); font: 500 12px var(--f-data); }
.toast { position: fixed; left: 50%; transform: translate(-50%, 20px); bottom: calc(var(--tab-h) + var(--bar-h) + 16px + env(safe-area-inset-bottom, 0px)); z-index: 60; background: var(--ink); color: var(--surface); padding: 11px 16px; border-radius: 12px; display: flex; gap: 14px; align-items: center; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100vw - 32px); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: none; color: var(--accent); font-weight: 700; }
@media (min-width: 1000px) { .toast { bottom: calc(var(--bar-h) + 20px); left: calc(50% + var(--rail) / 2); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .tabbar, .inqbar, .sidenav, .topbar .search-btn, .topbar .seg { display: none; } .wm { position: fixed; inset: 0; } }

.conf { font: 600 11px var(--f-data); padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.conf.verified, .conf.teshi { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.conf.single-source { background: var(--sel); color: var(--warn); }
.notes a { color: var(--blue); overflow-wrap: anywhere; }

.faq { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 15px 48px 15px 18px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 12px; font: 400 22px var(--f-data); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { background: var(--surface-2); }
.faq .ans { padding: 0 18px 16px; color: var(--muted); max-width: 75ch; line-height: 1.65; }
.faq-sec .h2 { margin-bottom: 12px; }

/* ---------- teshigroup.com data (data sheets, PDF library, web tables) ---------- */
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 4px; }
.btnrow .btn { height: 40px; }
.web-fig { max-width: 620px; margin: 0 auto 12px; color: var(--ink); }
.web-fig svg { width: 100%; height: auto; display: block; }
dl.kv.legend dd { font-weight: 400; }
.tds h2.h3 { margin-top: 22px; }
.tds h2.h3:first-child { margin-top: 0; }
.tds p { margin: 8px 0; line-height: 1.55; }
.tds-list { margin: 8px 0 4px; padding-left: 20px; line-height: 1.55; }
.tds-list li { margin: 4px 0; }
.pdflist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.pdfrow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); text-decoration: none; }
.pdfrow:hover { border-color: var(--accent); }
.pdfrow .ic { flex: none; color: var(--accent); }
.pdfrow span { display: flex; flex-direction: column; min-width: 0; }
.pdfrow b { font-weight: 600; overflow-wrap: anywhere; }
.pdfrow small { color: var(--muted); }
.pdfrow[hidden], .ds[hidden] { display: none; }
.eqtable tr[data-go] { cursor: pointer; }
.legend-t { width: 100%; border-collapse: collapse; margin: 8px 0 4px; font-size: 14px; }
.legend-t th { text-align: left; width: 64px; padding: 6px 10px 6px 0; font-family: var(--f-data); color: var(--accent); vertical-align: top; white-space: nowrap; }
.legend-t td { padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.grade-note { margin: 8px 0; line-height: 1.5; }
.legend-t.spec-t th { width: 32%; min-width: 120px; font-family: var(--f-body); color: var(--muted); font-weight: 600; white-space: normal; }
