/* ============================================================
   Zhonghongxin static prototype — design system tokens
   Source: docs/benchmark-teardown.md (Sierra IC design pattern)
   Rule: design layer copied; all copy, part data and assets are ours
   Tone: professional / direct / pragmatic
   ============================================================ */

:root {
  /* 7-color palette derived from B2B semiconductor procurement */
  --ink:        #16283b;   /* primary text, deep navy */
  --ink-soft:   #4a5d70;   /* secondary text */
  --brand:      #0b3d5c;   /* primary brand, deep teal-blue */
  --brand-2:    #14799e;   /* accent blue */
  --cta:        #bf521c;   /* action orange — 4.73:1 on white (WCAG AA) */
  --cta-dark:   #a84718;   /* hover — 5.87:1 on white */
  --accent:     #4d351d;   /* ZHX logo brown — accent strip, section labels, source cards */
  --surface:    #ffffff;
  --surface-2:  #f3f7fa;
  --line:       #d7e2ea;
  --ok:         #1f7a55;   /* verified / inspected */

  --radius: 6px;
  --shadow: 0 2px 10px rgba(11, 61, 92, .07);
  --maxw: 1180px;

  /* type scale 1.2 */
  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-base: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5625rem;
  --t-2xl: 2rem;
  --t-3xl: 2.5rem;

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--cta); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--sp-3); }

/* ---------- header ---------- */
.topbar {
  background: var(--brand);
  color: #fff;
  font-size: var(--t-xs);
  letter-spacing: .02em;
}
.topbar .wrap { display: flex; gap: var(--sp-3); flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.topbar span::before { content: "•"; margin-right: 6px; opacity: .7; }
.topbar span:first-child::before { content: ""; margin: 0; }

.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.nav-row { display: flex; align-items: center; gap: var(--sp-4); min-height: 64px; }
.logo { display: inline-flex; align-items: center; font-weight: 800; font-size: var(--t-lg); color: var(--brand); letter-spacing: -.02em; white-space: nowrap; }
.logo-mark { display: block; height: 34px; width: auto; }
.logo small { display: inline; font-size: .72em; font-weight: 500; color: var(--ink-soft); letter-spacing: 0; margin-left: 8px; }
.nav-links { display: flex; gap: var(--sp-3); margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: var(--t-sm); padding: 8px 0; }
.nav-links a:hover { color: var(--brand-2); }
/* CTA button inside nav must keep white text (nav-links a would override it) */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius);
  font-weight: 700; font-size: var(--t-sm); text-align: center;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-dark); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }

/* ---------- hero ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hero { background: linear-gradient(160deg, var(--brand) 0%, #0d4e70 60%, #106184 100%); color: #fff; padding: var(--sp-6) 0 var(--sp-5); }
.hero h1 { font-size: var(--t-3xl); line-height: 1.15; margin: 0 0 var(--sp-2); letter-spacing: -.02em; max-width: 20ch; }
.hero p.lede { font-size: var(--t-lg); color: #d9ecf5; max-width: 62ch; margin: 0 0 var(--sp-3); }
.hero .cta-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.6); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); }
.hero-sm { padding: var(--sp-4) 0 var(--sp-4); }
.hero-sm h1 { max-width: none; }

/* RFQ page: tech photo is tiled down the whole page and scrolls with the content.
   The two-column panel is translucent so the picture reads as one continuous surface. */
