:root {
  color-scheme: light;
  --page: #f7f8f4;
  --surface: #fff;
  --ink: #162820;
  --quiet: #4c6057;
  --rule: #d6dfd8;
  --control: #809188;
  --accent: #17614a;
  --wash: #e8f1eb;
  --error: #94352c;
  --radius: 12px;
  font: 100%/1.55 system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
::selection { background: #c7e4d4; color: var(--ink); }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; top: .75rem; left: .75rem; z-index: 2; padding: .5rem; background: var(--surface); }
.skip:not(:focus) { clip-path: inset(50%); }

.masthead { background: var(--surface); border-bottom: 1px solid var(--rule); }
.masthead-inner, .shell, .footer { width: min(100% - 3rem, 72rem); margin-inline: auto; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { color: var(--ink); display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 680; }
.brand svg { color: var(--accent); flex-shrink: 0; }
.brand-divider { color: var(--quiet); font-weight: 400; margin-inline: .2rem; }
.account { color: var(--quiet); font-size: .875rem; overflow-wrap: anywhere; }
.shell { min-height: 70vh; padding-block: 2rem 3rem; }
.sign-in { max-width: 34rem; margin-block: 3rem; }
h1, h2, h3 { line-height: 1.16; text-wrap: balance; }
h1 { margin: 1.25rem 0 .55rem; font-size: 2.25rem; letter-spacing: -.035em; font-weight: 720; }
h2 { margin: 0 0 .75rem; font-size: 1.25rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; max-width: 68ch; }
.note, .status, .footer { color: var(--quiet); font-size: .875rem; }
.status:empty { display: none; }
.status { margin-block: .75rem; }
.status[data-error] { color: var(--error); }
.sign-in .note { margin-top: 1rem; }
.footer { border-top: 1px solid var(--rule); padding-block: 1rem 1.75rem; }
.footer span { margin-inline: .3rem; }

.nav { display: flex; flex-wrap: wrap; gap: .5rem 1.35rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.75rem; }
.nav a { display: inline-flex; padding: .4rem .15rem .6rem; color: var(--quiet); text-decoration: none; border-bottom: 2px solid transparent; font-size: .925rem; font-weight: 620; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); }
.nav a[aria-current] { border-color: var(--accent); }

.toolbar, .fields, .report-selector { display: flex; align-items: end; flex-wrap: wrap; gap: .7rem; }
.toolbar { align-items: center; margin-block: 1rem; }
.fields { margin-bottom: .85rem; }
.report-selector { margin-block: 1.25rem .85rem; }
.report-form { padding: 1.1rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
.report-form > .field { margin-bottom: .85rem; }
.field { display: grid; gap: .35rem; width: fit-content; max-width: 100%; color: var(--quiet); font-size: .875rem; font-weight: 620; }
.field.grow { flex: 1 1 16rem; }
input, select, button { font: inherit; }
input:not([type=checkbox]), select, button { border: 1px solid var(--control); border-radius: .5rem; min-height: 2.65rem; padding: .45rem .7rem; color: var(--ink); background: var(--surface); }
input { caret-color: var(--accent); }
input:not([type=checkbox]), select { width: 100%; }
select { max-width: 100%; }
button { cursor: pointer; font-weight: 620; transition: background-color .16s, border-color .16s; }
button:hover:not(:disabled) { background: var(--wash); border-color: var(--accent); }
button:active:not(:disabled) { background: #d8eadf; }
button:disabled { cursor: default; opacity: .55; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { background: #124e3d; }
button[aria-pressed=true] { border-color: var(--accent); color: var(--accent); background: var(--wash); }
button.danger { color: var(--error); }
#active-property { max-width: min(100%, 36rem); }
#mcp-url, #token-value { font-family: ui-monospace, monospace; font-size: .875rem; font-weight: 400; min-width: min(24rem, 100%); }

.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--rule); }
th { background: var(--wash); white-space: nowrap; color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f5f9f6; }
td { overflow-wrap: anywhere; }
.numeric { text-align: right; white-space: nowrap; }
.period-label { white-space: nowrap; }
.metric-note { display: block; color: var(--quiet); font-size: .78rem; }
.report-block { margin-block: 1.4rem; }
.connector-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; margin-block: 1.5rem; }
.surface { padding: 1.15rem; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--surface); }
.surface > .field { width: 100%; }
fieldset { margin: 1rem 0; padding: 0; border: 0; min-inline-size: 0; }
legend { font-weight: 620; margin-bottom: .4rem; }
.choices { max-height: 15rem; overflow: auto; }
.checkbox { display: flex; align-items: start; gap: .45rem; padding-block: .3rem; overflow-wrap: anywhere; }
.checkbox input { accent-color: var(--accent); width: 1rem; height: 1rem; margin: .28rem 0 0; flex: none; }
#create-grant > .checkbox { margin-bottom: .7rem; font-size: .875rem; }
.grant { border-bottom: 1px solid var(--rule); padding-block: .7rem; }
.grant .note { overflow-wrap: anywhere; }
details { padding-block: .75rem; }
summary { color: var(--accent); cursor: pointer; font-weight: 620; }
details p { margin-top: .75rem; }
pre { padding: .8rem; border-radius: .5rem; background: var(--wash); overflow: auto; font-size: .82rem; }
code { overflow-wrap: anywhere; }
.account-tools { border-top: 1px solid var(--rule); padding-top: 1.5rem; margin-top: 1rem; }
.coverage { margin-block: 1.5rem; }
.coverage div { display: grid; grid-template-columns: minmax(9rem, .35fr) 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--rule); }
dt { font-weight: 660; }
dd { margin: 0; color: var(--quiet); }
.chart { display: block; width: 100%; max-height: 12rem; color: var(--accent); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
@media (max-width: 42rem) {
  .masthead-inner, .shell, .footer { width: calc(100% - 2rem); }
  .masthead-inner { flex-wrap: wrap; gap: .2rem; align-content: center; padding-block: .5rem; }
  .account { width: 100%; padding-left: 2.7rem; }
  .shell { padding-top: 1.1rem; }
  .sign-in { margin-block: 1.5rem; }
  h1 { font-size: 1.85rem; }
  .connector-layout { grid-template-columns: minmax(0, 1fr); }
  th, td { padding-inline: .5rem; }
  td:first-child { min-width: 7rem; }
  .period-label { white-space: normal; display: inline-block; width: 6rem; overflow-wrap: normal; }
  .coverage div { grid-template-columns: 1fr; gap: .15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
