:root {
  --ink: #0F1923;
  --ink-2: #1a2534;
  --muted: #525252;
  --muted-2: #6B7A8A;
  --muted-3: #8a98a8;
  --line: #E5E5E5;
  --line-2: #ECECEC;
  --line-3: #F2F2F2;
  --paper: #FFFFFF;
  --paper-2: #FAFAFA;
  --paper-3: #F5F5F5;
  --accent: #B08D57;
  --accent-2: #D4B285;
  --accent-hover: #8F6F3E;
  --accent-soft: #F7F1E6;
  --accent-soft-2: #FBF7F0;
  --green: #2F7A4D;
  --green-soft: #E8F5EE;
  --red: #C94A3E;
  --red-soft: #FEF2F2;
  --blue: #3B5EA5;
  --blue-soft: #EEF2F8;
  --amber: #D97706;
  --amber-soft: #FFFBEB;
  --gray-soft: #F0F0F0;
  --ff-body: 'DM Sans', system-ui, -apple-system, Segoe UI, sans-serif;
  --ff-mono: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --max-w: 1280px;
  --inner-pad: 32px;
  --ease-smooth: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 0.15s;
  --dur-base: 0.3s;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff-body); color: var(--ink); background: var(--paper);
  line-height: 1.5; text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.1; font-weight: 600; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
}
.lede { font-size: 21px; line-height: 1.55; color: var(--muted); font-weight: 400; }
.h1 { font-size: clamp(40px, 5.2vw, 52px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.h2 { font-size: clamp(30px, 3.6vw, 36px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
.h2-band { font-size: clamp(32px, 3.6vw, 40px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; }
.body-17 { font-size: 18px; line-height: 1.6; color: var(--muted); }
.mono { font-family: var(--ff-mono); font-feature-settings: 'tnum'; }
.tnum { font-feature-settings: 'tnum'; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding-left: var(--inner-pad); padding-right: var(--inner-pad); }
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--line); }
.bg-2 { background: var(--paper-2); }

/* Buttons */
.btn {
  font-family: inherit; font-size: 16px; font-weight: 500;
  padding: 12px 20px; border: 1px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; white-space: nowrap; text-decoration: none;
  transition: background var(--dur-fast), color var(--dur-fast),
              border-color var(--dur-fast), transform var(--dur-fast),
              box-shadow var(--dur-base);
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 14px 22px; font-size: 17px; font-weight: 600; }
.btn-sm { padding: 8px 14px; font-size: 15px; font-weight: 500; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-2); box-shadow: 0 10px 28px -10px rgba(15,25,35,0.45); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-accent-dark-on { background: var(--accent); color: var(--ink); }
.btn-accent-dark-on:hover { background: #c39e6a; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-inv { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-ghost-inv:hover { border-color: #fff; background: rgba(255,255,255,0.04); }
.btn-outline-red { background: #fff; color: var(--red); border-color: rgba(201,74,62,0.4); }
.btn-outline-red:hover { border-color: var(--red); }
.txt-link {
  color: var(--accent); font-weight: 500; font-size: 17px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap var(--dur-fast);
}
.txt-link:hover { gap: 10px; }

/* HEADER */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--paper); border-bottom: 1px solid var(--line); }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 2s ease-in-out infinite; }
.site-nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 14px var(--inner-pad); display: flex; align-items: center; justify-content: space-between; }
.site-nav-left { display: flex; align-items: center; gap: 44px; }
.site-nav-right { display: flex; align-items: center; gap: 10px; }
.nav-list { display: flex; align-items: center; gap: 22px; }
.nav-link { font-size: 16.5px; font-weight: 500; color: var(--ink); padding: 8px 4px; }
.nav-link:hover { color: var(--accent); }
.nav-signin { font-size: 16px; padding: 8px 12px; color: var(--ink); }
.nav-signin:hover { color: var(--accent); }
.edma-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.edma-logo .phoenix { height: 34px; width: auto; }

/* ===== 1 · HERO ===== */
.s-hero { padding: 96px 0 64px; }
.s-hero .eyebrow { display: inline-block; margin-bottom: 22px; }
.s-hero h1 { margin-bottom: 24px; max-width: 940px; }
.s-hero .lede { max-width: 720px; margin-bottom: 36px; }
.hero-cta { display: inline-flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ===== 2 · CENTERPIECE ===== */
.s-centerpiece { padding: 16px 0 96px; }
.cp-frame { background: var(--paper); border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden; }
.cp-topnav {
  background: var(--ink); display: flex; align-items: center; gap: 24px;
  padding: 12px 24px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cp-brand { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 8px; }
.cp-brand .dot { width: 14px; height: 14px; background: var(--accent); display: inline-block; }
.cp-tabs { display: flex; gap: 22px; }
.cp-tab { font-size: 15px; color: rgba(255,255,255,0.55); padding: 4px 0; border-bottom: 2px solid transparent; }
.cp-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.cp-toolbar-spacer { flex: 1; }
.cp-toolbar-right { display: flex; gap: 14px; font-size: 14px; color: rgba(255,255,255,0.6); }
.cp-toolbar-right .mono { color: rgba(255,255,255,0.85); }

.cp-body { padding: 26px 28px 28px; }
.cp-id-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cp-id { font-family: var(--ff-mono); font-size: 22px; font-weight: 500; color: var(--ink); }
.cp-client { font-size: 17px; color: var(--ink); }
.cp-flag { display: inline-block; margin-right: 4px; }
.cp-units { font-family: var(--ff-mono); font-size: 17px; color: var(--muted); font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.pill .dot-sm { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.is-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(217,119,6,0.25); }
.pill.is-red { background: var(--red-soft); color: var(--red); border-color: rgba(201,74,62,0.25); }
.pill.is-green { background: var(--green-soft); color: var(--green); border-color: rgba(47,122,77,0.2); }
.pill.is-amber-out { background: #fff; color: var(--amber); border-color: rgba(217,119,6,0.4); }
.pill.is-active { background: var(--ink); color: #fff; }

/* Capacity bar */
.cap-summary {
  margin-top: 6px; padding: 14px 16px; background: var(--paper-2);
  border: 1px solid var(--line);
}
.cap-summary-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 15px; color: var(--muted); margin-bottom: 8px;
}
.cap-summary-head .l { color: var(--ink); font-weight: 500; }
.cap-summary-head .r { font-family: var(--ff-mono); }
.cap-bar { height: 10px; background: var(--line-3); display: flex; overflow: hidden; }
.cap-bar .seg-1 { background: var(--accent); width: 60%; }
.cap-bar .seg-2 { background: var(--accent-2); width: 40%; }
.cap-key {
  display: flex; gap: 18px; margin-top: 10px;
  font-size: 14px; color: var(--muted);
}
.cap-key .k { display: inline-flex; align-items: center; gap: 6px; }
.cap-key .sw { width: 10px; height: 10px; }
.cap-key .sw-1 { background: var(--accent); }
.cap-key .sw-2 { background: var(--accent-2); }

/* Manufacturer rows */
.mfr-rows { margin-top: 14px; display: grid; gap: 10px; }
.mfr-row {
  display: grid; grid-template-columns: 40% 35% 25%;
  gap: 14px; align-items: center;
  background: var(--paper); border: 1px solid var(--line);
  padding: 16px 18px; min-height: 80px;
}
.mfr-name { display: flex; align-items: center; gap: 10px; }
.mfr-name .name { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.mfr-name .meta { font-size: 14.5px; color: var(--muted-2); margin-top: 2px; }
.mfr-name .flag { font-size: 22px; line-height: 1; }
.mfr-lot { font-size: 15px; color: var(--muted); }
.mfr-lot .lot-id { font-family: var(--ff-mono); font-size: 16px; color: var(--accent); font-weight: 500; display: block; margin-bottom: 2px; }
.mfr-lot .alloc { font-family: var(--ff-mono); color: var(--ink); }
.mfr-prog { display: flex; flex-direction: column; gap: 6px; }
.mini-bar { height: 6px; background: var(--line-3); position: relative; overflow: hidden; }
.mini-bar > span { position: absolute; inset: 0 auto 0 0; }
.mini-bar.is-gold > span { background: var(--accent); }
.mini-bar.is-amber > span { background: var(--amber); }
.mfr-prog-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; }
.mfr-prog-stage { color: var(--muted-2); }

/* QC mini card */
.qc-mini { margin-top: 14px; border: 1px solid var(--line); background: var(--paper); }
.qc-mini-head { padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.qc-mini-row {
  padding: 10px 16px; display: grid; grid-template-columns: 12px 1fr;
  gap: 10px; font-size: 15px; color: var(--muted); align-items: start;
}
.qc-mini-row + .qc-mini-row { border-top: 1px dashed var(--line); }
.qc-mini-row .dt { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; }
.qc-mini-row .dt.is-green { background: var(--green); }
.qc-mini-row .dt.is-amber { background: var(--amber); }
.qc-mini-row .strong { color: var(--ink); font-family: var(--ff-mono); }
.qc-mini-row .res { color: var(--green); font-weight: 500; }
.qc-mini-row .res.is-amber { color: var(--amber); }

/* ===== 3 · PROBLEM ===== */
.s-problem { background: var(--paper-2); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.problem-h { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.problem-body { font-size: 18px; line-height: 1.6; color: var(--muted); }
.problem-body em { color: var(--ink); font-style: normal; font-weight: 500; }

/* ===== Section heads ===== */
.head { max-width: 760px; margin-bottom: 48px; }
.head .h2 { margin: 16px 0 18px; }
.head p { font-size: 18px; line-height: 1.6; color: var(--muted); }

/* ===== 4 · ALLOCATION ===== */
.alloc-card {
  max-width: 740px;
  border: 1px solid var(--line); background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.alloc-head { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.alloc-head .ttl { font-size: 17.5px; font-weight: 700; color: var(--ink); }
.alloc-head .sub { font-size: 14.5px; color: var(--muted-2); margin-top: 4px; font-family: var(--ff-mono); }
.alloc-row {
  padding: 16px 22px; display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 0.7fr;
  gap: 14px; align-items: center;
  border-bottom: 1px solid var(--line-2);
}
.alloc-row.is-dim { opacity: 0.55; }
.alloc-row .name { display: flex; align-items: center; gap: 10px; }
.alloc-row .name .nm { font-size: 16px; font-weight: 600; color: var(--ink); }
.alloc-row .name .flag { font-size: 21px; line-height: 1; }
.alloc-row .cap { font-size: 15px; color: var(--muted); font-family: var(--ff-mono); }
.alloc-row .cap-label { color: var(--muted-2); font-size: 13.5px; font-family: var(--ff-body); display: block; }
.alloc-row .assign { font-size: 15px; font-family: var(--ff-mono); color: var(--ink); }
.alloc-row .assign .pct { color: var(--muted); margin-left: 4px; }
.alloc-row .price { font-family: var(--ff-mono); font-size: 15px; color: var(--ink); }
.alloc-row .score { display: flex; justify-content: flex-end; }
.alloc-foot {
  padding: 16px 22px; display: flex; justify-content: space-between; align-items: center;
  background: var(--paper-2); flex-wrap: wrap; gap: 14px;
}
.alloc-foot .meta { font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.alloc-foot .meta .ok { color: var(--green); font-weight: 500; }
.alloc-foot .meta .mono { font-family: var(--ff-mono); }
.alloc-foot-actions { display: flex; gap: 8px; }

/* ===== 5 · LOT ===== */
.lot-card {
  max-width: 760px;
  border: 1px solid var(--line); background: var(--paper);
  border-left: 3px solid var(--accent);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.lot-head { padding: 22px 24px 18px; }
.lot-head-id-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lot-head .id { font-family: var(--ff-mono); font-size: 22px; font-weight: 700; color: var(--ink); font-feature-settings: 'tnum'; }
.lot-head .sub { margin-top: 8px; font-size: 15.5px; color: var(--muted); }
.lot-head .sub .mono { color: var(--ink); }
.lot-stages {
  padding: 22px 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.lot-stages-bar {
  display: grid; grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center; gap: 0;
}
.stage-node {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 140px; flex: none;
}
.stage-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
}
.stage-dot.is-done { background: var(--green); color: #fff; }
.stage-dot.is-current { background: #fff; border: 2px solid var(--accent); color: var(--accent); box-shadow: 0 0 0 4px rgba(176,141,87,0.15); }
.stage-dot.is-current::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.stage-dot.is-future { background: #fff; border: 2px solid var(--line); color: var(--muted-3); }
.stage-label { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.stage-node.is-future .stage-label { color: var(--muted-2); font-weight: 400; }
.stage-line { height: 2px; background: var(--line); }
.stage-line.is-done { background: var(--green); }
.stage-line.is-half { background: linear-gradient(90deg, var(--green) 50%, var(--line) 50%); }

.lot-lineage { padding: 18px 24px; display: flex; flex-wrap: wrap; gap: 28px; font-size: 15px; }
.lot-lineage .k { display: flex; flex-direction: column; gap: 2px; }
.lot-lineage .k-l { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.lot-lineage .k-v { color: var(--ink); font-family: var(--ff-mono); }
.lot-foot { padding: 12px 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted-2); background: var(--paper-2); }

/* ===== 6 · QC ===== */
.s-qc { background: var(--paper-2); }
.qc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.qc-card {
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.qc-card.is-fail { border-top: 3px solid var(--red); }
.qc-card.is-pass { border-top: 3px solid var(--green); }
.qc-card-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.qc-card-head .id { font-family: var(--ff-mono); font-size: 16px; color: var(--ink); font-weight: 500; margin-bottom: 8px; display: flex; align-items: center; gap: 12px; }
.qc-card-head .lot { font-size: 15.5px; color: var(--muted); margin-top: 4px; }
.qc-card-head .lot .mono { color: var(--ink); }
.qc-fail-banner {
  padding: 12px 22px;
  background: var(--red-soft); color: var(--red);
  font-size: 15px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(201,74,62,0.15);
}
.qc-fail-banner .dt { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.qc-kv { padding: 18px 22px; }
.qc-kv-row {
  display: grid; grid-template-columns: 1fr auto;
  font-size: 15.5px; padding: 8px 0;
  border-bottom: 1px dashed var(--line-2);
}
.qc-kv-row:last-child { border-bottom: 0; }
.qc-kv-row .k { color: var(--muted); }
.qc-kv-row .v { color: var(--ink); font-family: var(--ff-mono); }
.qc-kv-row.is-result .v { color: var(--green); font-weight: 600; font-family: var(--ff-body); }
.qc-kv-row.is-fail .v { color: var(--red); font-weight: 600; font-family: var(--ff-body); }
.qc-photos {
  display: flex; gap: 8px; padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
}
.qc-photo {
  flex: 1; aspect-ratio: 1 / 1; max-width: 76px;
  background: repeating-linear-gradient(45deg, #ECECEC, #ECECEC 4px, #F5F5F5 4px, #F5F5F5 8px);
  border: 1px solid var(--line);
}
.qc-fail-body { padding: 18px 22px; font-size: 15.5px; line-height: 1.7; color: var(--muted); }
.qc-fail-body .mono { color: var(--ink); }
.qc-fail-body .strong { color: var(--ink); font-weight: 500; }
.qc-decision-label {
  padding: 4px 22px 0; font-size: 14px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2);
}
.qc-decision-list {
  padding: 12px 22px 22px; display: grid; gap: 10px;
}
.qc-decision-list .btn { width: 100%; }

/* ===== 7 · YIELD ===== */
.yield-card {
  border: 1px solid var(--line); background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.yield-head {
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.yield-head .ttl { font-size: 17.5px; font-weight: 700; color: var(--ink); }
.yield-head .sub { font-size: 14.5px; color: var(--muted-2); margin-top: 2px; font-family: var(--ff-mono); }
.yield-head .filter {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 15px; padding: 7px 12px;
  border: 1px solid var(--line); color: var(--ink); background: var(--paper);
}
.yield-chart-wrap {
  padding: 28px 24px 8px; overflow-x: auto;
}
.yield-svg { width: 100%; max-width: 800px; height: 240px; display: block; margin: 0 auto; }
.yield-legend {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding: 18px 24px; border-top: 1px solid var(--line);
  font-size: 15.5px;
}
.yield-legend .k { display: flex; flex-direction: column; gap: 4px; }
.yield-legend .k .nm { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.yield-legend .k .nm .sw { width: 14px; height: 3px; }
.yield-legend .k .nm .sw.is-gold { background: var(--accent); }
.yield-legend .k .nm .sw.is-blue { background: var(--blue); }
.yield-legend .k .stat { font-family: var(--ff-mono); color: var(--muted); }
.yield-legend .k .stat .flag { color: var(--amber); font-weight: 500; }
.yield-legend .k .stat .ok { color: var(--green); font-weight: 500; }
.yield-bench {
  padding: 14px 24px; background: var(--paper-2);
  border-top: 1px solid var(--line);
  font-size: 15px; color: var(--muted);
}
.yield-bench .strong { color: var(--ink); font-weight: 500; }

/* ===== 8 · PARTIAL FULFILLMENT ===== */
.s-partial { background: var(--paper-2); }
.partial-flow {
  display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr;
  gap: 0; align-items: stretch;
  margin-bottom: 28px;
}
.flow-arrow {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
  font-size: 13px; color: var(--muted-2);
  letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600;
}
.flow-arrow .line {
  width: 100%; height: 1px; background: var(--ink); position: relative;
}
.flow-arrow .line::after {
  content: ''; position: absolute; right: -1px; top: -4px;
  border-left: 8px solid var(--ink);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent;
}
.flow-arrow .lab { margin-bottom: 8px; }
.flow-box {
  border: 1px solid var(--line); background: var(--paper);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.flow-box.is-soft { background: var(--accent-soft); border-color: rgba(176,141,87,0.4); }
.flow-box .lab { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); }
.flow-box .id { font-family: var(--ff-mono); font-size: 17px; color: var(--ink); font-weight: 500; }
.flow-box .units { font-family: var(--ff-mono); font-size: 22px; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.flow-box .breakdown { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.flow-box .breakdown .strong { color: var(--ink); font-family: var(--ff-mono); }
.flow-split {
  border: 1px solid var(--line); background: var(--paper);
  display: flex; flex-direction: column;
}
.flow-split-half { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.flow-split-half.is-green { background: var(--green-soft); border-bottom: 1px solid rgba(47,122,77,0.2); }
.flow-split-half.is-amber { background: var(--amber-soft); }
.flow-split-half .lab { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.flow-split-half.is-green .lab { color: var(--green); }
.flow-split-half.is-amber .lab { color: var(--amber); }
.flow-split-half .id { font-family: var(--ff-mono); font-size: 16px; color: var(--ink); font-weight: 600; }
.flow-split-half .units { font-family: var(--ff-mono); font-size: 19px; color: var(--ink); font-weight: 600; }
.flow-split-half .meta { font-size: 14px; color: var(--muted); }

.partial-foot { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 760px; }
.partial-foot em { color: var(--ink); font-style: normal; font-weight: 500; }

/* ===== 9 · CASCADE ===== */
.cascade-frame {
  padding: 40px 32px;
  border: 1px solid var(--line); background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 28px;
}
.cascade-foot { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 760px; }

.cascade-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 56px 1fr;
  align-items: center;
  gap: 0;
}
.cascade-source {
  background: #FBE9E7;
  border: 1px solid var(--red);
  padding: 22px 20px;
}
.cascade-source .src-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--red); margin-bottom: 8px;
}
.cascade-source .src-title {
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 18px; font-weight: 500; color: var(--ink);
  font-feature-settings: 'tnum'; line-height: 1.3;
}
.cascade-source .src-meta {
  font-size: 15px; color: var(--muted); margin-top: 6px;
}
.cascade-source .src-sub {
  display: inline-block; font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin-top: 14px;
  padding-top: 12px; border-top: 1px solid rgba(201, 74, 62, 0.2);
}

.cascade-connectors {
  height: 100%;
  position: relative;
}
.cascade-connectors svg {
  width: 100%; height: 100%; display: block;
}

.cascade-effects {
  display: grid; gap: 10px;
}
.cascade-effect {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}
.cascade-effect .ef-eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--ink); margin-bottom: 4px;
}
.cascade-effect .ef-body {
  font-size: 15px; color: var(--muted); line-height: 1.45;
}
.cascade-effect .ef-tag {
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 13px; color: var(--tertiary);
  font-feature-settings: 'tnum';
  white-space: nowrap;
}
@media (max-width: 860px) {
  .cascade-grid { grid-template-columns: 1fr; gap: 16px; }
  .cascade-connectors { display: none; }
}

/* ===== 10 · COMPARE ===== */
.s-compare { background: var(--paper-2); }
.compare-head { max-width: 760px; margin-bottom: 48px; }
.compare-head .h2 { margin: 16px 0 0; }
.compare-table {
  width: 100%; border-collapse: collapse;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  font-size: 16px;
}
.compare-table th, .compare-table td {
  padding: 16px 20px; text-align: left;
  border-bottom: 1px solid var(--line-2);
}
.compare-table thead th {
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-2); background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table th.cap, .compare-table td.cap { width: 36%; color: var(--ink); font-weight: 500; }
.compare-table td.val { color: var(--muted); text-align: center; font-feature-settings: 'tnum'; }
.compare-table td.val .em { color: var(--muted-2); font-style: italic; font-size: 15px; }
.compare-table td.val .check { color: var(--green); font-size: 17px; }
.compare-table td.val .dash { color: var(--muted-2); }
.compare-table .col-edma { background: var(--accent-soft); color: var(--ink) !important; font-weight: 500; }
.compare-table thead th.col-edma { background: var(--accent); color: #fff; border-bottom-color: var(--accent); }
.compare-table tbody td.col-edma .check { color: var(--accent-hover); }
.compare-table tbody td.col-edma.val { font-weight: 600; color: var(--ink); }
.compare-foot { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 760px; margin-top: 32px; }

/* ===== 11 · FAQ ===== */
.s-faq .head { margin-bottom: 40px; }

/* ===== 12 · CTA ===== */
.s-cta-band { background: var(--ink); padding: 120px 0; text-align: center; border-top: 0; }
.s-cta-band .wrap { max-width: 820px; }
.s-cta-band .h2-band { color: #fff; margin-bottom: 22px; }
.s-cta-band p { color: rgba(255,255,255,0.78); font-size: 19px; line-height: 1.55; margin-bottom: 36px; }
.s-cta-band .cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ===== 13 · RELATED ===== */
.s-related { padding: 96px 0; }
.s-related .eyebrow { text-align: center; display: block; margin-bottom: 36px; }
.related-grid {
  max-width: 1024px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.related-card {
  border: 1px solid var(--line); padding: 24px; background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color var(--dur-fast), transform var(--dur-fast);
}
.related-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.related-card .ttl { font-size: 18px; font-weight: 700; color: var(--ink); }
.related-card .desc { font-size: 16px; color: var(--muted); line-height: 1.5; flex: 1; }
.related-card .more { font-size: 15px; color: var(--accent); font-weight: 500; margin-top: 8px; }
.related-back { text-align: center; margin-top: 32px; }
.related-back a { font-size: 16px; color: var(--muted); display: inline-flex; gap: 6px; }
.related-back a:hover { color: var(--ink); }

/* FOOTER */
.site-footer { background: var(--ink); color: #fff; }
.footer-top { border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-top-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 48px var(--inner-pad);
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.edma-logo--footer { color: #fff; }
.edma-logo--footer .edma-wordmark { color: #fff; }
.footer-brand-tag { color: rgba(255,255,255,0.6); margin-top: 14px; max-width: 360px; font-size: 16px; line-height: 1.5; }
.footer-newsletter-title { font-size: 16px; font-weight: 600; }
.footer-newsletter-sub { font-size: 15px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.footer-newsletter { display: flex; gap: 8px; margin-top: 14px; max-width: 420px; }
.footer-newsletter input { flex: 1; background: transparent; border: 1px solid rgba(255,255,255,0.18); color: #fff; padding: 10px 12px; font-family: inherit; font-size: 15px; }
.footer-newsletter input::placeholder { color: rgba(255,255,255,0.35); }
.footer-newsletter button { background: var(--accent); color: #fff; padding: 10px 16px; font-size: 15px; font-weight: 500; cursor: pointer; }
.footer-links { max-width: var(--max-w); margin: 0 auto; padding: 56px var(--inner-pad); display: grid; grid-template-columns: repeat(6, 1fr); gap: 32px; }
.footer-col-title { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
.footer-link-list li { margin-bottom: 8px; }
.footer-link-list a { font-size: 15.5px; color: rgba(255,255,255,0.78); }
.footer-link-list a:hover { color: var(--accent); }
.footer-legal-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 24px var(--inner-pad);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
}
.footer-legal-inner .links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-legal-inner .status-ok { color: #6CB388; }

/* Responsive */
@media (max-width: 1024px) {
  section { padding: 72px 0; }
  .s-cta-band { padding: 96px 0; }
  .problem-grid { gap: 40px; }
  .qc-grid { grid-template-columns: 1fr; }
  .partial-flow { grid-template-columns: 1fr; gap: 12px; }
  .flow-arrow { width: 100%; height: 36px; flex-direction: row; }
  .flow-arrow .line { height: 1px; width: 80%; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { grid-template-columns: repeat(3, 1fr); }
  .footer-top-inner { grid-template-columns: 1fr; }
  .mfr-row { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 720px) {
  :root { --inner-pad: 20px; }
  .nav-list { display: none; }
  .nav-signin { display: none; }
  .cp-tabs { display: none; }
  .problem-grid { grid-template-columns: 1fr; }
  .alloc-row { grid-template-columns: 1fr 1fr; }
  .alloc-row .name { grid-column: 1 / 3; }
  .lot-stages-bar { grid-template-columns: 1fr; gap: 12px; }
  .lot-stages-bar .stage-line { display: none; }
  .compare-table th, .compare-table td { padding: 12px 10px; font-size: 14.5px; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}

/* ============= FAQ — single-open accordion (matches /product overview) ============= */

/* ============================================================
   13. FAQ
   ============================================================ */
.faq-list {
  max-width: 880px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}

/* The question is now a real <button> — clickable, full-width,
   with a chevron that rotates on open. */
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  transition: color var(--dur-base);
}
.faq-q:hover { color: var(--accent); }
.faq-q:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq-q-text {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.faq-q-icon {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  transition:
    transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color var(--dur-base),
    color var(--dur-base),
    background var(--dur-base);
}
.faq-q:hover .faq-q-icon {
  border-color: var(--accent);
  color: var(--accent);
}
.faq-item.is-open .faq-q-icon {
  transform: rotate(180deg);
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* The answer wrapper uses the grid-template-rows 0fr → 1fr trick
   to animate height changes smoothly without needing a known max-height.
   The inner div has overflow:hidden to clip the content while collapsed. */
.faq-a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.faq-item.is-open .faq-a-wrap {
  grid-template-rows: 1fr;
}
.faq-a-inner {
  overflow: hidden;
  min-height: 0;
}
.faq-a {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 760px;
  padding: 0 0 24px;
  margin: 0;
  /* Subtle fade-in delay so text appears after the height animation starts */
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 220ms 80ms ease-out, transform 220ms 80ms ease-out;
}
.faq-item.is-open .faq-a {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .faq-q-icon,
  .faq-a-wrap,
  .faq-a { transition-duration: 0ms; }
}
