:root {
  color-scheme: light;
  --canvas: #f5f7fb;
  --paper: #fff;
  --ink: #18243b;
  --muted: #4c5b72;
  --line: #dce3ed;
  --accent: #1457c5;
  --accent-dark: #0c419d;
  --focus: #1562cf;
  font: 16px/1.55 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
a { color: var(--accent); text-underline-offset: .16em; }
a:hover { color: var(--accent-dark); }
button, input, select, textarea { font: inherit; }
button, input[type="submit"] { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: .5rem 1rem;
  border-radius: 6px;
  background: var(--paper);
}

.brand {
  display: inline-flex;
  gap: .6rem;
  align-items: center;
  font-weight: 760;
  white-space: nowrap;
}

.brand-icon {
  width: 26px;
  height: 26px;
  padding: 5px;
  display: inline-flex;
  gap: 2px;
  align-items: flex-end;
  border-radius: 7px;
  background: #d7e7ff;
}

.brand-icon i { width: 4px; height: 5px; border-radius: 1px; background: #2151a4; }
.brand-icon i:nth-child(2) { height: 8px; }
.brand-icon i:nth-child(3) { height: 13px; }
.header-action { margin: 0 0 0 auto; }

button, input[type="submit"], .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: .45rem .95rem;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

button:hover, input[type="submit"]:hover, .button:hover {
  background: var(--accent-dark);
  color: white;
}

button.quiet { border-color: #60738e; background: transparent; }
button.quiet:hover { background: #30435f; }

.workspace {
  width: min(100%, 1512px);
  margin: 0 auto;
  padding: clamp(1.1rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2.25rem) 3rem;
}

h1, h2, h3, p { margin-block: 0 .65rem; }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4vw, 2.55rem); letter-spacing: -.04em; }
h2 { font-size: 1.25rem; letter-spacing: -.015em; }
h3 { font-size: 1.05rem; }
.page-heading { margin-bottom: 1.4rem; }
.page-heading p, .muted { color: var(--muted); }
.panel {
  min-width: 0;
  margin: 0 0 1rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-block: .8rem; }
.notice, .error {
  padding: .75rem .95rem;
  margin: 0 0 1rem;
  border-radius: 8px;
}
.notice { color: #214779; background: #e8f1ff; border: 1px solid #d4e5ff; }
.error { color: #962a36; background: #fff0f1; border: 1px solid #f0c7ce; }

label {
  display: grid;
  align-content: end;
  gap: .28rem;
  min-width: 0;
  color: var(--ink);
  font-weight: 620;
}

input:not([type="submit"], [type="checkbox"], [type="radio"], [type="hidden"]),
select, textarea {
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  width: 100%;
  border: 1px solid #aebbd0;
  border-radius: 7px;
  padding: .42rem .65rem;
  background: white;
  color: var(--ink);
  font-weight: 420;
}

form:not(.report-filters, .header-action) label { margin-block: .5rem; }
form:not(.report-filters, .header-action) > label { max-width: 38rem; }
.report-filters {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) repeat(4, minmax(130px, 1.2fr)) auto;
  align-items: end;
  gap: .75rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin-bottom: 1rem;
}
.stat {
  display: grid;
  align-content: space-between;
  gap: .45rem;
  margin: 0;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}
.stat > span { color: var(--muted); font-size: .9rem; font-weight: 560; }
.stat strong {
  color: var(--ink);
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.report-panel { padding: 0; overflow: hidden; }
.section-heading { padding: 1rem 1.15rem .75rem; }
.section-heading p { margin-bottom: 0; font-size: .9rem; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -3px; }

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}
th, td {
  padding: .75rem .8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
thead { background: #edf2f8; color: #243753; }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:last-child :is(th, td) { border-bottom: 0; }
.report-table { min-width: 1020px; }
.report-table th:first-child { min-width: 172px; }
.report-table td { white-space: nowrap; }
.report-table :is(td, th):not(:first-child) { text-align: right; }
.row-detail {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 430;
}
.dash { color: var(--muted); }
.empty { padding: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); }
.empty h3 { color: var(--ink); }
.empty p { margin-bottom: 0; }
.diagnostics summary { cursor: pointer; font-weight: 680; }
.diagnostics[open] summary { margin-bottom: .7rem; }
.diagnostics ul { margin: .5rem 0; padding-left: 1.4rem; }

@media (max-width: 1080px) {
  .report-filters { grid-template-columns: repeat(4, minmax(123px, 1fr)); }
}
@media (max-width: 660px) {
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filters button { grid-column: 1 / -1; }
  .summary-grid { gap: .45rem; }
  .stat { padding: .65rem .55rem; }
  .stat > span { font-size: .8rem; overflow-wrap: anywhere; }
}

:root {
  --canvas: #f4f6f9;
  --ink: #17243b;
  --muted: #506078;
  --line: #e1e6ef;
  --accent: #3f4dd6;
  --accent-dark: #303bad;
}

.app-layout { min-height: 100vh; }
.app-layout.signed-in { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.app-main { min-width: 0; }
.app-top {
  min-height: 63px;
  padding: .8rem clamp(1rem, 3vw, 2.4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}
.role {
  color: #3a475f;
  font-size: .86rem;
  font-weight: 570;
  flex-shrink: 0;
}
.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  align-self: start;
  padding: 1.25rem .85rem;
  background: #151e35;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
}
.sidebar a { text-decoration: none; color: #e2e7f5; }
.sidebar .brand { color: #fff; padding-inline: .55rem; font-size: 1.05rem; }
.sidebar .brand-icon { background: #dfe2ff; }
.sidebar .brand-icon i { background: #454bc8; }
.sidebar nav { display: grid; gap: .36rem; }
.sidebar nav a {
  display: flex;
  gap: .65rem;
  align-items: center;
  padding: .7rem .75rem;
  border-radius: 8px;
  font-weight: 615;
  line-height: 1.35;
}
.sidebar nav a:hover { background: #26324a; }
.sidebar nav a[aria-current=page] { color: #fff; background: #2d375b; }
.nav-mark { width: .4rem; height: .4rem; border-radius: 2px; background: #8998ba; flex: none; }
[aria-current=page] > .nav-mark { background: #a7aaff; }
.sidebar .header-action { margin: auto 0 0; }
.sidebar .header-action button { padding-inline: .8rem; }
.sidebar :focus-visible { outline-color: #c6c9ff; }
.demo-note {
  padding: .55rem clamp(1rem, 3vw, 2.4rem);
  color: #414d94;
  border-bottom: 1px solid #dadef5;
  background: #e9ecfd;
  font-weight: 640;
  font-size: .87rem;
}
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.page-heading h1 { margin-bottom: .5rem; }
.page-heading p { margin-bottom: 0; }
.workspace { padding-top: clamp(1.25rem, 3vw, 2.1rem); }
.summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.admin-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { min-height: 102px; padding: .9rem 1rem; overflow-wrap: anywhere; }
.stat strong { font-size: clamp(1.35rem, 2.15vw, 2rem); }
.money { display: inline-flex; align-items: baseline; gap: .24em; white-space: nowrap; }
.stat .money { display: inline; white-space: normal; }
.stat .currency { margin-left: .3em; font-size: .55em; white-space: nowrap; }
.stat-focus { background: #eef0ff; border-color: #d9ddfb; }
.stat-focus strong { color: #373fb6; }
.sync-note {
  color: var(--muted);
  font-size: .86rem;
  max-width: 18rem;
  text-align: right;
  padding-top: .45rem;
}
.stage-panel h2 { margin-bottom: 1rem; }
.milestone-grid { display: grid; gap: .95rem; grid-template-columns: repeat(5,minmax(0,1fr)); }
.milestone-grid article { display: grid; gap: .25rem; min-width: 0; align-content: end; }
.milestone-grid article span { font-weight: 580; color: var(--muted); font-size: .86rem; }
.milestone-grid article strong { font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.milestone-grid meter { width: 100%; height: 10px; accent-color: var(--accent); }
.milestone-grid meter::-webkit-meter-bar { background: #e6e9f3; border: 0; }
.milestone-grid meter::-webkit-meter-optimum-value { background: #666fe2; }
.report-filters { grid-template-columns: repeat(2,minmax(110px,1fr)) repeat(4,minmax(100px,1fr)) auto; }
.report-table { min-width: 940px; }
.outcome-detail { display: grid; gap: .02rem; }
.project-filters {
  display: grid;
  align-items: end;
  gap: .75rem;
  grid-template-columns: minmax(180px, 2fr) minmax(155px,1fr) auto;
  max-width: 660px;
  padding: .9rem 1.15rem 1.15rem;
}
form.project-filters label { margin: 0; }
.projects-table { min-width: 735px; }
.project-name { font-weight: 720; color: var(--ink); }
.row-actions a { display: block; padding-block: .12rem; }
.status-tag {
  display: inline-flex;
  padding: .24rem .56rem;
  border-radius: 5px;
  font-size: .83rem;
  font-weight: 650;
}
.status-tag.ready { color: #146451; background: #e2f3ec; }
.status-tag.attention { color: #7a4711; background: #fff0da; }
.status-tag.pending { color: #495878; background: #edf0f6; }
.settings-tabs {
  display: flex;
  align-items: center;
  overflow-x: auto;
  gap: .25rem;
  margin-block: 0 1.2rem;
  border-bottom: 1px solid var(--line);
}
.settings-tabs a {
  color: #43526c;
  padding: .75rem .65rem;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 610;
  border-bottom: 3px solid transparent;
}
.settings-tabs a:focus-visible { outline-offset: -3px; }
.settings-tabs a[aria-current=page] { color: var(--accent-dark); border-color: var(--accent); }
.settings-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.settings-form details, .panel details { margin-block: .65rem; }
summary { cursor: pointer; }
.panel summary { color: var(--accent-dark); font-weight: 650; }
.create-project { flex: 0 1 auto; margin: 0; padding: .65rem .9rem; }
.create-project[open] { flex: 1 1 280px; max-width: 340px; }
fieldset { border: 1px solid var(--line); padding: .45rem .7rem; border-radius: 7px; }
fieldset legend { font-weight: 675; }
label.check { display: flex; align-items: center; }
input[type=checkbox] { accent-color: var(--accent); }
.demo-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; max-width: 850px; }
.demo-choice { display: grid; justify-items: start; align-content: start; padding: 1.5rem; }
.demo-choice p { color: var(--muted); margin-bottom: 1.1rem; }
.login-card { max-width: 420px; margin: 3rem auto; }
.login-card .panel { padding: 1.55rem; }
.app-top .brand { color: var(--ink); text-decoration: none; }

@media (max-width: 1200px) {
  .report-filters { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .app-layout.signed-in { grid-template-columns: 175px minmax(0,1fr); }
  .sidebar { padding-inline: .55rem; }
  .summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .settings-grid { grid-template-columns: minmax(0,1fr); }
  .stat { min-height: 80px; }
}
@media (max-width: 690px) {
  .app-layout.signed-in { display: block; }
  .sidebar { position: static; height: auto; gap: .5rem; padding: .65rem .8rem; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .sidebar nav { display: flex; flex-wrap: wrap; grid-column: 1 / -1; grid-row: 2; }
  .sidebar nav a { padding: .4rem .5rem; font-size: .89rem; }
  .sidebar .brand { padding-inline: 0; }
  .sidebar .header-action { margin: 0; }
  .app-top { min-height: 45px; }
  .page-heading { flex-wrap: wrap; }
  .sync-note { text-align: left; padding-top: 0; }
  .summary-grid,.milestone-grid,.report-filters,.project-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-filters button { grid-column: 1 / -1; }
  .demo-choices { grid-template-columns: 1fr; }
}
