/* =====================================================
 * KINETIC LAB-Link — FAQ Site
 * Design language: Sporty Precision (white surface + graphite instrument)
 * Aligned with prototype style.css + DESIGN.md v3.3
 * ===================================================== */

:root {
  /* Brand */
  --brand: #0EA5E9;
  --brand-dark: #0284C7;
  --teal: #14B8A6;
  --accent: #6366F1;
  --grad: linear-gradient(135deg, #0EA5E9 0%, #14B8A6 100%);
  --grad-soft: linear-gradient(135deg, rgba(14,165,233,0.08), rgba(20,184,166,0.08));

  /* Ink / text */
  --ink: #0F172A;
  --ink-2: #1E293B;
  --text: #334155;
  --text-2: #475569;
  --muted: #64748B;

  /* Lines / surfaces */
  --line: #E2E8F0;
  --line-2: #F1F5F9;
  --bg: #F8FAFC;
  --bg-soft: #F0F9FF;
  --card: #FFFFFF;

  /* States */
  --danger: #EF4444;
  --success: #10B981;
  --warn: #F59E0B;

  /* Instrument (graphite) */
  --tech-bg: #0F172A;
  --tech-bg-2: #1E293B;
  --tech-line: #334155;
  --tech-text: #F1F5F9;
  --tech-text-2: #94A3B8;
  --tech-cyan: #22D3EE;

  /* Layout */
  --header-h: 60px;
  --maxw: 1180px;
  --radius: 18px;
  --radius-sm: 12px;

  --shadow-sm: 0 1px 3px rgba(15,23,42,0.04);
  --shadow-md: 0 8px 30px rgba(15,23,42,0.08);
  --shadow-lg: 0 20px 50px rgba(15,23,42,0.12);

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--sans);
  background: linear-gradient(180deg, #F0F9FF 0%, #FFFFFF 22%, #F8FAFC 100%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--brand-dark); text-decoration: none; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.01em; }

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }
.brand .tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.18);
}
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.header-nav a {
  font-size: 13px; font-weight: 600; color: var(--text-2);
  padding: 8px 12px; border-radius: 10px;
  transition: color .15s, background .15s;
}
.header-nav a:hover { color: var(--ink); background: var(--line-2); }
.header-cta {
  font-size: 13px; font-weight: 700; color: #fff !important;
  background: var(--grad); padding: 9px 16px !important; border-radius: 10px;
  box-shadow: 0 4px 14px rgba(14,165,233,0.32);
}
.header-cta:hover { background: var(--grad) !important; filter: brightness(1.03); }
.menu-toggle { display: none; }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 56px 0 40px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(680px 280px at 15% -10%, rgba(14,165,233,0.10), transparent 60%),
    radial-gradient(560px 300px at 95% 0%, rgba(20,184,166,0.10), transparent 60%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--brand-dark);
  padding: 5px 12px; border-radius: 999px;
  background: rgba(14,165,233,0.08); border: 1px solid rgba(14,165,233,0.18);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px rgba(14,165,233,0.18);
}
.hero h1 {
  font-size: clamp(28px, 5vw, 44px); font-weight: 800; line-height: 1.15;
  margin: 18px 0 12px; letter-spacing: -0.02em;
}
.hero h1 .grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead { font-size: 16px; color: var(--text-2); max-width: 620px; margin: 0 0 26px; }

