/* =========================================================
   ASIS — design tokens
   Brand blue (from logo) · soft night · soft white
   ========================================================= */
:root {
  --night-0: #0b121c;
  --night:   #0f1722;
  --night-2: #142032;
  --night-3: #1b2a40;
  --line:    rgba(148, 178, 214, 0.14);
  --line-2:  rgba(148, 178, 214, 0.26);

  --blue:      #0a5ca8;   /* ASIS brand blue (logo letterforms) */
  --blue-hi:   #46aaea;   /* ASIS sky blue (logo swoosh), accents on dark */
  --blue-deep: #004a8e;
  --blue-soft: #a9d3f3;
  --steel:     #6d84a0;

  --white:  #f3f5f8;      /* soft white */
  --paper:  #e7ecf2;
  --ink:    #0f1722;
  --ink-2:  #3a4a5e;

  --text:       #dbe4ef;
  --text-muted: #8fa1b8;

  --ok:   #4fbf9f;
  --warn: #e8b04a;
  --hot:  #f0743e;

  --radius:   10px;
  --radius-s: 6px;
  --shadow:   0 20px 50px -20px rgba(0, 0, 0, 0.55);
  --font-head: "Montserrat", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--blue-hi); text-decoration: none; }
a:hover { color: var(--blue-soft); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; color: #fff; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); font-family: var(--font-mono); font-weight: 500; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 4px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--font-mono); }
.small { font-size: .85rem; }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.35em; border-radius: 999px;
  font-weight: 600; font-size: .95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hi); color: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--blue-hi); color: #fff; }
.btn-sm { padding: .6em 1.05em; font-size: .88rem; }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 50;
  background: rgba(243, 245, 248, 0.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #dde4ec;
  transition: box-shadow .25s;
}
.site-header.scrolled { box-shadow: 0 6px 24px -12px rgba(15, 23, 34, .25); }
.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 42px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a:not(.btn) { color: var(--ink-2); padding: 8px 12px; border-radius: 6px; font-size: .94rem; font-weight: 500; position: relative; }
.nav-menu a:not(.btn):hover { color: var(--blue-deep); background: rgba(10, 92, 168, .06); }
.nav-menu a[aria-current="page"]:not(.btn) { color: var(--blue-deep); }
.nav-menu a[aria-current="page"]:not(.btn)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--blue); border-radius: 2px; }
.nav-cta { margin-left: 12px; }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .brand img { height: 36px; }
  .nav-menu {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 16px 20px; background: var(--white);
    border-bottom: 1px solid #dde4ec; box-shadow: 0 20px 30px -20px rgba(15,23,34,.3);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
  }
  .nav-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-menu a:not(.btn) { padding: 12px; font-size: 1.05rem; }
  .nav-menu a[aria-current="page"]:not(.btn)::after { left: 12px; right: auto; width: 24px; bottom: 6px; }
  .nav-cta { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.section-tight { padding: clamp(48px, 7vw, 80px) 0; }
.section-alt { background: var(--night-0); }
.section-light { background: var(--white); color: var(--ink-2); }
.section-light h1, .section-light h2, .section-light h3 { color: var(--ink); }
.section-light h4 { color: var(--steel); }
.section-light .muted { color: #5c6d82; }
.section-light a:not(.btn) { color: var(--blue); }
.section-light .eyebrow { color: var(--blue); }
.section-light .eyebrow::before { background: var(--blue); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-hi); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--blue-hi); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; }
.section-head.center .eyebrow { justify-content: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); }
.section-light .lead { color: #4f6076; }

.grid-bg::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  opacity: .55;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(100svh, 920px);
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 40px) 0 80px;
  overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 80% 70% at 70% 40%, #15253b 0%, var(--night) 60%, var(--night-0) 100%);
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(11,18,28,.92) 0%, rgba(11,18,28,.65) 38%, rgba(11,18,28,0) 70%),
              linear-gradient(0deg, var(--night) 0%, transparent 25%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: end; }
.hero h1 { max-width: 17ch; font-size: clamp(2.2rem, 4.4vw, 3.5rem); }
.hero h1 .accent { color: var(--blue-hi); }
.hero .lead { max-width: 54ch; margin-bottom: 32px; color: #b4c3d6; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hud {
  justify-self: end; width: min(320px, 100%);
  font-family: var(--font-mono); font-size: .76rem; color: var(--blue-soft);
  background: rgba(11, 18, 28, .6); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  padding: 14px 16px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hud-title { display: flex; justify-content: space-between; color: var(--text-muted); letter-spacing: .1em; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line-2); }
