/* kakobuy-s.net -- original design system for this site only.
   Colors, radii and component set follow this project's own style spec;
   nothing here is copied from any sibling project. */

:root {
  --bg: #ECECE7;
  --surface: #FAF9F7;
  --ink: #171717;
  --ink-soft: #666666;
  --border: #D9D9D3;
  --accent: #FF4B1F;
  --accent-action: #D9360F;
  --accent-dark: #C9310E;
  --accent-tint: #FBE4DC;
  --focus: #1C64F2;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 14px;
  --shadow-soft: 0 8px 24px rgba(23, 23, 23, 0.06);
  --header-h: 70px;
  --max: 1220px;
  --max-narrow: 800px;
  --max-wide: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--max-wide); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 0; top: -999px; background: var(--accent-action); color: #fff;
  padding: 10px 16px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 247, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex; align-items: center; gap: 20px;
  height: var(--header-h);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; flex-shrink: 0; }
.logo img { width: 26px; height: 26px; }
.logo span.brand { color: #FF2840; }
.primary-nav { display: flex; gap: 4px; margin-right: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.primary-nav::-webkit-scrollbar { display: none; }
.nav-link { padding: 9px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 600; color: var(--ink-soft); }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); background: var(--surface); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
/* Language switcher: a dropdown listing every supported locale. Linking to a
   page that has no translation yet falls back to that locale's homepage
   (see pageAlternates resolution in build.mjs / layout.mjs). */
.lang-switch { position: relative; }
.lang-switch-trigger {
  display: inline-flex; align-items: center; gap: 5px; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); border-radius: 999px;
  height: 40px; padding: 0 14px; font-weight: 700; font-size: 13px; color: var(--ink-soft); cursor: pointer;
}
.lang-switch-trigger:hover { border-color: var(--accent); color: var(--accent-dark); }
.lang-switch-panel {
  position: absolute; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-soft); padding: 6px; display: flex; flex-direction: column;
  min-width: 160px; z-index: 120;
}
.lang-switch-panel[hidden] { display: none; }
html[dir="ltr"] .lang-switch-panel, .lang-switch-panel { left: 0; }
html[dir="rtl"] .lang-switch-panel { left: auto; right: 0; }
.lang-switch-option { padding: 9px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.lang-switch-option:hover { background: var(--accent-tint); color: var(--accent-dark); }
.lang-switch-option.is-current { background: var(--bg); color: var(--accent-dark); }
.header-spreadsheet-cta {
  background: var(--accent-action); color: #fff; font-weight: 700; font-size: 14px;
  height: 40px; display: inline-flex; align-items: center; padding: 0 18px; border-radius: 999px;
}
.header-spreadsheet-cta:hover { background: var(--accent-dark); }
.header-shipping-calc {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--ink); font-weight: 700; font-size: 13.5px; white-space: nowrap;
}
.header-shipping-calc:hover { border-color: var(--accent); color: var(--accent-dark); }
.header-shipping-calc svg { flex-shrink: 0; }
.quick-nav { display: none; }
.desktop-only { }
.mobile-menu-btn { display: none; }

@media (max-width: 1100px) {
  .header-shipping-calc { width: 40px; padding: 0; justify-content: center; }
  .header-shipping-calc .label-text { display: none; }
}

