:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: #f4f5f8;
  color: #152139;
  font-size: 15px;
  line-height: 1.55;
  --ink: #152139;
  --muted: #526178;
  --line: #dce1eb;
  --accent: #4141bb;
  --nav: #181b38;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
.application { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
aside {
  position: sticky;
  top: 0;
  min-height: 100vh;
  height: max-content;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  background: var(--nav);
  color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-weight: 750;
  font-size: 1.2rem;
  letter-spacing: -.025em;
  text-decoration: none;
}
.mark {
  display: inline-flex;
  align-items: end;
  gap: 3px;
  padding: 9px;
  border-radius: 10px;
  height: 34px;
  width: 34px;
  background: #b8f3d7;
  flex: 0 0 auto;
}
.mark span { width: 4px; background: #243e50; border-radius: 2px; }
.mark span:nth-child(1) { height: 6px; }
.mark span:nth-child(2) { height: 11px; }
.mark span:nth-child(3) { height: 16px; }
.agency { margin: 36px 0 20px; padding: 13px 12px; background: #262949; border-radius: 8px; overflow-wrap: anywhere; }
small { display: block; color: var(--muted); }
aside small { color: #c3c9df; }
nav { display: grid; gap: 4px; }
nav a { display: block; padding: 10px 12px; border-radius: 6px; color: #ecedff; text-decoration: none; font-weight: 600; }
nav a:hover, nav a[aria-current] { background: #393d68; color: #fff; }
nav a[aria-current] { box-shadow: inset 3px 0 #b8f3d7; }
.account { margin-top: auto; padding: 32px 8px 0; overflow-wrap: anywhere; }
.account form { margin-top: 12px; }
main { padding: 38px clamp(18px, 4vw, 66px) 70px; width: 100%; max-width: 1460px; }
.public main { max-width: 690px; margin-inline: auto; padding-top: clamp(28px, 10vh, 116px); }
.public .brand { margin-bottom: 32px; }
h1, h2, p { margin: 0 0 14px; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 750; line-height: 1.13; letter-spacing: -.045em; }
h2 { font-size: 1.18rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
header { margin-bottom: 22px; }
.intro { color: var(--muted); font-size: 1.06rem; margin-bottom: 24px; }
.panel, .metrics section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(16px,2vw,25px); }
.panel { margin: 0 0 18px; }
.panel > :last-child { margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.metrics span { color: var(--muted); font-weight: 600; display: block; }
.metrics strong { font-size: 2rem; line-height: 1.15; display: block; margin-top: 10px; }
.split, .fields, .followup { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.followup { grid-template-columns: 1fr minmax(145px,220px); }
a { color: #3939a1; font-weight: 600; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, .primary {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 8px 13px;
  min-height: 40px;
  color: white;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .primary:hover { background: #303094; }
.quiet { background: white; color: var(--ink); border-color: #b9c2d2; }
.quiet:hover { color: var(--ink); background: #e9edf5; }
.danger { background: white; color: #a3323d; border-color: #dfc0c6; }
.danger:hover { color: #862631; background: #fae9ec; }
:focus-visible { outline: 3px solid #7a78f9; outline-offset: 3px; }
.toolbar, .inline, .actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.toolbar { justify-content: space-between; margin-bottom: 18px; }
.inline { align-items: end; }
main > .actions { margin-bottom: 16px; }
form, label { display: grid; gap: 8px; }
form { gap: 14px; }
label { color: var(--ink); font-weight: 600; font-size: .93rem; }
input, textarea, select { width: 100%; padding: 9px 11px; border: 1px solid #aeb9cb; border-radius: 6px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input[type=checkbox] { width: 17px; height: 17px; }
.check { display: flex; align-items: center; gap: 8px; }
.eligible { max-height: 280px; overflow-y: auto; }
.pill { display: inline-block; background: #dbf3e8; color: #164e3b; padding: 2px 9px; border-radius: 14px; }
.pill.muted { color: #574950; background: #f0e8ed; }
.notice { background: #dcf4e8; color: #194c3b; padding: 12px 17px; border-radius: 8px; overflow-wrap: anywhere; }
.empty, .context { color: var(--muted); }
.empty { border: 1px dashed var(--line); padding: 16px; border-radius: 8px; }
.preserve { white-space: pre-wrap; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f2f4f9; color: #425471; font-size: .87rem; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.panel label + .actions, .panel form + .table-scroll { margin-top: 14px; }
code { color: #3939a1; overflow-wrap: anywhere; }
@media (max-width: 1050px) {
  .application { grid-template-columns: 200px minmax(0,1fr); }
  aside { padding-inline: 14px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .application { display: block; }
  aside { position: static; min-height: 0; padding: 16px 18px; }
  .agency { margin: 14px 0 8px; padding: 8px 10px; }
  nav { display: flex; flex-wrap: wrap; }
  nav a { padding: 7px 9px; }
  .account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0 0; }
  .account form { margin: 0; }
  .account .quiet { min-height: 32px; padding: 4px 8px; }
  main { padding-top: 23px; }
  .split, .fields, .followup { grid-template-columns: 1fr; }
}
