/* Kakobuy Find Spreadsheet -- design tokens & site chrome
   Light-blue research-utility direction (not a WooCommerce clone):
   soft blue base, charcoal type, Kakobuy red-orange for actions,
   a deep navy gradient reserved for the hero, soft green for QC. */

:root {
  --bg: #f6f9fd;
  --bg-alt: #eef4fb;
  --surface: #ffffff;
  --ink: #1c2536;
  --ink-soft: #4d5b73;
  --ink-faint: #7c899e;
  --line: #e2eaf3;
  --line-soft: #ecf1f8;
  --brand: #ff4934;
  --brand-dark: #e13a27;
  --brand-tint: #fff1ee;
  --good: #2f8c68;
  --good-tint: #eaf6f0;
  --good-dark: #226b4f;
  --focus: #1f6fb2;
  --navy-deep: #0b1b3a;
  --navy: #1e4073;
  --navy-light: #2f5fa3;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(35,32,30,.06);
  --shadow: 0 8px 24px rgba(35,32,30,.08);
  --shadow-lg: 0 20px 48px rgba(35,32,30,.14);
  --header-h: 72px;
  --maxw: 1180px;
  --maxw-narrow: 760px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 14px); }
section[id] { scroll-margin-top: calc(var(--header-h) + 14px); }
/* overflow-x:hidden on body (not just html) breaks position:sticky for
   descendants like the header -- body becomes its own scroll container that
   never actually receives the page's scroll offset, so sticky elements
   inside it stop tracking the viewport. Keep the safety net on html only. */
html { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--navy-deep); color: #fff;
  padding: 10px 16px; border-radius: var(--radius-sm); z-index: 1000; transition: top .15s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .95rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-good { background: var(--good); color: #fff; }
.btn-good:hover { background: var(--good-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.ext-mark { font-size: .8em; opacity: .7; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200; background: rgba(250,247,242,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line); height: var(--header-h);
}
.header-row { display: flex; align-items: center; gap: 20px; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; margin-right: 8px; }
.logo img { height: 26px; width: auto; }
.logo-accent { font-weight: 600; color: var(--ink-soft); font-size: .82em; margin-left: 4px; }
.primary-nav { display: flex; align-items: center; gap: 30px; flex: 1; }
.nav-link { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-soft); padding: 8px 2px; border-bottom: 2px solid transparent; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); border-color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.quick-nav { display: none; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink-faint); }
.lang-switch { position: relative; }
.lang-btn {
  height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: .82rem; cursor: pointer; color: var(--ink);
}
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; min-width: 168px;
  display: grid; gap: 2px; max-height: 320px; overflow-y: auto; z-index: 50;
}
.lang-menu[aria-hidden="true"] { display: none; }
.lang-menu button {
  border: 0; background: transparent; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--ink);
}
.lang-menu button:hover { background: var(--bg-alt); }
.header-spreadsheet-cta {
  background: var(--brand); color: #fff; text-decoration: none; font-weight: 800; font-size: .92rem;
  padding: 11px 22px; border-radius: 999px; white-space: nowrap;
}
.header-spreadsheet-cta:hover { background: var(--brand-dark); }
.desktop-only { }
.menu-toggle { display: none; }

