:root {
  --bg: #0b0b0d;
  --bg-2: #111114;
  --panel: #16161a;
  --panel-2: #1c1c21;
  --line: #2a2a31;
  --text: #ecebe7;
  --muted: #a3a2a8;
  --gold: #c9a227;
  --gold-hi: #e3c25a;
  --gold-dim: rgba(201, 162, 39, 0.14);
  --red: #d9534f;
  --green: #4caf6e;
  --radius: 10px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: Oswald, Inter, sans-serif; font-weight: 600; letter-spacing: 0.02em; line-height: 1.15; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; margin-top: 32px; }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 700; margin: 0 0 8px; }

.notice-bar { background: #050506; color: var(--muted); font-size: 0.78rem; text-align: center; padding: 6px 12px; border-bottom: 1px solid var(--line); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 13, 0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: Oswald, sans-serif; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.05; }
.brand:hover { text-decoration: none; }
.brand small { display: block; color: var(--gold); font-size: 0.7rem; letter-spacing: 0.22em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a { color: var(--muted); padding: 8px 12px; border-radius: 6px; font-weight: 500; font-size: 0.92rem; }
.site-nav > a:hover, .site-nav > a.active { color: var(--text); background: var(--panel); text-decoration: none; }
.site-nav > a.active { box-shadow: inset 0 -2px 0 var(--gold); }
.nav-account { display: flex; gap: 8px; margin-left: 12px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; font-family: inherit; letter-spacing: 0.02em; transition: background 0.15s, border-color 0.15s, color 0.15s; min-height: 44px; }
.btn:hover { text-decoration: none; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; min-height: 38px; }
.btn-gold { background: var(--gold); color: #111; }
.btn-gold:hover { background: var(--gold-hi); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }
.btn-danger { background: #3a1513; color: #ffb4b0; border-color: #6b2622; }
.btn-danger:hover { background: #4b1a17; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero { position: relative; min-height: 78vh; display: flex; align-items: center; background: linear-gradient(90deg, rgba(8,8,9,0.96) 0%, rgba(8,8,9,0.8) 45%, rgba(8,8,9,0.35) 100%), var(--hero) center / cover no-repeat; overflow: hidden; }
.hero-small { min-height: 300px; }
.hero-inner { padding: 80px 24px; max-width: var(--wrap); width: 100%; }
.hero h1 { max-width: 14ch; }
.hero .lead { font-size: 1.15rem; color: #d6d4cf; max-width: 56ch; margin-bottom: 28px; }
.stripe { position: absolute; left: -5%; right: -5%; bottom: 36px; height: 14px; background: var(--gold); transform: rotate(-2deg); box-shadow: 0 0 0 4px rgba(255,255,255,0.88); }
.hero-small .stripe { bottom: 22px; height: 9px; box-shadow: 0 0 0 3px rgba(255,255,255,0.88); }

.section { padding: 80px 0; }
.section-dark { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p:last-child { color: var(--muted); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.grid > .card { margin-bottom: 0; }
.card h3 { margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }
.link-card { color: var(--text); display: block; transition: border-color 0.15s; }
.link-card:hover { border-color: var(--gold); text-decoration: none; }
.note { margin-top: 32px; }

.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.strip-item img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.cta { background: linear-gradient(120deg, #17140a, #0b0b0d 60%); border-top: 1px solid var(--line); padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin-bottom: 6px; }
.cta p { color: var(--muted); margin: 0; }

.prose-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1em 0; padding: 12px 18px; border-left: 3px solid var(--gold); background: var(--gold-dim); border-radius: 0 8px 8px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose code { background: var(--panel-2); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; }
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: sticky; top: 100px; }
.side-card img { margin: 0 auto 16px; }
.side-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 16px; }
.side-card dt { color: var(--muted); }
.side-card dd { margin: 0; font-weight: 600; text-align: right; }
.checks { list-style: none; padding: 0; margin: 0 0 20px; }
.checks li { padding: 8px 0 8px 28px; position: relative; border-bottom: 1px solid var(--line); }
.checks li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 10px; height: 6px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.person { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.person img { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); }
.person h3 { margin: 0; }
.person .eyebrow { margin-bottom: 4px; }
.rank-list { columns: 2; margin: 0; padding-left: 1.2em; color: var(--muted); }

.org { margin-bottom: 36px; text-align: center; }
.org-top { display: inline-block; background: var(--gold); color: #111; font-weight: 700; padding: 12px 28px; border-radius: 8px; font-family: Oswald, sans-serif; text-transform: uppercase; letter-spacing: 0.06em; }
.org-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; position: relative; }
.org-row div { background: var(--panel); border: 1px solid var(--gold); border-radius: 8px; padding: 12px; font-weight: 600; }
.division { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 28px; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.tags li { background: var(--panel-2); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; font-size: 0.85rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.photo { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.photo figcaption { padding: 14px 16px; color: var(--muted); font-size: 0.92rem; }

.steps { list-style: none; padding: 0; margin: 0; }
.step { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.step-num { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: #111; display: grid; place-items: center; font-weight: 700; font-family: Oswald, sans-serif; font-size: 1.2rem; }
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--muted); }

.faq { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none; position: relative; padding-right: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 14px; color: var(--gold); font-size: 1.4rem; }
.faq[open] summary::after { content: "-"; }
.faq p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

.rule { display: flex; gap: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 12px; }
.rule-num { flex: none; background: var(--panel-2); border: 1px solid var(--line); color: var(--gold); font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; padding: 4px 10px; border-radius: 6px; height: fit-content; white-space: nowrap; }
.rule h3 { margin-bottom: 4px; }
.rule p { margin: 0; color: var(--muted); }

.center-box { text-align: center; padding: 40px 0; }
.center-box img { margin: 0 auto 20px; }
.center-box h1 { font-size: 2.2rem; }

.flash { background: var(--gold-dim); border: 1px solid var(--gold); padding: 12px 16px; border-radius: 8px; margin: 16px 0; }
.flash.error { background: #2a1210; border-color: #6b2622; color: #ffb4b0; }

.site-footer { border-top: 1px solid var(--line); background: #070708; padding: 40px 0 24px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand strong { display: block; font-family: Oswald, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-brand span { color: var(--muted); font-size: 0.85rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: #7d7c82; font-size: 0.8rem; }

.portal { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; padding-top: 32px; padding-bottom: 40px; align-items: start; }
.portal-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 96px; }
.me { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.me img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--gold); }
.me strong { display: block; line-height: 1.2; }
.me span { color: var(--gold); font-size: 0.85rem; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pill { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 0.75rem; color: var(--muted); }
.portal-nav { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.portal-nav a { color: var(--muted); padding: 10px 12px; border-radius: 6px; font-weight: 500; }
.portal-nav a:hover, .portal-nav a.active { background: var(--panel-2); color: var(--text); text-decoration: none; }
.portal-nav a.active { box-shadow: inset 3px 0 0 var(--gold); }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 4px; }
.page-head.row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat span { display: block; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.stat strong { display: block; font-family: Oswald, sans-serif; font-size: 1.6rem; font-weight: 600; margin-top: 4px; }
.stat small { color: var(--muted); }
.bar { height: 8px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line); }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); }
.card.notice { border-color: var(--gold); background: var(--gold-dim); }
.card.notice-bad { border-color: #6b2622; background: #1f0f0e; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.list { margin: 0; padding-left: 1.1em; }
.list li { margin-bottom: 6px; }

.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.doc-list li:last-child { border-bottom: 0; }
.doc-list small { color: var(--muted); }
.pin { background: var(--gold); color: #111; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; margin-right: 8px; text-transform: uppercase; }
.doc { font-size: 1.02rem; }
.doc h2 { font-size: 1.8rem; }
.doc h3 { font-size: 1.4rem; margin-top: 1.2em; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.08em; }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-pending { background: #2b2410; color: var(--gold-hi); }
.status-approved { background: #10261a; color: #8fe0a8; }
.status-returned { background: #2a1210; color: #ffb4b0; }

.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; margin-bottom: 18px; font-size: 0.92rem; }
.form label small { color: var(--muted); font-weight: 400; }
.form input, .form select, .form textarea { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font: inherit; font-weight: 400; min-height: 44px; }
.form textarea { resize: vertical; line-height: 1.5; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.form .check { flex-direction: row; align-items: center; gap: 10px; font-weight: 500; }
.form .check input { min-height: auto; width: 18px; height: 18px; accent-color: var(--gold); }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.85rem; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.req { color: var(--gold); }
.danger-zone { margin-top: 8px; }
.kv-list { margin: 0; }
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 12px 0 12px 18px; border-left: 2px solid var(--gold); margin-left: 4px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline li span { display: block; color: var(--muted); font-size: 0.82rem; }
.timeline li p { margin: 4px 0 0; color: var(--muted); }
.timeline li.revoked { opacity: 0.55; border-left-color: var(--line); }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 12px 24px 20px; display: none; }
  .site-nav.open { display: flex; }
  .nav-account { margin: 12px 0 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .prose-wrap { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .portal { grid-template-columns: 1fr; }
  .portal-side { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .grid-2 { grid-template-columns: 1fr; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { min-height: 70vh; }
  .section { padding: 56px 0; }
  .kv { grid-template-columns: 1fr; gap: 4px; }
  .rank-list { columns: 1; }
  .org-row { grid-template-columns: 1fr; }
  .rule { flex-direction: column; gap: 10px; }
}
.grid + .card, .card + .grid, .grid + .grid { margin-top: 20px; }

.guarded { position: relative; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.guarded input, .guarded textarea { -webkit-user-select: auto; user-select: auto; }
.wm { position: fixed; inset: 0; z-index: 40; pointer-events: none; background-repeat: repeat; }
body.veiled .guarded > *:not(.wm) { filter: blur(18px); transition: filter 0.1s; }
@media print { body * { display: none !important; } body::after { content: "Printing is disabled for the GCSO Virtual Academy."; display: block; padding: 40px; color: #000; } }
.phase-list { list-style: none; margin: 0; padding: 0; }
.phase-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.phase-row:last-child { border-bottom: 0; }
.phase-row strong { display: block; }
.phase-row small { color: var(--muted); }
.phase-row.locked { opacity: 0.55; }
.phase-num { width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--gold); color: var(--gold-hi); display: grid; place-items: center; font-family: Oswald, sans-serif; font-weight: 600; font-size: 1.1rem; }
.status { background: var(--panel-2); color: var(--muted); }
.video-card { padding: 12px; }
.lesson { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; display: block; }
.video-note { margin: 10px 4px 2px; }
.reading table td, .reading table th { white-space: normal; }
.reading { font-size: 1.02rem; }
.reading ul.sub { margin-top: -0.6em; padding-left: 2.6em; }
.quiz-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.quiz-cta h3 { margin-bottom: 4px; }
.quiz-cta p { margin: 0; }
.btn.disabled { opacity: 0.45; cursor: not-allowed; pointer-events: auto; }
.quiz .q { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 14px; }
.quiz legend { display: flex; gap: 12px; font-weight: 600; font-size: 1.02rem; padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.quiz legend span { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #111; display: grid; place-items: center; font-size: 0.85rem; }
.quiz .opt { clear: both; flex-direction: row; align-items: center; gap: 12px; font-weight: 400; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.quiz .opt:hover { border-color: var(--gold); }
.quiz .opt input { min-height: auto; width: 18px; height: 18px; accent-color: var(--gold); flex: none; }
.quiz .opt:has(input:checked) { border-color: var(--gold); background: var(--gold-dim); }
.key > li { margin-bottom: 16px; }
.key ul { margin: 6px 0 0; color: var(--muted); }
.key li.right { color: #8fe0a8; font-weight: 600; }
.cert-card { padding: 12px; }
.cert-card canvas { width: 100%; height: auto; display: block; border-radius: 6px; }
.sop-nav { justify-content: space-between; margin-bottom: 20px; }
.doc table td, .doc table th { white-space: normal; }