/* Search */
.search-box { position: relative; max-width: 640px; }
.search-box svg.s-ic {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; color: var(--muted); pointer-events: none;
}
.search-box input {
  width: 100%; height: 60px;
  padding: 0 18px 0 52px;
  font-size: 16px; font-family: inherit; color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.12), var(--shadow-md);
}
.search-box input::placeholder { color: var(--muted); }
.search-meta {
  margin-top: 12px; font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.search-meta .pop { color: var(--text-2); }
.search-meta a {
  font-size: 12px; font-weight: 600; color: var(--brand-dark);
  padding: 4px 10px; border-radius: 999px; background: var(--line-2);
  transition: background .15s;
}
.search-meta a:hover { background: rgba(14,165,233,0.1); }

/* ============ AI chat (hero) ============ */
.ai-chat { max-width: 720px; }
.ai-input-row {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-md); padding: 8px 8px 8px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.ai-input-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14,165,233,0.12), var(--shadow-md); }
.ai-input-row .ai-ic { flex: 0 0 auto; width: 22px; height: 22px; color: var(--brand); }
.ai-input-row input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font-family: inherit; font-size: 16px; color: var(--ink); height: 44px;
}
.ai-input-row input::placeholder { color: var(--muted); }
.ai-send {
  flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(14,165,233,0.3); transition: transform .12s, filter .15s;
}
.ai-send:hover { filter: brightness(1.05); }
.ai-send:active { transform: scale(.94); }
.ai-send:disabled { opacity: .5; cursor: not-allowed; }
.ai-send svg { width: 18px; height: 18px; }
.ai-mic {
  flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 12px;
  background: #f1f5f9; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, background .15s, color .15s;
}
.ai-mic svg { width: 20px; height: 20px; }
.ai-mic:hover { background: #e2e8f0; color: var(--ink); }
.ai-mic:active { transform: scale(.94); }
.ai-mic.listening {
  background: rgba(14,165,233,0.12); color: var(--brand);
  box-shadow: 0 0 0 0 rgba(14,165,233,0.45); animation: ai-mic-pulse 1.4s ease-out infinite;
}
@keyframes ai-mic-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(14,165,233,0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(14,165,233,0); }
  100% { box-shadow: 0 0 0 0 rgba(14,165,233,0); }
}
@media (prefers-reduced-motion: reduce) { .ai-mic.listening { animation: none; } }

