:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5a6472;
  --accent: #2563eb;
  --border: #e5e7eb;
  --card: #f8fafc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e8eaed;
    --muted: #9aa4b2;
    --accent: #6ea8fe;
    --border: #232833;
    --card: #171a21;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
header { padding: 64px 0 40px; border-bottom: 1px solid var(--border); }
header h1 { font-size: 2rem; margin: 0 0 8px; line-height: 1.2; }
header p { color: var(--muted); margin: 4px 0; }
nav {
  position: sticky; top: 0; background: var(--bg);
  border-bottom: 1px solid var(--border); z-index: 5;
}
nav .wrap { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 20px; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
nav a:hover { color: var(--accent); }
section { padding: 40px 0; border-bottom: 1px solid var(--border); }
section h2 { font-size: 1.35rem; margin: 0 0 16px; }
h3 { font-size: 1.05rem; margin: 24px 0 8px; }
a { color: var(--accent); }
ul { padding-left: 20px; }
li { margin: 6px 0; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px; margin: 16px 0;
}
.muted { color: var(--muted); }
.note { font-size: 0.8rem; color: var(--muted); padding: 24px 0 48px; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; }
th, td {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--border); font-size: 0.92rem;
}
th { color: var(--muted); font-weight: 600; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--card); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 4px; font-size: 0.85em;
}
ol { padding-left: 22px; }
ol > li { margin: 12px 0; }
.contact { font-size: 0.9rem; }

/* ============================================================
   Diagram design system (shared by all proposal pages)
   Grounded in Headlamp's own UI vocabulary: resource-kind nodes,
   StatusLabel-style chips (shape + icon + text + color, never color
   alone), monospace resource kinds, kubectl-aligned columns.
   ============================================================ */
:root {
  /* status palette — fixed across themes (validated) */
  --st-good: #0ca30c;
  --st-warn: #fab219;
  --st-serious: #ec835a;
  --st-crit: #d03b3b;
  --st-run: var(--accent);
  --st-neutral: var(--muted);
  /* gantt work-type hues (light) */
  --gantt-build: #2a78d6;
  --gantt-quality: #1baf7a;
  --gantt-milestone: #4a3aa7;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --gantt-build: #3987e5;
    --gantt-quality: #199e70;
    --gantt-milestone: #9085e9;
  }
}

figure.diagram { margin: 28px 0; }
figure.diagram > .surface {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px;
}
figure.diagram figcaption {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 10px;
  line-height: 1.5;
}
figure.diagram figcaption b { color: var(--fg); font-weight: 600; }
.scroll-x { overflow-x: auto; }

/* --- resource-kind map (inline SVG) --- */
.map-svg { display: block; width: 100%; height: auto; min-width: 480px; font-family: var(--mono); }
.map-svg .node { fill: var(--bg); stroke: var(--border); stroke-width: 1.5; }
.map-svg .node.accent {
  fill: var(--card);
  stroke: var(--accent);
  stroke-width: 1.75;
}
.map-svg .kind { fill: var(--fg); font-weight: 700; font-size: 13px; }
.map-svg .scope { fill: var(--muted); font-size: 10px; font-family: -apple-system, system-ui, sans-serif; }
.map-svg .edge { stroke: var(--muted); stroke-width: 1.5; fill: none; }
.map-svg .edge-label {
  fill: var(--muted); font-size: 9.5px;
  font-family: var(--mono);
}
.map-svg .arrowhead { fill: var(--muted); }

/* --- status chips (StatusLabel style) --- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 11px; border-radius: 999px;
  font-size: 0.82rem; line-height: 1.6;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.chip .ic { width: 13px; height: 13px; flex: 0 0 auto; }
.chip.good     { --c: var(--st-good); }
.chip.warn     { --c: var(--st-warn); }
.chip.serious  { --c: var(--st-serious); }
.chip.crit     { --c: var(--st-crit); }
.chip.run      { --c: var(--st-run); }
.chip.neutral  { --c: var(--st-neutral); }
.chip[class*=" "] , .chip.good, .chip.warn, .chip.serious, .chip.crit, .chip.run, .chip.neutral {
  border-color: color-mix(in srgb, var(--c) 45%, var(--border));
  background: color-mix(in srgb, var(--c) 10%, var(--card));
}
.chip .ic { color: var(--c); }

/* --- lifecycle stepper --- */
.stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 2px; }
.step {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 45%, var(--border));
  background: color-mix(in srgb, var(--c, var(--muted)) 9%, var(--card));
  border-radius: 10px; padding: 7px 11px; font-size: 0.85rem;
}
.step .ic { width: 14px; height: 14px; color: var(--c, var(--muted)); flex: 0 0 auto; }
.step.good { --c: var(--st-good); }
.step.run { --c: var(--st-run); }
.step.neutral { --c: var(--st-neutral); }
.chevron { color: var(--muted); flex: 0 0 auto; width: 16px; height: 16px; }
.branch-note {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 0.85rem; color: var(--muted);
}
.branch-note .chips { margin-bottom: 8px; }

/* --- verb map (kubectl-aligned translation table) --- */
.verbmap { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.verbmap td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.verbmap tr:last-child td { border-bottom: 0; }
.verbmap .cmd { font-family: var(--mono); color: var(--fg); white-space: nowrap; }
.verbmap .mid { color: var(--muted); font-size: 0.8rem; text-align: center; white-space: nowrap; }
.verbmap .obj { font-family: var(--mono); color: var(--accent); }
.verbmap .obj small { display: block; font-family: -apple-system, system-ui, sans-serif; color: var(--muted); font-size: 0.72rem; margin-top: 2px; }

/* --- progressive disclosure (DRA) --- */
.disclosure { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .disclosure { grid-template-columns: 1fr; } }
.disc-col h4 { margin: 0 0 10px; font-size: 0.85rem; }
.disc-col .tag { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.field {
  display: block; font-family: var(--mono); font-size: 0.8rem;
  padding: 6px 10px; border-radius: 7px; margin: 6px 0;
  border: 1px solid var(--border); background: var(--bg);
}
.field.ghost {
  border-style: dashed;
  color: var(--muted);
  background: transparent;
}

/* --- gantt --- */
.gantt { position: relative; min-width: 660px; }
.g-row { display: grid; grid-template-columns: 172px repeat(12, minmax(24px, 1fr)); align-items: center; height: 30px; }
.g-head-row { height: 26px; }
.g-head-row .g-cell {
  grid-row: 1; font-size: 11px; color: var(--muted); text-align: center;
  font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--border);
  padding-bottom: 5px; align-self: end;
}
.g-head-row .g-label { border-bottom: 1px solid var(--border); }
.g-label { grid-column: 1; font-size: 12px; color: var(--fg); text-align: right; padding-right: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-bar { height: 20px; border-radius: 6px; margin: 0 2px; align-self: center; }
.g-bar.b-build { background: var(--gantt-build); }
.g-bar.b-quality { background: var(--gantt-quality); }
.g-bar.b-milestone { background: var(--gantt-milestone); }
.g-midterm {
  position: absolute; top: 4px; bottom: 22px;
  left: calc(172px + (100% - 172px) * 0.5);
  border-left: 2px dashed var(--accent);
  pointer-events: none;
}
.g-midterm span {
  position: absolute; top: -18px; left: 6px; white-space: nowrap;
  font-size: 10.5px; color: var(--accent); font-weight: 600;
}
.g-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; font-size: 0.8rem; color: var(--muted); }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.g-legend .l-build { background: var(--gantt-build); }
.g-legend .l-quality { background: var(--gantt-quality); }
.g-legend .l-milestone { background: var(--gantt-milestone); }

