/* ==========================================================================
   Executive Set page — extends styles.css (same tokens, same Montserrat look)
   Content lives in executive-set.html; behaviour lives in js/executive.js.
   ========================================================================== */

:root {
  --nav-h: 64px;
  --good: #1f7a4d;
  --good-soft: #e6f3ec;
  --mid: #a86400;
  --mid-soft: #fdf1dc;
  --bad: #c0261b;
  --bad-soft: #fbe4e1;
  --blue: #44607f;
  --panel-border: var(--gray-300);
}

.x-page { background: var(--white); }
[hidden] { display: none !important; }

/* ---------- Page header ---------- */
.x-hero {
  background: var(--black);
  color: var(--white);
  padding: calc(var(--nav-h) + 72px) 24px 64px;
}
.x-hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 300;
  max-width: 820px;
}
.x-hero-sub {
  margin-top: 22px;
  max-width: 640px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--gray-300);
}
.x-hero-actions { justify-content: flex-start; margin-top: 32px; }

/* ---------- Tabs ---------- */
.x-tabbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-300);
}
.x-tabbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.x-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font);
  text-align: left;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.x-tab:hover { color: var(--black); background: var(--off-white); }
.x-tab:focus-visible { outline: 2px solid var(--black); outline-offset: -2px; }
.x-tab[aria-selected="true"] { color: var(--black); border-bottom-color: var(--accent); }
.x-tab-num {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--gray-300);
  font-weight: 700;
  font-size: 0.85rem;
}
.x-tab[aria-selected="true"] .x-tab-num { background: var(--accent); border-color: var(--accent); color: var(--white); }
.x-tab-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.x-tab-text strong { font-size: 0.92rem; font-weight: 600; }
.x-tab-text small { font-size: 0.74rem; font-weight: 500; letter-spacing: 0.02em; }

/* ---------- Panels ---------- */
.x-main { background: var(--off-white); }
.x-panel { padding: 56px 24px 88px; }
.x-qhead { margin-bottom: 28px; }
.x-kicker {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.x-qhead h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  max-width: 900px;
}