.ai-hint { margin-top: 12px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-hint .ex { font-weight: 600; color: var(--text-2); }
.ai-examples { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.ai-examples button {
  font-size: 12px; font-weight: 600; color: var(--brand-dark);
  padding: 5px 12px; border-radius: 999px; background: var(--line-2); border: 0; cursor: pointer;
  transition: background .15s;
}
.ai-examples button:hover { background: rgba(14,165,233,0.12); }

.ai-disclaimer { margin-top: 10px; font-size: 11.5px; color: var(--ink-3, #94A3B8); line-height: 1.6; }

/* thread */
.ai-thread { margin-top: 18px; display: none; flex-direction: column; gap: 14px; }
.ai-thread.show { display: flex; }
.ai-row { display: flex; gap: 10px; align-items: flex-start; }
.ai-row.user { justify-content: flex-end; }
.ai-avatar {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.ai-avatar.ai { background: var(--grad); }
.ai-avatar svg { width: 18px; height: 18px; }
.ai-bubble {
  max-width: 80%; padding: 12px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.8;
}
.ai-bubble.ai { background: #fff; border: 1px solid var(--line); color: var(--ink); border-top-left-radius: 5px; box-shadow: var(--shadow-sm); }
.ai-bubble.user { background: var(--grad); color: #fff; border-top-right-radius: 5px; }
.ai-bubble p { margin: 0 0 8px; } .ai-bubble p:last-child { margin: 0; }
.ai-bubble.ai a { color: var(--brand-dark); font-weight: 600; border-bottom: 1px solid rgba(2,132,199,.3); }
.ai-sources { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 7px; }
.ai-sources a {
  font-size: 12px; font-weight: 600; color: var(--brand-dark);
  padding: 5px 11px; border-radius: 999px; background: var(--grad-soft);
  border: 1px solid rgba(14,165,233,0.2); display: inline-flex; align-items: center; gap: 5px;
}
.ai-sources a:hover { background: rgba(14,165,233,0.14); border-bottom: 1px solid rgba(14,165,233,0.2); }
.ai-typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); opacity: .4; animation: aitype 1.2s infinite; }
.ai-typing span:nth-child(2){ animation-delay:.15s; } .ai-typing span:nth-child(3){ animation-delay:.3s; }
@keyframes aitype { 0%,80%,100%{ opacity:.3; transform:translateY(0);} 40%{ opacity:1; transform:translateY(-3px);} }
.ai-fallback { margin-top: 8px; }
.ai-fallback a {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: #fff; background: var(--grad); padding: 8px 14px; border-radius: 10px;
}

@media (max-width: 760px) {
  .ai-bubble { max-width: 88%; }
}

/* ============ Category grid ============ */
.section { padding: 40px 0; }
.section-head { margin-bottom: 22px; }
.section-head .kicker {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-dark); margin: 0 0 6px;
}
.section-head h2 { font-size: clamp(22px, 3.4vw, 28px); font-weight: 800; margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; }

.cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
.cat-card {
  display: block;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative; overflow: hidden;
}
.cat-card::after {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: var(--grad); transition: width .25s ease;
}
.cat-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: rgba(14,165,233,0.35);
}
.cat-card:hover::after { width: 100%; }
.cat-ic {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--grad-soft);
  border: 1px solid rgba(14,165,233,0.18);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand-dark); margin-bottom: 14px;
}
.cat-ic svg { width: 24px; height: 24px; }
.cat-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 5px; }
.cat-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
.cat-card .count {
  margin-top: 12px; font-family: var(--mono); font-size: 11px;
  font-weight: 700; color: var(--brand-dark);
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.cat-card .count svg { width: 15px; height: 15px; flex: 0 0 auto; }

/* ============ Featured: Body scan banner ============ */
.feature-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  border-radius: 24px; padding: 34px;
  color: var(--tech-text);
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
}
.feature-banner::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 200px at 10% 0%, rgba(20,184,166,0.20), transparent 60%),
    radial-gradient(500px 260px at 100% 100%, rgba(34,211,238,0.16), transparent 60%);
  pointer-events: none;
}
.feature-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, black, transparent 80%);
  mask-image: linear-gradient(180deg, black, transparent 80%);
}
.feature-banner .fb-body { position: relative; z-index: 1; }
.feature-banner .fb-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--tech-cyan);
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.feature-banner .fb-label .blink {
  width: 7px; height: 7px; border-radius: 50%; background: var(--tech-cyan);
  box-shadow: 0 0 10px var(--tech-cyan); animation: blink 1.4s steps(2,end) infinite;
}
@keyframes blink { 50% { opacity: .25; } }
.feature-banner h2 { color: #fff; font-size: clamp(22px, 3.6vw, 30px); font-weight: 800; margin: 0 0 10px; }
.feature-banner p { color: var(--tech-text-2); font-size: 14px; max-width: 520px; margin: 0 0 20px; }
.feature-banner .fb-visual { position: relative; z-index: 1; }
.btn-on-dark {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 14px;
  padding: 13px 22px; border-radius: 12px; border: 0;
  box-shadow: 0 8px 22px rgba(14,165,233,0.4);
  transition: transform .12s, filter .15s;
}
.btn-on-dark:hover { filter: brightness(1.05); }
.btn-on-dark:active { transform: scale(.97); }

/* ============ FAQ layout (sidebar + accordion) ============ */
.faq-layout {
  display: grid; grid-template-columns: 250px 1fr; gap: 36px;
  align-items: start;
}
.faq-side { position: sticky; top: calc(var(--header-h) + 20px); }
.faq-side .side-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px; padding: 0 12px;
}
.faq-side ul { list-style: none; margin: 0; padding: 0; }
.faq-side li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: background .15s, color .15s;
}
.faq-side li a:hover { background: var(--line-2); color: var(--ink); }
.faq-side li a.active { background: var(--grad-soft); color: var(--brand-dark); }
.faq-side li a .n {
  margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted);
}

.faq-main { min-width: 0; }
.faq-group { margin-bottom: 36px; scroll-margin-top: calc(var(--header-h) + 20px); }
.faq-group-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.faq-group-head .gi {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.18);
  display: flex; align-items: center; justify-content: center; color: var(--brand-dark);
}
.faq-group-head .gi svg { width: 20px; height: 20px; }
.faq-group-head h3 { font-size: 19px; font-weight: 800; margin: 0; }