@media (max-width: 900px) {
  .primary-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .desktop-only { display: none; }
  .quick-nav { display: flex; align-items: center; gap: 2px; margin-right: auto; }
  .quick-link { font-weight: 700; font-size: 13.5px; padding: 6px 4px; border-radius: 999px; white-space: nowrap; }
  .quick-link:hover { background: var(--surface); }
  .header-row { gap: 6px; }
  .header-actions { gap: 6px; }
  .wrap { padding: 0 14px; }
  .logo { font-size: 15px; gap: 6px; }
  .logo img { width: 22px; height: 22px; }
  .lang-switch-trigger { padding: 0 10px; font-size: 12px; height: 36px; }
  .icon-btn { width: 36px; height: 36px; }
  .header-spreadsheet-cta { height: 36px; padding: 0 12px; font-size: 13px; }
  /* 44px, not 36px like the other icon-circles here: this is the one-tap
     Calculator entry point, so it keeps a full touch-target size even
     though it's icon-only at this width. */
  .header-shipping-calc { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .header-shipping-calc .label-text { display: none; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 8px; }
  .logo { font-size: 13px; gap: 4px; }
  .logo img { width: 19px; height: 19px; }
  .quick-link { padding: 5px 2px; font-size: 12.5px; }
  .lang-switch-trigger { padding: 0 6px; font-size: 11px; height: 32px; }
  .icon-btn { width: 32px; height: 32px; }
  .logo .brand { display: none; }
  .quick-link { font-size: 12px; padding: 4px 2px; }
  .header-spreadsheet-cta { display: inline-flex; height: 32px; padding: 0 7px; font-size: 11px; flex: 0 0 auto; }
  .header-shipping-calc { width: 40px; height: 40px; }
  .header-row { gap: 2px; }
  /* 0, not 2px: the Shipping Calc touch target grew to 44px for tap-size
     compliance, so this pays for it back without touching global .wrap
     padding or shrinking any other control below its own breakpoint size. */
  .header-actions { gap: 0; }
}

@media (max-width: 480px) {
  .hero-search-card .search-form { flex-direction: column; }
  .hero-search-card .search-form input { width: 100%; }
  .hero-search-card .search-form button { width: 100%; }
}

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 150; display: none; }
.drawer[data-open] { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(23,23,23,0.4); }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(340px, 86vw);
  background: var(--surface); box-shadow: -12px 0 30px rgba(0,0,0,0.15);
  padding: 18px; overflow-y: auto;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a {
  padding: 12px 10px; border-radius: 10px; font-weight: 600; font-size: 15px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink);
}
.drawer-nav a:hover { background: var(--accent-tint); color: var(--accent-dark); }