.x-oneline {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 20px 24px;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 28px;
}
.x-tag {
  display: inline-block;
  margin-right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Layout helpers ---------- */
.x-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.x-two-wide { grid-template-columns: 1.05fr 0.95fr; gap: 40px; margin-bottom: 0; }
.x-two-tight { grid-template-columns: 1fr; gap: 26px; margin: 22px 0 0; }
.x-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.x-four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.x-block {
  background: var(--white);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 28px;
  margin-bottom: 24px;
}
.x-two > .x-block { margin-bottom: 0; }
.x-two > * { min-width: 0; } /* lets wide children (tables) scroll inside instead of stretching the page */
.x-block-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 22px;
  line-height: 1.35;
}
.x-num {
  flex: none;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-size: 0.78rem;
}
.x-sub {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.x-note { margin-top: 18px; color: var(--gray-700); line-height: 1.6; font-size: 0.95rem; }
.x-statement { margin-top: 18px; line-height: 1.65; font-size: 1.02rem; color: var(--gray-700); }
.x-statement strong { color: var(--black); }
.x-accent { color: var(--accent); font-weight: 600; }
.x-sources {
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--gray-300);
  font-size: 0.76rem;
  line-height: 1.65;
  color: var(--gray-500);
}
.x-next { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn-dark { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark:hover { background: var(--gray-700); }
.btn-ghost { border-color: var(--gray-300); color: var(--black); background: var(--white); }
.btn-ghost:hover { border-color: var(--black); }

/* ---------- Language toggle ---------- */
.x-viewbar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.x-viewbar-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-500);
}
.x-viewbar-hint { font-size: 0.82rem; color: var(--gray-500); }
.x-seg {
  display: inline-flex;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  padding: 3px;
  background: var(--white);
}
.x-seg button {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.x-seg button:hover { background: var(--gray-100); }
.x-seg button.is-active { background: var(--black); color: var(--white); }
.x-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.x-seg-lg { display: flex; flex-wrap: wrap; border-radius: 12px; padding: 4px; gap: 4px; }
.x-seg-lg button { border-radius: 9px; padding: 12px 18px; font-size: 0.9rem; flex: 1 1 auto; }
.x-seg-lg button.is-bad.is-active { background: var(--bad); }
.x-seg-lg button.is-good.is-active { background: var(--good); }

[data-view="kitchen"] .v-tech { display: none; }
[data-view="tech"] .v-kitchen { display: none; }

/* ---------- Power per cabinet bars ---------- */
/* One row per cabinet type: label on the left, bar on the right (stacked on phones) */
.pb-rows { list-style: none; margin: 0; padding: 0; }
.pb-rows > li {
  display: grid;
  grid-template-columns: minmax(120px, 36%) 1fr;
  column-gap: 14px;
  align-items: center;
  min-height: 58px;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}
.pb-rows > li:hover, .pb-rows > li:focus-visible, .pb-rows > li.is-on { background: var(--off-white); }
.pb-rows > li:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.pb-label { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 6px 6px; }
.pb-main { font-size: 0.88rem; font-weight: 700; line-height: 1.25; }
.pb-sub { font-size: 0.74rem; color: var(--gray-500); }
.pb-track { position: relative; display: block; height: 58px; }
.pb-fill {
  position: absolute;
  top: 16px;
  left: 0;
  height: 26px;
  width: 0;
  border-radius: 2px;
  background: var(--gray-500);
  transition: width 0.9s var(--ease);
}
.pb-rows > li[data-hot="true"] .pb-fill { background: #e98a82; }
.pb-rows > li[data-last="true"] .pb-fill { background: var(--accent); }
.is-in .pb-fill { width: var(--w); }
.pb-val {
  position: absolute;
  top: 50%;
  left: calc(var(--w) + 8px);
  transform: translateY(-50%);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s 0.5s;
}
.is-in .pb-val { opacity: 1; }
.pb-rows > li[data-last="true"] .pb-val { left: auto; right: 10px; color: var(--white); }
.pb-air {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--from);
  width: var(--span);
  background: rgba(68, 96, 127, 0.16);
  border-left: 1px dashed var(--blue);
  border-right: 1px dashed var(--blue);
  pointer-events: none;
}
.pb-air-note { margin-top: 10px; font-size: 0.78rem; font-weight: 600; color: var(--blue); display: flex; align-items: center; gap: 8px; }
.pb-air-swatch { width: 14px; height: 10px; background: rgba(68, 96, 127, 0.3); border: 1px dashed var(--blue); display: inline-block; }
.pb-readout {
  margin-top: 14px;
  min-height: 2.9em;
  padding: 12px 14px;
  background: var(--off-white);
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--gray-700);
}