/* Accordion item */
.faq-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; margin-bottom: 10px; overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.faq-item:hover { border-color: rgba(14,165,233,0.3); }
.faq-item.open { border-color: rgba(14,165,233,0.4); box-shadow: var(--shadow-sm); }
.faq-q {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; cursor: pointer;
  font-weight: 700; color: var(--ink); font-size: 15px; line-height: 1.5;
}
.faq-q .qmark {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; font-family: var(--mono);
}
.faq-q .q-txt { flex: 1; }
.faq-q .arrow {
  flex-shrink: 0; color: var(--muted);
  transition: transform .25s ease; width: 20px; height: 20px;
}
.faq-item.open .faq-q .arrow { transform: rotate(180deg); color: var(--brand-dark); }
.faq-a-wrap {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.faq-item.open .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a { overflow: hidden; }
.faq-a-inner {
  padding: 0 18px 18px 56px;
  font-size: 14px; color: var(--text); line-height: 1.85;
}
.faq-a-inner p { margin: 0 0 10px; }
.faq-a-inner p:last-child { margin-bottom: 0; }
.faq-a-inner ul { margin: 6px 0 10px; padding-left: 20px; }
.faq-a-inner li { margin-bottom: 5px; }
.faq-a-inner a { font-weight: 600; border-bottom: 1px solid rgba(2,132,199,0.3); }
.faq-a-inner a:hover { border-color: var(--brand-dark); }
.faq-a-inner code {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--line-2); padding: 1px 6px; border-radius: 5px; color: var(--ink-2);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.kb-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; font-family: var(--mono);
  background: var(--grad); color: #fff; letter-spacing: 0.03em;
}

/* Figures inside answers */
.a-figs {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px;
}
.a-figs.flow { align-items: stretch; }
.a-fig {
  flex: 1 1 130px; max-width: 190px; margin: 0;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px; text-align: center;
  position: relative;
}
.a-fig img {
  width: 100%; height: 110px; object-fit: contain; margin: 0 auto 8px;
  mix-blend-mode: multiply;
}
.a-fig .cap {
  font-size: 11.5px; color: var(--text-2); font-weight: 600; line-height: 1.45;
}
.a-fig .cap .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 5px; margin-right: 4px;
  background: var(--grad); color: #fff; font-family: var(--mono);
  font-size: 10px; font-weight: 700; vertical-align: middle;
}
/* arrow between flow figures */
.a-figs.flow .a-fig + .a-fig::before {
  content: "›"; position: absolute; left: -11px; top: 50%;
  transform: translateY(-50%); color: var(--brand); font-weight: 800; font-size: 18px;
}

/* Callouts inside answers */
.callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; margin: 12px 0;
  font-size: 13.5px; line-height: 1.7;
}
.callout .c-ic { flex-shrink: 0; font-size: 16px; line-height: 1.5; }
.callout.info { background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.2); color: var(--ink-2); }
.callout.warn { background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E; }
.callout.danger { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.callout strong { color: inherit; }

/* No results */
.no-results {
  display: none; text-align: center; padding: 50px 20px; color: var(--muted);
}
.no-results.show { display: block; }
.no-results .nr-ic { font-size: 40px; margin-bottom: 10px; }

/* highlight from search */
mark { background: rgba(14,165,233,0.22); color: inherit; border-radius: 3px; padding: 0 2px; }

/* ============ Contact CTA ============ */
.contact-cta {
  background: var(--grad-soft);
  border: 1px solid rgba(14,165,233,0.2);
  border-radius: 24px; padding: 36px;
  text-align: center;
}
.contact-cta .cc-ic { font-size: 40px; margin-bottom: 8px; }
.contact-cta h2 { font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.contact-cta p { color: var(--text-2); margin: 0 auto 22px; max-width: 480px; }
.cc-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 13px; border: 0;
  box-shadow: 0 6px 18px rgba(14,165,233,0.34);
  transition: transform .12s, filter .15s;
}
.btn-primary:hover { filter: brightness(1.04); }
.btn-primary:active { transform: scale(.97); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 13px; border: 1.5px solid var(--line);
  transition: border-color .15s, transform .12s;
}
.btn-outline:hover { border-color: var(--brand); }
.btn-outline:active { transform: scale(.97); }

/* ============ Footer ============ */
.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
}
.site-footer .wrap { padding-top: 36px; padding-bottom: 36px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer-brand img { height: 26px; margin-bottom: 12px; }
.footer-brand p { font-size: 13px; color: var(--muted); max-width: 280px; margin: 0; }
.footer-col h4 {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: 13.5px; color: var(--text-2); }
.footer-col a:hover { color: var(--brand-dark); }
.footer-bottom {
  margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--muted);
}