/* Search overlay */
.search-panel { position: fixed; inset: 0; z-index: 160; display: none; }
.search-panel[data-open] { display: block; }
.search-backdrop { position: absolute; inset: 0; background: rgba(23,23,23,0.45); }
.search-box {
  position: relative; max-width: 560px; margin: 12vh 16px 0; background: var(--surface);
  border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-soft);
}
@media (min-width: 592px) { .search-box { margin: 12vh auto 0; } }
.search-hint { color: var(--ink-soft); font-size: 13px; margin: 10px 0 0; }
.search-form { display: flex; gap: 8px; }
.search-form input {
  flex: 1; min-width: 0; height: 52px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  padding: 0 16px; font-size: 15px; background: var(--bg);
}
.search-form input:focus { border-color: var(--accent); background: var(--surface); }
@media (max-width: 420px) {
  .search-form { flex-direction: column; }
  .search-form button { width: 100%; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 15px;
  line-height: 1.25; text-align: center; border: 1px solid transparent; cursor: pointer; white-space: normal;
}
.btn-primary { background: var(--accent-action); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.ext-mark { font-size: 12px; opacity: 0.65; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 72px;
  background: linear-gradient(180deg, #0B1430 0%, #111A3A 100%);
  color: #fff;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent-dark); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 10px; }
.hero .eyebrow { color: #FF8A5C; }
.hero h1 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 18px; color: #fff; }
.hero-copy { color: var(--ink-soft); font-size: 17px; max-width: 60ch; }
.hero .hero-copy { color: #AEB8D6; }
.hero-secondary a { color: #AEB8D6; }
.hero-secondary a:hover { color: #fff; }
.hero-search-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-soft); margin-top: 24px;
}
.hero-search-card .search-form input { height: 64px; font-size: 16px; }
.hero-secondary { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-weight: 600; font-size: 14.5px; }
.hero-secondary a:hover { color: var(--accent-dark); }
.hero-media { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: #fff; aspect-ratio: 1/1; position: relative; }
.hero-slide { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 20px; }
.hero-slide[data-active] { display: block; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 32px 0 48px; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 40px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: clamp(24px, 2.6vw, 32px); font-weight: 750; letter-spacing: -0.01em; margin: 0 0 10px; }
.lead { color: var(--ink-soft); font-size: 16.5px; max-width: 72ch; margin: 0 0 32px; }
@media (max-width: 640px) { .section { padding: 48px 0; } }

/* Door cards (homepage) */
.door-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.door-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, transform .15s;
}
.door-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.door-num { font-size: 12px; font-weight: 800; color: var(--accent-dark); }
.door-card h3 { font-size: 17px; margin: 0; font-weight: 700; }
.door-card p { color: var(--ink-soft); font-size: 14px; margin: 0; flex: 1; }
.door-action { font-weight: 700; font-size: 14px; color: var(--accent-dark); }
@media (max-width: 900px) { .door-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .door-grid { grid-template-columns: 1fr; } }

/* Category grid — each tile is a real-W2C-destination card plus a separate
   local-guide link underneath (two distinct destinations, never nested). */
.cat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.cat-tile { display: flex; flex-direction: column; min-width: 0; }
.cat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: block; transition: border-color .15s, transform .15s;
}
.cat-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.cat-media { position: relative; display: block; aspect-ratio: 1/1; background: #fff; padding: 10px; }
.cat-media img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.cat-media-qc { padding: 0; background: #168a35; }
.cat-media-qc img { object-fit: cover; }
.qc-flag {
  position: absolute; top: 8px; left: 8px; background: #16A34A; color: #fff; font-size: 10.5px;
  font-weight: 800; padding: 4px 8px; border-radius: 999px; z-index: 2; letter-spacing: 0.02em;
}
.cat-body { display: block; padding: 12px 14px 16px; font-weight: 700; font-size: 14.5px; text-align: center; }
.cat-guide-link {
  display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  padding: 2px 2px;
}
.cat-guide-link:hover { color: var(--accent-dark); }
@media (max-width: 980px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* Homepage "Explore Categories" treatment: dark surface, dense 9-across grid,
   full catalog in one pass (W2C's own category-rail look, redone for our
   two-destination tile instead of copied). */
.section-categories {
  background: linear-gradient(180deg, #0B1430 0%, #111A3A 100%);
  border-top: none; border-bottom: none;
}
.section-categories h2 { color: #fff; }
.section-categories .lead { color: #AEB8D6; }
.section-categories .cat-guide-link { color: #8D98C2; }
.section-categories .cat-guide-link:hover { color: #fff; }
.cat-grid-wide { grid-template-columns: repeat(8, 1fr); gap: 10px; }
.cat-grid-wide .cat-body { padding: 8px 8px 10px; font-size: 12.5px; line-height: 1.25; min-height: 50px; }
.cat-grid-wide .cat-guide-link { font-size: 10.5px; line-height: 1.3; min-height: 32px; }
.cat-grid-wide .cat-media { padding: 6px; }
@media (max-width: 1100px) { .cat-grid-wide { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 760px) { .cat-grid-wide { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
@media (max-width: 480px) { .cat-grid-wide { grid-template-columns: repeat(3, 1fr); gap: 8px; } }

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: block; transition: border-color .15s, transform .15s;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-media { display: block; aspect-ratio: 1/1; background: #F1F1EE; }
.product-media img { width: 100%; height: 100%; object-fit: contain; object-position: center; background:#fff; padding:8px; }
.product-body { display: block; padding: 12px 14px 16px; }
.product-body strong { display: block; font-size: 13.5px; font-weight: 650; line-height: 1.35; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { color: var(--accent-dark); font-weight: 800; font-size: 15px; }
.muted { color: var(--ink-soft); font-weight: 500; font-size: 12px; }
.view-link { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); }
.product-card:hover .view-link { color: var(--accent-dark); }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* Checkpoints / method rail */
.checkpoint-rail { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; counter-reset: cp; }
.checkpoint {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px 16px; position: relative;
}
.checkpoint .n { font-size: 22px; font-weight: 800; color: var(--accent-dark); display: block; margin-bottom: 8px; }
.checkpoint h3 { font-size: 15px; margin: 0 0 6px; }
.checkpoint p { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
@media (max-width: 900px) { .checkpoint-rail { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .checkpoint-rail { grid-template-columns: 1fr; } }

/* Three-column decision cards */
.decision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.decision-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; }
.decision-card h3 { margin: 0 0 8px; font-size: 16px; }
.decision-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
@media (max-width: 780px) { .decision-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item button {
  width: 100%; text-align: left; background: none; border: 0; padding: 18px 4px; cursor: pointer;
  font-size: 16px; font-weight: 650; display: flex; justify-content: space-between; gap: 16px; color: var(--ink);
}
.faq-item button::after { content: "+"; color: var(--accent-dark); font-size: 20px; font-weight: 400; flex-shrink: 0; }
.faq-item button[aria-expanded="true"]::after { content: "\2212"; }
.faq-body { padding: 0 4px 18px; color: var(--ink-soft); font-size: 15px; max-width: 74ch; }
.faq-body[hidden] { display: none; }

/* ---------- Article layout ---------- */
.breadcrumb { max-width: var(--max-narrow); margin: 20px auto 0; padding: 0 24px; font-size: 13px; color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb .sep { margin: 0 6px; }
.article-layout { padding: 20px 0 80px; }
.prose-wrap { max-width: min(var(--max-narrow), 100%); margin: 0 auto; padding: 0 24px; min-width: 0; box-sizing: border-box; }
.prose-wrap .eyebrow { margin-top: 8px; }
.prose-wrap h1 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.01em; line-height: 1.14; margin: 0 0 20px; }
.prose { font-size: 16.5px; line-height: 1.68; color: #2A2A2A; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose p, .prose li, .prose a, .article-layout, .category-layout, .category-layout > * { min-width: 0; overflow-wrap: anywhere; }
html[lang="de"] .prose, html[lang="de"] .guide-card, html[lang="de"] .prose-wrap { hyphens: auto; }
.prose p { margin: 0 0 18px; }
.prose h2 { font-size: 23px; font-weight: 700; margin: 40px 0 14px; letter-spacing: -0.01em; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 26px 0 10px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose a { color: var(--accent-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.prose a.btn { text-decoration: none; font-weight: 700; }
.prose a.btn-primary { color: #fff; }
.prose a.btn-ghost { color: var(--ink); }
.prose code { background: var(--accent-tint); color: var(--accent-dark); padding: 1px 6px; border-radius: 6px; font-size: 0.92em; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; max-width: 100%; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface); font-weight: 700; }
.rule { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.direct-answer {
  background: var(--accent-tint); border: 1px solid #FFD9CB; border-radius: var(--radius-md);
  padding: 18px 20px; font-size: 16.5px; margin: 0 0 30px; color: #5A2711;
}
.direct-answer strong { color: var(--accent-dark); }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 20px; margin: 0 0 30px; }
.toc strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 18px; font-size: 14px; }
.toc li { margin-bottom: 6px; }

.article-faq { max-width: var(--max-narrow); margin: 40px auto 0; }
.related-guides { max-width: var(--max-narrow); margin: 48px auto 0; }
.related-guides h2 { font-size: 20px; margin: 0 0 16px; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.guide-card strong, .guide-card span { overflow-wrap: anywhere; }
.guide-card:hover { border-color: var(--accent); }
.guide-card strong { font-size: 15px; }
.guide-card span { font-size: 13.5px; color: var(--ink-soft); }
.guide-action { color: var(--accent-dark); font-weight: 700; margin-top: 4px; }
@media (max-width: 640px) { .guide-grid { grid-template-columns: 1fr; } }

.prev-next { max-width: var(--max-narrow); margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prev-next a { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: block; background: var(--surface); }
.prev-next a:last-child { text-align: end; }
html[dir="rtl"] .prev-next a:first-child { text-align: end; }
html[dir="rtl"] .prev-next a:last-child { text-align: start; }
.prev-next span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.prev-next strong { font-size: 14.5px; }
@media (max-width: 560px) { .prev-next { grid-template-columns: 1fr; } }

/* ---------- Bespoke guide/category components ---------- */

/* Query Ladder */
.ladder { display: flex; flex-direction: column; gap: 0; margin: 24px 0; }
.ladder-step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); }
.ladder-step:first-child { border-top: 0; }
.ladder-step .lvl { width: 44px; height: 44px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-dark); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.ladder-step h3 { margin: 2px 0 6px; font-size: 16px; }
.ladder-step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* Arrival Board */
.board-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius-md); }
.board-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.board-table th { background: var(--surface); text-align: left; padding: 12px 14px; font-weight: 700; border-bottom: 1px solid var(--border); }
.board-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--ink-soft); }
.gate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.gate-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; text-align: center; }
.gate-card .mark { width: 32px; height: 32px; border-radius: 999px; background: var(--accent-action); color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; font-weight: 800; }
.gate-card h3 { font-size: 14.5px; margin: 0; }
@media (max-width: 780px) { .gate-grid { grid-template-columns: repeat(2, 1fr); } }

/* Parcel Cost Stack */
.cost-stack { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.cost-layer { display: grid; grid-template-columns: 140px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; align-items: start; }
.cost-layer .layer-tag { font-weight: 800; color: var(--accent-dark); font-size: 13px; }
.cost-layer h3 { margin: 0 0 6px; font-size: 15.5px; }
.cost-layer p { margin: 0; color: var(--ink-soft); font-size: 14px; }
@media (max-width: 640px) { .cost-layer { grid-template-columns: 1fr; } .cost-layer .layer-tag { padding-bottom: 4px; } }

/* Parcel Brief / role tags */
.brief-card { background: var(--accent-tint); border: 1px solid #FFD9CB; border-radius: var(--radius-md); padding: 20px; margin: 20px 0; font-size: 16px; color: #5A2711; font-weight: 600; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.role-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; background: var(--surface); }
.role-card .tag { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-dark); margin-bottom: 8px; }
.role-card p { margin: 0; font-size: 14px; color: var(--ink-soft); }
@media (max-width: 780px) { .role-grid { grid-template-columns: 1fr; } }

/* Scan Story timeline */
.timeline { position: relative; margin: 24px 0; padding-left: 28px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 22px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ""; position: absolute; left: -34px; top: 4px; width: 12px; height: 12px; border-radius: 999px; background: var(--accent-dark); }
.timeline-item h3 { margin: 0 0 4px; font-size: 15.5px; }
.timeline-item p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* Evidence formula */
.formula-box { background: #111; color: #fff; border-radius: var(--radius-md); padding: 22px; margin: 24px 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.formula-box .hl { color: #FFB199; }
.example-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 20px 0; }
.example-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; background: var(--surface); }
.example-card .who { font-weight: 800; font-size: 12.5px; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.example-card p { margin: 0; font-size: 14.5px; font-style: italic; }
@media (max-width: 640px) { .example-grid { grid-template-columns: 1fr; } }

/* Classification card */
.class-card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 22px; margin: 24px 0; }
.class-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 12px 0; border-top: 1px dashed var(--border); }
.class-row:first-child { border-top: 0; padding-top: 0; }
.class-row strong { font-size: 14.5px; }
.class-row span { color: var(--ink-soft); font-size: 14.5px; }
@media (max-width: 640px) { .class-row { grid-template-columns: 1fr; gap: 4px; } }

/* Budget envelopes */
.envelope-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; }
.envelope-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; background: var(--surface); text-align: center; }
.envelope-card .num { font-size: 22px; font-weight: 800; color: var(--accent-dark); display: block; margin-bottom: 6px; }
.envelope-card h3 { font-size: 14px; margin: 0 0 6px; }
.envelope-card p { margin: 0; font-size: 13px; color: var(--ink-soft); }
@media (max-width: 780px) { .envelope-grid { grid-template-columns: repeat(2, 1fr); } }

/* Comparison worksheet lines */
.worksheet { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 20px 22px; margin: 22px 0; }
.worksheet .line { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--border); font-size: 14.5px; }
.worksheet .line:first-child { border-top: 0; }
.worksheet .line b { min-width: 170px; flex-shrink: 0; }

/* Sidebar layout for categories */
.category-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; align-items: start; }

.category-sidebar-media { width:100%; height:auto; aspect-ratio:1/1; object-fit:contain; object-position:center; background:#fff; padding:6px; border-radius:var(--radius-sm); margin-bottom:16px; }
.category-sidebar-media.is-qc { object-fit:cover; padding:0; background:#168a35; }

.category-sidebar { position: sticky; top: calc(var(--header-h) + 20px); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); padding: 20px; }
.category-sidebar h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 12px; color: var(--ink-soft); }
.category-sidebar ul { margin: 0; padding-left: 18px; font-size: 14px; }
.category-sidebar li { margin-bottom: 8px; }
@media (max-width: 980px) {
  .category-layout { grid-template-columns: 1fr; }
  .category-sidebar { position: static; }
  .category-sidebar-media { max-height: 260px; width: auto; margin-left: auto; margin-right: auto; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); gap: 32px; padding-bottom: 40px; }
.footer-brand-col .logo { margin-bottom: 12px; }
.footer-tagline { color: var(--ink-soft); font-size: 14px; max-width: 32ch; margin: 0 0 14px; }
.footer-whatsapp { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-dark); font-size: 14px; }
.footer-col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin: 0 0 14px; }
.footer-col nav { display: flex; flex-direction: column; gap: 10px; }
.footer-col nav a { font-size: 14.5px; }
.footer-col nav a:hover { color: var(--accent-dark); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; font-size: 13px; color: var(--ink-soft); }
.footer-bottom a:hover { color: var(--accent-dark); }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand-col { grid-column: 1 / -1; }
}

.back-top {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 999px;
  background: var(--ink); color: #fff; border: 0; display: none; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow-soft); z-index: 60;
}
.back-top[data-show] { display: flex; }

/* Compact page hero (non-home pages that need one, e.g. 404) */
.page-hero { padding: 48px 0 20px; text-align: left; }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); margin: 8px 0 14px; }
.error-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.error-action { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; cursor: pointer; text-align: left; font: inherit; }
.error-action strong { display: block; margin-bottom: 6px; }
.error-action span { color: var(--ink-soft); font-size: 14px; }
@media (max-width: 780px) { .error-actions { grid-template-columns: 1fr; } }

.final-cta { background: var(--ink); color: #fff; padding: 56px 0; }
.final-cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.final-cta h2 { margin: 0 0 6px; font-size: 24px; }
.final-cta p { margin: 0; color: #C9C9C6; }
.final-cta .btn-ghost { background: transparent; border-color: #444; color: #fff; }
.final-cta .btn-ghost:hover { border-color: #fff; }

.notranslate { }

.section-head-row { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:24px; }
.section-head-row h2 { margin-bottom:8px; }
.section-head-row .lead { margin-bottom:0; max-width:760px; }
@media (max-width:700px){ .section-head-row { align-items:flex-start; flex-direction:column; } }

/* ---------- Shipping calculator: info grids ---------- */
.decision-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0 28px; }
@media (max-width: 900px) { .decision-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .decision-grid-4 { grid-template-columns: 1fr; } }

.mini-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 22px 0; }
.mini-info { border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; }
.mini-info strong { display: block; font-size: 14.5px; margin-bottom: 4px; }
.mini-info span { display: block; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 780px) { .mini-info-grid { grid-template-columns: 1fr; gap: 14px; } }

.tag-list { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 15px; font-size: 13.5px; color: var(--ink); }

/* ---------- Tool callout (used inside other guides) ---------- */
.tool-callout {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 22px 24px; margin: 28px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.tool-callout .eyebrow { margin: 0 0 2px; }
.tool-callout h2, .tool-callout h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.tool-callout p { margin: 0 0 14px; color: var(--ink-soft); font-size: 15px; }
.tool-callout .btn { margin: 0; }

/* ---------- Live calculator module ---------- */
.calc-module {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; margin: 28px 0 40px; scroll-margin-top: calc(var(--header-h) + 16px);
}
.calc-module .eyebrow { margin-bottom: 8px; }
.calc-module h2 { margin: 0 0 14px !important; }
.calc-module .calc-sub { color: var(--ink-soft); font-size: 14px; margin: -8px 0 18px; }
.calc-module .calc-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 22px; }
.calc-module .calc-helper { color: var(--ink-soft); font-size: 13px; margin: 0; }
.calc-direct-link { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.calc-direct-link:hover { color: var(--accent-dark); }

/* ---------- Shipping calculator modal ---------- */
.shipping-calculator-modal { position: fixed; inset: 0; z-index: 170; display: none; }
.shipping-calculator-modal[data-open] { display: block; }
.calculator-backdrop { position: absolute; inset: 0; background: rgba(23, 23, 23, 0.5); }
.calculator-panel {
  position: relative; margin: 4vh auto; width: min(1280px, 96vw); height: 92vh; max-height: 92vh;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; overflow: hidden;
}
.calculator-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.calculator-header h2 { margin: 0 0 4px; font-size: 18px; }
.calculator-header p { margin: 0; color: var(--ink-soft); font-size: 13px; max-width: 56ch; }
.calculator-close {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.calculator-close:hover { border-color: var(--accent); color: var(--accent); }
.shipping-calculator-frame-wrap { position: relative; flex: 1; width: 100%; height: 100%; background: var(--bg); }
.shipping-calculator-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.calculator-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 14.5px; font-weight: 600; background: var(--bg);
}
.calculator-footer { flex-shrink: 0; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.calculator-footer a { color: var(--accent-dark); font-weight: 600; }

@media (max-width: 760px) {
  .calculator-panel { position: fixed; inset: 0; margin: 0; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .calc-module { padding: 22px 18px; }
}
