:root {
  color-scheme: light;
  --ink: #172832;
  --muted: #536674;
  --nav: #102833;
  --nav-muted: #b7cad0;
  --canvas: #f3f6f5;
  --paper: #fff;
  --line: #dce5e3;
  --accent: #086a56;
  --accent-dark: #045344;
  --mint: #e5f3eb;
  --amber: #765018;
  --amber-bg: #fff0cf;
  font: 100%/1.48 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); min-width: 0; }
a { color: var(--accent-dark); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #289d81; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { line-height: 1.1; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.055em; font-weight: 740; }
h2 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; }
small { display: block; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.skip { position: fixed; top: -5rem; left: 1rem; z-index: 10; background: white; padding: .75rem; }
.skip:focus { top: 1rem; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 15.3rem; padding: 2.1rem 1.15rem 1.2rem;
  display: flex; flex-direction: column; background: var(--nav); color: white; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: .8rem;
  width: fit-content; font-weight: 820; font-size: 1.85rem; line-height: 1.05; letter-spacing: -.065em; }
.brand-mark { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; border-radius: .72rem;
  background: #a7dfbf; color: var(--nav); font-size: 1.6rem; padding-bottom: .15rem; }
.brand small { color: var(--nav-muted); padding-top: .3rem; font-weight: 500; letter-spacing: .01em; }
.brand-o { color: #a7dfbf; }
.sidebar .brand { margin: 0 .5rem 2.35rem; }
.sidebar nav { display: grid; gap: .32rem; }
.sidebar nav a { color: var(--nav-muted); border-radius: .55rem; padding: .66rem .8rem;
  text-decoration: none; font-size: .94rem; font-weight: 560; border: 1px solid transparent; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #23424a; color: #fff; border-color: #36565c; }
.profile { margin-top: auto; padding: .8rem .5rem 0; border-top: 1px solid #3a5258; }
.profile strong { display: block; overflow-wrap: anywhere; }
.signout { padding: .28rem 0; border: 0; background: transparent; color: var(--nav-muted); font-size: .875rem; }
.signout:hover { text-decoration: underline; }
.workspace { margin-left: 15.3rem; max-width: 111rem; padding: 2rem clamp(1.5rem, 4vw, 4.2rem) 3rem; }
.demo-bar { font-size: .8125rem; color: var(--accent-dark); margin-bottom: 1.4rem; font-weight: 650; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.55rem; }
.page-head p:not(.eyebrow) { color: var(--muted); margin-top: .55rem; }
.eyebrow { font-size: .86rem; font-weight: 650; color: var(--accent-dark); margin-bottom: .42rem; }
.eyebrow::first-letter { text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; background: var(--accent);
  border: 1px solid transparent; border-radius: .55rem; color: white; text-decoration: none;
  font-weight: 670; font-size: .92rem; min-height: 2.65rem; padding: .5rem .9rem; text-align: center; }
.button:hover { background: var(--accent-dark); }
.button.secondary { background: var(--paper); border-color: #bdceca; color: var(--accent-dark); }
.button.secondary:hover { background: var(--mint); }
.actions, .head-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.head-tags { color: var(--muted); margin-top: .75rem; font-size: .88rem; }
.quiet-link, .plain { color: var(--accent-dark); font-size: .9rem; font-weight: 650; }
.plain { border: 0; background: transparent; text-decoration: underline; }

.panel, .metric { background: var(--paper); border: 1px solid var(--line); border-radius: .82rem; }
.panel { min-width: 0; margin-bottom: 1rem; box-shadow: 0 2px 3px #0d332805; }
.panel-head { padding: 1rem 1.2rem; display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.content-panel { padding: 1.15rem 1.2rem; }
.content-panel > p, .rich { margin-top: .65rem; color: var(--muted); }
.rich p + p { margin-top: .7rem; }
.self-start { align-self: start; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .9rem; margin-bottom: 1.35rem; }
.metric { display: flex; flex-direction: column; min-height: 8.6rem; padding: .98rem 1.08rem;
  color: var(--ink); text-decoration: none; }
a.metric:hover { border-color: #79b2a4; }
.metric > span, .balance-grid span { font-size: .9rem; color: var(--muted); font-weight: 600; }
.metric strong { font-size: clamp(1.6rem, 3vw, 2.32rem); letter-spacing: -.06em; line-height: 1.25; margin: .3rem 0; }
.metric em { font-size: .83rem; font-style: normal; letter-spacing: 0; }
.metric small { margin-top: auto; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 1rem; }
.deadline { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.deadline:hover { background: var(--canvas); }
.deadline time { display: grid; place-content: center; background: var(--mint); color: var(--accent-dark);
  border-radius: .45rem; min-width: 3rem; min-height: 3rem; text-align: center; line-height: 1.15; }
.deadline time span { font-size: .78rem; }
.tag { display: inline-block; background: #edf2f1; border-radius: 2rem; padding: .23rem .55rem;
  font-size: .8rem; font-weight: 670; white-space: nowrap; color: #39535b; }
.tag.green { background: var(--mint); color: var(--accent-dark); }
.tag.warn { background: var(--amber-bg); color: var(--amber); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92rem; }
th { background: #f5f8f7; color: var(--muted); font-size: .86rem; white-space: nowrap; }
th, td { padding: .72rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
td small { margin-top: .16rem; }
.cell-title { font-weight: 680; color: var(--ink); text-decoration: none; }
.cell-title:hover { text-decoration: underline; }
.line { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .77rem 1.15rem;
  border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.line h3 { margin: .35rem 0 .2rem; }
.line time { color: var(--muted); white-space: nowrap; font-size: .875rem; }
.line small { margin-top: .2rem; }
.empty { padding: 1rem 1.15rem; color: var(--muted); }
.source-foot { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.breadcrumb { display: inline-block; color: var(--muted); margin-bottom: 1rem; font-size: .9rem; }
.tabs { display: flex; gap: .75rem; margin-bottom: 1rem; border-bottom: 1px solid #bfcdca; overflow-x: auto; }
.tabs a { padding: .55rem .35rem .65rem; color: var(--muted); text-decoration: none; font-weight: 650; white-space: nowrap; }
.tabs a[aria-current] { border-bottom: 3px solid var(--accent); color: var(--accent-dark); }
.balance-grid { padding: .65rem 1rem 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .55rem; }
.balance-grid > div { border-radius: .5rem; padding: .65rem; background: var(--canvas); }
.balance-grid strong { display: block; margin-top: .23rem; }
.filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: .75rem; padding: 1rem 1.15rem; }
.pager { padding: .85rem 1rem; display: flex; justify-content: space-between; border-top: 1px solid var(--line); }
.form-panel, .login-card { max-width: 43rem; padding: 1.25rem; }
.form-panel form p, .login-card form p, .content-panel form p { margin-bottom: .9rem; }
label { display: block; color: var(--ink); font-size: .9rem; font-weight: 630; margin-bottom: .25rem; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { display: block; width: 100%; padding: .52rem .65rem;
  border: 1px solid #adc0bc; border-radius: .45rem; background: white; color: var(--ink); min-height: 2.65rem; }
select { appearance: none; padding-right: 2rem; background-image:
  linear-gradient(45deg, transparent 50%, #39535b 50%), linear-gradient(135deg, #39535b 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }
.filters label { min-width: min(100%, 12rem); margin: 0; }
.filters input, .filters select { margin-top: .28rem; }
.notice { color: var(--accent-dark); background: var(--mint); border-radius: .5rem;
  padding: .7rem .9rem; margin-bottom: .9rem; }
.panel > .notice { margin-inline: 1rem; }
.notice.error, .errorlist { color: #842d25; background: #fff0eb; }
.errorlist { padding: .45rem .45rem .45rem 1.65rem; margin: .3rem 0; }
.signin { min-height: 100dvh; display: grid; align-content: center; justify-content: center;
  padding: 1rem; background: radial-gradient(ellipse at 88% 13%, #c8e6d7, transparent 65%), var(--canvas); }
.login-card { width: min(100%, 28rem); background: white; border: 1px solid var(--line); border-radius: 1rem;
  box-shadow: 0 12px 52px #112c2715; padding: clamp(1.2rem, 5vw, 2.1rem); }
.login-card .brand-o { color: var(--accent); }
.login-card .brand { margin-bottom: 1.4rem; }
.login-card h1 { margin-bottom: 1.2rem; }
.login-card .button { width: 100%; }
@media (min-width: 1800px) { .workspace { max-width: 105rem; } }
@media (max-width: 1020px) { .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 750px) {
  .sidebar { position: static; width: auto; padding: .8rem .95rem; gap: .65rem; display: grid; grid-template-columns: 1fr auto; }
  .sidebar .brand { margin: 0; font-size: 1.4rem; }
  .sidebar .brand-mark { width: 2.1rem; height: 2.1rem; }
  .sidebar .brand small { font-size: .75rem; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; display: flex; overflow-x: auto; gap: .22rem; }
  .sidebar nav a { white-space: nowrap; padding: .46rem .6rem; font-size: .875rem; }
  .profile { grid-row: 1; grid-column: 2; border: 0; padding: 0; margin: 0; text-align: right; font-size: .85rem; max-width: 10rem; }
  .workspace { margin: 0; padding: 1rem .9rem 2rem; }
  .page-head { align-items: flex-start; flex-direction: column; gap: .7rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .metric { min-height: 7rem; padding: .7rem; }
  .metric span { font-size: .84rem; }
  .metric strong { margin-block: .15rem; }
  .panel-head { padding: .85rem .9rem; flex-wrap: wrap; }
  .button { min-height: 2.75rem; }
  .line { padding-inline: .9rem; }
}