.hud-title .rec { color: var(--hot); }
.hud-title .rec::before { content: "●"; margin-right: 6px; animation: blink 1.4s infinite; }
.hud-row { display: flex; justify-content: space-between; padding: 3px 0; }
.hud-row span:last-child { color: #fff; }
.hud-bar { height: 3px; background: var(--line); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.hud-bar i { display: block; height: 100%; width: 0; background: var(--blue-hi); transition: width .3s linear; }
.hud-note { margin-top: 10px; color: var(--text-muted); font-size: .68rem; }
@keyframes blink { 50% { opacity: .2; } }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hud { display: none; }
  .hero { min-height: 100svh; align-items: flex-start; }
  .hero::after { background: linear-gradient(0deg, var(--night) 5%, rgba(11,18,28,.7) 50%, rgba(11,18,28,.5) 100%); }
}

/* ---------- Cards ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card {
  position: relative; background: var(--night-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; overflow: hidden;
  transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card p { color: var(--text-muted); font-size: .95rem; margin: 0; }
.card .card-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(74,143,224,.12); color: var(--blue-hi); margin-bottom: 20px; }
.card .card-icon svg { width: 22px; height: 22px; }
.card .card-link { display: inline-flex; gap: 6px; margin-top: 18px; font-size: .9rem; font-weight: 600; }
.section-light .card { background: #fff; border-color: #dbe2ea; box-shadow: 0 1px 0 rgba(15,23,34,.03); }
.section-light .card:hover { border-color: #b9c8da; }
.section-light .card p { color: #56677c; }
.section-light .card .card-icon { background: rgba(47,111,184,.1); color: var(--blue); }

/* ---------- CTA band ---------- */
.cta-band {
  border-radius: 22px; padding: clamp(36px, 6vw, 64px);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(74,143,224,.35), transparent 55%),
    linear-gradient(135deg, var(--blue-deep), #14315a 60%, var(--night-2));
  border: 1px solid rgba(156,194,239,.25);
  display: grid; grid-template-columns: 1.4fr auto; gap: 28px; align-items: center;
  position: relative; overflow: hidden;
}
.cta-band p { color: #c3d4e8; margin: 0; max-width: 56ch; }
.cta-band h2 { margin-bottom: .35em; }
@media (max-width: 760px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- Page header (inner pages) ---------- */
.page-hero { padding: calc(var(--header-h) + clamp(56px, 8vw, 96px)) 0 clamp(48px, 6vw, 72px); position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 70% 90% at 80% 0%, #17283f, var(--night) 70%); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; }
.page-hero .lead { max-width: 62ch; }

/* ---------- Data lab panels (information page) ---------- */
.lab { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--night-0); box-shadow: var(--shadow); }
.lab-stage { position: relative; min-height: 300px; background: #070c13; display: flex; align-items: center; justify-content: center; }
.lab-stage canvas { width: 100%; height: auto; display: block; touch-action: none; }
.lab-side { border-left: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 18px; background: var(--night-2); font-size: .9rem; }
.lab-overlay { position: absolute; pointer-events: none; font-family: var(--font-mono); font-size: .72rem; color: var(--blue-soft); }
.lab-overlay.tl { top: 12px; left: 14px; }
.lab-overlay.tr { top: 12px; right: 14px; text-align: right; }
.lab-overlay.bl { bottom: 12px; left: 14px; }
.lab-overlay.br { bottom: 12px; right: 14px; text-align: right; }
.lab-hint { color: var(--text-muted); font-size: .8rem; }
.lab-overlay.sim { color: var(--warn); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 960px) {
  .lab { grid-template-columns: 1fr; }
  .lab-side { border-left: 0; border-top: 1px solid var(--line); }
}

.seg { display: inline-flex; border-radius: 14px !important; background: var(--night); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 999px; font-size: .8rem; color: var(--text-muted); cursor: pointer; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.seg button:hover:not([aria-pressed="true"]) { color: #fff; }

.readout { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.readout > div { background: var(--night); padding: 10px 12px; }
.readout dt, .readout .k { font-family: var(--font-mono); font-size: .68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.readout dd, .readout .v { margin: 2px 0 0; font-family: var(--font-mono); font-size: 1rem; color: #fff; }
.readout .v small { color: var(--text-muted); font-size: .72rem; margin-left: 2px; }
.readout .wide { grid-column: 1 / -1; }

.anomaly-list { list-style: none; margin: 0; padding: 0; font-family: var(--font-mono); font-size: .78rem; max-height: 170px; overflow: auto; }
.anomaly-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.anomaly-list .sev { align-self: flex-start; white-space: nowrap; padding: 0 6px; border-radius: 4px; font-size: .68rem; }
.sev-high { background: rgba(240,116,62,.18); color: var(--hot); }
.sev-med { background: rgba(232,176,74,.16); color: var(--warn); }
.sev-low { background: rgba(156,194,239,.14); color: var(--blue-soft); }

.legend-bar { height: 10px; border-radius: 3px; }
.legend-labels { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .7rem; color: var(--text-muted); margin-top: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-size: .78rem; font-family: var(--font-mono); color: var(--text-muted); display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .06em; }
.field label output { color: #fff; text-transform: none; letter-spacing: 0; }
input[type="range"] { width: 100%; accent-color: var(--blue-hi); }
.lab select, .lab input[type="number"] { background: var(--night); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 10px; color: #fff; width: 100%; }
.warn-note { font-size: .78rem; color: var(--warn); font-family: var(--font-mono); min-height: 1.2em; }

.profile-chart { width: 100%; height: 150px; display: block; }

.lab-section { padding-top: clamp(56px, 8vw, 96px); }
.lab-section:first-of-type { padding-top: 0; }
.lab-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 28px; }
.lab-head p { color: var(--text-muted); margin: 0; }
.lab-head .num { font-family: var(--font-mono); color: var(--blue-hi); font-size: .8rem; letter-spacing: .1em; display: block; margin-bottom: 10px; }
@media (max-width: 860px) { .lab-head { grid-template-columns: 1fr; gap: 12px; } }

/* sub nav for info page */
.subnav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(15,23,34,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.subnav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a { padding: 14px 14px; font-size: .85rem; color: var(--text-muted); white-space: nowrap; font-family: var(--font-mono); border-bottom: 2px solid transparent; }
.subnav a:hover, .subnav a.active { color: #fff; border-bottom-color: var(--blue-hi); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid #d6dee8; border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 620px; }
table.data th, table.data td { text-align: left; padding: 14px 18px; border-bottom: 1px solid #e3e9f0; vertical-align: top; }
table.data th { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--steel); background: var(--paper); font-weight: 500; }
table.data tr:last-child td { border-bottom: 0; }
table.data td:first-child { color: var(--ink); font-weight: 600; }
table.data code { font-family: var(--font-mono); font-size: .8rem; background: var(--paper); padding: 2px 6px; border-radius: 4px; color: var(--blue-deep); }

/* ---------- Equipment ---------- */
.equip { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.equip-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); overflow: hidden; }
.equip-card header { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.equip-card header .role { font-family: var(--font-mono); font-size: .74rem; color: var(--blue-hi); letter-spacing: .1em; text-transform: uppercase; }
.equip-card header h3 { margin: 6px 0 4px; font-size: 1.4rem; }
.equip-card header p { margin: 0; color: var(--text-muted); font-size: .92rem; }
.spec-list { margin: 0; padding: 8px 26px 20px; }
.spec-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.spec-list div:last-child { border-bottom: 0; }
.spec-list dt { color: var(--text-muted); }
.spec-list dd { margin: 0; color: #fff; text-align: right; font-family: var(--font-mono); font-size: .84rem; }

.note { border-left: 3px solid var(--blue-hi); padding: 14px 18px; background: rgba(74,143,224,.07); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: .92rem; color: var(--text); }
.section-light .note { background: rgba(47,111,184,.07); border-color: var(--blue); color: var(--ink-2); }

/* ---------- Portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { border: 1px solid var(--line-2); background: transparent; color: var(--text-muted); padding: 7px 14px; border-radius: 999px; font-size: .85rem; cursor: pointer; font-weight: 500; }
.chip:hover { color: #fff; border-color: var(--blue-hi); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.project-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); overflow: hidden; color: inherit; transition: border-color .25s, transform .25s; }
.project-card:hover { border-color: var(--blue-hi); transform: translateY(-4px); color: inherit; }
.project-media { position: relative; aspect-ratio: 16 / 10; background: #070c13; overflow: hidden; }
.project-media img, .project-media canvas { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-card:hover .project-media img, .project-card:hover .project-media canvas { transform: scale(1.04); }
.project-media .badge { position: absolute; top: 12px; left: 12px; }
.badge { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; padding: 4px 9px; border-radius: 6px; background: rgba(11,18,28,.75); border: 1px solid var(--line-2); color: var(--blue-soft); backdrop-filter: blur(4px); text-transform: uppercase; }
.badge.sample { color: var(--warn); border-color: rgba(232,176,74,.4); }
.project-body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project-body .meta { font-family: var(--font-mono); font-size: .74rem; color: var(--text-muted); display: flex; gap: 14px; flex-wrap: wrap; }
.project-body h3 { margin: 0; font-size: 1.2rem; }
.project-body p { color: var(--text-muted); font-size: .93rem; margin: 0; }
.project-body .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.empty { padding: 48px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--text-muted); }

.case-hero-media { aspect-ratio: 21 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: #070c13; margin-top: 36px; }
.case-hero-media img, .case-hero-media canvas { width: 100%; height: 100%; object-fit: cover; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; }
.case-layout .prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.case-layout .prose h2:first-child { margin-top: 0; }
.case-layout .prose p, .case-layout .prose li { color: #b9c7d8; }
.case-facts { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); padding: 8px 22px; }
.case-facts div { padding: 12px 0; border-bottom: 1px dashed var(--line); }
.case-facts div:last-child { border-bottom: 0; }
.case-facts dt { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.case-facts dd { margin: 3px 0 0; color: #fff; font-size: .95rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 28px 0; }
.metric { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 16px 18px; background: var(--night-2); }
.metric b { display: block; font-family: var(--font-head); font-size: 1.8rem; color: #fff; line-height: 1.1; }
.metric span { font-size: .82rem; color: var(--text-muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 18px; }
.gallery figure { margin: 0; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: #070c13; }
.gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery figcaption { font-size: .8rem; color: var(--text-muted); padding: 8px 10px; }
@media (max-width: 900px) {
  .case-layout { grid-template-columns: 1fr; gap: 32px; }
  .case-facts { position: static; }
}

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.values { display: grid; gap: 14px; }
.value { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 18px; border: 1px solid #dbe2ea; border-radius: var(--radius); background: #fff; }
.value b.n { font-family: var(--font-mono); color: var(--blue); font-weight: 500; font-size: .85rem; padding-top: 3px; }
.value h3 { font-size: 1.05rem; margin: 0 0 4px; }
.value p { margin: 0; font-size: .93rem; }
.cred-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.cred-list li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--night-2); font-size: .93rem; }
.cred-list li svg { width: 18px; height: 18px; color: var(--ok); flex: none; margin-top: 3px; }
.cred-list li.pending svg { color: var(--steel); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 32px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--night-2); }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: .8rem; font-family: var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
.form input, .form select, .form textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--night); color: #fff; transition: border-color .2s, box-shadow .2s; }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue-hi); box-shadow: 0 0 0 3px rgba(74,143,224,.2); }
.form .hp { position: absolute; left: -9999px; }
.form-status { grid-column: 1 / -1; font-size: .92rem; min-height: 1.4em; margin: 0; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--hot); }
.contact-aside { display: flex; flex-direction: column; gap: 14px; }
.contact-item { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); }
.contact-item h4 { margin-bottom: 6px; }
.contact-item a, .contact-item p { color: #fff; font-size: 1.02rem; margin: 0; word-break: break-word; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--white); color: var(--ink-2); border-top: 1px solid #dde4ec; padding: 64px 0 28px; }
.site-footer h4 { color: var(--steel); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1.3fr .8fr 1fr; gap: 40px; }
.footer-grid a:not(.footer-logo) { display: block; color: var(--ink-2); padding: 4px 0; font-size: .92rem; }
.footer-grid a:not(.footer-logo):hover { color: var(--blue); }
.footer-logo img { width: 220px; height: auto; }
.footer-tag { color: #5c6d82; margin: 16px 0 0; max-width: 36ch; font-size: .93rem; }
.footer-scope { margin-top: 40px; padding: 18px 20px; background: #fff; border: 1px solid #dde4ec; border-radius: var(--radius-s); }
.footer-scope p { margin: 0; font-size: .82rem; color: #5c6d82; line-height: 1.55; }
.footer-scope strong { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 22px; border-top: 1px solid #dde4ec; font-size: .82rem; color: #5c6d82; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.view-enter { animation: viewIn .45s ease both; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-top: var(--header-h); }
.not-found .code { font-family: var(--font-mono); font-size: 5rem; color: var(--blue-hi); line-height: 1; }

.anchor { scroll-margin-top: calc(var(--header-h) + 64px); }

/* =========================================================
   Enterprise components
   ========================================================= */

/* Trust bar under hero */
.trust { background: var(--white); border-bottom: 1px solid #dde4ec; }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { display: flex; gap: 12px; align-items: center; padding: 22px 18px; color: var(--ink-2); font-size: .9rem; line-height: 1.35; border-left: 1px solid #e3e9f0; }
.trust-item:first-child { border-left: 0; padding-left: 0; }
.trust-item svg { width: 22px; height: 22px; color: var(--blue); flex: none; }
.trust-item b { display: block; color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .trust-inner { grid-template-columns: 1fr 1fr; }
  .trust-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .trust-item { border-top: 1px solid #e3e9f0; }
  .trust-item:nth-child(-n+2) { border-top: 0; }
}

/* Hero trust line */
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 28px; font-size: .85rem; color: #9fb3ca; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-hi); }

/* Service cards */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .svc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .svc-grid { grid-template-columns: 1fr; } }
.svc { display: flex; flex-direction: column; background: #fff; border: 1px solid #dbe2ea; border-radius: var(--radius); padding: 26px; color: var(--ink-2); transition: border-color .2s, box-shadow .2s, transform .2s; }
.svc:hover { border-color: #a9c4e2; box-shadow: 0 18px 40px -24px rgba(10, 92, 168, .45); transform: translateY(-2px); color: var(--ink-2); }
.svc .card-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(10, 92, 168, .08); color: var(--blue); margin-bottom: 18px; }
.svc .card-icon svg { width: 22px; height: 22px; }
.svc h3 { color: var(--ink); font-size: 1.12rem; margin-bottom: 8px; }
.svc p { font-size: .94rem; color: #56677c; margin: 0 0 16px; }
.svc .svc-get { margin-top: auto; padding-top: 14px; border-top: 1px dashed #dbe2ea; font-size: .82rem; color: #56677c; }
.svc .svc-get b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--steel); margin-bottom: 4px; }
.svc .more { margin-top: 14px; font-size: .88rem; font-weight: 600; color: var(--blue); }

/* Process stepper */
.process { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.process-steps { list-style: none; margin: 0; padding: 0; position: relative; }
.process-steps::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--line-2); }
.process-steps button { position: relative; display: flex; gap: 14px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px 10px 0; cursor: pointer; color: var(--text-muted); font-size: .98rem; font-weight: 500; border-radius: 8px; }
.process-steps button b { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 500; font-size: .82rem; background: var(--night); border: 1.5px solid var(--line-2); color: var(--text-muted); position: relative; z-index: 1; transition: all .2s; }
.process-steps button:hover { color: #fff; }
.process-steps button[aria-selected="true"] { color: #fff; }
.process-steps button[aria-selected="true"] b { background: var(--blue); border-color: var(--blue-hi); color: #fff; box-shadow: 0 0 0 5px rgba(70, 170, 234, .15); }
.process-steps button.done b { border-color: var(--blue-hi); color: var(--blue-hi); }
.process-panel { background: var(--night-2); border: 1px solid var(--line-2); border-radius: var(--radius); padding: clamp(24px, 3.5vw, 36px); min-height: 100%; }
.process-panel .step-k { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; color: var(--blue-hi); text-transform: uppercase; }
.process-panel h3 { font-size: 1.6rem; margin: 8px 0 6px; }
.process-panel > p { color: var(--text-muted); margin-bottom: 24px; }
.process-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.process-cols div { background: var(--night); padding: 18px; }
.process-cols h4 { margin-bottom: 8px; }
.process-cols p { margin: 0; font-size: .93rem; color: var(--text); }
.process-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 12px; }
.process-bar { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.process-bar i { display: block; height: 100%; background: var(--blue-hi); transition: width .3s; }
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; }
  .process-steps { display: flex; overflow-x: auto; gap: 4px; padding-bottom: 6px; }
  .process-steps::before { display: none; }
  .process-steps button { flex-direction: column; gap: 6px; min-width: 96px; font-size: .78rem; text-align: center; padding: 6px; }
  .process-cols { grid-template-columns: 1fr; }
}

/* Industries */
.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #dbe2ea; border: 1px solid #dbe2ea; border-radius: var(--radius); overflow: hidden; }
.industries div { background: #fff; padding: 24px; }
.industries h3 { font-size: 1.02rem; margin-bottom: 6px; color: var(--ink); }
.industries p { margin: 0; font-size: .92rem; color: #56677c; }
@media (max-width: 900px) { .industries { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .industries { grid-template-columns: 1fr; } }

/* Scope / standards */
.standards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.standard { border-top: 2px solid var(--blue-hi); padding-top: 18px; }
.standard h3 { font-size: 1.08rem; }
.standard p { color: var(--text-muted); font-size: .94rem; margin: 0; }
@media (max-width: 860px) { .standards { grid-template-columns: 1fr; } }

/* Tech teaser tiles */
.tech-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tech-tile { display: block; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); color: var(--text); transition: border-color .2s, transform .2s; }
.tech-tile:hover { border-color: var(--blue-hi); transform: translateY(-2px); color: var(--text); }
.tech-tile .k { font-family: var(--font-mono); font-size: .72rem; color: var(--blue-hi); letter-spacing: .1em; }
.tech-tile h3 { font-size: 1rem; margin: 8px 0 6px; }
.tech-tile p { margin: 0; font-size: .86rem; color: var(--text-muted); }
@media (max-width: 1000px) { .tech-tiles { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq { max-width: 860px; margin: 0 auto; border-top: 1px solid #dbe2ea; }
.faq details { border-bottom: 1px solid #dbe2ea; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 600; color: var(--ink); font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--blue); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 20px; color: #56677c; max-width: 72ch; }

/* Services page */
.svc-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 64px); padding: clamp(48px, 7vw, 80px) 0; border-top: 1px solid #dbe2ea; scroll-margin-top: calc(var(--header-h) + 64px); }
.svc-detail:first-child { border-top: 0; padding-top: 0; }
.svc-detail .card-icon { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: rgba(10, 92, 168, .08); color: var(--blue); margin-bottom: 18px; }
.svc-detail .card-icon svg { width: 24px; height: 24px; }
.svc-detail h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.svc-detail .lead { margin-bottom: 18px; }
.svc-panel { background: #fff; border: 1px solid #dbe2ea; border-radius: var(--radius); padding: 24px; }
.svc-panel h4 { margin: 0 0 10px; }
.svc-panel ul { margin: 0 0 22px; padding: 0; list-style: none; }
.svc-panel li { padding: 7px 0 7px 22px; position: relative; font-size: .94rem; color: var(--ink-2); border-bottom: 1px dashed #e3e9f0; }
.svc-panel li:last-child { border-bottom: 0; }
.svc-panel li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 2px; background: var(--blue); opacity: .75; }
.svc-panel .sensor { font-family: var(--font-mono); font-size: .8rem; color: var(--blue-deep); background: var(--paper); padding: 8px 10px; border-radius: 6px; }
.svc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn-outline { border-color: #b9c8da; color: var(--blue-deep); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.svc-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-jump a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); font-size: .86rem; }
.svc-jump a:hover { border-color: var(--blue-hi); color: #fff; }
@media (max-width: 900px) { .svc-detail { grid-template-columns: 1fr; } }

/* Technology explainers */
.explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.explain div { background: var(--night-2); padding: 18px 20px; }
.explain h4 { margin-bottom: 6px; }
.explain p { margin: 0; font-size: .93rem; color: var(--text); }
@media (max-width: 860px) { .explain { grid-template-columns: 1fr; } }

.guide { display: flex; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; margin-top: 20px; background: var(--night-2); }
.guide-steps { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-width: 220px; }
.guide-steps button { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 18px; color: var(--text-muted); cursor: pointer; font-size: .9rem; display: flex; gap: 10px; align-items: center; }
.guide-steps button:last-child { border-bottom: 0; }
.guide-steps button b { font-family: var(--font-mono); font-weight: 500; font-size: .75rem; color: var(--steel); }
.guide-steps button:hover { color: #fff; background: rgba(255,255,255,.02); }
.guide-steps button[aria-selected="true"] { color: #fff; background: rgba(70,170,234,.1); box-shadow: inset 3px 0 0 var(--blue-hi); }
.guide-steps button[aria-selected="true"] b { color: var(--blue-hi); }
.guide-body { padding: 20px 24px; flex: 1; }
.guide-body h4 { color: var(--blue-hi); margin-bottom: 6px; }
.guide-body p { margin: 0; color: var(--text); font-size: .96rem; max-width: 70ch; }
.guide-body .guide-play { margin-top: 14px; display: flex; gap: 10px; align-items: center; font-size: .8rem; color: var(--text-muted); }
@media (max-width: 760px) {
  .guide { flex-direction: column; }
  .guide-steps { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); min-width: 0; }
  .guide-steps button { border-bottom: 0; border-right: 1px solid var(--line); white-space: nowrap; }
}

.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.terms div { font-size: .86rem; color: var(--text-muted); padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--radius-s); }
.terms dt { font-family: var(--font-mono); font-size: .76rem; color: #fff; margin-bottom: 3px; }
.terms dd { margin: 0; }

.tech-index { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tech-index a { display: block; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--night-2); color: var(--text); }
.tech-index a:hover { border-color: var(--blue-hi); color: var(--text); }
.tech-index .k { font-family: var(--font-mono); font-size: .72rem; color: var(--blue-hi); }
.tech-index b { display: block; font-family: var(--font-head); margin: 6px 0 4px; color: #fff; font-size: .98rem; }
.tech-index span { font-size: .82rem; color: var(--text-muted); }
@media (max-width: 1000px) { .tech-index { grid-template-columns: 1fr 1fr; } }

.lab-stage.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch; }
.lab-stage.dual > div { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 18px; position: relative; }
.lab-stage.dual > div + div { border-left: 1px solid var(--line); }
.lab-stage.dual svg { width: 100%; height: auto; max-width: 420px; }
.stage-cap { position: absolute; top: 12px; left: 14px; font-family: var(--font-mono); font-size: .7rem; color: var(--blue-soft); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 700px) { .lab-stage.dual { grid-template-columns: 1fr; } .lab-stage.dual > div + div { border-left: 0; border-top: 1px solid var(--line); } }

.disclaimer { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border: 1px solid #dbe2ea; background: #fff; border-radius: var(--radius); color: var(--ink-2); font-size: .92rem; }
.disclaimer svg { width: 22px; height: 22px; color: var(--blue); flex: none; margin-top: 2px; }
.disclaimer p { margin: 0; }
.hl { animation: hlPulse 1.6s ease; border-radius: 8px; }
@keyframes hlPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(70,170,234,0); } 20%, 70% { box-shadow: 0 0 0 4px rgba(70,170,234,.45); } }
.section-light .standard p { color: #56677c; }
.section-light .standard { border-top-color: var(--blue); }

/* =========================================================
   Media: hero video, deliverables, diagrams, photos, lightbox
   ========================================================= */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.dev-note { position: absolute; right: 16px; bottom: 16px; z-index: 2; max-width: 360px; font-size: .74rem; color: #f3d9a6; background: rgba(60, 40, 0, .7); border: 1px dashed rgba(232,176,74,.6); padding: 8px 10px; border-radius: 6px; }

.deliv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 1000px) { .deliv-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .deliv-grid { grid-template-columns: 1fr; } }
.deliv { display: flex; flex-direction: column; background: #fff; border: 1px solid #dbe2ea; border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.deliv:hover { box-shadow: 0 20px 44px -26px rgba(10, 92, 168, .5); transform: translateY(-2px); }
.deliv-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #e7ecf2; border-bottom: 1px solid #dbe2ea; }
.deliv-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s ease; }
.deliv-img.landscape img { object-position: center; }
.deliv:hover .deliv-img img { transform: scale(1.03); }
.deliv-zoom { position: absolute; right: 12px; bottom: 12px; display: inline-flex; gap: 6px; align-items: center; background: rgba(15, 23, 34, .82); color: #fff; font-size: .8rem; font-weight: 600; padding: 6px 10px; border-radius: 999px; }
.deliv-zoom svg { width: 14px; height: 14px; }
.deliv-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.deliv-body h3 { color: var(--ink); font-size: 1.05rem; margin: 0; }
.deliv-body p { color: #56677c; font-size: .92rem; margin: 0; }
.deliv-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.deliv-link { margin-top: auto; padding-top: 8px; font-size: .86rem; font-weight: 600; color: var(--blue); }

.deliv-thumb { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; padding: 10px; border: 1px solid #dbe2ea; border-radius: var(--radius-s); background: #fff; color: var(--ink-2); margin-top: 12px; transition: border-color .2s; }
.deliv-thumb:hover { border-color: var(--blue); color: var(--ink-2); }
.deliv-thumb img { width: 110px; height: 82px; object-fit: cover; object-position: top; border-radius: 4px; border: 1px solid #dbe2ea; }
.deliv-thumb.landscape img { object-position: center; }
.deliv-thumb span { font-size: .86rem; line-height: 1.4; }
.deliv-thumb b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); margin-bottom: 2px; }
.lab-section .deliv-thumb { background: var(--night-2); border-color: var(--line-2); color: var(--text); }
.lab-section .deliv-thumb img { border-color: var(--line-2); }
.lab-section .deliv-thumb b { color: var(--blue-hi); }

.diagram { margin: 0; }
.diagram img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid #dbe2ea; background: #fff; }
.diagram figcaption { font-size: .82rem; color: var(--text-muted); margin-top: 8px; }
.section-light .diagram figcaption { color: #5c6d82; }

.how { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.how-side { display: flex; flex-direction: column; gap: 0; }
.how-side h4 { margin: 0 0 2px; }
.how-side p { margin: 0; color: var(--text-muted); font-size: .9rem; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } }

.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.media-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .media-grid, .media-grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .media-grid, .media-grid.three { grid-template-columns: 1fr; } }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.photo figcaption { font-size: .84rem; color: var(--text-muted); margin-top: 8px; }
.section-light .photo figcaption { color: #5c6d82; }
.ph-box { aspect-ratio: 4 / 3; border: 1.5px dashed rgba(232, 176, 74, .7); border-radius: var(--radius); background: rgba(232, 176, 74, .06); padding: 16px; display: flex; flex-direction: column; gap: 6px; font-size: .8rem; color: var(--text-muted); overflow: hidden; }
.ph-box svg { width: 22px; height: 22px; color: var(--warn); }
.ph-box b { color: var(--text); font-size: .9rem; }
.ph-box em { margin-top: auto; font-style: normal; font-family: var(--font-mono); font-size: .66rem; color: var(--warn); }
.section-light .ph-box { color: #5c6d82; }
.section-light .ph-box b { color: var(--ink); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6, 10, 16, .92); display: none; flex-direction: column; }
.lightbox.open { display: flex; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 18px; color: #dbe4ef; font-size: .9rem; border-bottom: 1px solid rgba(148,178,214,.2); }
.lb-actions { display: flex; gap: 10px; align-items: center; flex: none; }
.lb-actions button, .lb-actions a { background: rgba(255,255,255,.08); border: 1px solid rgba(148,178,214,.3); color: #fff; border-radius: 6px; padding: 6px 12px; font-size: .84rem; cursor: pointer; }
.lb-stage { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; cursor: zoom-in; background: #fff; }
.lightbox.zoomed .lb-stage { align-items: flex-start; }
.lightbox.zoomed .lb-stage img { max-height: none; width: min(1600px, 100%); cursor: zoom-out; }

/* tags (shared) */
.tag { display: inline-block; font-family: var(--font-mono); font-size: .72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--blue-soft); white-space: nowrap; }
.section-light .tag, .deliv .tag { border-color: #c8d4e2; color: var(--blue-deep); background: #fff; }
.how-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.how-photos .photo img, .how-photos .ph-box { aspect-ratio: 4 / 3; }
.how-photos .ph-box { padding: 10px; font-size: .7rem; gap: 4px; }
.how-photos .ph-box b { font-size: .78rem; }
.how-photos .ph-box span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.how-photos .ph-box em { display: none; }
.how-photos .photo figcaption { font-size: .76rem; }
.deliv-feature { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-s); border: 1px solid #dbe2ea; background: #e7ecf2; margin-top: 4px; }
.deliv-feature img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s; }
.deliv-feature.landscape img { object-position: center; }
.deliv-feature:hover img { transform: scale(1.03); }
.deliv-feature-cap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .86rem; margin: 8px 0 14px; color: var(--ink-2); }
.deliv-feature-cap b { color: var(--ink); }
.deliv-feature-cap span { font-family: var(--font-mono); font-size: .76rem; color: var(--steel); }