/* mobile drawer */
.drawer { position: fixed; inset: 0; z-index: 300; visibility: hidden; }
.drawer[aria-hidden="false"] { visibility: visible; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(20,18,16,.4); opacity: 0; transition: opacity .18s; }
.drawer[aria-hidden="false"] .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(84vw, 340px); background: var(--surface);
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .2s ease; padding: 18px;
  display: flex; flex-direction: column; overflow-y: auto;
}
.drawer[aria-hidden="false"] .drawer-panel { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-nav { display: grid; gap: 4px; }
.drawer-nav a, .drawer-search-btn {
  padding: 12px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600;
  border: 0; background: transparent; text-align: left; font: inherit; font-size: 1rem; cursor: pointer;
}
.drawer-nav a:hover, .drawer-search-btn:hover { background: var(--bg-alt); }

/* search overlay */
.search-panel { position: fixed; inset: 0; z-index: 300; visibility: hidden; }
.search-panel[aria-hidden="false"] { visibility: visible; }
.search-backdrop { position: absolute; inset: 0; background: rgba(20,18,16,.4); opacity: 0; transition: opacity .18s; }
.search-panel[aria-hidden="false"] .search-backdrop { opacity: 1; }
.search-box {
  position: relative; max-width: 560px; margin: 12vh auto 0; background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; transform: translateY(-12px); opacity: 0; transition: all .18s ease;
}
.search-panel[aria-hidden="false"] .search-box { transform: translateY(0); opacity: 1; }
.search-hint { color: var(--ink-faint); font-size: .88rem; margin-top: 10px; }
.search-hint a { color: var(--brand); font-weight: 700; text-decoration: none; }

/* product finder form (header search + hero + footer) */
.search-form { display: flex; gap: 10px; min-width: 0; }
.search-form input[type="search"], .search-form input[type="text"] {
  flex: 1; min-width: 0; height: 48px; border-radius: 999px; border: 1.5px solid var(--line); padding: 0 20px; font: inherit;
  font-size: 1rem; background: var(--surface); color: var(--ink);
}
.search-form input:focus { border-color: var(--brand); }
.search-form .btn { height: 48px; }

/* ---------- hero (fixed dark-navy gradient, independent of light/dark theme) ---------- */
.hero { position: relative; padding: 56px 0 48px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-light) 100%);
}
.hero-grid { display: flex; justify-content: center; }
.hero-col-text { min-width: 0; max-width: 700px; width: 100%; }
.hero .eyebrow { color: #ffd9cf; }
.hero h1 { font-size: clamp(2rem, 3.4vw, 2.7rem); line-height: 1.14; margin: 0 0 18px; letter-spacing: -.01em; color: #fff; }
.hero .hero-copy p { color: rgba(255,255,255,.82); font-size: 1.06rem; }
.hero .hero-copy strong { color: #fff; }
.hero-search-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-top: 22px; box-shadow: var(--shadow-lg); }
.hero-search-card .search-hint { margin-top: 12px; }
.hero-secondary { margin-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-secondary a { color: rgba(255,255,255,.82); font-weight: 700; text-decoration: none; font-size: .92rem; }
.hero-secondary a:hover { color: #fff; }

/* route cards */
.route-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.route-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; min-height: 168px;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.route-card:hover { box-shadow: var(--shadow); border-color: var(--ink-faint); transform: translateY(-2px); }
.route-num { font-weight: 800; color: var(--brand); font-size: .82rem; }
.route-card h3 { margin: 0; font-size: 1.02rem; }
.route-card p { margin: 0; color: var(--ink-soft); font-size: .88rem; flex: 1; }
.route-action { font-weight: 700; font-size: .84rem; color: var(--ink); }

/* section rhythm */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-tight { padding: 36px 0; }
.section > .wrap > h2, .section > .wrap-narrow > h2 { font-size: 1.7rem; margin: 0 0 8px; }
.section .lead { color: var(--ink-soft); max-width: 62ch; margin: 0 0 28px; }

/* category grid -- simplified image + name cards, 2 rows of 8 on desktop,
   matching w2cspreadsheet.net's own category-card layout */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; align-items: center;
  padding: 14px 10px 12px; text-align: center; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.cat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--ink-faint); }
.cat-media { width: 100%; aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.cat-media img { width: 100%; height: 100%; object-fit: contain; }
.qc-flag {
  position: absolute; top: 4px; left: 4px; background: var(--good); color: #fff; font-size: .6rem; font-weight: 800;
  padding: 3px 7px; border-radius: 999px; letter-spacing: .02em; z-index: 1;
}
.cat-body { padding: 10px 2px 0; }
.cat-body strong { font-size: .86rem; line-height: 1.3; }

/* product grid (featured finds) */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-media { aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line-soft); }
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.product-body strong { font-size: .92rem; line-height: 1.3; }
.product-meta { font-size: .76rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .03em; }
.price { font-weight: 800; color: var(--ink); margin-top: 2px; }
.price .muted { font-weight: 600; color: var(--ink-faint); font-size: .78em; }
.view-link { margin-top: 6px; font-weight: 700; font-size: .84rem; color: var(--brand); }

/* ---------- prose / article ---------- */
.article-layout { padding: 40px 0 80px; }
.prose-wrap { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.prose h2 { font-size: 1.5rem; margin: 44px 0 14px; letter-spacing: -.005em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.18rem; margin: 30px 0 10px; }
.prose h4 { font-size: 1.02rem; margin: 22px 0 8px; }
.prose p { margin: 0 0 16px; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: 20px 0; padding: 14px 20px; background: var(--bg-alt); border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft); font-style: italic;
}
.prose blockquote p { margin: 0; }
.prose a { color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(255,73,52,.35); }
.prose a:hover { text-decoration-color: var(--brand); }
.prose code { background: var(--bg-alt); padding: .12em .4em; border-radius: 5px; font-size: .9em; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.content-photo {
  margin: 24px 0; padding: 0; max-width: 420px;
}
.content-photo img {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--line); display: block;
}
.content-photo figcaption { margin-top: 8px; font-size: .84rem; color: var(--ink-faint); }
.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 460px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th { background: var(--bg-alt); font-weight: 700; color: var(--ink); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.16; margin: 0 0 18px; letter-spacing: -.01em; }

.breadcrumb { padding: 18px 20px 0; font-size: .84rem; color: var(--ink-faint); max-width: var(--maxw); margin: 0 auto; }
.breadcrumb a { color: var(--ink-faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .sep { margin: 0 8px; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 28px 0; }
.toc strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.1em; columns: 2; gap: 20px; }
.toc a { text-decoration: none; color: var(--ink); font-size: .92rem; }
.toc a:hover { color: var(--brand); }

/* ---------- special framework components ---------- */

/* Search Aperture funnel */
.aperture-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 22px 0 8px; }
.aperture-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; text-align: center; position: relative; }
.aperture-step .n { display: block; font-size: .72rem; font-weight: 800; color: var(--brand); margin-bottom: 6px; }
.aperture-step code { background: var(--bg-alt); font-size: .84rem; }
.aperture-step:not(:last-child)::after {
  content: "\2192"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); font-weight: 700;
}