/* ============ Sub-page (body scan) ============ */
.subpage-hero {
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  color: var(--tech-text);
  position: relative; overflow: hidden;
}
.subpage-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black, transparent);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black, transparent);
}
.subpage-hero .wrap { position: relative; z-index: 1; padding: 28px 20px 40px; }
.breadcrumb { font-size: 13px; color: var(--tech-text-2); margin-bottom: 18px; }
.breadcrumb a { color: var(--tech-text-2); }
.breadcrumb a:hover { color: var(--tech-cyan); }
.subpage-hero h1 { color: #fff; font-size: clamp(26px, 4.4vw, 38px); font-weight: 800; margin: 8px 0 12px; }
.subpage-hero .sub-lead { color: var(--tech-text-2); font-size: 15px; max-width: 640px; margin: 0; }

/* Steps overview */
.steps-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 30px;
}
.step-chip {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--tech-line);
  border-radius: 14px; padding: 14px;
}
.step-chip .sn {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--tech-cyan); letter-spacing: 0.1em;
}
.step-chip .st { color: #fff; font-weight: 700; font-size: 14px; margin-top: 4px; }
.step-chip .sd { color: var(--tech-text-2); font-size: 12px; margin-top: 3px; }

/* Body overview (full-body 10-point map) */
.body-overview {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 24px; box-shadow: var(--shadow-sm); margin-top: 18px;
}
.body-overview .bo-figure {
  background: radial-gradient(120% 120% at 50% 0%, #FFFFFF, #EAF4FB);
  border: 1px solid var(--line); border-radius: 16px;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.body-overview .bo-figure img { max-height: 360px; width: auto; }
.body-overview h3 { font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.body-overview p { font-size: 14px; color: var(--text-2); margin: 0 0 14px; }

/* Body scan points */
.scan-intro { margin: 36px 0 10px; }
.order-bar {
  display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; box-shadow: var(--shadow-sm);
}
.order-bar .num {
  width: 24px; height: 24px; border-radius: 7px; background: var(--grad);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px;
}
.order-bar .sep { color: var(--muted); }

.point-card {
  display: grid; grid-template-columns: 300px 1fr; gap: 0;
  background: #fff; border: 1px solid var(--line);
  border-radius: 20px; overflow: hidden; margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.point-figure {
  background: radial-gradient(130% 120% at 50% 0%, #FFFFFF 0%, #EAF4FB 100%);
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 18px; min-height: 300px;
  border-right: 1px solid var(--line);
}
.point-figure::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image:
    linear-gradient(rgba(14,165,233,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14,165,233,.06) 1px, transparent 1px);
  background-size: 20px 20px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, black, transparent);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 45%, black, transparent);
}
.point-figure svg,
.point-figure img {
  position: relative; z-index: 1; width: 100%; height: auto; max-height: 360px;
  object-fit: contain;
}
.point-figure img {
  mix-blend-mode: multiply;   /* drop the white image bg into the light plate */
  filter: drop-shadow(0 6px 14px rgba(15,23,42,0.08));
}
.fig-tag {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; color: var(--brand-dark);
}
.fig-credit {
  position: absolute; bottom: 10px; right: 12px; z-index: 2;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; color: var(--muted);
}
.point-body { padding: 24px; min-width: 0; }
.point-body .pnum {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--brand-dark);
  margin-bottom: 8px;
}
.point-body .pnum .badge {
  background: var(--grad); color: #fff; border-radius: 7px;
  padding: 2px 9px; letter-spacing: 0.06em;
}
.point-body h3 { font-size: 21px; font-weight: 800; margin: 0 0 2px; }
.point-body .en {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em; margin-bottom: 14px;
}
.point-body .where {
  font-size: 14.5px; color: var(--text); line-height: 1.85; margin: 0 0 14px;
}
.point-body .where b { color: var(--ink); }
.findlist { margin: 0; padding: 0; list-style: none; }
.findlist li {
  position: relative; padding-left: 30px;
  font-size: 13.5px; color: var(--text-2); margin-bottom: 8px; line-height: 1.75;
}
.findlist li .fi {
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.2);
  color: var(--brand-dark); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}

/* How to measure block */
.howto {
  background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.2);
  border-radius: 18px; padding: 22px; margin: 14px 0;
  display: flex; gap: 16px; align-items: flex-start;
}
.howto .h-ic {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center;
}
.howto h3 { font-size: 16px; margin: 0 0 6px; }
.howto p { margin: 0; font-size: 14px; color: var(--text); }

