:root {
  --navy-950: #092b49;
  --navy-900: #103d63;
  --navy-800: #164f7e;
  --blue-700: #17689f;
  --blue-100: #e6f2f8;
  --saffron: #ee8a1b;
  --saffron-dark: #c96606;
  --ink: #152536;
  --muted: #5b6b7b;
  --line: #dce4eb;
  --canvas: #f4f7f9;
  --white: #ffffff;
  --green: #147a55;
  --green-soft: #eaf7f1;
  --amber: #a45a08;
  --amber-soft: #fff4dd;
  --red: #b53838;
  --red-soft: #fff0ef;
  --shadow-sm: 0 1px 2px rgba(15, 39, 61, .05), 0 4px 16px rgba(15, 39, 61, .04);
  --shadow-lg: 0 16px 45px rgba(13, 50, 79, .11);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-700); text-underline-offset: 3px; }
a:hover { color: var(--navy-950); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  border-radius: 8px;
  background: var(--white);
  color: var(--navy-950);
  font-weight: 700;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: relative;
  background: linear-gradient(125deg, var(--navy-950), var(--navy-900));
  color: var(--white);
  box-shadow: 0 3px 16px rgba(7, 35, 58, .16);
}

.accent-band {
  height: 4px;
  background: linear-gradient(90deg, #ffb341 0 33%, #fff 33% 66%, #32a46f 66%);
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { color: var(--white); }

.brand-mark {
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  background: rgba(255,255,255,.11);
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { font-family: Georgia, "Times New Roman", serif; font-size: 24px; letter-spacing: -.2px; }
.brand-copy span { margin-top: 4px; color: #cbdce9; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }

.primary-nav { display: flex; align-items: center; gap: 5px; }
.primary-nav a {
  padding: 9px 13px;
  border-radius: 8px;
  color: #deebf4;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: var(--white); }
.primary-nav .nav-action { margin-left: 7px; background: var(--saffron); color: #222; }
.primary-nav .nav-action:hover { background: #ff9f2c; color: #16202b; transform: translateY(-1px); }

.container {
  width: min(1120px, calc(100% - 40px));
  min-height: 420px;
  margin: 34px auto;
  padding: 36px 40px;
  border: 1px solid rgba(202, 214, 224, .9);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

h1, h2, h3 { color: var(--navy-950); line-height: 1.22; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; }
h2 { margin-top: 0; font-size: clamp(1.7rem, 4vw, 2.15rem); letter-spacing: -.02em; }
h3 { margin-top: 28px; }
p { margin: 0 0 16px; }

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid var(--navy-900);
  border-radius: 9px;
  background: var(--navy-900);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover { border-color: var(--navy-800); background: var(--navy-800); color: var(--white); transform: translateY(-1px); box-shadow: 0 7px 18px rgba(15, 63, 101, .18); }
.btn-secondary { border-color: #c9d8e4; background: var(--white); color: var(--navy-900); }
.btn-secondary:hover { border-color: var(--navy-900); background: #f4f9fc; color: var(--navy-950); }

label { display: block; margin: 18px 0 6px; color: #24394d; font-size: 14px; font-weight: 700; }
input[type="text"], input[type="password"], select {
  width: 100%;
  max-width: 480px;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #b9c6d1;
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input[type="file"] { max-width: 100%; padding: 10px 0; font: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(238, 138, 27, .36);
  outline-offset: 2px;
  border-color: var(--saffron-dark);
}

.flash {
  margin: 0 0 22px;
  padding: 13px 16px;
  border: 1px solid #efb2ac;
  border-left: 4px solid var(--red);
  border-radius: 9px;
  background: var(--red-soft);
  color: #8d2929;
}
.note { color: var(--muted); font-size: 14px; }

table.tbl { width: 100%; border-spacing: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.tbl td, table.tbl th { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); font-size: 14px; text-align: left; vertical-align: top; }
table.tbl th { background: #f0f5f8; color: #2b4255; font-weight: 700; }
table.tbl tr:last-child td, table.tbl tr:last-child th { border-bottom: 0; }
table.tbl tr:nth-child(even) td { background: #fbfcfd; }

.steps {
  margin: -8px 0 24px;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--blue-100);
  color: var(--muted);
  font-size: 13px;
}
.steps b { color: var(--navy-900); }

.footer { margin-top: 56px; border-top: 1px solid #d5dee6; background: #eaf0f4; color: var(--muted); }
.footer-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 110px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-size: 13px;
}
.footer-inner > div { display: flex; flex-direction: column; }
.footer-inner strong { color: var(--navy-900); font-family: Georgia, serif; font-size: 17px; }
.footer nav { display: flex; gap: 22px; }
.footer a { color: var(--navy-800); font-weight: 600; }

/* Portal home */
.home-page .container { padding: 0; border: 0; background: transparent; box-shadow: none; }
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(310px, .7fr);
  gap: clamp(34px, 6vw, 78px);
  align-items: center;
  min-height: 430px;
  padding: clamp(42px, 7vw, 78px);
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 8%, rgba(255,255,255,.1) 0 2px, transparent 3px) 0 0 / 24px 24px,
    linear-gradient(130deg, var(--navy-950), #15577f);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: "";
  position: absolute;
  right: -150px;
  bottom: -260px;
  width: 510px;
  height: 510px;
  border: 70px solid rgba(238, 138, 27, .13);
  border-radius: 50%;
}
.hero-copy, .benefit-card { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #e6b16f; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow > span { width: 24px; height: 2px; background: var(--saffron); }
.hero h1 { max-width: 620px; margin: 16px 0 17px; color: var(--white); font-size: clamp(2.55rem, 5.4vw, 4.45rem); letter-spacing: -.04em; }
.hero-lead { max-width: 630px; color: #d5e4ee; font-size: clamp(1rem, 1.8vw, 1.13rem); line-height: 1.72; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.hero .btn { border-color: var(--saffron); background: var(--saffron); color: #202b34; }
.hero .btn:hover { border-color: #ff9f2c; background: #ff9f2c; color: #17222b; }
.hero .btn-secondary { border-color: rgba(255,255,255,.33); background: rgba(255,255,255,.06); color: var(--white); }
.hero .btn-secondary:hover { background: rgba(255,255,255,.13); }
.assistance-note { color: #bed1df; font-size: 13px; }

.benefit-card { overflow: hidden; border: 1px solid rgba(255,255,255,.26); border-radius: 17px; background: rgba(255,255,255,.97); box-shadow: 0 20px 40px rgba(3, 29, 48, .25); }
.benefit-card-top { padding: 26px 27px 23px; }
.benefit-label { display: block; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.benefit-card-top strong { display: block; margin: 4px 0 2px; color: var(--navy-950); font-family: Georgia, serif; font-size: 52px; line-height: 1.1; }
.benefit-card-top strong span { margin-right: 3px; color: var(--saffron-dark); font-size: 28px; vertical-align: 11px; }
.benefit-card-top p { margin: 0; color: var(--muted); font-size: 13px; }
.benefit-facts { margin: 0; border-top: 1px solid var(--line); background: #f5f8fa; }
.benefit-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 27px; border-bottom: 1px solid var(--line); }
.benefit-facts div:last-child { border-bottom: 0; }
.benefit-facts dt { color: var(--muted); font-size: 13px; }
.benefit-facts dd { margin: 0; color: var(--navy-900); font-size: 13px; font-weight: 800; }

.window-notice { display: flex; align-items: center; gap: 15px; margin: 24px 0 56px; padding: 17px 20px; border: 1px solid #b9dfce; border-radius: 12px; background: var(--green-soft); }
.window-notice.is-closed { border-color: #f0d3a0; background: var(--amber-soft); }
.notice-icon { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--green); color: white; font-weight: 900; }
.is-closed .notice-icon { background: var(--amber); }
.window-notice strong { display: block; color: #185b43; }
.is-closed strong { color: #82470a; }
.window-notice span:not(.notice-icon) { color: var(--muted); font-size: 14px; }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.section-heading h2 { margin: 4px 0 0; }
.section-kicker { color: var(--saffron-dark); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.section-heading > a { padding-bottom: 6px; font-size: 14px; font-weight: 700; text-decoration: none; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.process-grid li { min-height: 215px; padding: 23px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: var(--shadow-sm); }
.step-number { display: inline-block; margin-bottom: 25px; color: var(--saffron-dark); font-family: Georgia, serif; font-size: 14px; font-weight: 700; }
.process-grid h3 { margin: 0 0 9px; color: var(--navy-900); font-size: 16px; }
.process-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

/* Evaluation dashboard */
.dashboard-page .container { padding: 0; border: 0; background: transparent; box-shadow: none; }
.dashboard-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; padding: 38px 42px; border-radius: var(--radius); background: linear-gradient(125deg, var(--navy-950), var(--navy-800)); color: white; box-shadow: var(--shadow-lg); }
.dashboard-hero h1 { margin: 12px 0 10px; color: white; font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.035em; }
.dashboard-hero p { max-width: 720px; margin: 0; color: #d7e5ef; font-size: 15px; }
.privacy-badge { flex: none; margin-top: 3px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.27); border-radius: 999px; background: rgba(255,255,255,.09); color: #e9f4f9; font-size: 12px; font-weight: 700; }
.privacy-badge span { margin-right: 4px; color: #83dbb6; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 20px 0; }
.metric-card { min-height: 142px; padding: 20px 21px; border: 1px solid var(--line); border-radius: 13px; background: var(--white); box-shadow: var(--shadow-sm); }
.metric-card > span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.metric-card > strong { display: block; margin: 11px 0 4px; color: var(--navy-950); font-family: Georgia, serif; font-size: 32px; line-height: 1.1; }
.metric-card small { color: #71808e; font-size: 12px; }
.metric-status > strong { display: flex; align-items: center; gap: 9px; font-family: inherit; font-size: 17px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.status-dot.passed { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.status-dot.failed { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }

.empty-state { display: grid; grid-template-columns: 210px 1fr; gap: 40px; align-items: center; min-height: 290px; padding: 36px 42px; border: 1px dashed #b9c9d6; border-radius: var(--radius); background: rgba(255,255,255,.72); }
.empty-illustration { position: relative; width: 165px; height: 165px; margin: auto; border-radius: 50%; background: linear-gradient(145deg, #e6f2f7, #f7fafc); }
.empty-illustration::before { content: ""; position: absolute; left: 44px; top: 42px; width: 72px; height: 79px; border: 2px solid #8baec3; border-radius: 8px; background: white; box-shadow: 8px 9px 0 #cde0ea; }
.empty-illustration::after { content: ""; position: absolute; left: 61px; top: 67px; width: 40px; height: 2px; background: #8baec3; box-shadow: 0 13px 0 #8baec3, 0 26px 0 #8baec3; }
.empty-illustration span { position: absolute; z-index: 2; width: 9px; height: 9px; border-radius: 50%; background: var(--saffron); }
.empty-illustration span:nth-child(1) { top: 27px; right: 34px; }
.empty-illustration span:nth-child(2) { right: 15px; bottom: 50px; width: 5px; height: 5px; }
.empty-illustration span:nth-child(3) { bottom: 24px; left: 31px; width: 6px; height: 6px; }
.empty-state h2 { margin: 11px 0 10px; font-size: 27px; }
.empty-state p { max-width: 720px; color: var(--muted); font-size: 14px; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.status-pending { background: var(--amber-soft); color: var(--amber); }
.status-passed { background: var(--green-soft); color: var(--green); }
.status-failed { background: var(--red-soft); color: var(--red); }
.evidence-list { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 21px; color: #41586a; font-size: 12px; font-weight: 700; }
.evidence-list span { display: inline-flex; align-items: center; gap: 7px; }
.evidence-list b { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--blue-100); color: var(--navy-800); font-size: 11px; }

.run-card { margin: 20px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.run-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px 28px 18px; }
.run-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.run-header h2 { margin: 2px 0 0; font-family: inherit; font-size: 20px; }
.run-meta { display: grid; grid-template-columns: 1fr 1fr 2fr; margin: 0; padding: 15px 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9fb; }
.run-meta div { padding-right: 20px; }
.run-meta dt { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.run-meta dd { margin: 2px 0 0; color: #2d4457; font-size: 13px; font-weight: 600; }
.run-meta code { overflow-wrap: anywhere; }
.case-list { padding: 12px 20px 20px; }
.case-card { border-bottom: 1px solid var(--line); }
.case-card:last-child { border-bottom: 0; }
.case-card summary { display: grid; grid-template-columns: 52px 1fr 20px; gap: 12px; align-items: center; padding: 16px 6px; cursor: pointer; list-style: none; }
.case-card summary::-webkit-details-marker { display: none; }
.case-result { font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.case-pass { color: var(--green); }
.case-fail { color: var(--red); }
.case-persona { color: var(--navy-900); font-weight: 700; }
.chevron { width: 8px; height: 8px; border-right: 2px solid #71808e; border-bottom: 2px solid #71808e; transform: rotate(45deg); transition: transform .18s ease; }
.case-card[open] .chevron { transform: rotate(225deg); }
.case-body { padding: 0 6px 19px 70px; }
.case-body > p { color: var(--muted); font-size: 14px; }
.evidence-block { margin-top: 14px; }
.evidence-block h3 { margin: 0; padding: 7px 12px; border: 1px solid #d6e0e7; border-bottom: 0; border-radius: 8px 8px 0 0; background: #f2f6f8; color: #43596a; font-family: inherit; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.evidence-block pre { max-height: 340px; margin: 0; overflow: auto; padding: 14px; border: 1px solid #d6e0e7; border-radius: 0 0 8px 8px; background: #10283b; color: #e7f0f6; font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .header-inner { padding: 15px 0; align-items: flex-start; }
  .primary-nav { flex-wrap: wrap; justify-content: flex-end; }
  .hero { grid-template-columns: 1fr; }
  .benefit-card { max-width: 450px; }
  .process-grid, .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-hero { flex-direction: column; }
}

@media (max-width: 650px) {
  .header-inner { width: min(100% - 28px, 1180px); flex-direction: column; gap: 13px; }
  .brand-copy strong { font-size: 21px; }
  .primary-nav { width: 100%; justify-content: flex-start; gap: 2px; }
  .primary-nav a { padding: 7px 9px; font-size: 12px; }
  .primary-nav .nav-action { margin-left: auto; }
  .container { width: min(100% - 24px, 1120px); margin: 20px auto; padding: 24px 20px; }
  .home-page .container, .dashboard-page .container { padding: 0; }
  .hero { min-height: auto; padding: 35px 24px; border-radius: 15px; }
  .hero h1 { font-size: 2.55rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .window-notice { align-items: flex-start; margin-bottom: 42px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .process-grid, .metric-grid { grid-template-columns: 1fr; }
  .process-grid li { min-height: 0; }
  .step-number { margin-bottom: 14px; }
  .footer-inner { padding: 26px 0; align-items: flex-start; flex-direction: column; }
  .footer nav { flex-wrap: wrap; gap: 12px 18px; }
  .dashboard-hero { padding: 31px 24px; border-radius: 15px; }
  .metric-card { min-height: 120px; }
  .empty-state { grid-template-columns: 1fr; gap: 15px; padding: 30px 24px; text-align: center; }
  .empty-illustration { width: 140px; height: 140px; }
  .empty-state .status-pill { margin: auto; }
  .evidence-list { align-items: flex-start; flex-direction: column; text-align: left; }
  .run-meta { grid-template-columns: 1fr; gap: 10px; }
  .case-body { padding-left: 6px; }
  table.tbl { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
