/* Shared styles for the Business Plan page and its four phase pages. */
:root {
  --white: #ffffff; --bg-main: #f8fafc; --bg-subtle: #f1f5f9;
  --border-color: #cbd5e1; --text-main: #0f172a; --text-muted: #475569; --text-light: #64748b;
  --accent-blue: #0284c7; --accent-blue-hover: #0369a1; --accent-soft: #e0f2fe;
  --warn: #92400e; --warn-soft: #fef3c7;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius-5: 5px;
  --shadow-warm-md: 0 10px 25px -4px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-stack); background: var(--bg-main); color: var(--text-main); line-height: 1.6; }
.bay { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
header { width: 100%; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; background: rgba(255,255,255,0.96); z-index: 50; }
header .bay { display: flex; justify-content: space-between; align-items: center; padding-top: 0.85rem; padding-bottom: 0.85rem; }
@font-face { font-family: "Brand Marker"; src: url("/fonts/PermanentMarker-Regular.ttf") format("truetype"); font-display: swap; }
header a.logo { font-family: "Brand Marker", var(--font-stack); font-size: 1.35rem; color: var(--text-main); text-decoration: none; display: flex; align-items: center; gap: 0.55rem; }
header a.logo img { width: 26px; height: 26px; border-radius: 6px; display: block; }
/* Room to the left of it. The logo sits immediately before this link in the
   same flex row and the row has no gap, so the arrow was touching the final
   letter of the logo -- and that letter is slanted, so it leaned into the
   arrow. The margin is on the link rather than a gap on the row, because the
   row also holds the sign-in area on the right and that spacing is already
   correct. */
header a.back-link { font: 700 0.78rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); text-decoration: none; margin-left: 1.5rem; }
header a.back-link:hover { color: var(--accent-blue); }
.page-section { padding: clamp(2rem, 4vw, 3rem) 0; }
.plan { max-width: 820px; display: flex; flex-direction: column; gap: 2.2rem; }
.page-title-block { border-left: 4px solid var(--accent-blue); padding: 0.2rem 0 0.2rem 1rem; }
.page-title-block h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); margin: 0; font-weight: 800; letter-spacing: -0.02em; }
.page-title-block .tagline { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-blue); margin: 0.2rem 0 0.4rem; }
.page-title-block p { margin: 0; color: var(--text-muted); max-width: 70ch; }
.game-rules { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-5); padding: 0.9rem 1.2rem; }
.game-rules summary { font-weight: 700; cursor: pointer; }
.game-rules ul { margin: 0.7rem 0 0; padding-left: 1.2rem; }
h2, h3 { margin: 0; line-height: 1.25; text-wrap: balance; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--accent-blue); }
.eyebrow { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.72rem; color: var(--accent-blue); font-weight: 700; }
.note { background: var(--warn-soft); border-left: 4px solid var(--warn); padding: 1rem 1.2rem; border-radius: var(--radius-5); display: flex; flex-direction: column; gap: 0.4rem; }
.note strong { color: var(--warn); }
.phase { display: flex; flex-direction: column; gap: 1rem; }
.phase-head { display: flex; flex-direction: column; gap: 0.2rem; }
.diagram { overflow-x: auto; background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-5); padding: 0.8rem; }
.diagram svg { display: block; width: 100%; min-width: 520px; height: auto; }
.diagram text { font-family: var(--font-stack); fill: var(--text-main); }
.diagram .small { fill: var(--text-muted); font-size: 12px; }
.diagram .box { fill: var(--white); stroke: var(--border-color); stroke-width: 1.5; }
.diagram .gov { fill: var(--accent-soft); stroke: var(--accent-blue); stroke-width: 1.5; }
.diagram .arrow { stroke: var(--accent-blue); stroke-width: 1.5; fill: none; }
.diagram .head { fill: var(--accent-blue); }
.progress { display: flex; align-items: center; gap: 0.8rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.bar { flex: 1; height: 8px; background: var(--border-color); border-radius: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent-blue); width: 0; transition: width .3s; }
ol.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.8rem; }
.step { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-5); padding: 1.1rem 1.25rem; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; box-shadow: var(--shadow-warm-md); }
.step .num { font-weight: 800; font-size: 1.35rem; color: var(--accent-blue); font-variant-numeric: tabular-nums; line-height: 1.2; min-width: 2ch; }
.step .body { min-width: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.step ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 0.25rem; }
.step.done { opacity: .6; }
.step.done h3 { text-decoration: line-through; }
.check { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); cursor: pointer; width: max-content; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-blue); }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; }
.fig { border: 1px solid var(--border-color); border-radius: var(--radius-5); padding: 0.6rem 0.75rem; display: flex; flex-direction: column; }
.fig b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.fig span { font-size: 0.82rem; color: var(--text-muted); }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border-color); vertical-align: top; }
th { font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.7rem; color: var(--text-muted); }
td.n, th.n { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.sources { font-size: 0.88rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.5rem; }
.sources ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 0.25rem; }
footer { border-top: 1px solid var(--border-color); padding: 1.5rem 0; margin-top: 2rem; }
footer .bay { font: 700 0.7rem var(--font-mono); letter-spacing: 0.04em; color: var(--text-light); }
@media (prefers-reduced-motion: reduce) { .bar span { transition: none; } }
@media (max-width: 480px) { .bay { padding: 0 1rem; } .step { padding: 1rem; } }
.phase-docs { font-size: 0.9rem; font-weight: 600; text-decoration: none; margin-top: 0.3rem; }
.phase-docs:hover { text-decoration: underline; }

/* Phase pages: one card per document, with a Word download and the full text
   folded inside so the page stays short until a document is opened. */
.doc-list { display: flex; flex-direction: column; gap: 1rem; }
.doc-card { background: var(--white); border: 1px solid var(--border-color); border-radius: var(--radius-5); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-warm-md); display: flex; flex-direction: column; gap: 0.6rem; }
.doc-card .doc-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.doc-card .doc-num { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 0.05em; }
.doc-card .doc-summary { color: var(--text-muted); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn-dl { display: inline-flex; align-items: center; height: 2.25rem; padding: 0 0.9rem; border: 1px solid var(--accent-blue); border-radius: var(--radius-5); color: var(--accent-blue); font: 700 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none; background: var(--white); }
.btn-dl:hover { background: var(--accent-soft); }
.doc-card details summary { cursor: pointer; font-weight: 700; }
.doc-body { border-top: 1px solid var(--border-color); margin-top: 0.7rem; padding-top: 0.9rem; display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
.doc-body h1 { font-size: 1.3rem; margin: 0.3rem 0 0; }
.doc-body h2 { font-size: 1.1rem; margin: 0.6rem 0 0; }
.doc-body h3 { font-size: 1rem; margin: 0.4rem 0 0; }
.doc-body p, .doc-body li { max-width: 72ch; }
.doc-body ul, .doc-body ol { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.25rem; }
.doc-body blockquote { margin: 0; padding: 0.7rem 1rem; border-left: 3px solid var(--accent-blue); background: var(--bg-subtle); }
.doc-body hr { border: 0; border-top: 1px dashed var(--border-color); width: 100%; margin: 0.4rem 0; }
.doc-body table { display: block; overflow-x: auto; }
.phase-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-weight: 600; }
.phase-nav a { text-decoration: none; }
.phase-nav a:hover { text-decoration: underline; }
/* Long web addresses in the sources wrap instead of widening the page. */
.doc-card { min-width: 0; }
.doc-body a { overflow-wrap: anywhere; }