/* Precautions cards */
.prec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.prec-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow-sm);
}
.prec-card .ph { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.prec-card .ph .pc-ic {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.prec-card.req .pc-ic { background: #FEF2F2; }
.prec-card.tip .pc-ic { background: var(--grad-soft); }
.prec-card h4 { font-size: 15px; margin: 0; }
.prec-card .req-tag {
  font-size: 10px; font-weight: 800; font-family: var(--mono);
  padding: 2px 7px; border-radius: 6px; letter-spacing: 0.06em;
}
.prec-card.req .req-tag { background: #FEE2E2; color: #B91C1C; }
.prec-card.tip .req-tag { background: rgba(14,165,233,0.12); color: var(--brand-dark); }
.prec-card p { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }

/* Anchor jump nav for points */
.point-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 28px;
}
.point-nav a {
  font-size: 12.5px; font-weight: 700; font-family: var(--mono);
  padding: 8px 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--text-2);
  transition: all .15s;
}
.point-nav a:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--grad-soft); }

/* ============ Contact form ============ */
.form-wrap { max-width: 680px; margin: 0 auto; }
.form-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; box-shadow: var(--shadow-md);
}
.field { margin-bottom: 20px; }
.field > label {
  display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 8px;
}
.field .req, .field .opt {
  font-size: 10px; font-weight: 700; font-family: var(--mono);
  padding: 1px 7px; border-radius: 5px; margin-left: 8px; vertical-align: middle;
  letter-spacing: 0.04em;
}
.field .req { color: #fff; background: var(--danger); }
.field .opt { color: var(--muted); background: var(--line-2); }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: 0 14px; height: 52px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { height: auto; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.7; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 42px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(14,165,233,0.12);
}
.field input.invalid, .field select.invalid, .field textarea.invalid {
  border-color: var(--danger); background: #FEF2F2;
}
.field .err {
  display: none; font-size: 12px; color: var(--danger); font-weight: 600; margin-top: 6px;
}
.field.show-err .err { display: block; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.6; }
.char-count { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.char-count.over { color: var(--danger); font-weight: 700; }
.recaptcha-row { margin: 4px 0 18px; }
.form-actions { margin-top: 4px; }
.form-actions .btn-primary { width: 100%; }
.form-note {
  font-size: 12.5px; color: var(--muted); margin-top: 16px; line-height: 1.75;
  padding-top: 14px; border-top: 1px solid var(--line-2);
}
.form-note a { font-weight: 600; }
.form-alert {
  display: none; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px; line-height: 1.7;
}
.form-alert.show { display: flex; }
.form-alert.error { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.form-alert.info { background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.2); color: var(--ink-2); }
.form-success {
  display: none; text-align: center; padding: 24px 10px;
}
.form-success.show { display: block; }
.form-success .ok-ic {
  width: 64px; height: 64px; border-radius: 50%; background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.form-success h2 { font-size: 22px; margin: 0 0 8px; }
.form-success p { color: var(--text-2); margin: 0 0 18px; }

/* ============ Legal / document pages ============ */
.doc-hero {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(680px 240px at 12% -20%, rgba(14,165,233,0.08), transparent 60%),
    radial-gradient(560px 240px at 95% -10%, rgba(20,184,166,0.08), transparent 60%);
}
.doc-hero .wrap { padding: 34px 20px 30px; }
.doc-hero h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; margin: 10px 0 8px; }
.doc-hero .doc-sub { color: var(--text-2); font-size: 14px; margin: 0; max-width: 680px; }
.doc-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px;
  font-size: 12.5px; color: var(--muted);
}
.doc-meta b { color: var(--text-2); font-weight: 700; }
.doc-meta .mono { font-family: var(--mono); }

.legal-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start;
  padding: 40px 0 10px;
}
.legal-toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
.legal-toc .toc-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px; padding: 0 10px;
}
.legal-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.legal-toc li a {
  display: block; padding: 6px 10px; border-radius: 8px;
  font-size: 13px; color: var(--text-2); line-height: 1.45;
  border-left: 2px solid transparent;
}
.legal-toc li a:hover { background: var(--line-2); color: var(--ink); }
.legal-toc li a.active { color: var(--brand-dark); border-left-color: var(--brand); background: var(--grad-soft); }

