/* ==========================================================================
   HOANTRANTDH — Machine Vision Solutions
   Landing page styles
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("assets/fonts/inter-vietnamese-wght-normal.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

:root {
  --navy-950: #030814;
  --navy-900: #050b1a;
  --navy-850: #081226;
  --navy-800: #0c1a33;
  --navy-700: #13264a;
  --cyan: #22d3ee;
  --sky: #38bdf8;
  --blue: #3b82f6;
  --violet: #818cf8;
  --danger: #f87171;
  --grad: linear-gradient(120deg, #22d3ee 0%, #38bdf8 45%, #3b82f6 100%);

  /* contextual tokens (dark by default) */
  --bg: var(--navy-900);
  --text: #e8eef8;
  --heading: #ffffff;
  --muted: #94a5c3;
  --line: rgba(148, 178, 230, 0.14);
  --line-strong: rgba(148, 178, 230, 0.26);
  --card: rgba(255, 255, 255, 0.035);
  --card-hover: rgba(255, 255, 255, 0.06);
  --accent: var(--cyan);
  --accent-soft: rgba(34, 211, 238, 0.12);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
  --container: 1200px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--navy-900);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--heading); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 750; }
h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.82em; }
strong, b { color: var(--heading); font-weight: 650; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: var(--cyan); color: var(--navy-900); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.8em 1.35em; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.95rem; line-height: 1.2; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, border-color .25s, color .25s;
}
.btn .icon { width: 1.1em; height: 1.1em; transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--grad); color: #04101f; box-shadow: 0 8px 30px -8px rgba(34, 211, 238, 0.55); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 38px -8px rgba(34, 211, 238, 0.7); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); color: var(--heading); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--cyan); background: var(--accent-soft); }
.btn-ghost:hover .icon { transform: rotate(-30deg); }
.btn-sm { padding: 0.6em 1.1em; font-size: 0.875rem; }
.btn-lg { padding: 0.95em 1.6em; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(5, 11, 26, 0.82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; letter-spacing: 0.06em; color: #fff; font-size: 0.98rem; }
.brand-sub { font-size: 0.72rem; color: var(--cyan); letter-spacing: 0.04em; font-weight: 500; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-link { display: block; white-space: nowrap; padding: 8px 10px; border-radius: 8px; font-size: 0.875rem; font-weight: 500; color: var(--muted); transition: color .2s, background-color .2s; position: relative; }
.nav-link:hover { color: #fff; }
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-cta-mobile { display: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04); align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1199px) {
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    margin: 0; padding: 24px var(--gutter) 40px;
    background: rgba(3, 8, 20, 0.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    display: flex; flex-direction: column; gap: 20px; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s var(--ease); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-link { font-size: 1.125rem; padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text); }
  .nav-link.is-active { color: var(--cyan); }
  .nav-link.is-active::after { display: none; }
  .nav-cta-mobile { display: inline-flex; align-self: flex-start; }
  .site-header.menu-open { background: rgba(3, 8, 20, 0.97); border-bottom-color: var(--line); }
}
@media (max-width: 560px) {
  .header-cta { display: none; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: 112px 0; background: var(--bg); color: var(--text); }
.section--tight-top { padding-top: 0; }
.section--deep { --bg: var(--navy-950); }
.section--light {
  --bg: #f3f6fb;
  --text: #33415c;
  --heading: #0a1530;
  --muted: #5b6a86;
  --line: #dbe3ef;
  --line-strong: #c4d0e2;
  --card: #ffffff;
  --card-hover: #ffffff;
  --accent: #0891b2;
  --accent-soft: rgba(8, 145, 178, 0.1);
  --shadow: 0 18px 40px -22px rgba(15, 35, 80, 0.35);
}
.section--light .gradient-text { background: linear-gradient(120deg, #0891b2, #2563eb); -webkit-background-clip: text; background-clip: text; }
.section:not(.section--light)::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(148,178,230,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(148,178,230,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.section > .container { position: relative; }
.section-head { max-width: 780px; margin: 0 auto 56px; text-align: center; }
.section-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); margin: 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background-color .35s;
}
.section:not(.section--light) .card { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); background: var(--card-hover); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }
.card-icon { display: inline-flex; width: 48px; height: 48px; border-radius: 12px; align-items: center; justify-content: center; margin-bottom: 18px; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.card-icon .icon { width: 24px; height: 24px; }
.card-grid { display: grid; gap: 20px; }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.card-grid--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1024px) { .card-grid--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .card-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid--3 { grid-template-columns: 1fr; } .card-grid--5 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Reveal on scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
.js .card[data-reveal].is-visible:hover { transform: translateY(-4px); }
.js [data-reveal].reveal-done { transition-delay: 0s; }
.js .card[data-reveal].reveal-done { transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background-color .35s; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; padding: calc(var(--header-h) + 72px) 0 96px; overflow: hidden; background: var(--navy-900); }
.hero-bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 50% 62%, rgba(56, 189, 248, 0.16), transparent 70%),
    radial-gradient(600px 400px at 12% 10%, rgba(59, 130, 246, 0.16), transparent 70%),
    radial-gradient(600px 400px at 90% 20%, rgba(34, 211, 238, 0.1), transparent 70%);
}
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,178,230,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,178,230,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
}
.hero .container { position: relative; }
.hero-copy { max-width: 920px; margin: 0 auto; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,0.04); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; color: var(--text); margin-bottom: 28px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 rgba(34,211,238,.6); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34,211,238,.6); } 70% { box-shadow: 0 0 0 10px rgba(34,211,238,0); } 100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); } }
.hero-title { font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; margin-bottom: 22px; }
.hero-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; color: #cfe3ff; margin-bottom: 18px; }
.hero-sub span { position: relative; }
.hero-sub span:nth-child(odd) { color: var(--cyan); }
.hero-vi { max-width: 720px; margin: 0 auto 34px; color: var(--muted); font-size: 1.05rem; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 28px; }
.hero-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; font-size: 0.9rem; color: var(--muted); }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points .icon { color: var(--cyan); width: 1.05em; height: 1.05em; stroke-width: 2.4; }

