/* ============================================================
   AXIOM — Operating Surface Design System
   An instrument panel for decision systems, not a decorative skin.
   Calm, precise, dense, legible. Built for operators under pressure.

   Rules:
   • One signal accent (Thai flag blue) for live / positive / primary action.
   • Thailand flag palette: red · white · blue.
   • Red is negative data only — never buttons or headings.
   • Hairline grids. Left-aligned labels. Right-aligned numbers.
   • No gradients, shadows, glows, glass, icons, pure black/white.
   • Motion confirms; it does not entertain.
   ============================================================ */

:root {
  /* §1.1 Foundation — warm paper, warm ink, hairline grey */
  --paper: #faf9f7;
  /* page bg — warm off-white, never #fff */
  --panel: #fcfbf9;
  /* cells / faces — never pure white */
  --ink: #191712;
  /* primary text, bars, active — warm near-black */
  --ink-2: #5c5a54;
  /* secondary text — calibrated for AA on paper */
  --ink-3: #736f66;
  /* tertiary text, labels, meta */
  --line: #e7e5dd;
  /* hairlines, grid gaps, inactive tracks */
  --line-2: #d2cfc5;
  /* stronger borders, structural dividers */

  /* §1.2 Thailand flag — red · white · blue */
  --th-red: #a51931;
  --th-white: #f8f7f5;
  --th-blue: #00247d;

  /* §1.3 Signal — the single UI accent */
  --accent: #00247d;
  /* flag blue — live, positive, primary action */
  --neg: #a51931;
  /* flag red — negative data only */

  /* §1.4 Identity — corporate logo colors */
  --id-navy: #00247d;
  --id-blue: #00247d;
  --id-red: #a51931;

  /* §1.4 neutral fills for categories */
  --fill-1: #8f8b80;
  --fill-2: #bdb9ad;
  --fill-3: #d8d4ca;

  /* §3.1 spatial — 11px base unit */
  --u: 11px;
  /* base unit */
  --pad: 22px;
  /* outer padding (~2u) */
  --gap: 22px;
  /* section gap (~2u) */
  --maxw: 1200px;
  /* wide-tool container */

  /* §1.5 motion — confirm, not entertain */
  --t-fast: 100ms;
  /* visible feedback */
  --t-state: 150ms;
  /* state changes */
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* §10 global rules */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.25;
  }
}