.legal-content { min-width: 0; }
.legal-content > .intro-note {
  background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.2);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 28px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.8;
}
.legal-content article {
  scroll-margin-top: calc(var(--header-h) + 20px);
  padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line-2);
}
.legal-content article:last-of-type { border-bottom: 0; }
.legal-content h2 {
  font-size: 18px; font-weight: 800; margin: 0 0 12px;
  display: flex; align-items: baseline; gap: 10px;
}
.legal-content h2 .art-no {
  font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--brand-dark);
  background: var(--grad-soft); border: 1px solid rgba(14,165,233,0.2);
  border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}
.legal-content p { margin: 0 0 10px; font-size: 14px; color: var(--text); line-height: 1.9; }
.legal-content ol.clauses { margin: 0 0 10px; padding-left: 0; list-style: none; counter-reset: cl; }
.legal-content ol.clauses > li {
  position: relative; padding-left: 30px; margin-bottom: 10px;
  font-size: 14px; color: var(--text); line-height: 1.9;
}
.legal-content ol.clauses > li::before {
  counter-increment: cl; content: counter(cl);
  position: absolute; left: 0; top: 3px;
  width: 22px; height: 22px; border-radius: 6px;
  background: #fff; border: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
}
.legal-content ul.items {
  margin: 8px 0 8px; padding-left: 20px; list-style: none;
}
.legal-content ul.items > li {
  position: relative; padding-left: 18px; margin-bottom: 5px;
  font-size: 13.5px; color: var(--text-2); line-height: 1.8;
}
.legal-content ul.items > li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 6px; height: 6px; border-radius: 2px; background: var(--brand);
}
.legal-content .appendix {
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin-top: 24px; font-size: 13.5px; color: var(--text-2); line-height: 1.9;
}
.legal-content .appendix b { color: var(--ink); }
.legal-content .liability-note {
  background: #FFFBEB; border: 1px solid #FDE68A; color: #92400E;
  border-radius: 12px; padding: 14px 16px; margin: 10px 0; font-size: 13.5px; line-height: 1.8;
}
.legal-content .safe-note {
  background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;
  border-radius: 12px; padding: 14px 16px; margin: 10px 0; font-size: 13.5px; line-height: 1.8;
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .faq-layout { grid-template-columns: 1fr; gap: 20px; }
  .faq-side { position: static; }
  .faq-side ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .faq-side .side-title { width: 100%; padding: 0; }
  .faq-side li a { background: #fff; border: 1px solid var(--line); }
  .faq-side li a .n { display: none; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-layout { grid-template-columns: 1fr; gap: 18px; }
  .legal-toc { position: static; max-height: none; overflow: visible;
    border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
  .legal-toc ol { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
}

@media (max-width: 760px) {
  .header-nav { display: none; }
  .menu-toggle {
    display: inline-flex; margin-left: auto;
    width: 42px; height: 42px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff;
    align-items: center; justify-content: center; color: var(--ink);
  }
  .header-nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(12px);
    padding: 12px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .header-nav.open a { padding: 12px 14px; }
  .header-nav.open .header-cta { text-align: center; }

  .hero { padding: 36px 0 28px; }
  .cat-grid { grid-template-columns: 1fr; }
  .feature-banner { grid-template-columns: 1fr; padding: 26px; }
  .feature-banner .fb-visual { display: none; }
  .steps-row { grid-template-columns: repeat(2, 1fr); }
  .point-card { grid-template-columns: 1fr; }
  .point-figure { min-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
  .body-overview { grid-template-columns: 1fr; }
  .body-overview .bo-figure { order: -1; }
  .prec-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-cta { padding: 26px; }
  .faq-a-inner { padding-left: 18px; }
  .a-figs.flow .a-fig + .a-fig::before { display: none; }
  .a-fig { flex-basis: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