/* Link Fingerprint strip (auto-fit so a 3-, 5- or 6-item strip both balance) */
.fingerprint-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 22px 0; }
.fingerprint-chip { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.fingerprint-chip .label { display: block; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); margin-bottom: 6px; }
.fingerprint-chip p { margin: 0; font-size: .86rem; color: var(--ink-soft); }

/* QC Evidence Sequence stepper */
.qc-sequence { counter-reset: qc; margin: 26px 0; border-left: 3px solid var(--good); padding-left: 0; list-style: none; }
.qc-step { position: relative; padding: 4px 0 30px 34px; }
.qc-step:last-child { padding-bottom: 4px; }
.qc-step::before {
  counter-increment: qc; content: counter(qc); position: absolute; left: -16px; top: 0; width: 30px; height: 30px;
  background: var(--good); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .88rem;
}
.qc-step h3 { margin: 0 0 6px; font-size: 1.08rem; }
.qc-step p, .qc-step ul { color: var(--ink-soft); font-size: .93rem; }

/* Parcel Footprint quadrant */
.footprint-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.footprint-box { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: var(--radius-sm); padding: 16px; }
.footprint-box strong { display: block; margin-bottom: 6px; }
.footprint-box p { margin: 0; font-size: .86rem; color: var(--ink-soft); }

/* Fit Delta worksheet */
.delta-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: var(--good-tint); color: var(--good-dark); font-weight: 800; font-size: .82rem; }

/* Evidence comparison table styling handled by generic table rules; add emphasis class */
.evidence-table th:first-child, .evidence-table td:first-child { font-weight: 700; }

/* Direct Answers / FAQ accordion */
.article-faq, .home-faq { margin-top: 44px; }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-item button {
  width: 100%; text-align: left; padding: 15px 46px 15px 18px; background: transparent; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .98rem; color: var(--ink); position: relative;
}
.faq-item button::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--brand); font-weight: 400;
}
.faq-item button[aria-expanded="true"]::after { content: "\2212"; }
.faq-body { padding: 0 18px 16px; color: var(--ink-soft); font-size: .93rem; }
.faq-body[hidden] { display: none; }

/* related links */
.related-guides { margin-top: 48px; }
.related-guides h2 { font-size: 1.3rem; margin-bottom: 14px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.guide-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none;
  color: var(--ink); display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, transform .15s;
}
.guide-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.guide-card strong { font-size: .96rem; }
.guide-card span:not(.guide-action) { font-size: .84rem; color: var(--ink-soft); }
.guide-action { font-weight: 700; font-size: .82rem; color: var(--brand); margin-top: auto; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.prev-next a { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); display: block; }
.prev-next a:last-child { text-align: right; }
.prev-next span { display: block; font-size: .76rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; }
.prev-next strong { font-size: .95rem; }

/* guides hub problem groups */
.problem-group { margin: 30px 0 40px; }
.problem-group h2 { font-size: 1.2rem; background: var(--bg-alt); display: inline-block; padding: 6px 16px; border-radius: 999px; margin-bottom: 16px; }

