@font-face { font-family: "Overused Grotesk"; src: url("OverusedGrotesk-VF.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --indigo: #181840; --indigo-2: #20244C; --sky: #88CCF8; --blue: #1F63D6; --blue-ink: #174EA6;
  --ink: #20244C; --slate: #5A5D78; --mute: #A8A8B8; --line: #E1E1EA; --line-2: #C9CCDA; --fill: #F4F5F8; --paper: #FFFFFF;
  --sky-fill: #EAF6FE; --ok: #1F7A3D; --ok-fill: #EFF9F1; --ok-line: #CDE7D4; --bad: #B3261E; --bad-fill: #FDF1F1;
  --warn: #8A4B00; --warn-fill: #FFF4E0; --on-indigo: #C9D2EE;
  --radius: 12px; --shadow: 0 4px 14px rgba(24, 24, 64, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fill); color: var(--ink); }
body { font-family: "Overused Grotesk", Helvetica, Arial, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); } a:hover { color: var(--indigo); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { color: var(--indigo); margin: 0; line-height: 1.15; }
h1 { font-size: 34px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.top { background: var(--indigo); color: #fff; }
.top-in { max-width: 1360px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.top img { height: 26px; width: auto; display: block; }
.top .brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.top .tag { font-size: 12px; letter-spacing: .18em; font-weight: 600; color: var(--sky); }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; flex-grow: 1; }
.top nav a { color: var(--on-indigo); text-decoration: none; padding: 10px 14px; border-radius: 8px; }
.top nav a.on { color: #fff; background: var(--indigo-2); font-weight: 600; }
.top nav a:hover { color: #fff; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sky); color: var(--indigo); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.dark { background: var(--indigo); color: var(--sky); }
.avatar.light { background: var(--sky-fill); color: var(--indigo); }

main { max-width: 1360px; margin: 0 auto; padding: 28px 20px 64px; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; font-weight: 600; color: var(--blue); text-transform: uppercase; }
.rule { width: 56px; height: 3px; background: var(--blue); margin: 12px 0 10px; }
.muted { color: var(--slate); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.grow { flex-grow: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.split { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.split > .side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.tight { padding: 16px; }
.card h2 + p, .card h3 + p { margin-top: 4px; }
.callout { background: var(--indigo); color: #fff; border-radius: var(--radius); padding: 20px 22px; border-left: 4px solid var(--blue); }
.callout .eyebrow { color: var(--sky); }
.callout p { margin-top: 8px; font-size: 16px; line-height: 1.45; }

/* buttons */
.btn { height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--indigo); color: var(--ink); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: #1953B8; }
.btn.dark { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn.sky { background: var(--sky); border-color: var(--sky); color: var(--indigo); }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--slate); cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; cursor: pointer; font-size: 14px; }
.link:hover { color: var(--indigo); text-decoration: underline; }
.pill { height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--line-2); background: var(--paper); }
.pill.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* chips */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.ok { background: var(--ok-fill); color: var(--ok); }
.chip.info { background: var(--sky-fill); color: var(--blue-ink); }
.chip.bad { background: var(--bad-fill); color: var(--bad); }
.chip.warn { background: var(--warn-fill); color: var(--warn); }
.chip.mute { background: var(--fill); color: var(--slate); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.Green { background: var(--ok); } .dot.Amber { background: #C27A00; } .dot.Red { background: var(--bad); }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat.dark { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.stat .big { font-size: 30px; font-weight: 700; line-height: 1; color: var(--indigo); }
.stat.dark .big { color: #fff; }
.stat .big span { color: var(--blue); font-size: 17px; }
.stat.dark .big span { color: var(--sky); }
.stat .lbl { font-size: 11px; letter-spacing: .16em; font-weight: 600; color: var(--slate); margin-top: 8px; text-transform: uppercase; }
.stat.dark .lbl { color: var(--on-indigo); }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.bar.ok > i { background: var(--ok); }
.stat.dark .bar { background: var(--indigo-2); margin-top: 12px; } .stat.dark .bar > i { background: var(--sky); }

/* stage rail */
.rail-wrap { overflow-x: auto; padding-bottom: 4px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 8px; }
.stage-btn { text-align: left; cursor: pointer; border-radius: 10px; padding: 14px; min-height: 148px; background: var(--fill); border: 2px solid transparent; display: flex; flex-direction: column; }
.stage-btn.active { background: var(--sky-fill); }
.stage-btn.sel { background: var(--paper); border-color: var(--blue); box-shadow: var(--shadow); }
.stage-btn .name { font-size: 15px; font-weight: 700; color: var(--indigo); margin-top: 8px; line-height: 1.25; }
.stage-btn .gate { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; font-size: 12px; font-weight: 600; }
.stage-btn .bar { margin-top: 10px; height: 4px; }
.sdot { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--mute); background: #fff; flex: none; }
.sdot.done { background: var(--ok); border-color: var(--ok); } .sdot.active { background: var(--blue); border-color: var(--blue); }

/* checklist rows */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); }
.check.met { border-color: var(--ok-line); background: var(--ok-fill); }
.check.waived { border-color: #F1D9A8; background: var(--warn-fill); }
.box { flex: none; width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 2px solid var(--mute); cursor: pointer; padding: 0; margin-top: 1px; }
.box.on { background: var(--ok); border-color: var(--ok); }
.box.round { border-radius: 50%; }
.box:disabled { cursor: default; }
.check .body { flex-grow: 1; min-width: 0; }
.check .label { font-weight: 600; color: var(--ink); }
.check .tools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.file { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; background: var(--sky-fill); color: var(--blue-ink); padding: 3px 10px; border-radius: 999px; text-decoration: none; }
.file button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font-size: 14px; line-height: 1; }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: .14em; color: var(--slate); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.ref { color: var(--slate); white-space: nowrap; }
.tbl tr:hover td { background: #FAFAFC; }
select.inline { height: 34px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; padding: 0 8px; font-size: 13px; }

/* project cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px; }
.pcard:hover { border-color: var(--blue); box-shadow: var(--shadow); color: inherit; }
.pcard .code { font-size: 11px; letter-spacing: .14em; font-weight: 600; color: var(--slate); }
.pcard h3 { font-size: 18px; }

/* risks */
.risk { border-radius: 8px; padding: 12px; background: var(--fill); }
.risk.High { background: var(--bad-fill); } .risk.Medium { background: var(--warn-fill); }
.risk .k { font-size: 11px; letter-spacing: .14em; font-weight: 700; color: var(--slate); text-transform: uppercase; }
.risk.High .k { color: var(--bad); } .risk.Medium .k { color: var(--warn); }
.risk.Closed { opacity: .65; }

/* tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--slate); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--indigo); border-bottom-color: var(--blue); }

/* forms */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
label.f .hint { font-weight: 400; color: var(--slate); }
.input, input[type=text].input, input[type=email].input, input[type=password].input, input[type=date].input, input[type=number].input, select.input, textarea.input {
  height: 44px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; padding: 0 12px; font-size: 15px; width: 100%; }
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; }
.input:focus, .btn:focus-visible, .pill:focus-visible, .box:focus-visible, .stage-btn:focus-visible, a:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.radio { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.radio.on { border-color: var(--blue); background: var(--sky-fill); }
.radio input { margin-top: 4px; accent-color: var(--blue); }
.tickrow { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tickrow input { width: 18px; height: 18px; accent-color: var(--blue); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(24, 24, 64, .45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; padding: 24px; box-shadow: 0 20px 60px rgba(24, 24, 64, .3); display: flex; flex-direction: column; gap: 14px; }
.modal .err { color: var(--bad); font-weight: 600; font-size: 14px; }

/* toast */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--indigo); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); z-index: 60; max-width: calc(100% - 32px); font-size: 14px; }
.toast.bad { background: var(--bad); }

/* sign-in */
.gate-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: radial-gradient(120% 90% at 85% 10%, #2B3A7A 0%, #181840 60%); }
.gate-page .panel { background: #fff; border-radius: 16px; width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.gate-page .logo { background: var(--indigo); border-radius: 10px; padding: 14px; display: flex; justify-content: center; }
.gate-page .logo img { height: 28px; }

/* actions */
.action { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: inherit; }
.action:hover { border-color: var(--blue); color: inherit; }
.action .k { font-size: 10px; letter-spacing: .14em; font-weight: 700; color: var(--blue-ink); text-transform: uppercase; }
.action.overdue .k, .action.risk .k { color: var(--bad); }
.empty { text-align: center; padding: 28px; color: var(--slate); }

.act-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.act-list .when { display: block; font-size: 12px; color: var(--slate); }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  main { padding: 20px 16px 48px; }
  .top .tag { display: none; }
  .top-in { gap: 10px; padding: 10px 16px; }
  .top .brand { flex-grow: 1; }
  .top nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; flex-grow: 0; }
  .top nav a { padding: 8px 12px; white-space: nowrap; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .tabs a { white-space: nowrap; }
  .card { padding: 16px; }
}
@media print { .top, .tabs, .btn, .link { display: none !important; } }
