/*
 * Planning and Project Controls (FR2) — shared stylesheet.
 * Generated by .dev/build.js — edit SITE_CSS there, not this file.
 * Mirrors the live site: Libre Franklin, uppercase letter-spaced title and
 * section labels, two-column editorial layout, no heavy chrome.
 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --text: #333333;
    --text-strong: #222222;
    --text-soft: #666666;
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --line: #eaeaea;
    --accent: #7a6a53;
    --shell: 945px;
    --label-col: 306px;
    --gap: 56px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    /* System stack only — no webfont request to a third-party CDN, so the
       site renders fully offline and depends on nothing external. */
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.66;
    color: var(--text);
    background: var(--bg);
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px; }

/* Header */

/* Sticky sitewide so the nav stays reachable on long pages. Solid
   background, since content scrolls underneath it. Padding is tighter than
   a static header would use, to keep the sticky bar from eating the screen. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 26px 0 0;
}

/* Logo mark + wordmark + build version, top left. */
.brand-row { display: flex; align-items: center; gap: 13px; }
.brand-mark { flex-shrink: 0; }

.version {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    color: var(--text-soft);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 2px 6px;
    white-space: nowrap;
    background: var(--bg);
}

.site-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-strong);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    line-height: 1.2;
}
.site-title .brand-mark { color: var(--text-strong); }
.site-title:hover .brand-mark { color: var(--accent); }
.site-title:hover { color: var(--accent); }

.site-tagline { font-size: 15px; color: var(--text-soft); margin-top: 6px; }

.site-nav { margin-top: 22px; border-top: 1px solid var(--line); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 32px; padding: 18px 0; }
.site-nav a { font-size: 14px; font-weight: 600; color: var(--text-strong); text-decoration: none; }
.site-nav a:hover, .site-nav a.is-active { color: var(--accent); }

.has-children { position: relative; }
.has-children > a { display: inline-flex; align-items: center; gap: 5px; }
.caret { flex-shrink: 0; stroke: var(--text-soft); transition: transform .15s ease; }
.has-children:hover .caret { transform: rotate(180deg); stroke: var(--accent); }

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: -18px;
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 10px 0;
    min-width: 260px;
    z-index: 50;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}
.has-children:hover .submenu, .has-children:focus-within .submenu { display: block; }
.submenu a { display: block; padding: 9px 22px; font-weight: 400; line-height: 1.4; }
.submenu a:hover { background: var(--bg-soft); }

/* Content */

main { padding: 76px 0 96px; }

.block { display: grid; grid-template-columns: var(--label-col) minmax(0, 1fr); gap: var(--gap); }

.block-label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.96px;
    text-transform: uppercase;
    color: var(--text-strong);
    line-height: 1.5;
}

.block-body > * + * { margin-top: 22px; }
.block-body p { color: var(--text); }

.block-body h2 {
    font-size: 26px;
    font-weight: 300;
    line-height: 1.45;
    color: var(--text);
    letter-spacing: normal;
    text-transform: none;
    margin-top: 38px;
}

.block-body h3 { font-size: 18px; font-weight: 600; color: var(--text-strong); margin-top: 28px; }
.block-body h4 { font-size: 15px; font-weight: 600; color: var(--text-strong); margin-top: 22px; }

.block-body ul, .block-body ol { padding-left: 20px; }
.block-body li { margin-bottom: 8px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text-strong); font-weight: 600; }

.editor-note {
    background: #fff8e6;
    border-left: 3px solid #d9a441;
    padding: 14px 18px;
    font-size: 14px;
    color: #6b5420;
}

.contact-block { background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 16px 20px; }

/* Footer */

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 60px 0 34px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 34px; }
.site-footer h4 { font-size: 12px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-strong); margin-bottom: 14px; }
.site-footer a { display: block; font-size: 14px; color: var(--text-soft); margin-bottom: 9px; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-soft); }

/* Responsive */

@media (max-width: 860px) {
    .block { grid-template-columns: 1fr; gap: 16px; }
    .site-header { padding-top: 16px; }
    .site-title { font-size: 17px; letter-spacing: 1.2px; gap: 8px; }
    .site-title .brand-mark { width: 20px; height: 20px; }
    .site-tagline { display: none; }
    .site-nav { margin-top: 14px; }
    main { padding: 48px 0 64px; }
    .site-nav ul { gap: 18px; }
    .block-body h2 { font-size: 21px; }
    .submenu { position: static; border: 0; box-shadow: none; padding: 6px 0 6px 14px; min-width: 0; }
}

/* ── Sticky header, compact state ─────────────────────────────────────
   Set by the small inline script in the footer once the page scrolls. The
   header is roomy at the top of a page and tight thereafter, so a persistent
   bar never costs a fifth of the viewport. */

.site-header { transition: padding .16s ease; }
.site-header .site-title,
.site-header .site-tagline { transition: font-size .16s ease, opacity .12s ease; }

.site-header.is-compact { padding-top: 12px; }
.site-header.is-compact .site-tagline { display: none; }
.site-header.is-compact .site-title { font-size: 19px; }
.site-header.is-compact .brand-mark { width: 22px; height: 22px; }
.site-header.is-compact .site-nav { margin-top: 12px; }
.site-header.is-compact .site-nav ul { padding: 11px 0; }

@media (prefers-reduced-motion: reduce) {
    .site-header, .site-header .site-title, .site-header .site-tagline { transition: none; }
}