body.rfq-page {
  background-color: #071722;
  background-image:
    radial-gradient(circle at 18% 62%, rgba(20,121,158,.18), transparent 46%),
    radial-gradient(circle at 86% 78%, rgba(11,61,92,.30), transparent 52%),
    var(--page-art);
  background-size: 100% 100%, 100% 100%, 100% auto;
  background-position: center center, center center, center top;
  background-attachment: scroll, scroll, scroll;   /* scrolls together with the modules */
  background-repeat: no-repeat;
}
/* hero lets the photo show through with a dark tech wash; white text for contrast */
.hero.rfq-hero {
  position: relative; isolation: isolate;
  background: transparent; color: #fff;
  padding: var(--sp-6) 0;
}
.hero.rfq-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6,20,31,.32), rgba(6,20,31,.58));
}
.hero.rfq-hero h1 { color: #fff; }
.hero.rfq-hero p.lede { color: #d8e8f2; }
/* glass panel: image stays visible behind both columns, no solid white card */
body.rfq-page section:has(.rfq-layout) {
  position: relative;
  background: rgba(7, 24, 36, .62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(151, 205, 232, .18);
  border-radius: 12px;
  padding: var(--sp-4);
  max-width: var(--maxw); margin: 0 auto var(--sp-4);
  color: #eaf4fa;
}
/* glass-panel internals: all copy light, controls stay bright for legibility */
body.rfq-page .rfq-aside .answer { background: rgba(255,255,255,.08); border-left-color: #58b3dd; }
body.rfq-page .rfq-aside .answer p { color: #dceaf3; }
body.rfq-page .contact-methods-h { color: #7fc7e8; }
body.rfq-page .contact-method { border-top-color: rgba(151,205,232,.20); }
body.rfq-page .contact-method-icon { color: #7fc7e8; }
body.rfq-page .contact-method-label { color: #a9c8da; }
body.rfq-page .contact-method a, body.rfq-page .contact-method-text { color: #eaf4fa; }
body.rfq-page .contact-method a:hover { color: #ffd2a6; }
body.rfq-page .rfq-form-frame .sec-head h2 { color: #fff; }
body.rfq-page .rfq-form-frame .sec-head p,
body.rfq-page .rfq-form-frame label,
body.rfq-page .rfq-form-frame .field .hint,
body.rfq-page .rfq-form-frame .form-note { color: #c4d9e6; }
body.rfq-page .rfq-form-frame .form-note { background: rgba(255,255,255,.08); }
body.rfq-page .rfq-form-frame .field-optional { color: #9fb6c4; }
body.rfq-page section.alt { background: rgba(7,24,36,.55); color: #eaf4fa; }
body.rfq-page section.alt .sec-head h2, body.rfq-page section.alt .step h3 { color: #fff; }
body.rfq-page section.alt .step p { color: #c4d9e6; }
body.rfq-page section.alt .step::before { color: #7fc7e8; }
@media (max-width: 899px) {
  body.rfq-page { background-position: 62% top; }
  body.rfq-page section:has(.rfq-layout) { padding: var(--sp-3); }
}

/* Part-number search (Sierra IC pattern) */
.part-search { position: relative; max-width: 720px; margin: 0 0 var(--sp-1); }
.ps-row { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 6px; padding: 6px; box-shadow: var(--shadow); }
.ps-icon { width: 18px; height: 18px; flex: 0 0 18px; margin-left: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a5d70' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4.5-4.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.ps-row input[type="search"] { flex: 1; border: 0; outline: 0; padding: 12px 8px; font-size: var(--t-base); color: var(--ink); background: transparent; min-width: 0; }
.ps-row input[type="search"]::placeholder { color: #8a99a6; }
.ps-row .btn { flex: 0 0 auto; }
.ps-row .btn-primary { background: var(--brand); min-width: 88px; }
.ps-row .btn-primary:hover { background: var(--brand-2); }
.ps-results { position: absolute; z-index: 20; top: calc(100% - 2px); left: 0; right: 0; background: #fff; color: var(--ink); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 12px 28px rgba(0,0,0,.18); max-height: 380px; overflow: auto; }
.ps-count { padding: 10px 14px; font-size: var(--t-xs); color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.ps-item { display: flex; align-items: baseline; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--surface-2); text-decoration: none; color: var(--ink); }
.ps-item:last-child { border-bottom: 0; }
.ps-item:hover { background: var(--surface-2); }
.ps-mpn { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-sm); }
.ps-meta { color: var(--ink-soft); font-size: var(--t-xs); flex: 1; }
.ps-view { color: var(--brand-2); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.ps-empty { padding: 14px; font-size: var(--t-sm); color: var(--ink-soft); }
.ps-empty a { color: var(--brand-2); font-weight: 600; }
@media (max-width: 720px) {
  .ps-item { flex-wrap: wrap; }
  .ps-meta { flex-basis: 100%; }
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-5); }
.stat { border-top: 2px solid rgba(255,255,255,.35); padding-top: var(--sp-2); }
.stat b { display: block; font-size: var(--t-2xl); line-height: 1.1; }
.stat span { font-size: var(--t-sm); color: #cfe4f0; }

/* ---------- answer block (GEO) ---------- */
.answer { background: var(--surface-2); border-left: 4px solid var(--brand-2); padding: var(--sp-3); margin: var(--sp-4) 0; border-radius: 0 var(--radius) var(--radius) 0; }
.answer p { margin: 0; max-width: 75ch; }

/* ---------- sections ---------- */
section { padding: var(--sp-6) 0; }
section.alt { background: var(--surface-2); }
.sec-head { margin-bottom: var(--sp-4); }
.sec-head h2 { font-size: var(--t-2xl); margin: 0 0 var(--sp-1); letter-spacing: -.01em; }
.sec-head p { color: var(--ink-soft); margin: 0; max-width: 65ch; }

.grid { display: grid; gap: var(--sp-3); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 var(--sp-1); font-size: var(--t-lg); }
.card p { margin: 0 0 var(--sp-2); color: var(--ink-soft); font-size: var(--t-sm); }
.card .tag { display: inline-block; font-size: var(--t-xs); color: var(--brand-2); font-weight: 700; margin-bottom: 6px; }

/* part number chips */
.parts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-2); }
.part { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--t-xs); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 5px 9px; color: var(--brand); }

/* steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
.step { position: relative; padding-top: var(--sp-4); }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 0; left: 0; font-size: var(--t-xl); font-weight: 800; color: var(--brand-2); opacity: .35; }
.step h3 { margin: 0 0 6px; font-size: var(--t-lg); }
.step p { margin: 0; color: var(--ink-soft); font-size: var(--t-sm); }

/* regions */
.regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.region { border-top: 3px solid var(--brand-2); padding-top: var(--sp-2); }
.region h3 { margin: 0 0 6px; }
.region p { margin: 0; font-size: var(--t-sm); color: var(--ink-soft); }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); min-width: 560px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--brand); color: #fff; font-weight: 700; }
.cat-table thead th { background: var(--surface-2); color: var(--brand-2); font-weight: 700; }
tbody tr:nth-child(even) { background: var(--surface-2); }
td.mpn { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--brand); }
/* catalog table: part number + description stacked, maker, action buttons */
.table-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); margin-bottom: 10px; font-size: var(--t-sm); color: var(--ink); }
.table-meta .meta-pages { color: var(--ink-soft); }
.cat-table th:first-child, .cat-table td:first-child { width: 52%; }
.cat-table th:nth-child(2), .cat-table td:nth-child(2) { width: 20%; }
.cat-table th:last-child, .cat-table td:last-child { width: 28%; }
.cat-table td.part-id { padding: 14px; }
.cat-table .part-mpn { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .875rem; font-weight: 700; color: var(--brand-2); text-decoration: none; cursor: pointer; }
.cat-table .part-mpn:hover { color: var(--cta); text-decoration: underline; }
.cat-table .part-desc { display: block; font-size: .75rem; color: var(--ink-soft); margin-top: 3px; line-height: 1.45; }
.cat-table td.brand { font-size: .75rem; font-weight: 600; }
.cat-table td.actions { white-space: nowrap; }
.cat-table td.actions .act-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 5px 9px; margin: 2px 3px 2px 0; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--brand-2); font-size: .75rem; font-weight: 600; text-decoration: none; }
.cat-table td.actions .act-btn:hover { border-color: var(--brand-2); background: var(--surface-2); text-decoration: none; }

/* two-level catalog directory (category + subcategory sidebar) */
.catalog-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.catalog-main { min-width: 0; }
.cat-sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2); position: sticky; top: 86px; }
.cat-sidebar h3 { margin: 0 0 8px; font-size: var(--t-sm); letter-spacing: .04em; color: var(--ink-soft); text-transform: uppercase; }
.cat-tree, .cat-children { list-style: none; padding: 0; margin: 0; }
.cat-tree > li { margin: 0 0 2px; }
.cat-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 4px;
  background: transparent; color: var(--ink); font: inherit;
  font-size: var(--t-sm); font-weight: 700; line-height: 1.35;
  text-align: left; cursor: pointer;
}
.cat-toggle:hover { background: var(--surface-2); }
.cat-toggle.active { background: var(--brand); color: #fff; }
.cat-toggle:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.cat-caret { width: 1em; flex: none; font-size: 11px; }
.cat-label { flex: 1; }
.cat-count { font-size: var(--t-xs); opacity: .75; white-space: nowrap; font-weight: 400; }
.cat-toggle.active .cat-count, .cat-children a.active .cat-count { opacity: 1; }
.cat-children { margin: 0 0 6px !important; padding: 2px 0 4px 22px !important; }
.cat-children[hidden] { display: none; }
.cat-children a, .cat-children .cat-empty {
  display: block; padding: 6px 8px; border-radius: 4px;
  font-size: var(--t-sm); color: var(--ink); text-decoration: none; line-height: 1.35;
}
.cat-children a:hover { background: var(--surface-2); }
.cat-children a.active { background: var(--brand-2); color: #fff; font-weight: 700; }
.cat-children .cat-empty { color: var(--ink-soft); }
.catalog-main .sec-head { margin-bottom: var(--sp-2); }

@media (max-width: 899px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .cat-sidebar { position: static; }
}

/* verdict strip */
.verdict { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); margin: var(--sp-3) 0; }
.verdict div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-2); }
.verdict b { color: var(--ok); display: block; }
.verdict span { font-size: var(--t-sm); color: var(--ink-soft); }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: var(--sp-2) 0; }
.faq summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.faq p { margin: 8px 0 0; color: var(--ink-soft); }

/* form */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); max-width: 760px; }
label { display: block; font-weight: 700; font-size: var(--t-sm); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink);
  min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: var(--sp-2); }
.field .hint { font-size: var(--t-xs); color: var(--ink-soft); margin-top: 4px; }
.form-note { font-size: var(--t-sm); color: var(--ink-soft); background: var(--surface-2); padding: var(--sp-2); border-radius: var(--radius); }

/* CTA band */
.cta-band { background: var(--brand); color: #fff; padding: var(--sp-5) 0; }
body.rfq-page .cta-band { background: rgba(11,61,92,.88); }
body.rfq-page .site-footer { background: rgba(22,40,59,.92); }
.cta-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.cta-band h2 { margin: 0; font-size: var(--t-2xl); }
.cta-band p { margin: 6px 0 0; color: #cfe4f0; }

/* footer */
.site-footer { background: var(--ink); color: #cbd8e2; padding: var(--sp-5) 0 var(--sp-3); font-size: var(--t-sm); }
.site-footer a { color: #9fd4e8; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--sp-3); }
.foot-grid h3 { color: #fff; margin: 0 0 10px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 6px; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: var(--sp-4); padding-top: var(--sp-2); font-size: var(--t-xs); }

/* prototype flag */
.prototype-flag { background: #fff4e5; border-bottom: 1px solid #f0c98a; color: #7a4b00; font-size: var(--t-xs); text-align: center; padding: 5px; }

/* ---------- GDX-style homepage structure ---------- */
.home-topbar { background: #3a2917; }
.home-header { background: #241a10; border-bottom: 1px solid rgba(255,255,255,.12); }
.home-header .logo { color: #fff; }
.home-header .logo small { color: #c8b9a2; font-weight: 400; }
.home-header .nav-links a { color: #e7dac7; }
.home-header .nav-links a.btn-primary { background: #fff; color: var(--accent); }
.home-header .nav-links a.btn-primary:hover { background: #efe6d6; color: var(--accent); }
.home-hero { position: relative; overflow: hidden; color: var(--ink); padding: var(--sp-6) 0 var(--sp-5); background: linear-gradient(135deg, #faf6ef 0%, #f1e7d7 55%, #e6d5ba 100%); }
.home-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 82% 24%, rgba(77,53,29,.10), transparent 40%), radial-gradient(circle at 8% 92%, rgba(77,53,29,.06), transparent 36%); pointer-events: none; }
.home-hero::after { content: ""; position: absolute; right: -160px; top: -120px; width: 560px; height: 560px; border: 1px solid rgba(77,53,29,.10); border-radius: 52px; transform: rotate(45deg); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--sp-5); align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.hero-eyebrow { display: inline-block; border: 1px solid rgba(77,53,29,.25); background: rgba(77,53,29,.06); padding: 6px 12px; border-radius: 999px; font-size: var(--t-xs); color: #5a4024; }
.home-hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.12; margin: var(--sp-2) 0; max-width: 16ch; letter-spacing: -.02em; }
.home-hero .lede { color: #5c5143; max-width: 58ch; }
.home-hero .part-search { max-width: 640px; }
.home-hero .ps-row { background: #fff; border: 1px solid rgba(77,53,29,.18); }
.ps-prefix { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-xs); font-weight: 700; color: #8a6a43; padding-left: 10px; }
.home-hero .ps-row input[type="search"] { color: var(--ink); }
.home-hero .ps-row input[type="search"]::placeholder { color: #8b8379; }
.home-hero .ps-row .btn-primary { background: var(--accent); min-width: 120px; }
.home-hero .ps-row .btn-primary:hover { background: #382615; }
.browse-link { margin: 10px 0 0; }
.browse-link a { color: #5a4024; font-size: var(--t-sm); text-decoration: none; }
.browse-link a:hover { text-decoration: underline; }
.hero-cta-row { margin: var(--sp-3) 0 0; }
.hero-cta-row .btn { background: var(--accent); }
.hero-cta-row .btn:hover { background: #382615; }
.hero-rfq { max-width: 620px; margin: var(--sp-3) 0 0; }
.hero-rfq-row { border: 1px solid rgba(77,53,29,.18); }
.hero-rfq .hero-rfq-row .btn-primary { background: var(--accent); min-width: 128px; }
.hero-rfq .hero-rfq-row .btn-primary:hover { background: #382615; }
.hero-rfq-hint { margin: 8px 0 0; font-size: var(--t-xs); color: #6b6054; }
.wa-row { margin: var(--sp-3) 0 0; }
.wa-chat { background: var(--surface-2); color: #1e7e5a; border-color: #1e7e5a; }
.wa-chat:hover { background: #e9f6f0; color: #155f43; border-color: #155f43; }

/* direct contact details: icon + label + value, GDX-style list */
.contact-methods { margin: var(--sp-4) 0 0; }
.contact-methods-h { display: block; font-size: var(--t-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--sp-2); }
.contact-method { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.contact-method-icon { flex: none; width: 22px; height: 22px; color: var(--cta); margin-top: 2px; }
.contact-method-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-method-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.contact-method-label { font-size: var(--t-xs); color: var(--ink-soft); }
.contact-method a, .contact-method-text { color: var(--ink); font-weight: 600; font-size: var(--t-base); text-decoration: none; word-break: break-word; line-height: 1.5; }
.contact-method a:hover { color: var(--cta); text-decoration: underline; }
.field-optional { color: #9aa3ad; font-weight: 400; font-size: var(--t-xs); }

/* RFQ: two-column layout — copy + contacts left, framed form right */
.rfq-layout {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--sp-5); align-items: start;
}
.rfq-aside .answer { margin: 0 0 var(--sp-3); }
.rfq-aside .answer p { font-size: var(--t-sm); }
.rfq-aside .contact-methods { margin: 0; }
.rfq-aside .contact-method { padding: 12px 0; }
.rfq-form-frame {
  border: 0; padding: 0; background: transparent; box-shadow: none;
}
.rfq-form-frame .sec-head { margin-bottom: var(--sp-3); }
.rfq-form-frame .sec-head h2 { font-size: var(--t-xl); }
.rfq-form-frame .form-grid { max-width: none; gap: var(--sp-1) var(--sp-2); }
.rfq-form-frame .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.rfq-form-frame label { font-size: var(--t-xs); margin-bottom: 4px; }
.rfq-form-frame input, .rfq-form-frame textarea {
  font-size: var(--t-sm); padding: 8px 10px; min-height: 38px;
}
.rfq-form-frame textarea { min-height: 80px; }
.rfq-form-frame .field { margin-bottom: 0; }
.rfq-form-frame .field .hint { font-size: .72rem; margin-top: 3px; }
.rfq-form-frame .form-note { font-size: var(--t-xs); padding: var(--sp-1) 12px; }
.contact-methods.contact-strip {
  max-width: 780px; margin: var(--sp-3) 0 0; padding: 0;
}
.contact-strip .contact-methods-h { margin-bottom: var(--sp-1); }
.contact-strip .contact-method {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 0; border: 0; margin: 0 var(--sp-3) var(--sp-1) 0;
}
.contact-strip .contact-method-icon { width: 17px; height: 17px; margin-top: 0; }
.contact-strip .contact-method-body { flex-direction: row; align-items: baseline; gap: 6px; }
.contact-strip .contact-method-label { font-size: var(--t-xs); }
.contact-strip .contact-method a, .contact-strip .contact-method-text {
  font-size: var(--t-xs); font-weight: 600;
}
.hero-visual { position: relative; z-index: 2; }
.brand-logo { width: 100%; max-width: 340px; height: auto; display: block; margin-left: auto; filter: drop-shadow(0 18px 28px rgba(77,53,29,.16)); }
.hero-stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); margin-top: var(--sp-5); border-top: 1px solid rgba(77,53,29,.2); padding-top: var(--sp-3); }
.hero-stat b { display: block; font-size: var(--t-2xl); line-height: 1.15; }
.hero-stat .stat-unit { color: var(--accent); font-size: .6em; font-weight: 700; margin-left: 2px; }
.hero-stat span { color: #6b6054; font-size: var(--t-sm); }
.cat-strip { background: var(--accent); color: #fff; }
.cat-strip-inner { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 12px 0; }
.cat-strip a { color: #fff; font-size: var(--t-xs); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cat-strip a span { margin-left: 4px; }
.cat-strip a:hover { text-decoration: underline; }
.sec-no { display: block; font-size: var(--t-xs); letter-spacing: .12em; color: var(--accent); font-weight: 800; margin-bottom: 6px; }
/* Full-bleed section artwork: image covers the whole section, copy/cards float on top.
   The translucent cream wash blends the photo into the page without hiding content. */
section.art-section {
  position: relative;
  isolation: isolate;
  background-color: var(--surface-2);
  background-image: var(--section-art);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
section.art-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg,
    rgba(250,247,241,.90) 0%,
    rgba(250,247,241,.78) 32%,
    rgba(250,247,241,.32) 78%,
    rgba(250,247,241,.24) 100%);
}
/* text blocks that sit directly on the artwork get a soft cream pad */
.art-section .feature,
.art-section .flow,
.art-section .region { background: rgba(250,247,241,.74); border-radius: 8px; padding: var(--sp-2); }
@media (max-width: 899px) {
  section.art-section::before {
    background: linear-gradient(180deg, rgba(250,247,241,.96) 0%, rgba(250,247,241,.86) 100%);
  }
}
.about-lead { max-width: 80ch; color: var(--ink-soft); }
.feature-grid, .line-grid, .source-grid, .flow-grid, .trust-grid { display: grid; gap: var(--sp-3); }
.feature-grid { grid-template-columns: repeat(3, 1fr); margin-top: var(--sp-3); }
.feature { border-top: 2px solid var(--line); padding-top: var(--sp-2); }
.feature-no { color: var(--brand-2); font-weight: 800; font-size: var(--t-xs); }
.feature h3 { margin: 6px 0; }
.feature p { color: var(--ink-soft); font-size: var(--t-sm); margin: 0; }
.answer-block { margin-top: var(--sp-4); background: var(--surface-2); border-left: 4px solid var(--brand-2); padding: var(--sp-3); border-radius: 0 var(--radius) var(--radius) 0; }
.answer-block h3 { margin: 0 0 8px; }
.answer-block p { margin: 0; max-width: 85ch; }
.line-grid { grid-template-columns: repeat(4, 1fr); margin-top: var(--sp-3); }
.line-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); }
.line-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); font-weight: 800; font-size: var(--t-xs); }
.line-card h3 { margin: 8px 0; }
.line-card p { color: var(--ink-soft); font-size: var(--t-sm); }
.line-card ul { padding-left: 18px; color: var(--ink-soft); font-size: var(--t-sm); }
.part-strip { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.part-strip p { color: var(--ink-soft); font-size: var(--t-sm); }
.source-grid { grid-template-columns: repeat(3, 1fr); margin: var(--sp-3) 0 var(--sp-4); }
.source-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: var(--sp-3); }
.source-card h3 { margin: 0 0 6px; }
.source-card p { color: var(--ink-soft); font-size: var(--t-sm); margin: 0; }
.sub-head { margin: 0 0 var(--sp-2); }
.flow-grid { grid-template-columns: repeat(4, 1fr); }
.flow { border-top: 2px solid var(--brand); padding-top: var(--sp-2); }
.flow-no { color: var(--accent); font-weight: 800; }
.flow h4 { margin: 6px 0; }
.flow p { color: var(--ink-soft); font-size: var(--t-sm); margin: 0; }
.trust-grid { grid-template-columns: repeat(4, 1fr); margin-bottom: var(--sp-4); }
.trust { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-3); background: var(--surface); }
.trust b { display: block; font-size: var(--t-2xl); color: var(--brand); }
.trust span { color: var(--ink-soft); font-size: var(--t-sm); }
.contact-section { padding: var(--sp-5) 0; background: var(--surface-2); }
.contact-section .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: var(--sp-5); align-items: start; }
.contact-intro h2 { margin: var(--sp-2) 0 var(--sp-3); font-size: var(--t-xl); color: var(--brand); line-height: 1.25; }
.contact-intro > p { color: var(--ink-soft); margin: 0 0 var(--sp-3); }
.contact-points { list-style: none; padding: 0; margin: 0; }
.contact-points li { position: relative; padding: 10px 0 10px 30px; border-top: 1px solid var(--line); color: var(--ink); font-size: var(--t-sm); }
.contact-points li::before { content: "✓"; position: absolute; left: 4px; top: 10px; color: var(--ok); font-weight: 800; }
.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.contact-form .field.wide { grid-column: 1 / -1; }
.contact-form .wide-field { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.contact-form .field label { font-weight: 700; font-size: var(--t-sm); margin-bottom: 6px; }
.contact-form .field input, .contact-form .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: var(--t-base); color: var(--ink); background: var(--surface-2); outline: none; resize: vertical; }
.contact-form .field input:focus, .contact-form .field textarea:focus { border-color: var(--brand-2); background: #fff; }
.contact-form .hint { display: block; margin-top: 5px; font-size: var(--t-xs); color: var(--ink-soft); }
.contact-form .actions .btn { width: 100%; }
.form-status { grid-column: 1 / -1; margin: 0; padding: 11px 13px; border-radius: 6px; background: #eef7f2; color: var(--ok); font-size: var(--t-sm); }
.form-status.error { background: #fdf0ee; color: #9c3b27; }
.btn-contact { background: #fff; color: var(--brand); }
.btn-contact:hover { background: #e8eef3; color: var(--brand); }

/* ---------- responsive: 599 / 899 / 1199 ---------- */
@media (max-width: 1199px) {
  .grid-4, .steps, .verdict, .line-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 899px) {
  .hero-grid, .rfq-layout { grid-template-columns: 1fr; }
  .rfq-layout { gap: var(--sp-4); }
  .contact-section .wrap { grid-template-columns: 1fr; gap: var(--sp-4); }
  .brand-logo { max-width: 240px; margin: 0 auto; }
  .feature-grid, .line-grid, .source-grid, .flow-grid, .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .grid-2, .regions { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-row { flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-2); padding-bottom: var(--sp-2); min-width: 0; }
  .nav-links { flex: 1 1 100%; width: 100%; min-width: 0; margin-left: 0; justify-content: flex-start; flex-wrap: wrap; gap: 8px 14px; }
}
@media (max-width: 599px) {
  :root { --t-3xl: 2rem; --t-2xl: 1.625rem; --sp-6: 40px; --sp-5: 32px; }
  .home-hero h1 { font-size: 2rem; max-width: none; overflow-wrap: anywhere; }
  .home-hero::after { display: none; }
  .feature-grid, .line-grid, .source-grid, .flow-grid, .trust-grid, .hero-stats { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--sp-2); }
  .grid-2, .grid-3, .grid-4, .steps, .verdict, .regions, .form-grid, .contact-form { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: var(--sp-2); }
  .cta-band .wrap { flex-direction: column; align-items: flex-start; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* table pagination for large catalogs */
.table-pager { display: flex; align-items: center; justify-content: center; gap: var(--sp-3); margin: var(--sp-3) 0; flex-wrap: wrap; }
.table-pager .pg-info { font-size: var(--t-sm); color: var(--ink-soft); }
.table-pager .pg-nums { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.table-pager .pg-num { min-width: 34px; height: 34px; padding: 0 8px; font: inherit; font-size: var(--t-sm); color: var(--brand); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.table-pager .pg-num:hover { border-color: var(--brand); background: var(--surface-2); }
.table-pager .pg-num.is-current { background: var(--brand); color: #fff; border-color: var(--brand); cursor: default; }
.table-pager .pg-dots { color: var(--ink-soft); padding: 0 2px; }
.table-pager .pg-current { font-size: var(--t-sm); font-weight: 700; color: var(--ink); }
.table-pager .pg-jump { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); color: var(--ink-soft); }
.table-pager .pg-input { width: 64px; height: 34px; padding: 4px 8px; font: inherit; font-size: var(--t-sm); text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.table-pager .pg-go { padding: 6px 12px; }
@media (max-width: 899px) {
  .table-pager { gap: 8px; }
  .table-pager .pg-nums { order: 3; width: 100%; }
}
.table-pager .pg-btn { background: var(--surface); color: var(--brand); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; font: inherit; font-size: var(--t-sm); font-weight: 700; cursor: pointer; }
.table-pager .pg-btn:hover:not(:disabled) { border-color: var(--brand); background: var(--surface-2); }
.table-pager .pg-btn:disabled { opacity: .45; cursor: default; }

/* DDR generation badges in part-number tables */
.cat-table .ddr-badge { display: inline-block; vertical-align: 1px; margin-right: 5px; padding: 1px 6px; border-radius: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; font-weight: 800; letter-spacing: .04em; line-height: 1.5; white-space: nowrap; }
.cat-table .ddr-badge.ddr4 { background: #e8f1ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.cat-table .ddr-badge.ddr5 { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }

/* Homepage stock lookup: centered, wide search bar above the ABOUT heading */
.stock-lookup { position: relative; z-index: 2; max-width: 860px; margin: 0 auto var(--sp-3); padding: 12px 14px 8px; background: rgba(255,255,255,.82); border: 1px solid rgba(77,53,29,.16); border-radius: 10px; box-shadow: 0 14px 34px rgba(77,53,29,.10); backdrop-filter: blur(4px); }
.stock-form { position: relative; min-width: 0; }
.stock-row { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid rgba(77,53,29,.22); border-radius: 6px; padding: 7px; box-shadow: 0 4px 12px rgba(77,53,29,.08); }
.stock-row .ps-icon { margin-left: 8px; }
.stock-row input[type="search"] { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 14px 10px; font-size: var(--t-base); color: var(--ink); }
.stock-row input[type="search"]::placeholder { color: #8b8379; }
.stock-row .btn-primary { flex: 0 0 auto; background: var(--accent); min-width: 120px; }
.stock-row .btn-primary:hover { background: #382615; }
.stock-note { margin: 7px 2px 0; font-size: 11px; color: #7a6f63; line-height: 1.5; text-align: center; }
.stock-results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 6px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 0 0 8px 8px; box-shadow: 0 16px 36px rgba(0,0,0,.18); max-height: 420px; overflow: auto; }
.stock-count, .stock-empty { padding: 9px 13px; font-size: var(--t-xs); color: var(--ink-soft); border-bottom: 1px solid var(--surface-2); }
.stock-empty a, .stock-all { color: var(--brand-2); font-weight: 700; text-decoration: none; }
.stock-all { display: block; padding: 9px 13px; font-size: var(--t-xs); border-top: 1px solid var(--surface-2); }
.stock-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 13px; border-bottom: 1px solid var(--surface-2); }
.stock-item:last-of-type { border-bottom: 0; }
.stock-item-main { min-width: 0; }
.stock-mpn { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--t-sm); font-weight: 800; color: var(--brand-2); text-decoration: none; overflow-wrap: anywhere; }
.stock-mpn:hover { text-decoration: underline; }
.stock-meta { display: block; font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.stock-qty { text-align: right; white-space: nowrap; }
.stock-qty b { display: block; font-size: var(--t-sm); color: var(--ink); }
.stock-qty span { font-size: 10px; color: #6b6054; }
.stock-view { font-size: var(--t-xs); font-weight: 700; color: var(--accent); text-decoration: none; white-space: nowrap; }
.stock-view:hover { text-decoration: underline; }
@media (max-width: 899px) {
  .stock-lookup { max-width: 100%; }
  .stock-results { position: static; margin-top: 8px; border-radius: 8px; }
}