/* ---------- Column charts ---------- */
.x-chart-title { font-size: 0.82rem; font-weight: 700; margin-bottom: 12px; }
.x-chart-title small { display: block; font-weight: 500; color: var(--gray-500); margin-top: 2px; }
.x-chart-title em { font-style: normal; font-weight: 500; color: var(--gray-500); }
.x-columns {
  --plot: 130px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: calc(var(--plot) + 52px);
  padding-top: 8px;
}
.x-columns-sm { --plot: 110px; max-width: 220px; gap: 24px; }
.x-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  outline: none;
  cursor: default;
}
.x-col-val { font-size: 0.74rem; font-weight: 700; color: var(--gray-500); transition: color 0.2s; }
.x-col.is-last .x-col-val { color: var(--black); }
.x-col-bar {
  width: 100%;
  height: 0;
  border-radius: 3px 3px 0 0;
  background: #a9b1bd;
  transition: height 0.9s var(--ease), background 0.2s;
}
.x-col.is-est .x-col-bar { background: #c3c9d2; }
.x-col.is-last .x-col-bar { background: var(--black); }
.x-columns-sm .x-col .x-col-bar { background: var(--black); }
.x-columns-sm .x-col.is-last .x-col-bar { background: var(--accent); }
.x-columns-sm .x-col .x-col-val { color: var(--black); font-size: 0.85rem; }
.is-in .x-col-bar { height: calc(var(--plot) * var(--r)); }
.x-col:hover .x-col-bar, .x-col:focus-visible .x-col-bar { background: var(--accent); }
.x-col:hover .x-col-val, .x-col:focus-visible .x-col-val { color: var(--accent); }
.x-col-lbl { font-size: 0.72rem; color: var(--gray-500); height: 16px; white-space: nowrap; }
.x-chart-caption { margin-top: 10px; font-size: 0.78rem; line-height: 1.5; color: var(--gray-500); }

/* ---------- Tiles ---------- */
.x-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.x-tile {
  background: var(--off-white);
  border-radius: 8px;
  padding: 16px;
}
.x-tile strong { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.x-tile span { display: block; margin-top: 4px; font-size: 0.82rem; line-height: 1.45; color: var(--gray-700); }
.x-tile-lg strong { font-size: 2rem; }
.x-tile-lg span { font-size: 0.86rem; }
.x-tile-lg b { color: var(--black); }

/* ---------- Mini cards, steps ---------- */
.x-mini { background: var(--off-white); border-radius: 8px; padding: 22px; }
.x-icon {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 14px;
}
.x-mini h4 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.x-mini p { font-size: 0.92rem; line-height: 1.6; color: var(--gray-700); }

.x-step {
  background: var(--off-white);
  border-radius: 8px;
  padding: 22px;
  border-top: 3px solid transparent;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.x-step:hover { transform: translateY(-3px); border-top-color: var(--accent); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07); }
.x-step-no {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.x-step h4 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.x-step p { font-size: 0.9rem; line-height: 1.6; color: var(--gray-700); }
.x-step em { font-style: normal; font-weight: 700; color: var(--accent); }

/* ---------- Mistake toggle ---------- */
.x-mistake-out { margin-top: 20px; padding: 18px 20px; border-radius: 8px; background: var(--bad-soft); line-height: 1.6; transition: background 0.3s var(--ease); }
.x-mistake-out.is-good { background: var(--good-soft); }
.x-quote { font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }

/* ---------- Dark bands ---------- */
.x-dark {
  background: var(--near-black);
  color: var(--white);
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 24px;
}
.x-dark-title { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 20px; }
.x-dark-card {
  border: 1px solid #3a3a38;
  border-radius: 8px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.03);
}
.x-dark-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.35; }
.x-dark-card p { font-size: 0.88rem; line-height: 1.55; color: var(--gray-300); }
.x-check { color: #4cc38a; margin-right: 6px; }
.x-dark-tag { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #ff7a6e; margin-bottom: 8px; }
.x-ask { margin-top: 16px; padding: 18px 20px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); }
.x-ask p { font-size: 0.92rem; line-height: 1.65; color: var(--gray-300); }
.x-ask strong { color: var(--white); }
.x-dark-row .x-change { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.x-change-q { font-weight: 700; color: var(--white) !important; font-size: 1rem !important; }
.x-change-a { margin-top: 6px; font-size: 1rem !important; color: #ff9f95 !important; font-weight: 700; }

/* ---------- Q2: data list + weights ---------- */
.x-datalist { margin: 0; }
.x-datalist > div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--gray-100); }
.x-datalist > div:first-child { border-top: none; padding-top: 0; }
.x-datalist dt { font-weight: 700; font-size: 0.9rem; }
.x-datalist dd { margin: 0; font-size: 0.88rem; line-height: 1.5; color: var(--gray-700); }
.x-weights { list-style: none; margin: 0; padding: 0; }
.x-weights li { display: grid; grid-template-columns: 1.2fr 1fr 44px; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.88rem; }
.x-weights b { text-align: right; }
.x-wbar { display: block; height: 10px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.x-wbar i { display: block; height: 100%; width: 0; background: var(--black); border-radius: 999px; transition: width 0.9s var(--ease); }
.is-in .x-wbar i { width: var(--w); }
.x-rules { margin-top: 16px; padding: 14px 16px; background: var(--accent-soft); border-radius: 8px; font-size: 0.9rem; line-height: 1.55; }

/* ---------- Lab (interactive calculators) ---------- */
.x-lab {
  margin-top: 28px;
  border: 1px dashed var(--gray-500);
  border-radius: 10px;
  padding: 22px;
  background: var(--off-white);
}
.x-lab-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.x-lab-head h4 { font-size: 1rem; font-weight: 700; }
.x-lab-intro { font-size: 0.9rem; line-height: 1.55; color: var(--gray-700); margin-bottom: 14px; }
.x-badge {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--white); border: 1px solid var(--gray-300); color: var(--gray-700);
}
.x-lab-body { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 28px; align-items: start; }
.x-sliders { display: grid; gap: 14px; }
.x-slider { display: grid; grid-template-columns: 1fr 52px; grid-template-areas: "t t" "r o"; gap: 6px 12px; align-items: center; font-size: 0.86rem; font-weight: 600; }
.x-slider > span { grid-area: t; }
.x-slider > span em { font-style: normal; font-weight: 500; color: var(--gray-500); margin-left: 6px; }
.x-slider input[type="range"] { grid-area: r; width: 100%; accent-color: var(--accent); }
.x-slider output { grid-area: o; text-align: right; font-weight: 700; }
.x-checks { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 6px; font-size: 0.86rem; font-weight: 600; }
.x-checks label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.x-checks label.is-sub { opacity: 0.55; }
.x-checks label.is-sub.is-on { opacity: 1; }
.x-checks input { accent-color: var(--accent); width: 16px; height: 16px; }
.x-result { background: var(--black); color: var(--white); border-radius: 10px; padding: 22px; }
.x-result-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-300); }
.x-result-score { margin: 6px 0 10px; font-size: 3rem; font-weight: 300; letter-spacing: -0.03em; line-height: 1.05; }
.x-result-score small { font-size: 0.95rem; font-weight: 500; color: var(--gray-300); margin-left: 8px; letter-spacing: 0; }
.x-result-verdict { font-size: 0.88rem; line-height: 1.55; color: #ffb3ab; font-weight: 600; }

/* ---------- Gantt ---------- */
.x-gantt { display: grid; gap: 6px; }
.x-gantt-axis { position: relative; height: 16px; margin-left: 110px; font-size: 0.7rem; color: var(--gray-500); font-weight: 600; }
.x-gantt-axis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.x-gantt-axis span:first-child { transform: none; }
.x-gantt-axis span:last-child { transform: translateX(-100%); }
.x-gantt-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  padding: 6px 0;
  border: none;
  background: none;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  border-radius: 6px;
}
.x-gantt-row:hover { background: var(--off-white); }
.x-gantt-row:focus-visible { outline: 2px solid var(--accent); }
.x-gantt-label { font-weight: 700; font-size: 0.95rem; padding-left: 6px; }
.x-gantt-label b {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; margin-right: 8px;
  border-radius: 50%; background: var(--gray-100); font-size: 0.72rem;
}
.x-gantt-track {
  position: relative; display: block; height: 30px; border-radius: 6px;
  background:
    repeating-linear-gradient(to right, transparent 0, transparent calc(100% / 6 - 1px), var(--gray-100) calc(100% / 6 - 1px), var(--gray-100) calc(100% / 6));
}
.x-gantt-track i {
  position: absolute; top: 3px; bottom: 3px;
  left: var(--l); width: 0;
  border-radius: 5px;
  background: #9aa3af;
  transition: width 0.9s var(--ease), background 0.2s;
}
.is-in .x-gantt-track i { width: var(--wd); }
.x-gantt-row.is-active .x-gantt-track i { background: var(--accent); }
.x-gantt-row.is-active .x-gantt-label b { background: var(--accent); color: var(--white); }
.x-gantt-row.is-build .x-gantt-track i { background: var(--black); }
.x-gantt-row.is-build.is-active .x-gantt-track i { background: var(--accent); }
.x-gantt-details { margin-top: 12px; }
.x-detail { background: var(--off-white); border-radius: 8px; padding: 20px 22px; }
.x-detail h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.x-detail p { font-size: 0.95rem; line-height: 1.6; color: var(--gray-700); max-width: 760px; }
.x-guardrail { margin-top: 18px; padding: 16px 20px; border-radius: 8px; background: var(--off-white); font-size: 0.92rem; line-height: 1.6; color: var(--gray-700); }
.x-guardrail strong { color: var(--black); }

