/* Compliance First National portal: the same look as the dashboard mock-up (navy header, Inter + Space Grotesk). */
:root {
  --bg: #F6F6F3; --surface: #FFFFFF; --ink: #1B1F24; --ink2: #2A313A; --muted: #5B6470; --soft: #3D4550;
  --line: #E2E3DE; --line2: #EEEFEA; --field: #C9CCC4; --chip: #EFF1EC;
  --navy: #1F3A5F; --navy-dark: #14263D; --navy-chip: #2C4D78; --navy-tint: #E8EEF6; --on-navy: #E3EAF4; --on-navy-2: #C9D6E8;
  --red: #B42318; --red-bg: #FEE4E2; --red-ink: #912018;
  --amber: #B54708; --amber-bg: #FEF0C7; --amber-ink: #93370D; --amber-soft: #FFF8E6; --amber-line: #F3D9A4; --amber-text: #5C3A06;
  --green: #067647; --green-bg: #DCFAE6; --green-ink: #05603A;
  --display: "Space Grotesk", Inter, system-ui, sans-serif; --body: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5 }
a { color: var(--navy) } a:hover { color: #132640 }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance }
h1 { font-size: clamp(24px, 3.2vw, 28px) } h2 { font-size: 19px } h3 { font-size: 16px }
.top { background: var(--navy); color: #fff; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between }
.top.group { background: var(--navy-dark) }
.brand { display: flex; gap: 14px; align-items: center; color: #fff; text-decoration: none; min-height: 44px }
.brand b { display: block; font-family: var(--display); font-size: 18px; font-weight: 600 }
.brand small { display: block; font-size: 13px; color: var(--on-navy-2) }
.top .meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--on-navy) }
.top .chip { background: var(--navy-chip); padding: 6px 12px; border-radius: 999px }
.top button.link { background: none; border: 1px solid var(--navy-chip); color: #fff; border-radius: 8px; min-height: 36px; padding: 0 12px; font: inherit; font-size: 13px; cursor: pointer }
.back { color: #fff; text-decoration: none; display: flex; gap: 10px; align-items: center; min-height: 44px; font-family: var(--display); font-weight: 600 }
.back:hover { color: #fff; text-decoration: underline }
.nav { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 24px; display: flex; flex-wrap: wrap; gap: 4px; overflow-x: auto }
.nav a { min-height: 48px; display: inline-flex; align-items: center; padding: 0 14px; color: var(--soft); text-decoration: none; white-space: nowrap }
.nav a[aria-current="page"] { font-weight: 600; color: var(--navy); border-bottom: 3px solid var(--navy) }
.main { max-width: 1320px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px }
.main.narrow { max-width: 1100px }
.lede { margin: 4px 0 0; color: var(--muted); max-width: 72ch }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-width: 0 }
.card.warn { background: var(--amber-soft); border-color: var(--amber-line) }
.card.pending { border: 2px solid var(--amber-line) }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) }
.grid.tight { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between }
.stack { display: flex; flex-direction: column; gap: 10px }
.muted { color: var(--muted) } .small { font-size: 13px } .soft { color: var(--soft) }
.kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted) }
.big { font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1.2 }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap }
.pill.red { background: var(--red-bg); color: var(--red-ink) } .pill.orange { background: var(--amber-bg); color: var(--amber-ink) }
.pill.green { background: var(--green-bg); color: var(--green-ink) } .pill.blue { background: var(--navy-tint); color: var(--navy) }
.pill.grey { background: var(--chip); color: #4A5360 }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--field); background: var(--surface); color: var(--ink); font: inherit; text-decoration: none; cursor: pointer }
.btn:hover { color: var(--ink); border-color: #9CA19A }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600 } .btn.primary:hover { background: #132640; color: #fff }
.btn.approve { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600 } .btn.approve:hover { background: #05603A; color: #fff }
.btn.danger { color: var(--red-ink) }
.btn[disabled] { opacity: .55; cursor: not-allowed }
.notice { background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 8px; padding: 10px 12px; font-size: 14px; color: var(--amber-text) }
.notice.good { background: var(--green-bg); border-color: #A6F4C5; color: var(--green-ink) }
.notice.bad { background: var(--red-bg); border-color: #FDA29B; color: var(--red-ink) }
table { width: 100%; border-collapse: collapse }
th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 8px; border-bottom: 1px solid var(--line); font-weight: 600 }
td { padding: 12px 8px; border-bottom: 1px solid var(--line2); vertical-align: top }
.scroll { overflow-x: auto }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted) }
input[type=text], input[type=password], input[type=search], textarea { min-height: 44px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 8px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; width: 100% }
textarea { min-height: 80px; resize: vertical }
:focus-visible { outline: 3px solid #7FA6D6; outline-offset: 2px }

/* manual text */
.md p { margin: 0 0 10px; line-height: 1.6; color: var(--ink2) }
.md ol, .md ul { margin: 0 0 10px; padding-left: 24px; color: var(--ink2) } .md li { margin: 2px 0 }
.md table { margin: 0 0 12px; font-size: 14px } .md td, .md th { padding: 6px 8px; border: 1px solid var(--line) }
.md mark.office { background: var(--amber-bg); color: var(--amber-ink); border-radius: 4px; padding: 1px 4px; font-size: 14px }
.md > :last-child { margin-bottom: 0 }
.doc-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start }
.toc { flex: 1 1 240px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px }
.toc a { display: block; padding: 6px 10px; border-radius: 6px; text-decoration: none; font-size: 14px }
.toc a.part { font-weight: 600; margin-top: 6px } .toc a.sub { padding-left: 22px; color: var(--soft) }
.toc a:hover { background: var(--navy-tint) }
.doc { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 16px }
.doc article { display: flex; flex-direction: column; gap: 4px }
.doc h2.part { font-size: 24px; margin: 22px 0 6px } .doc h3.section { font-size: 19px; margin: 18px 0 4px } .doc h4.sub { font-family: var(--display); font-size: 16px; margin: 14px 0 4px }
.clause { padding: 10px 12px; margin: 0 -12px; border-radius: 8px; scroll-margin-top: 16px }
.clause.changed { background: #EAF7EF; box-shadow: inset 0 0 0 1px #A6F4C5 }
.clause.focus { box-shadow: inset 0 0 0 2px var(--green) }
.clause .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px }
.clause details { margin-top: 6px; font-size: 14px } .clause details .md { background: var(--bg); border-radius: 8px; padding: 10px 12px; margin-top: 6px }
.versions { display: flex; flex-wrap: wrap; gap: 6px }
.versions a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; border: 1px solid var(--field); text-decoration: none; font-size: 14px; color: var(--ink) }
.versions a[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600 }
.side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px }
.side > div { border-radius: 8px; padding: 14px; min-width: 0 }
.side .was { background: var(--bg) } .side .now { background: var(--amber-soft) }
.side .now.done { background: #EAF7EF }
.transcript { white-space: pre-wrap; font-size: 14px; color: var(--soft); background: var(--bg); border-radius: 8px; padding: 12px; max-height: 420px; overflow: auto }
footer.docfoot { border-top: 1px solid var(--line); padding-top: 12px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 16px }
.skeleton { color: var(--muted); padding: 24px 0 }
@media (max-width: 720px) { .top, .nav { padding-left: 16px; padding-right: 16px } .main { padding: 16px } .toc { position: static; max-height: none } }
@media print { .top, .nav, .toc, .noprint { display: none !important } body { background: #fff } .card { border: 0; padding: 0 } }