.fine { font-size: 0.9rem !important; padding-left: 14px; border-left: 2px solid var(--line-strong); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { background: radial-gradient(800px 400px at 80% 30%, rgba(59,130,246,0.14), transparent 70%), var(--navy-900); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: start; }
.contact-copy > p:not(.kicker) { color: var(--muted); font-size: 1.05rem; }
.contact-vi { font-style: italic; }
.contact-list { display: flex; flex-direction: column; gap: 10px; margin: 24px 0 28px; }
.contact-list li { display: flex; align-items: center; gap: 10px; font-weight: 550; }
.contact-list .icon { color: var(--cyan); stroke-width: 2.4; }
.contact-mail { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--cyan); padding: 10px 16px; border-radius: 10px; border: 1px solid rgba(34,211,238,0.35); background: rgba(34,211,238,0.06); transition: background-color .2s; }
.contact-mail:hover { background: rgba(34,211,238,0.14); }
.contact-form { padding: 32px; }
.contact-form:hover { transform: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.field label span { color: var(--cyan); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.95rem; color: #fff; padding: 12px 14px; border-radius: 10px;
  background: rgba(3, 8, 20, 0.55); border: 1px solid var(--line-strong); transition: border-color .2s, box-shadow .2s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, #94a5c3 50%), linear-gradient(135deg, #94a5c3 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field select option { background: var(--navy-850); color: #fff; }
.field textarea { resize: vertical; min-height: 110px; }
.field input::placeholder, .field textarea::placeholder { color: #6b7c9b; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,0.18); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 0; min-height: 0; font-size: 0.8rem; color: #fca5a5; }
.form-status { margin: 14px 0 0; font-size: 0.9rem; color: #86efac; min-height: 1.2em; text-align: center; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } .contact-form { padding: 22px; } }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--navy-950); border-top: 1px solid var(--line); padding: 56px 0 28px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-brand { max-width: 420px; }
.footer-brand p { margin: 16px 0 0; font-size: 0.92rem; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 10px 40px; align-content: start; }
.footer-nav a { font-size: 0.92rem; transition: color .2s; }
.footer-nav a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 24px; font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
.footer-bottom p:first-child { color: #fff; font-weight: 600; }
.footer-bottom p:first-child span { color: var(--muted); font-weight: 400; }
.footer-note { max-width: 460px; }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-800); border: 1px solid var(--line-strong); color: var(--cyan); opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .3s, transform .3s, visibility 0s .3s, border-color .2s; }
.to-top .icon { transform: rotate(180deg); }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s, border-color .2s; }
.to-top:hover { border-color: var(--cyan); }

/* ---------- Responsive spacing ---------- */
@media (max-width: 760px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .section { padding: 80px 0; }
  .section--tight-top { padding-top: 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding: calc(var(--header-h) + 48px) 0 72px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .positioning { padding: 96px 0; }
  .highlight-quote { padding: 32px 24px; }
  .brand-name { font-size: 0.9rem; }
  .brand-sub { font-size: 0.66rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
}

/* ==========================================================================
   MACHINE VISION — page components
   ========================================================================== */
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .card-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid--4 { grid-template-columns: 1fr; } }

/* ---------- Hero ---------- */
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 56px; align-items: center; }
.hero-grid .hero-copy { text-align: left; margin: 0; max-width: none; }
.hero-grid .hero-title { font-size: clamp(2.3rem, 4.8vw, 4rem); }
.hero-grid .hero-sub { display: block; color: var(--cyan); letter-spacing: 0.02em; }
.hero-grid .hero-vi { margin: 0 0 30px; }
.hero-grid .hero-ctas, .hero-grid .hero-points { justify-content: flex-start; }
.hero-grid .hero-points { flex-direction: column; gap: 8px; }

.inspect {
  position: relative; margin: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; padding: 18px;
  border-radius: 20px; border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(56,189,248,0.08), rgba(255,255,255,0.02));
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8);
}
.inspect-scene { grid-column: 1 / -1; width: 100%; height: auto; border-radius: 14px; background: radial-gradient(circle at 50% 40%, rgba(59,130,246,0.12), rgba(3,8,20,0.6)); }
.belt { animation: belt 1.2s linear infinite; }
@keyframes belt { to { stroke-dashoffset: -24; } }
.cone { opacity: .55; transition: opacity .12s; }
.cone.is-flash { opacity: 1; }
.ring-light { filter: drop-shadow(0 0 6px rgba(34,211,238,.8)); }
.part-tag { font: 700 12px var(--font); }
.liveview { border-radius: 12px; overflow: hidden; border: 1px solid #1e3358; background: #050a16; display: flex; flex-direction: column; }
.lv-head { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font: 600 11px var(--mono); color: #94a5c3; border-bottom: 1px solid rgba(148,178,230,0.14); }
.lv-dot { width: 7px; height: 7px; border-radius: 50%; background: #f87171; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.lv-img { width: 100%; height: auto; display: block; background: #0b1222; }
.lv-foot { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-top: 1px solid rgba(148,178,230,0.14); min-height: 36px; }
.lv-badge { font: 800 11px var(--mono); padding: 3px 8px; border-radius: 5px; background: rgba(148,178,230,.15); color: #cbd5e1; }
.lv-badge.ok { background: rgba(74,222,128,.15); color: #86efac; }
.lv-badge.ng { background: rgba(248,113,113,.18); color: #fca5a5; }
.lv-meta { font: 500 11px var(--mono); color: #94a5c3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hud > div { display: flex; flex-direction: column; justify-content: center; padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.hud span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.hud b { font: 700 1.35rem var(--font); color: #fff; font-variant-numeric: tabular-nums; }
.hud b.ok { color: #86efac; } .hud b.ng { color: #fca5a5; }
.sim-note { grid-column: 1 / -1; font-size: 0.72rem; color: var(--muted); text-align: right; margin-top: -4px; }
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-grid .hero-copy { text-align: center; }
  .hero-grid .hero-ctas, .hero-grid .hero-points { justify-content: center; }
  .hero-grid .hero-points { flex-direction: row; }
  .hero-grid .hero-vi { margin: 0 auto 30px; }
  .inspect { max-width: 680px; margin: 0 auto; width: 100%; }
}
@media (max-width: 560px) {
  .inspect { grid-template-columns: 1fr; padding: 12px; }
  .hud b { font-size: 1.1rem; }
}

/* ---------- Vision chain ---------- */
.chain { max-width: 1000px; margin: 0 auto; }
.chain-track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 24px; }
.chain-track::before { content: ""; position: absolute; left: 10%; right: 10%; top: 36px; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--blue)); opacity: .35; }
.chain-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 4px 12px; background: none; border: 0; cursor: pointer; color: var(--muted); text-align: center; }
.chain-icon { position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-800); border: 1px solid var(--line-strong); color: var(--sky); transition: all .3s var(--ease); }
.chain-icon .icon { width: 30px; height: 30px; }
.chain-num { font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.chain-name { font-weight: 650; color: var(--text); font-size: .95rem; }
.chain-step:hover .chain-icon { border-color: var(--cyan); }
.chain-step.is-active .chain-icon { background: var(--grad); color: #04101f; border-color: transparent; box-shadow: 0 0 0 6px rgba(34,211,238,.12), 0 0 40px rgba(34,211,238,.45); transform: scale(1.06); }
.chain-step.is-active .chain-num { color: var(--cyan); }
.chain-step.is-active .chain-name { color: #fff; }
.chain-panel { padding: 28px 32px; border-radius: var(--radius); border: 1px solid rgba(34,211,238,.3); background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(59,130,246,.04)); }
.chain-panel h3 { font-size: 1.35rem; }
.chain-panel p { color: var(--muted); font-size: 1.02rem; }
.chain-tip { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: .92rem !important; color: #cfefff !important; }
.chain-tip .icon { color: var(--cyan); margin-top: 2px; }
.chain-panel.is-swap { animation: swap .45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .chain-track { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .chain-track::before { top: 24px; }
  .chain-icon { width: 48px; height: 48px; }
  .chain-icon .icon { width: 22px; height: 22px; }
  .chain-name { font-size: .72rem; }
  .chain-num { display: none; }
  .chain-panel { padding: 22px 20px; }
}

/* ---------- Component explorer ---------- */
.explorer { display: grid; grid-template-columns: 290px 1fr; gap: 20px; align-items: start; }
.explorer-tabs { display: flex; flex-direction: column; gap: 6px; }
.ex-tab { display: flex; align-items: center; gap: 12px; text-align: left; padding: 13px 16px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--text); font-weight: 600; font-size: .95rem; cursor: pointer; transition: all .25s; }
.ex-tab .icon { color: var(--accent); }
.ex-tab:hover { background: var(--card); border-color: var(--line); }
.ex-tab.is-active { background: var(--card); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--shadow); color: var(--heading); }
.explorer-panel { padding: 32px; min-height: 100%; }
.explorer-panel:hover { transform: none; }
.ex-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.ex-head .card-icon { margin: 0; flex: none; }
.ex-head h3 { font-size: 1.5rem; margin-bottom: 6px; }
.ex-head p { margin: 0; color: var(--muted); }
.ex-cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 28px; }
.ex-cols h4, .lab-info h4 { margin: 0 0 12px; font-size: .75rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.ex-cols p { margin: 0; color: var(--muted); font-size: .95rem; }
.ex-list { display: flex; flex-direction: column; gap: 8px; }
.ex-list li { position: relative; padding-left: 18px; font-size: .95rem; }
.ex-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.explorer-panel.is-swap .ex-head, .explorer-panel.is-swap .ex-cols { animation: swap .4s var(--ease); }
@media (max-width: 960px) {
  .explorer { grid-template-columns: 1fr; }
  .explorer-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .ex-tab { flex: none; white-space: nowrap; background: var(--card); border-color: var(--line); padding: 10px 14px; font-size: .88rem; }
  .ex-cols { grid-template-columns: 1fr 1fr; }
  .ex-cols > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .ex-cols { grid-template-columns: 1fr; } .explorer-panel { padding: 22px; } .ex-head { flex-direction: column; } }

/* ---------- Lighting lab ---------- */
.lab { max-width: 1100px; margin: 0 auto; }
.lab-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 24px; }
.lab-opt { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--text); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .25s; }
.lab-opt:hover { border-color: var(--cyan); }
.lab-opt.is-active { background: var(--grad); color: #04101f; border-color: transparent; box-shadow: 0 8px 26px -10px rgba(34,211,238,.7); }
.lab-stage { display: grid; grid-template-columns: 1.35fr .9fr 1fr; gap: 18px; align-items: stretch; }
.lab-diagram, .lab-view, .lab-info { border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255,255,255,.025); padding: 16px; }
.lab-label { margin: 0 0 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.lab-diagram svg, .lab-view svg { width: 100%; height: auto; display: block; border-radius: 10px; }
.lab-view { display: flex; flex-direction: column; }
.lab-view svg { margin: auto 0; border: 1px solid #1e3358; }
.lab-info { padding: 22px; }
.lab-info h3 { font-size: 1.3rem; }
.lab-info p { color: var(--muted); }
.ray { stroke-dasharray: 5 6; animation: rays 1s linear infinite; }
@keyframes rays { to { stroke-dashoffset: -11; } }
.lab-stage.is-swap svg, .lab-stage.is-swap .lab-info > * { animation: swap .4s var(--ease); }
@media (max-width: 960px) { .lab-stage { grid-template-columns: 1fr 1fr; } .lab-diagram { grid-column: 1 / -1; } }
@media (max-width: 560px) { .lab-stage { grid-template-columns: 1fr; } .lab-opt { padding: 8px 14px; font-size: .84rem; } }

/* ---------- Industries ---------- */
.industry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 1080px; margin: 0 auto; }
.industry-grid li { border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: border-color .3s, background-color .3s, transform .3s var(--ease); }
.industry-grid li:hover { border-color: rgba(34,211,238,.5); background: rgba(34,211,238,.06); transform: translateY(-2px); }
.industry-grid a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; height: 100%; }
.industry-grid .icon { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: var(--accent-soft); color: var(--cyan); }
.industry-grid b { display: block; color: #fff; font-weight: 650; }
.industry-grid span { font-size: .86rem; color: var(--muted); }
@media (max-width: 900px) { .industry-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .industry-grid { grid-template-columns: 1fr; } }

/* ---------- Calculator ---------- */
.calc-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.calc-copy > p:not(.kicker) { color: var(--muted); font-size: 1.05rem; }
.calc { padding: 28px; }
.calc:hover { transform: none; }
.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.out-item { padding: 14px 16px; border-radius: 12px; background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.28); }
.out-item span { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.out-item b { font-size: 1.2rem; color: #fff; font-variant-numeric: tabular-nums; }
.calc-note { margin: 14px 0 0; font-size: .85rem; color: #fcd34d; min-height: 1.2em; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 480px) { .calc-fields, .calc-out { grid-template-columns: 1fr; } .calc { padding: 20px; } }

/* ---------- Process timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.timeline li { position: relative; display: flex; gap: 16px; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.timeline h3 { margin-bottom: 6px; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }
.tl-num { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #04101f; background: var(--grad); box-shadow: 0 0 22px rgba(34,211,238,.35); }
@media (max-width: 900px) { .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .timeline { grid-template-columns: 1fr; } }

/* ---------- Cross-link ---------- */
.crosslink { display: flex; align-items: center; gap: 18px; margin: 36px auto 0; max-width: 860px; padding: 20px 24px; border-radius: var(--radius); background: linear-gradient(135deg, #0a1530, #13264a); color: #fff; box-shadow: 0 24px 50px -24px rgba(10,21,48,.7); transition: transform .3s var(--ease); }
.crosslink:hover { transform: translateY(-3px); }
.crosslink-icon img { width: 40px; height: 40px; }
.crosslink-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.crosslink-text b { color: #fff; }
.crosslink-text span { font-size: .9rem; color: #a9b8d3; }
.crosslink > .icon { color: var(--cyan); }
.contact-list a { color: var(--cyan); }

/* ==========================================================================
   MULTI-LEVEL SITE — shared navigation & deep-page components
   ========================================================================== */
html.has-subnav { scroll-padding-top: calc(var(--header-h) + 64px); }

/* ---------- Mega menu ---------- */
.mega-toggle { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 0.875rem; font-weight: 500; }
.mega-toggle .chev { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.has-mega.is-open .mega-toggle .chev { transform: rotate(180deg); }
.mega-toggle.is-current, .nav-link[aria-current="page"] { color: #fff; }
.mega-toggle.is-current::after, .nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); }
.mega-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.mega-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 12px; transition: background-color .2s; }
.mega-item:hover, .mega-item:focus-visible { background: rgba(34,211,238,.08); }
.mega-item[aria-current="page"] { background: rgba(34,211,238,.12); }
.mega-icon { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(34,211,238,.1); color: var(--cyan); }
.mega-icon .icon { width: 20px; height: 20px; }
.mega-item b { display: block; color: #fff; font-size: .92rem; font-weight: 650; }
.mega-item small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: 2px; }
.mega-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; padding: 12px 14px 4px; border-top: 1px solid var(--line); }
.mega-foot a { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--cyan); }
.mega-foot .icon { width: 16px; height: 16px; }
@media (min-width: 1200px) {
  .has-mega { position: static; }
  .mega {
    position: absolute; top: calc(var(--header-h) - 6px); left: 50%; width: min(820px, calc(100vw - 32px));
    padding: 14px; border-radius: 18px; border: 1px solid var(--line-strong);
    background: rgba(6, 13, 30, 0.97); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 30px 70px -20px rgba(0,0,0,.75);
    opacity: 0; visibility: hidden; transform: translate(-50%, -6px); transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
  }
  .has-mega.is-open .mega { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s, transform .2s var(--ease); }
}
@media (max-width: 1199px) {
  .mega-toggle { width: 100%; justify-content: space-between; font-size: 1.125rem; padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 0; color: var(--text); }
  .mega-toggle .chev { width: 20px; height: 20px; }
  .mega-toggle.is-current::after { display: none; }
  .mega { display: none; padding: 8px 0 12px; }
  .has-mega.is-open .mega { display: block; }
  .mega-grid { grid-template-columns: 1fr; }
  .mega-item { padding: 10px 12px; }
  .mega-foot { padding: 10px 12px 0; }
}

/* ---------- Breadcrumb & page hero ---------- */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--muted); margin-bottom: 28px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #475569; }
.breadcrumb a { color: var(--cyan); }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero { position: relative; padding: calc(var(--header-h) + 40px) 0 72px; overflow: hidden; background: var(--navy-900); }
.page-hero .container { position: relative; }
.page-hero--compact { padding-bottom: 56px; }
.ph-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.ph-title { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; margin-bottom: 18px; }
.ph-lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #cbd5e1; max-width: 720px; }
.ph-vi { color: var(--muted); max-width: 700px; margin-bottom: 28px; }
.ph-copy--center { text-align: center; max-width: 860px; margin: 0 auto; }
.ph-copy--center .ph-lead, .ph-copy--center .ph-vi { margin-left: auto; margin-right: auto; }
.page-hero .hero-ctas { justify-content: flex-start; margin-bottom: 0; }
.glance { padding: 26px; background: linear-gradient(160deg, rgba(34,211,238,.08), rgba(255,255,255,.02)); }
.glance:hover { transform: none; }
.glance-title { display: flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; }
.glance dl { margin: 0; display: flex; flex-direction: column; }
.glance dl > div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.glance dt { font-size: .8rem; font-weight: 600; color: var(--muted); }
.glance dd { margin: 0; font-size: .92rem; color: #fff; }
@media (max-width: 960px) { .ph-grid { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 560px) { .glance dl > div { grid-template-columns: 1fr; gap: 2px; } .page-hero .hero-ctas .btn { flex: 1 1 100%; } }

/* ---------- Sticky sub-navigation ---------- */
.subnav { position: sticky; top: var(--header-h); z-index: 60; background: rgba(5, 11, 26, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.subnav-inner { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a { flex: none; position: relative; padding: 16px 14px; font-size: .86rem; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .2s; }
.subnav a:hover { color: #fff; }
.subnav a.is-active { color: #fff; }
.subnav a.is-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; background: var(--grad); border-radius: 2px; }

/* ---------- Principle ---------- */
.principle-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.principle-copy p:not(.kicker) { color: var(--muted); font-size: 1.02rem; }
.principle-fig { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.principle-fig svg { width: 100%; height: auto; display: block; }
@media (max-width: 960px) { .principle-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Type cards (expandable) ---------- */
.types-toolbar { display: flex; justify-content: flex-end; margin: -24px 0 14px; }
.section--light .btn-ghost { color: var(--heading); background: #fff; }
.types-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.type-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s, box-shadow .3s; }
.type-card[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); grid-column: 1 / -1; }
.type-card summary { list-style: none; display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; cursor: pointer; }
.type-card summary::-webkit-details-marker { display: none; }
.tc-num { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: var(--accent); background: var(--accent-soft); }
.tc-head { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tc-name { font-weight: 700; color: var(--heading); font-size: 1.05rem; }
.tc-sum { color: var(--muted); font-size: .93rem; }
.tc-chev { flex: none; margin-top: 8px; color: var(--accent); transition: transform .25s var(--ease); }
.type-card[open] .tc-chev { transform: rotate(180deg); }
.tc-body { padding: 0 22px 22px 78px; animation: swap .35s var(--ease); }
.tc-how { color: var(--text); }
.tc-how b { color: var(--heading); }
.tc-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.tc-cols .tc-label { margin: 0 0 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.ok-list li::before { background: #16a34a; }
.warn-list li::before { background: #f59e0b; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-list li { font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
@media (max-width: 900px) { .types-grid { grid-template-columns: 1fr; } .tc-cols { grid-template-columns: 1fr; gap: 16px; } .tc-body { padding-left: 22px; } }
@media (max-width: 560px) { .types-toolbar { margin-top: -16px; } .type-card summary { padding: 16px; gap: 12px; } .tc-body { padding: 0 16px 18px; } }

/* ---------- Data tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .93rem; }
.data-table th, .data-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.data-table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); white-space: nowrap; }
.data-table tbody th { color: var(--heading); font-weight: 650; min-width: 170px; }
.data-table td { color: var(--muted); }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody tr:hover > * { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.table-note { margin: 12px 4px 0; font-size: .85rem; color: var(--muted); font-style: italic; }

/* ---------- Tools ---------- */
.tool-block { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: start; margin-bottom: 40px; }
.tool-intro h3 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.tool-intro h3 .icon { color: var(--cyan); }
.tool-intro p { color: var(--muted); }
.more-tools { margin: 0; }
.more-tools a { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--cyan); }
.more-tools a:hover { text-decoration: underline; }
.calc-fields .field input, .calc-fields .field select { min-height: 46px; }
.calc-title { margin: 0 0 16px; font-size: 1.1rem; }
@media (max-width: 900px) { .tool-block { grid-template-columns: 1fr; gap: 18px; } }

/* Color contrast tool */
.contrast { padding: 24px; }
.contrast:hover { transform: none; }
.ct-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.ct-lights { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.ct-light { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--text); font-size: .84rem; font-weight: 600; cursor: pointer; }
.ct-light i { width: 12px; height: 12px; border-radius: 50%; }
.ct-light.is-active { border-color: var(--cyan); background: rgba(34,211,238,.12); color: #fff; }
.ct-views { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ct-views figure { margin: 0; }
.ct-views figcaption { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ct-views svg { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid #1e3358; }
.ct-result { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ct-best { margin: 12px 0 0; font-size: .9rem; color: #a5f3fc; }
.ct-meter { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; }
.ct-meter i { display: block; height: 100%; background: var(--grad); transition: width .4s var(--ease); }
@media (max-width: 560px) { .ct-controls, .ct-result { grid-template-columns: 1fr; } }

/* Quiz */
.quiz { padding: 24px; }
.quiz:hover { transform: none; }
.quiz fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.quiz legend { font-weight: 650; color: #fff; margin-bottom: 10px; }
.quiz-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-opts label { position: relative; cursor: pointer; }
.quiz-opts input { position: absolute; opacity: 0; pointer-events: none; }
.quiz-opts span { display: inline-block; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line-strong); font-size: .88rem; color: var(--text); transition: all .2s; }
.quiz-opts input:checked + span { border-color: var(--cyan); background: rgba(34,211,238,.14); color: #fff; }
.quiz-opts input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.quiz-result { margin-top: 6px; padding: 18px 20px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--muted); }
.quiz-result.is-ready { border: 1px solid rgba(34,211,238,.45); background: rgba(34,211,238,.08); color: var(--text); }
.quiz-result h4 { margin: 0 0 6px; color: #fff; font-size: 1.15rem; }
.quiz-result p { margin: 0; }

/* ---------- Selection ---------- */
.selection-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.steps-box { padding: 26px; }
.steps-box:hover { transform: none; }
.steps-box h3 { display: flex; align-items: center; gap: 10px; }
.steps-box h3 .icon { color: var(--accent); }
.steps-list { counter-reset: st; display: flex; flex-direction: column; gap: 12px; }
.steps-list li { counter-increment: st; position: relative; padding-left: 40px; color: var(--text); font-size: .94rem; }
.steps-list li::before { content: counter(st); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 800; color: #fff; background: linear-gradient(120deg, #0891b2, #2563eb); }
@media (max-width: 1024px) { .selection-grid { grid-template-columns: 1fr; } }

/* ---------- Cases & mistakes ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.case-tag { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); margin-bottom: 8px; }
.case h3 { font-size: 1.12rem; margin-bottom: 14px; }
.case dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.case dt { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.case dd { margin: 2px 0 0; color: var(--text); font-size: .94rem; }
.mistakes { margin-top: 24px; padding: 26px; border-color: rgba(245,158,11,.35); background: linear-gradient(160deg, rgba(245,158,11,.07), rgba(255,255,255,.02)); }
.mistakes:hover { transform: none; }
.mistakes h3 { display: flex; align-items: center; gap: 10px; color: #fde68a; }
.mistake-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.mistake-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; }
.mistake-list .icon { flex: none; color: #f59e0b; margin-top: 2px; }
@media (max-width: 760px) { .mistake-list { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 900px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.faq-item[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; font-weight: 650; color: var(--heading); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chev { flex: none; color: var(--accent); transition: transform .25s var(--ease); }
.faq-item[open] .faq-chev { transform: rotate(180deg); }
.faq-a { padding: 0 22px 18px; color: var(--muted); }
.faq-a p { margin: 0; }

/* ---------- Related & CTA ---------- */
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.rel-grid--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.rel-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.rel-card .card-icon { margin: 0; flex: none; width: 44px; height: 44px; }
.rel-card > span:nth-child(2) { flex: 1; }
.rel-card b { display: block; color: var(--heading); font-weight: 650; }
.rel-card small { display: block; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.rel-card > .icon { color: var(--cyan); flex: none; transition: transform .25s var(--ease); }
.rel-card:hover > .icon { transform: translateX(4px); }
.rel-card--accent { border-color: rgba(34,211,238,.4); background: linear-gradient(135deg, rgba(34,211,238,.1), rgba(59,130,246,.05)); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding: 32px 36px; border-radius: 20px; background: linear-gradient(135deg, #0c1f42, #0b2f57); border: 1px solid rgba(34,211,238,.35); box-shadow: 0 30px 70px -30px rgba(8,145,178,.6); }
.cta-band h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); color: #fff; margin-bottom: 6px; }
.cta-band p { margin: 0; color: #a9b8d3; max-width: 560px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-band .btn-ghost { color: #fff; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.25); }
@media (max-width: 560px) { .cta-band { padding: 26px 22px; } .cta-actions .btn { flex: 1 1 100%; } }

/* ---------- Overview deep links ---------- */
.ex-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding: 11px 18px; border-radius: 999px; font-weight: 650; font-size: .92rem; color: #fff; background: linear-gradient(120deg, #0891b2, #2563eb); box-shadow: 0 10px 24px -12px rgba(37,99,235,.6); transition: transform .25s var(--ease); }
.ex-more:hover { transform: translateY(-2px); }
.ex-more .icon { width: 1.05em; height: 1.05em; }
.calc-copy .more-tools { margin-top: 18px; }

/* ---------- Solutions ---------- */
.ind-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 26px; }
.ind-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; color: var(--heading); font-weight: 600; font-size: .9rem; cursor: pointer; transition: all .2s; }
.ind-tab .icon { color: var(--accent); width: 18px; height: 18px; }
.ind-tab:hover { border-color: var(--accent); }
.ind-tab.is-active { background: linear-gradient(120deg, #0891b2, #2563eb); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -12px rgba(37,99,235,.6); }
.ind-tab.is-active .icon { color: #fff; }
.ind-panels { display: flex; flex-direction: column; gap: 22px; }
.ind-panel { padding: 32px; }
.ind-panel:hover { transform: none; }
.js .ind-panel[hidden] { display: none; }
.ind-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 26px; }
.ind-head .card-icon { margin: 0; flex: none; }
.ind-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 6px; }
.ind-head p { margin: 0; color: var(--muted); max-width: 760px; }
.ind-sub { font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 14px; }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 26px; counter-reset: none; }
.flow-stage { position: relative; display: flex; gap: 12px; padding: 18px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--line); }
.flow-num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .82rem; color: #fff; background: linear-gradient(120deg, #0891b2, #2563eb); }
.flow-body h4 { margin: 3px 0 8px; font-size: 1rem; color: var(--heading); }
.flow-body .ex-list li { font-size: .88rem; }
.flow-how { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: .84rem; color: var(--accent); font-weight: 600; }
.flow-how .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.comp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.comp-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 650; font-size: .88rem; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); transition: background-color .2s; }
.comp-chip:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.comp-chip .icon { width: 16px; height: 16px; }
@media (max-width: 560px) { .ind-panel { padding: 22px; } .ind-head { flex-direction: column; } .ind-tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .ind-tab { flex: none; } }

/* ---------- Knowledge ---------- */
.calc-hub { display: grid; grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
.calc-tabs .ex-tab { color: var(--text); }
.calc-tabs .ex-tab.is-active { background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.5); color: #fff; box-shadow: none; }
.calc-tabs .ex-tab:hover { background: rgba(255,255,255,.04); border-color: var(--line); }
.js .calc-panel[hidden] { display: none; }
.calc-panel-title { font-size: 1.25rem; margin-bottom: 14px; }
@media (max-width: 960px) { .calc-hub { grid-template-columns: 1fr; } .calc-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 6px; } .calc-tabs .ex-tab { flex: none; white-space: nowrap; background: rgba(255,255,255,.03); border-color: var(--line); } }
.formula h3 { font-size: 1.02rem; }
.formula-eq { font-family: var(--mono); font-size: .9rem !important; color: var(--heading) !important; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); padding: 10px 12px; border-radius: 8px; margin-bottom: 10px !important; overflow-wrap: anywhere; }
.check-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.check-progress { flex: 1; min-width: 220px; font-weight: 650; color: #fff; }
.check-progress .bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); margin-top: 8px; overflow: hidden; }
.check-progress .bar i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s var(--ease); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.check-group { margin: 0; padding: 22px; }
.check-group:hover { transform: none; }
.check-group legend { float: left; width: 100%; font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.check-group ul { clear: both; display: flex; flex-direction: column; gap: 10px; }
.check-group label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .93rem; }
.check-group input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: #22d3ee; }
.check-group input:checked + span { color: var(--muted); text-decoration: line-through; }
.gloss-search { position: relative; display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 0 auto 26px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.gloss-search .icon { color: var(--accent); }
.gloss-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 14px 0; font: inherit; font-size: 1rem; background: transparent; color: var(--heading); }
.gloss-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8,145,178,.15); }
.gloss-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.gloss-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gloss-item { padding: 16px 18px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.gloss-item[hidden] { display: none; }
.gloss-item dt { font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.gloss-item dd { margin: 0; color: var(--muted); font-size: .92rem; }
.gloss-item mark { background: rgba(34,211,238,.25); color: inherit; border-radius: 3px; padding: 0 1px; }
.gloss-empty { text-align: center; color: var(--muted); }

/* ---------- Footer columns ---------- */
.footer-cols { display: grid; grid-template-columns: repeat(2, auto); gap: 12px 64px; }
.footer-cols h2 { font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: #fff; margin-bottom: 12px; }
.footer-cols div { display: flex; flex-direction: column; gap: 8px; }
.footer-cols a { font-size: .9rem; transition: color .2s; }
.footer-cols a:hover { color: var(--cyan); }
.footer-contact { display: flex; align-items: center; gap: 8px; }
.footer-contact a { color: var(--cyan); }
@media (max-width: 560px) { .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ---------- Print (checklist) ---------- */
@media print {
  .site-header, .subnav, .to-top, .site-footer, .page-hero, .cta-band, #calculators, #formulas, #glossary, .check-bar button { display: none !important; }
  body, .section { background: #fff !important; color: #000 !important; }
  .check-group { border: 1px solid #999 !important; break-inside: avoid; }
  .check-group legend, .check-group label { color: #000 !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Grid children may shrink below their content (wide tables scroll inside .table-wrap) */
.selection-grid > *, .tool-block > *, .principle-grid > *, .calc-hub > *, .ph-grid > *, .explorer > *, .calc-grid > * { min-width: 0; }

/* More opaque sticky bars so light sections do not tint them */
.site-header.is-scrolled { background: rgba(5, 11, 26, 0.95); }
.subnav { background: rgba(5, 11, 26, 0.96); }

/* Tables become stacked cards on small screens */
@media (max-width: 640px) {
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  .data-table { min-width: 0; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table tr { margin-bottom: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); overflow: hidden; }
  .data-table tbody th { padding: 14px 16px 8px; border-bottom: 0; font-size: 1rem; }
  .data-table td { padding: 4px 16px 10px; border-bottom: 0; }
  .data-table td::before { content: attr(data-label); display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 2px; }
  .data-table tbody tr:last-child > * { border-bottom: 0; }
  .data-table td:last-child { padding-bottom: 14px; }
}

/* Honeypot field (spam protection) — hidden from people */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* brand:start — official HOANTRANTDH identity (generated by scripts/brand.py) */
:root { --brand-red: #921b21; --brand-red-2: #b8262f; }
.site-header { border-top: 3px solid var(--brand-red); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 9px; padding: 3px 7px; line-height: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(146, 27, 33, .12); flex: none; }
.brand-logo img { display: block; height: 42px; width: auto; }
.brand-site { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding-left: 12px; border-left: 1px solid var(--line-strong, rgba(148, 178, 230, .26)); line-height: 1.2; }
.brand-site .brand-sub { font-size: .86rem; font-weight: 700; letter-spacing: .02em; color: var(--heading, #fff); white-space: nowrap; }
.brand-site .brand-tag { font-size: .68rem; font-style: italic; color: var(--muted, #94a5c3); white-space: nowrap; }
.footer-brand .brand-logo { padding: 6px 12px; border-radius: 12px; }
.footer-brand .brand-logo img { height: 74px; }
.footer-company { margin-top: 18px; display: grid; gap: 8px; font-size: .9rem; }
.footer-company .fc-name { font-weight: 700; color: var(--heading, #fff); }
.footer-company .fc-name small { display: block; font-weight: 500; color: var(--muted, #94a5c3); font-size: .8rem; }
.footer-company .fc-row { display: flex; align-items: flex-start; gap: 10px; margin: 0; }
.footer-company svg { width: 16px; height: 16px; flex: none; margin-top: 3px; fill: none; stroke: var(--brand-red-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-company a { color: inherit; text-decoration: none; }
.footer-company a:hover { color: var(--heading, #fff); text-decoration: underline; }
.site-footer { border-top: 3px solid var(--brand-red); }
.footer-family { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding-top: 22px; padding-bottom: 6px; border-top: 1px solid var(--line, rgba(148, 178, 230, .14)); font-size: .86rem; }
.footer-family span { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; color: var(--heading, #fff); margin-right: 6px; }
.footer-family a { color: var(--muted, #94a5c3); text-decoration: none; }
.footer-family a:hover, .footer-family a[aria-current] { color: var(--heading, #fff); }
@media (max-width: 1100px) { .brand-site .brand-tag { display: none; } }
@media (max-width: 560px) {
  .brand-logo img { height: 34px; }
  .brand { gap: 9px; }
  .brand-site { padding-left: 9px; }
  .brand-site .brand-sub { font-size: .76rem; white-space: normal; max-width: 9.5em; }
}
/* brand:end */