/* ---------- Q3 ---------- */
.x-bullets { margin: 0; padding-left: 20px; color: var(--gray-700); line-height: 1.65; font-size: 0.92rem; }
.x-bullets li { margin-bottom: 10px; }
.x-bullets li::marker { color: var(--accent); }
.x-bullets strong { color: var(--black); }

.x-table-wrap { overflow-x: auto; }
.x-options { width: 100%; border-collapse: separate; border-spacing: 4px; font-size: 0.86rem; min-width: 440px; }
.x-options th, .x-options td { padding: 11px 10px; text-align: center; border-radius: 4px; }
.x-options tbody th { text-align: left; background: var(--off-white); font-weight: 600; }
.x-options thead button {
  width: 100%; font-family: var(--font); font-weight: 700; font-size: 0.84rem;
  padding: 10px 8px; border: 1px solid var(--gray-300); background: var(--white); border-radius: 6px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.x-options thead button:hover { border-color: var(--black); }
.x-options thead button.is-hl { background: var(--black); color: var(--white); border-color: var(--black); }
.x-options td { font-weight: 700; transition: box-shadow 0.2s; }
.x-options td.is-hl { box-shadow: 0 0 0 2px var(--black); }
.r-good { background: var(--good-soft); color: var(--good); }
.r-mid { background: var(--mid-soft); color: var(--mid); }
.r-bad { background: var(--bad-soft); color: var(--bad); }

.x-flow { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr; align-items: stretch; gap: 8px; }
.x-flow-arrow { display: grid; place-items: center; color: var(--gray-500); font-size: 1.2rem; }
.x-flow-card {
  background: var(--off-white);
  border-radius: 8px;
  padding: 20px;
  border-top: 4px solid var(--bad);
  transition: opacity 0.3s, box-shadow 0.3s, transform 0.3s var(--ease);
}
.x-flow-card[data-tone="amber"] { border-top-color: #c98a1b; }
.x-flow-card[data-tone="blue"] { border-top-color: var(--blue); }
.x-flow-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.x-flow-card > p { font-size: 0.86rem; color: var(--gray-700); }
.x-flow-card.is-pending { opacity: 0.45; }
.x-flow-card.is-skipped { opacity: 0.25; }
.x-flow-card.is-current { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }
.x-flow-card.is-hit { background: var(--black); color: var(--white); opacity: 1; }
.x-flow-card.is-hit > p, .x-flow-card.is-hit .x-flow-rule { color: var(--gray-300); }
.x-flow-card.is-hit .x-flow-rule strong { color: var(--white); }
.x-yn { display: flex; gap: 8px; margin: 14px 0; }
.x-yn button {
  flex: 1; font-family: var(--font); font-weight: 700; font-size: 0.85rem;
  padding: 9px 0; border-radius: 6px; border: 1px solid var(--gray-500); background: var(--white); cursor: pointer;
}
.x-yn button:hover:not(:disabled) { background: var(--black); color: var(--white); border-color: var(--black); }
.x-yn button:disabled { cursor: not-allowed; opacity: 0.5; }
.x-yn button.is-chosen { background: var(--accent); color: var(--white); border-color: var(--accent); opacity: 1; }
.x-flow-rule { font-size: 0.84rem; line-height: 1.5; color: var(--gray-700); }
.x-flow-out {
  margin-top: 14px; padding: 16px 20px; border-radius: 8px; background: var(--off-white);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 1rem; font-weight: 600; line-height: 1.5;
}
.x-flow-out.has-result { background: var(--black); color: var(--white); }
.x-reset {
  font-family: var(--font); font-weight: 600; font-size: 0.82rem; padding: 8px 14px; border-radius: 6px;
  border: 1px solid var(--gray-500); background: transparent; color: inherit; cursor: pointer; white-space: nowrap;
}

/* risk chart */
.x-risk-toggles { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.8rem; font-weight: 600; margin-bottom: 8px; }
.x-risk-toggles label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.x-risk-toggles input { width: 15px; height: 15px; }
.k-defer { color: #c0261b; } .k-defer input { accent-color: #c0261b; }
.k-low { color: #b26a00; } .k-low input { accent-color: #b26a00; }
.k-phased { color: #1f7a4d; } .k-phased input { accent-color: #1f7a4d; }
.x-risk svg { width: 100%; height: auto; display: block; }
.rk-band { fill: var(--bad-soft); }
.rk-bandlabel { font-size: 11px; font-weight: 700; fill: var(--bad); }
.rk-axis { stroke: var(--gray-500); stroke-width: 1; }
.rk-guide { stroke: var(--gray-500); stroke-width: 1; stroke-dasharray: 3 4; }
.rk-guidelabel, .rk-ticks text, .rk-ylabel { font-size: 11px; fill: var(--gray-500); font-family: var(--font); }
.rk-line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; transition: opacity 0.3s; }
.line-defer { stroke: #c0261b; }
.line-low { stroke: #b26a00; stroke-dasharray: 7 5; }
.line-phased { stroke: #1f7a4d; }
.x-risk[data-hide~="defer"] .line-defer,
.x-risk[data-hide~="low"] .line-low,
.x-risk[data-hide~="phased"] .line-phased { opacity: 0; }

.x-hbars { list-style: none; margin: 0; padding: 0; }
.x-hbars li { display: grid; grid-template-columns: 96px 1fr 40px; align-items: center; gap: 10px; padding: 9px 0; font-size: 0.82rem; }
.x-hbar { display: block; height: 14px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.x-hbar i { display: block; height: 100%; width: 0; background: var(--black); transition: width 0.9s var(--ease); }
.x-hbars li:nth-child(2) .x-hbar i { background: #6b7c93; }
.x-hbars li:nth-child(3) .x-hbar i { background: #a9b1bd; }
.is-in .x-hbar i { width: var(--w); }
.x-hbars b { text-align: right; }

.x-phases .is-now { border-top-color: var(--black); }
.x-phases .is-gate { border-top-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .x-four { grid-template-columns: repeat(2, 1fr); }
  .x-two, .x-two-wide { grid-template-columns: 1fr; }
  .x-lab-body { grid-template-columns: 1fr; }
  .x-flow { grid-template-columns: 1fr; }
  .x-flow-arrow { transform: rotate(90deg); height: 18px; }
}
@media (max-width: 720px) {
  .x-hero { padding: calc(var(--nav-h) + 48px) 24px 44px; }
  .x-tabbar-inner { padding: 0 8px; }
  .x-tab { flex-direction: column; justify-content: center; gap: 6px; padding: 12px 4px; text-align: center; }
  .x-tab-text small { display: none; }
  .x-tab-text strong { font-size: 0.74rem; line-height: 1.25; }
  .x-panel { padding: 36px 16px 64px; }
  .x-block { padding: 20px 18px; }
  .x-three, .x-four, .x-tiles, .x-dark-row .x-change { grid-template-columns: 1fr; }
  .x-datalist > div { grid-template-columns: 1fr; gap: 4px; }
  .x-dark { padding: 22px 18px; }
  .x-oneline { font-size: 1rem; padding: 16px 18px; }
  .x-gantt-axis { margin-left: 84px; }
  .x-gantt-row { grid-template-columns: 84px 1fr; }
  .pb-rows > li { grid-template-columns: 1fr; row-gap: 0; padding-bottom: 6px; }
  .pb-label { padding: 8px 6px 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
  .pb-track { height: 38px; }
  .pb-fill { top: 6px; }
  .x-weights li { grid-template-columns: 1fr 70px 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .pb-fill, .x-col-bar, .x-wbar i, .x-gantt-track i, .x-hbar i { transition: none; }
  html { scroll-behavior: auto; }
}
