:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #1c2938;
  background: #f2f5f7;
  --ink: #1c2938;
  --muted: #536579;
  --line: #dce4eb;
  --navy: #132438;
  --deep: #10212e;
  --accent: #197565;
  --accent-hover: #126456;
  --mint: #a9e8d3;
  --white: #fff;
  --radius: .8rem;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; display: grid; grid-template-columns: 16.25rem minmax(0, 1fr); min-height: 100vh; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: #166755; text-underline-offset: .19em; }
:focus-visible { outline: 3px solid #31a38b; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 10; top: .5rem; left: .5rem; transform: translateY(-160%); padding: .75rem; background: white; }
.skip-link:focus { transform: none; }

.sidebar { position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; background: var(--navy); padding: 1.75rem 1.1rem 1.15rem; color: #f4f8fb; }
.brand { display: flex; align-items: center; gap: .75rem; padding: 0 .3rem 1.55rem; color: #fff; text-decoration: none; }
.brand-mark, .number { flex: none; display: inline-grid; place-items: center; width: 2.55rem; height: 2.55rem; border-radius: .65rem; font-size: .92rem; font-weight: 750; letter-spacing: -.04em; background: #294254; color: #d0e6ec; }
.brand-mark { background: var(--mint); color: #12473e; }
.brand strong, .brand small, .sidebar-footer small { display: block; }
.brand strong { font-size: .96rem; letter-spacing: -.02em; }
.brand small, .sidebar-footer small { margin-top: .18rem; font-size: .78rem; color: #afc1d4; }
.sidebar-label { margin: .1rem .65rem .55rem; color: #afc1d4; font-size: .75rem; letter-spacing: .105em; text-transform: uppercase; font-weight: 700; }
#navigation { display: grid; gap: .22rem; }
#navigation a { position: relative; display: flex; align-items: center; gap: .7rem; min-height: 2.68rem; padding: .58rem .68rem; border-radius: .5rem; font-size: .89rem; text-decoration: none; color: #c5d5e4; }
#navigation a::before { flex: none; content: ""; width: .47rem; height: .47rem; border: 1px solid #8aa4ba; border-radius: .15rem; }
#navigation a:hover { background: #223b4d; color: white; }
#navigation a[aria-current="page"] { background: #254355; color: #fff; font-weight: 680; box-shadow: inset .18rem 0 0 #88e2c5; }
#navigation a[aria-current="page"]::before { background: #a9e8d3; border-color: #a9e8d3; }
.sidebar-footer { display: flex; align-items: center; gap: .7rem; margin-top: auto; border-top: 1px solid #3a5166; padding: 1rem .25rem 0; font-size: .89rem; font-weight: 620; }
.sidebar-footer small { font-weight: 400; }

main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; min-height: 4.75rem; padding: .8rem clamp(1rem, 3vw, 2.4rem); background: white; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin: 0; font-size: .88rem; color: var(--muted); }
#breadcrumb { color: var(--ink); }
.toolbar, .stage-navigation, .hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.56rem; padding: .51rem .9rem; border: 1px solid transparent; border-radius: .5rem; text-decoration: none; line-height: 1.22; font-size: .89rem; font-weight: 660; white-space: nowrap; }
.primary { background: var(--accent); color: white; }
.primary:hover { background: var(--accent-hover); }
.secondary { background: white; color: var(--ink); border-color: #cbd7df; }
.secondary:hover { background: #eaf5f2; border-color: #86b6ab; }
.danger { color: #8f2c3e; background: #fff3f5; border-color: #efc5cd; }
.main-inner { width: min(100%, 96rem); margin-inline: auto; padding: 1.8rem clamp(1rem, 3vw, 2.4rem) 3rem; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13.75rem, .43fr); align-items: stretch; gap: clamp(1rem, 3vw, 2.4rem); border-radius: 1rem; padding: clamp(1.24rem, 3vw, 2.25rem); background: linear-gradient(115deg, #122b39 8%, #173d48 100%); color: white; }
.hero h1 { margin-top: .62rem; max-width: 24ch; }
.hero p { margin: .58rem 0 0; color: #d2e3e9; max-width: 60ch; }
.hero .eyebrow { color: #a9e8d3; }
.eyebrow { font-size: .8rem; font-weight: 730; letter-spacing: .09em; text-transform: uppercase; }
.hero-actions { margin-top: 1.15rem; }
.hero-actions .primary { color: #103c35; background: var(--mint); }
.hero-actions .primary:hover { background: #caf3e7; }
.hero-actions .secondary { color: #eff9fc; background: transparent; border-color: #678894; }
.hero-actions .secondary:hover { background: #345463; }
.hero-verification { display: flex; flex-direction: column; justify-content: center; gap: .50rem; align-self: center; padding: 1.02rem; border-radius: .75rem; border: 1px solid #557685; background: #ffffff10; }
.hero-verification h2 { font-size: .92rem; font-weight: 650; letter-spacing: 0; }
.hero-verification .verification-count { color: white; font-size: 1.2rem; line-height: 1.25; font-weight: 730; margin: 0; }
.hero-verification a { color: var(--mint); font-size: .89rem; margin-top: .16rem; }
.test-pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex-wrap: wrap; gap: .3rem; padding: 0; margin: .32rem 0; list-style: none; }
.test-pills li { color: #d9e7ed; background: #ffffff12; border-radius: .36rem; border: 1px solid #71909c; text-align: center; padding: .25rem .2rem; font-size: .78rem; font-weight: 680; }
.test-pills li[data-complete="true"] { color: #103c35; background: var(--mint); border-color: var(--mint); }

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.026em; }
h1 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); font-weight: 755; }
h2 { font-size: 1.21rem; }
h3 { font-size: 1rem; }
p { line-height: 1.55; }
.section-head { margin: .15rem 0 1.25rem; }
.section-head p { color: var(--muted); margin: .52rem 0 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; align-items: stretch; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.card, .metric { background: white; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; box-shadow: 0 1px 2px #172b3b08; }
.card { padding: 1.15rem; }
.card header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; margin-bottom: .85rem; }
.card > p { margin-top: 0; }
.metric { padding: .93rem 1rem; display: flex; flex-direction: column; justify-content: space-between; gap: .42rem; }
.metric:first-child { background: #e9f5f1; border-color: #c6e4da; }
.metric strong { font-size: 1.7rem; line-height: 1.1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: .87rem; line-height: 1.35; }
.stack, .record-list { display: grid; gap: .85rem; }
.record-list { gap: .6rem; }
.record { border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.record summary { cursor: pointer; padding: .74rem .9rem; line-height: 1.5; font-weight: 630; overflow-wrap: anywhere; }
.record summary:hover { background: #eef6f5; }
.record summary .badge { margin-inline-start: .6rem; }
.record-body { border-top: 1px solid var(--line); padding: .87rem; }
.record-body .button { margin-top: .68rem; }
.record-search { display: grid; gap: .28rem; color: var(--muted); font-size: .87rem; margin: 0 0 .75rem; }
.record-search input { border: 1px solid #c3d2db; border-radius: .45rem; padding: .5rem .65rem; width: min(100%, 25rem); color: var(--ink); font-size: 1rem; }
.badge { display: inline-block; padding: .19rem .52rem; max-width: 100%; border-radius: .38rem; background: #eaf1f6; color: #365165; font-size: .8rem; font-weight: 680; vertical-align: middle; }
.badge[data-tone="success"] { color: #136047; background: #def3eb; }
.badge[data-tone="pending"] { color: #775016; background: #fbefd9; }
.badge[data-tone="danger"] { color: #912946; background: #fceaf0; }
.line-list, .report-checks { margin: 0; padding: 0; list-style: none; }
.line-list li { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .61rem 0; border-bottom: 1px solid var(--line); }
.line-list li:last-child { border-bottom: none; }
.line-list + .button { margin-top: .6rem; }
.milestones-card { grid-column: 1 / -1; }
.milestones-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: .62rem; padding: 0; margin: 0; list-style: none; }
.milestones-list li { display: flex; flex-direction: column; align-items: start; gap: .45rem; padding: .69rem .75rem; border: 1px solid var(--line); border-radius: .48rem; background: #f7fafb; font-size: .9rem; font-weight: 650; }
.stage-navigation { justify-content: space-between; margin-top: 1rem; }
.stage-navigation a:only-child.primary { margin-left: auto; }
progress { width: 100%; height: .56rem; accent-color: var(--accent); margin-block: .24rem .5rem; }
dl { display: grid; grid-template-columns: minmax(7rem, 25%) minmax(0, 1fr); gap: .5rem 1.1rem; margin: 0; line-height: 1.5; }
dt { color: var(--muted); font-weight: 620; }
dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
dd img { display: block; max-width: 100%; max-height: 25rem; border: 1px solid var(--line); border-radius: .35rem; }
.muted, .empty { color: var(--muted); }
.empty { margin: .3rem 0; }
.table-wrap { max-width: 100%; overflow-x: auto; margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .89rem; }
th, td { padding: .66rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #eaf3f3; }
.report-check { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .82rem .15rem; border-bottom: 1px solid var(--line); }
.report-check a { font-weight: 650; }
.check-index { color: var(--muted); font-size: .83rem; font-variant-numeric: tabular-nums; }
.report-check p, .report-actions p { margin: .24rem 0 0; font-size: .9rem; color: var(--muted); }
.report-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .8rem; padding-top: 1rem; }
.message { margin: 0 0 1rem; background: #e8f4f0; border: 1px solid #bfddd4; border-radius: .58rem; padding: .65rem .85rem; }
.error, .message[data-error="true"] { color: #852335; background: #fff0f2; border-color: #efc5cd; }

dialog { width: min(43rem, calc(100% - 1rem)); max-height: calc(100% - 1rem); border: 1px solid var(--line); border-radius: .78rem; padding: 0; color: var(--ink); box-shadow: 0 20px 60px #172b3b40; }
dialog::backdrop { background: #1324389c; }
dialog form { padding: 1.2rem; }
.dialog-head, .dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.dialog-head { margin-bottom: 1rem; }
.dialog-actions { justify-content: flex-end; margin-top: 1rem; }
#remove { margin-right: auto; }
#fields { display: grid; gap: .8rem; }
.field { display: grid; gap: .3rem; font-size: .93rem; font-weight: 650; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #c3d2db; border-radius: .45rem; padding: .55rem .65rem; color: var(--ink); background: white; font-size: 1rem; font-weight: 400; }
.field textarea { min-height: 5rem; resize: vertical; }
.field small { color: var(--muted); font-weight: 400; overflow-wrap: anywhere; }
.error { padding: .5rem; border-radius: .4rem; }

@media (max-width: 1100px) {
  body { grid-template-columns: 13rem minmax(0, 1fr); }
  .topbar { align-items: flex-start; flex-wrap: wrap; }
  .metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); }
}
@media (max-width: 915px) {
  .hero { grid-template-columns: 1fr; }
  .hero-verification { width: min(100%, 22rem); }
}
@media (max-width: 760px) {
  body { display: block; }
  .sidebar { position: static; height: auto; padding: .75rem; }
  .brand { padding: 0 .15rem .54rem; }
  #navigation { display: flex; overflow-x: auto; padding: .15rem; }
  #navigation a { flex: 0 0 auto; min-height: 2.4rem; }
  .sidebar-footer, .sidebar-label, .breadcrumbs { display: none; }
  .topbar { min-height: 0; justify-content: end; }
  .toolbar { justify-content: end; }
  .toolbar .button { padding-inline: .55rem; font-size: .83rem; }
  .main-inner { padding-top: 1rem; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 440px) {
  dl { grid-template-columns: 1fr; gap: .2rem; }
  dd { margin-bottom: .48rem; }
  .report-check { grid-template-columns: 1.4rem minmax(0, 1fr); }
  .report-check .badge { grid-column: 2; justify-self: start; }
}