body {
  color: var(--ink);
  font-family: 'Helvetica Neue', Helvetica, Arial, 'IBM Plex Sans Thai', 'Noto Sans KR', 'Noto Sans JP', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.42;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

img {
  display: block;
  max-width: 100%;
}

/* ---- containers ---- */
.wrap {
  width: min(var(--maxw), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}

.section {
  padding: calc(var(--gap) * 1.8) 0;
}

.section+.section {
  border-top: 1px solid var(--line);
}

/* ============================================================
   §2 TYPOGRAPHY — size + grey are the only hierarchy
   Data weight capped at 600. Labels: small, uppercase, grey.
   Numbers: tabular, right-aligned.
   ============================================================ */

.t-hero {
  font-size: clamp(34px, 6.5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.t-hero em {
  font-style: normal;
  color: var(--accent);
}

.t-big {
  /* section metric / big value */
  font-size: clamp(19px, 3.4vw, 24px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0;
}

.t-statval {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.t-body {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

.t-body-2 {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-2);
}

.t-label {
  /* §2.2 section header label */
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.t-ctrl {
  /* control / nav */
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.t-micro {
  /* §2.2 micro-label / meta */
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   §3.4 COCKPIT — sticky masthead
   ============================================================ */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line-2);
}

.flag-stripe {
  display: flex;
  height: 3px;
  width: 100%;
}

.flag-stripe span {
  flex: 1;
  background: var(--th-red);
}

.flag-stripe span:nth-child(2),
.flag-stripe span:nth-child(4) {
  background: var(--th-white);
}

.flag-stripe span:nth-child(3) {
  flex: 2;
  background: var(--th-blue);
}

.masthead__inner {
  width: min(var(--maxw), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.brand__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand__ver {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}

.nav {
  display: flex;
  gap: 2px;
  flex: 1;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color var(--t-fast) var(--ease);
}

.nav a:hover {
  color: var(--accent);
}

/* locale switch — flat segmented hairline control */
.locale-switch {
  display: inline-flex;
  border: 1px solid var(--line-2);
}

.locale-switch button {
  appearance: none;
  background: var(--panel);
  border: 0;
  border-left: 1px solid var(--line-2);
  min-height: 44px;
  min-width: 32px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  cursor: pointer;
  font-family: inherit;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.locale-switch button:first-child {
  border-left: 0;
}

.locale-switch button:hover {
  color: var(--accent);
}

.locale-switch button.active {
  background: var(--ink);
  color: var(--paper);
}

/* ============================================================
   §4.1 SECTION HEADER — 600/0.16em over a 1px ink rule
   ============================================================ */

.s-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 7px;
  margin-bottom: 18px;
}

.s-head__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.s-head__meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* cluster label inside a section */
.cluster-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 6px;
  margin: 28px 0 1px;
}

.cluster-head:first-of-type {
  margin-top: 0;
}

/* sandbox operational note — systems section footnote */
.sandbox-note {
  display: flex;
  align-items: stretch;
  max-width: 64ch;
  margin: 0 0 20px;
  border: 1px solid var(--line-2);
  background: var(--panel);
}

.sandbox-note__tag {
  flex-shrink: 0;
  padding: 10px 14px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border-right: 1px solid var(--line-2);
  background: var(--paper);
  display: flex;
  align-items: center;
}

.sandbox-note__body {
  margin: 0;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ============================================================
   §3.2 HAIRLINE CELL GRID — the workhorse
   1px hairlines. Structural whitespace. No arbitrary offsets.
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.cell {
  background: var(--panel);
  padding: 13px 16px;
}

@media (min-width: 600px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 760px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* §4.2 STAT CELL — label left-grey, value large, tabular */
.stat__lbl {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stat__val {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 600;
  margin-top: 6px;
  line-height: 1;
  letter-spacing: -0.01em;
}

.stat__sub {
  font-size: 10px;
  color: var(--ink-3);
  margin-top: 3px;
}

/* §4.3 DATA ROW — label left, value right-aligned, baseline */
.row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row__k {
  font-size: 13px;
  font-weight: 500;
}

.row__vwrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.row__v {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row__delta {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.row__delta--up {
  color: var(--accent);
}

.row__delta--down {
  color: var(--neg);
}

/* §4.4 FLAT BAR / METER — no radius, no gradient, hairline track */
.bar {
  height: 4px;
  background: var(--line);
  position: relative;
  border: 0;
}

.bar__fill {
  height: 100%;
  background: var(--accent);
}

.bar__fill--neg {
  background: var(--neg);
}

/* §4.5 ROUTE DISC — flat circular marker, no glow */
.disc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--panel);
  font-size: 9px;
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   §4.6 STATUS PLATE — the ink sign-plate
   ============================================================ */

.plate {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-2);
  background: var(--panel);
}

.plate__tag {
  background: var(--id-navy);
  color: var(--paper);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.plate__body {
  padding: 11px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

/* ============================================================
   §4.7 BUTTONS — flat, square, no radius, flag blue for primary
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background var(--t-state) var(--ease), color var(--t-state) var(--ease), border-color var(--t-state) var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: #001a5c;
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn .tri {
  color: var(--accent);
}

.btn--primary .tri {
  color: var(--paper);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============================================================
   §4.9 LIVE INDICATOR — the only sanctioned animation
   ============================================================ */

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  animation: blink 2.4s ease-in-out infinite;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  padding: 48px 0 0;
  border-bottom: 1px solid var(--line);
}

.hero__metaline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}

.hero__metaline b {
  color: var(--ink);
  font-weight: 600;
}

.hero__hl {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.t-hero {
  max-width: 16ch;
}

/* Zone B */
.hero__body {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--panel);
}

.hero__body-main {
  padding: 28px 0 28px;
}

.hero__body-hud {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.hero__body-hud .readout {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
  max-width: none;
}

.hero__sub {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0;
}

.hero__cta {
  margin-top: 24px;
}

/* Zone C — 4-stat strip */
.hero__strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--line);
  gap: 1px;
  margin-top: 1px;
}

.hero__stat {
  background: var(--panel);
  padding: 20px 20px;
}

/* readout — tabular key/value, honest provenance line */
.readout {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  max-width: 480px;
}

.readout .ln {
  display: flex;
  gap: 14px;
  padding: 3px 0;
  font-size: 11px;
}

.readout .k {
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: 64px;
}

.readout .v {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   TEAM
   ============================================================ */

.cv__name {
  font-size: 18px;
  font-weight: 600;
}

.cv__role {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
  margin-top: 2px;
}

.cv-block {
  margin-top: 14px;
}

.cv-block__h {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.cv-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-block li {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  padding: 2px 0;
  color: var(--ink);
}

/* ============================================================
   PRESS / list rows with right-aligned meta
   ============================================================ */

.press-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  transition: color var(--t-fast) var(--ease);
}

.press-row:hover .press-row__title {
  color: var(--accent);
}

.press-row__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.press-row__outlet {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 3px;
}

.press-row__meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact {
  padding: 48px 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.field label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.field input,
.field textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-2);
  padding: 11px 13px;
  transition: border-color var(--t-state) var(--ease);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */

.foot {
  border-top: 1px solid var(--line-2);
  padding: 24px 0 40px;
}

.foot__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
  justify-content: space-between;
}

.foot__note {
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.foot__fineprint {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 72ch;
}

.foot__fineprint-p,
.foot__fineprint-copy {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

.foot__fineprint-label {
  margin: 4px 0 8px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.foot__fineprint-list {
  margin: 0 0 14px;
  padding: 0 0 0 1.1em;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-2);
}

.foot__fineprint-list li {
  margin-bottom: 4px;
}

.foot__fineprint-list li:last-child {
  margin-bottom: 0;
}

.foot__fineprint-copy {
  margin-bottom: 0;
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.03em;
}

@media (max-width: 480px) {
  .foot__fineprint {
    max-width: none;
  }

  .foot__fineprint-p,
  .foot__fineprint-list {
    font-size: 12px;
    line-height: 1.65;
  }
}

.foot a {
  color: var(--ink-2);
}

.foot a:hover {
  color: var(--accent);
}

/* ============================================================
   STAGES — keynote record blocks
   ============================================================ */

.stage {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.stage:last-child {
  border-bottom: 0;
}

.stage__loc {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stage__loc b {
  color: var(--ink);
}

.stage__title {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 8px 0 0;
}

.stage__lead {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 12px 0 0;
  max-width: 60ch;
}

.stage__pull {
  margin: 16px 0 0;
  padding: 12px 0 12px 16px;
  border-left: 2px solid var(--accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

.stage__cite {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stage__shot {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--line);
  margin-top: 16px;
  filter: saturate(0.92);
}

.stage__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 1px;
}

.stage__gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--panel);
  filter: saturate(0.9);
}

/* ============================================================
   FLOODDASH SPOTLIGHT — rotating product gallery
   ============================================================ */

.flooddash-spotlight {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.flooddash-spotlight .section-tag {
  display: inline-block;
  margin: 4px 0 10px;
}

.flooddash-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.flooddash-meta__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.flooddash-meta__live .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  animation: flooddash-pulse 1.6s ease-in-out infinite;
}

@keyframes flooddash-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.flooddash-carousel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg, #faf9f7);
  outline: none;
}

.flooddash-carousel:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.flooddash-carousel__progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 3;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.flooddash-carousel__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transform-origin: left center;
}

.flooddash-carousel.is-paused .flooddash-carousel__progress-bar,
.flooddash-carousel.is-reduced .flooddash-carousel__progress-bar {
  animation: none;
  width: 0;
}

.flooddash-carousel.is-running .flooddash-carousel__progress-bar {
  animation: flooddash-progress var(--carousel-ms, 5200ms) linear forwards;
}

@keyframes flooddash-progress {
  from { width: 0%; }
  to { width: 100%; }
}

.flooddash-carousel__viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0a0e14;
}

.flooddash-carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.flooddash-carousel__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.flooddash-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: saturate(0.95);
}

.flooddash-carousel__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(10, 14, 20, 0.78);
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace);
}

.flooddash-carousel__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  min-height: 44px;
}

.flooddash-carousel__btn,
.flooddash-carousel__pause,
.flooddash-carousel__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg, #faf9f7);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
  transition: color 120ms ease, border-color 120ms ease, background 120ms ease;
}

.flooddash-carousel__btn:hover,
.flooddash-carousel__pause:hover,
.flooddash-carousel__dot:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.flooddash-carousel__btn:active,
.flooddash-carousel__pause:active,
.flooddash-carousel__dot:active {
  transform: scale(0.97);
}

.flooddash-carousel__dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.flooddash-carousel__dot {
  min-width: 44px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  position: relative;
}

.flooddash-carousel__dot::after {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--line);
  display: block;
}

.flooddash-carousel__dot.is-active::after {
  background: var(--accent);
}

.flooddash-carousel__pause {
  font-size: 10px;
  letter-spacing: 0.04em;
  margin-left: auto;
  min-width: 48px;
}

.flooddash-carousel__pause.is-paused {
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 759px) {
  .flooddash-carousel__viewport {
    aspect-ratio: 4 / 3;
  }

  .flooddash-meta {
    gap: 6px 12px;
    font-size: 10px;
  }

  .stage__gallery {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flooddash-meta__live .dot {
    animation: none;
  }

  .flooddash-carousel__slide {
    transition: opacity 120ms ease;
  }

  .flooddash-carousel.is-running .flooddash-carousel__progress-bar {
    animation: none;
  }
}

/* ============================================================
   PRO BONO + NETWORK
   ============================================================ */

.probono-card {
  background: var(--panel);
  display: flex;
  flex-direction: column;
}

.probono-card__shot {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: var(--line);
  filter: saturate(0.9);
}

.probono-card__body {
  padding: 12px 14px 14px;
}

.probono-card__org {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.probono-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  margin: 5px 0;
}

.probono-card__title em {
  font-style: normal;
  color: var(--accent);
}

.probono-card__for {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
}

.probono-card:hover .probono-card__title {
  color: var(--accent);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tags span {
  background: var(--panel);
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* creds chips, built-with stack */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  padding: 5px 9px;
}

/* ============================================================
   BUILT-WITH STACK — layered hairline rows, top -> bottom
   ============================================================ */

.stack {
  border: 1px solid var(--line-2);
  background: var(--panel);
  margin-top: 1px;
}
/* each layer = a stratum: big index numeral (spine) + content, hairline axis between */
.stack__layer {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: stretch;
  border-top: 1px solid var(--line);
}
.stack__layer:first-child { border-top: 0; }
.stack__icon {
  display: flex;
  justify-content: center;
  padding: 16px 14px 0;
  color: var(--ink-2);
  border-right: 1px solid var(--line);
}
.stack__icon svg { width: 26px; height: 26px; display: block; }
.stack__main { padding: 14px 16px 16px; min-width: 0; }
.stack__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.stack__name { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.stack__role {
  margin-left: auto;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.stack__count { font-size: 11px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.stack__items { display: flex; flex-wrap: wrap; gap: 6px; }
.stack__items span,
.stack__items a {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  padding: 5px 9px;
}
/* runtime Easter egg — cloud: solid hairline (default); local: dashed + signal bar */
.stack__items [data-runtime="local"] {
  border-style: dashed;
  border-color: var(--line-2);
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}
.stack__items [data-runtime="local"]:hover::after {
  content: " // LOCAL";
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.stack__items [data-runtime="local"].is-fav {
  border-left-color: var(--accent);
}
.stack__legend {
  margin-top: 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stack__legend [data-runtime="local"],
.stack__legend [data-runtime="cloud"] {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  padding: 4px 8px;
  margin-right: 6px;
  vertical-align: middle;
}
.stack__legend [data-runtime="local"] {
  border-style: dashed;
  border-left: 2px solid var(--accent);
  padding-left: 7px;
}
/* easter egg: the only clickable chip — reveals the accent on hover */
.stack__items a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.stack__items a:hover { border-color: var(--accent); color: var(--accent); }
/* easter egg: the one darker box per layer = the favorite */
.stack__items span.is-fav {
  background: var(--line);
  border-color: var(--ink-2);
  color: var(--ink);
  font-weight: 600;
}

/* ============================================================
   PROMISES / numbered notes
   ============================================================ */

.numbered {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.numbered:last-child {
  border-bottom: 0;
}

.numbered__n {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  width: 24px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.numbered__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.numbered__body {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-2);
  margin-top: 4px;
}

/* ============================================================
   SYSTEM CELL — screenshot + name + category + one-line + link
   ============================================================ */

.sys-cell {
  background: var(--panel);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.sys-cell__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.sys-cell__idx {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.sys-cell__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.sys-cell__shot {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
  background: var(--line);
  filter: saturate(0.92);
  transition: filter var(--t-state) var(--ease);
}

.sys-cell__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.sys-cell__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.1;
}

.sys-cell__cat {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sys-cell__lede {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-2);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sys-cell__link {
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color var(--t-fast) var(--ease);
}

.sys-cell__link .tri {
  color: var(--accent);
}

.sys-cell:hover .sys-cell__link {
  color: var(--accent);
}

.sys-cell:hover .sys-cell__shot {
  filter: saturate(1);
}

/* ============================================================
   §11.8 mobile-first is the base above; desktop refinements
   ============================================================ */

/* tablet: hide anchor nav so the masthead stays one clean row */
@media (max-width: 1023px) {
  .masthead .nav {
    display: none;
  }

  .masthead__inner {
    justify-content: space-between;
    gap: 10px;
  }
}

/* phone: also drop the CTA — brand + locale only */
@media (max-width: 759px) {
  .masthead__inner>.btn--primary {
    display: none;
  }
}

@media (min-width: 760px) {
  .section {
    padding: calc(var(--gap) * 2.2) 0;
  }

  .hero {
    padding: 64px 0 0;
  }

  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }

  .two-col>* {
    background: var(--panel);
    padding: 20px;
  }
}

/* Hero zone breakpoints */
@media (min-width: 640px) {
  .hero__strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 760px) {
  .hero__body {
    grid-template-columns: 3fr 2fr;
    background: var(--line);
    gap: 1px;
  }

  .hero__body-main {
    background: var(--panel);
  }

  .hero__body-hud {
    background: var(--panel);
    border-top: 0;
    padding: 28px 24px;
  }
}

/* ============================================================
   §4.8 CREDENTIALS — compact header + expandable details
   ============================================================ */

.credentials--compact {
  padding: calc(var(--gap) * 1.1) 0;
}

.cred-header {
  margin-bottom: 0;
}

.cred-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 8px 0 0;
}

.cred-compact {
  margin: 10px 0 0;
  max-width: 64ch;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.cred-trade-note {
  margin: 8px 0 0;
  max-width: 64ch;
  color: var(--ink-3);
}

.cred-actions {
  margin-top: 14px;
}

.cred-details {
  margin-top: 20px;
  border: 1px solid var(--line-2);
  background: var(--panel);
}

.cred-details__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  user-select: none;
}

.cred-details__summary::-webkit-details-marker {
  display: none;
}

.cred-details__summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.cred-details[open] > .cred-details__summary::after {
  content: "−";
}

.cred-details__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.cred-details__body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.cred-standards-head {
  margin-top: 20px;
}

.cred-standards-lede {
  max-width: 64ch;
  margin: 0 0 16px;
}

.cred-plate {
  margin-top: 12px;
}

.cred-plate .row__v {
  max-width: 36ch;
}

.cred-tiers {
  margin-top: 4px;
}

.cred-tier {
  min-height: 100%;
}

.cred-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cred-list li {
  font-size: 13px;
  line-height: 1.45;
}

.cred-list a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}

.cred-list a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.cred-stack {
  margin-top: 24px;
}

.cred-disclaimer {
  margin: 18px 0 0;
  max-width: 64ch;
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.5;
}

/* ============================================================
   §4.9 BRAND KIT + STACK — compact glimpse + expandable
   ============================================================ */

.brand--compact,
.stack-block--compact {
  padding: calc(var(--gap) * 1.1) 0;
}

.brand-lede {
  margin: 8px 0 0;
  max-width: 60ch;
  color: var(--ink-3);
}

.brand-actions {
  margin-top: 14px;
}

.brand-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: 16px;
  background: var(--line);
  border: 1px solid var(--line-2);
}

.brand-preview__item {
  display: block;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
}

.brand-preview__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top;
}

.brand-preview__lbl {
  display: block;
  padding: 8px 10px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.brand-preview__item:hover .brand-preview__lbl {
  color: var(--accent);
}

.brand-details {
  margin-top: 16px;
}

.stack-block--compact {
  margin-top: 24px;
}

.stack__legend--compact {
  margin-top: 10px;
}

.stack-glimpse {
  margin-top: 10px;
}

.stack-glimpse__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stack-details {
  margin-top: 12px;
}

.stack-details .stack {
  margin-top: 0;
}

.stack-note {
  margin: 12px 0 0;
  max-width: 64ch;
  color: var(--ink-3);
}

@media (max-width: 480px) {
  .brand-preview {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   §4.10 FOLD ROWS — one-line about-us sections
   ============================================================ */

.section--fold {
  padding: 0;
}

.fold-strip {
  border: 1px solid var(--line-2);
  background: var(--panel);
  margin: calc(var(--gap) * 0.75) 0;
}

.fold-strip .section--fold .wrap {
  padding-left: 0;
  padding-right: 0;
  width: 100%;
  max-width: none;
}

.fold-strip .fold-row {
  border-bottom: 1px solid var(--line);
}

.fold-strip .section--fold:last-child .fold-row {
  border-bottom: none;
}

.fold-row {
  border: 1px solid var(--line-2);
  background: var(--panel);
}

.fold-strip .fold-row {
  border: none;
  border-radius: 0;
}

.fold-row__summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  list-style: none;
  user-select: none;
}

.fold-row__summary::-webkit-details-marker {
  display: none;
}

.fold-row__summary::after {
  content: "+";
  margin-left: auto;
  padding-left: 12px;
  flex-shrink: 0;
  font-family: ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.fold-row[open] > .fold-row__summary {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.fold-row[open] > .fold-row__summary::after {
  content: "−";
}

.fold-row__summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.fold-row__body {
  padding: 16px;
}

.fold-row__body .s-head:first-child {
  margin-top: 0;
}

.section--fold:not(.fold-strip .section--fold) {
  margin: calc(var(--gap) * 0.75) 0;
}

.section--fold:not(.fold-strip .section--fold) .fold-row {
  width: min(var(--maxw), calc(100% - (var(--pad) * 2)));
  margin: 0 auto;
}