/* ---------- final CTA ---------- */
.final-cta { padding: 56px 0 72px; }
.final-cta .wrap {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy)); color: #fff; border-radius: var(--radius-lg);
  padding: 44px 40px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.final-cta h2 { margin: 0 0 8px; font-size: 1.5rem; color: #fff; }
.final-cta p { color: rgba(255,255,255,.78); margin: 0; max-width: 46ch; }
.final-cta .btn-ghost { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.final-cta .btn-ghost:hover { border-color: #fff; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 52px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; padding-bottom: 40px; }
.footer-brand-col p.footer-tagline { color: var(--ink-soft); font-size: .9rem; max-width: 34ch; margin: 14px 0 16px; }
.footer-whatsapp { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--brand); text-decoration: none; font-size: .9rem; }
.footer-whatsapp:hover { text-decoration: underline; }
.footer-col h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin: 0 0 14px; }
.footer-col nav { display: grid; gap: 10px; }
.footer-col a { text-decoration: none; color: var(--ink-soft); font-size: .92rem; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line-soft); padding: 18px 0; }
.footer-bottom p { margin: 0; font-size: .84rem; color: var(--ink-faint); }
.footer-bottom a { color: var(--ink-faint); text-decoration: none; }
.footer-bottom a:hover { color: var(--brand); }

.back-top {
  position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer; display: none; align-items: center; justify-content: center;
  color: var(--ink); z-index: 100;
}
.back-top.is-visible { display: flex; }

/* ---------- error page ---------- */
.page-hero { padding: 60px 0 20px; text-align: center; }
.error-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px 0 10px; }
.error-action {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: left;
  text-decoration: none; color: var(--ink); cursor: pointer; font: inherit; display: block;
}
.error-action strong { display: block; margin-bottom: 6px; }
.error-action span { font-size: .86rem; color: var(--ink-soft); }
.error-action:hover { box-shadow: var(--shadow); }

/* mini label used for search hints etc */
.mini-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 700; margin: 0 0 10px; }

/* google translate mount point (kept invisible; no top banner) */
#google_translate_element { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.goog-te-banner-frame, .skiptranslate > iframe { display: none !important; }
body { top: 0 !important; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .route-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .aperture-steps, .fingerprint-strip { grid-template-columns: repeat(3, 1fr); }
  .footprint-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .primary-nav, .header-spreadsheet-cta.desktop-only, .search-toggle.desktop-only { display: none; }
  .menu-toggle { display: inline-flex; }
  .quick-nav { display: flex; align-items: center; gap: 16px; margin-right: 4px; }
  .quick-link { text-decoration: none; font-weight: 700; font-size: .88rem; color: var(--ink); }
}
@media (max-width: 760px) {
  .wrap, .wrap-wide { padding: 0 16px; }
  .route-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .aperture-steps, .fingerprint-strip { grid-template-columns: 1fr 1fr; }
  .aperture-step::after { display: none; }
  .footprint-grid { grid-template-columns: 1fr; }
  .error-actions { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .prev-next { grid-template-columns: 1fr; }
  .prev-next a:last-child { text-align: left; }
  .final-cta .wrap { padding: 32px 24px; }
}
@media (max-width: 480px) {
  :root { --header-h: 64px; }
  .cat-grid, .product-grid, .route-grid { grid-template-columns: 1fr 1fr; }
  .cat-body strong { font-size: .82rem; }
  .hero { padding: 36px 0 32px; }
  .section { padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  /* Header must fit "Kakobuy | Home | Spreadsheet | Language | Menu" without
     horizontal overflow at narrow widths -- drop the wordmark's text half
     (the K-mark logo image alone still reads as the brand) and tighten
     spacing rather than truncating any of the required controls. */
  .header-row { gap: 8px; }
  .logo { margin-right: 0; gap: 0; }
  .logo-accent { display: none; }
  .header-actions { gap: 6px; }
  .quick-nav { gap: 10px; }
  .quick-link { font-size: .82rem; }
  .lang-btn { padding: 0 10px; font-size: .76rem; height: 36px; }
  .menu-toggle, .icon-btn { width: 36px; height: 36px; }
}

/* Intentionally no @media (prefers-color-scheme: dark) override: the site
   always renders this one light-blue palette regardless of the visitor's
   OS/browser theme, so the design stays predictable and consistent. */
