:root {
  color-scheme: light;
  --paper: #f7f7f1;
  --surface: #fffefa;
  --pine: #204838;
  --pine-dark: #193b30;
  --text: #21382b;
  --muted: #53665b;
  --line: #d7ddcf;
  --lime: #d9eaa8;
  --soft: #edf2e5;
  --focus: #507829;
  --radius: 16px;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--text); overflow-wrap: break-word; }
#app { display: flex; flex-direction: column; min-height: 100vh; }
img, svg { display: block; max-width: 100%; }
a { color: #295943; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: default; opacity: .63; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: #d5eaa2; color: #1c3e30; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 3.8vw, 3.5rem); letter-spacing: -.055em; font-weight: 630; }
h2 { font-size: clamp(1.45rem, 2.5vw, 2.15rem); letter-spacing: -.046em; font-weight: 625; }
h3 { font-size: 1.16rem; letter-spacing: -.027em; font-weight: 640; }
p + p { margin-top: .75em; }
.wrap { width: min(1152px, calc(100% - 88px)); margin-inline: auto; }
.workspace { flex: 1; padding-block: 36px 64px; }
.workspace:not(.wrap) > .wrap { min-width: 0; }

.topbar {
  background: #fffefa; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; gap: 20px; min-height: 71px;
}
.topbar > .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 70px; }
.topbar:has(> .brand) { padding-inline: max(44px, calc((100% - 1152px) / 2)); }
.brand {
  color: var(--pine-dark); display: inline-flex; align-items: center; gap: 10px;
  font-size: 1.43rem; font-weight: 710; line-height: 1; letter-spacing: -.055em;
  text-decoration: none; background: none; border: 0; padding: 0; white-space: nowrap;
}
.brand img { width: 35px; height: 35px; flex: none; }
.topnav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topnav :is(a, button) {
  display: inline-flex; align-items: center; gap: .45rem; color: var(--muted);
  text-decoration: none; border: 0; border-radius: 8px; background: none;
  padding: .5rem .85rem; font-size: .88rem; font-weight: 560; line-height: 1.25;
}
.topnav :is(a, button):hover { background: #f1f3eb; color: var(--pine-dark); }
.topnav :is(.active, [aria-current="page"]) { background: #e9efdf; color: #244b34; }
.topnav svg, .button svg, .backlink svg { width: 17px; height: 17px; flex: none; }

.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; isolation: isolate;
  overflow: hidden; background: var(--pine-dark); color: #f8f8ef; border-radius: 20px;
}
.hero-copy { align-self: center; padding: clamp(32px, 4.7vw, 64px); min-width: 0; }
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 9px; font-size: .71rem;
  font-weight: 700; line-height: 1.45; letter-spacing: .13em; text-transform: uppercase;
}
.eyebrow::before, .kicker::before { content: ""; display: inline-block; width: 21px; height: 2px; background: currentColor; }
.eyebrow { color: #d6e8aa; }
.kicker { color: #526a4d; }
.hero h1 {
  font-size: clamp(2.75rem, 4.1vw, 3.6rem); line-height: 1.04; letter-spacing: -.062em;
  margin-top: 20px; margin-bottom: 19px; font-weight: 580; text-wrap: balance;
}
.hero .lead { font-size: clamp(.98rem, 1.4vw, 1.09rem); line-height: 1.55; color: #dae6da; max-width: 41ch; }
.hero-map { min-width: 0; min-height: 100%; position: relative; overflow: hidden; background: #dce5d2; }
.hero-map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero .actions { margin-top: 27px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.button, .backlink { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; text-decoration: none; }
.button {
  min-height: 42px; border: 1px solid var(--pine); border-radius: 8px; padding: .62rem 1.02rem;
  line-height: 1.25; background: var(--pine); color: #fff; font-size: .9rem; font-weight: 615;
}
.button:hover { background: #2e5944; border-color: #2e5944; }
.button.secondary { background: var(--surface); color: var(--pine); border-color: #b7c5b7; }
.button.secondary:hover { background: var(--soft); border-color: #6b886f; }
.button.quiet { color: var(--pine); border-color: transparent; background: transparent; }
.button.quiet:hover { background: #e8eee1; }
.hero .button { background: var(--lime); color: #203d2c; border-color: var(--lime); }
.hero .button:hover { background: #e4f2ba; border-color: #e4f2ba; }
.hero .button.secondary { background: transparent; color: #f1f6e8; border-color: #849a86; }
.hero .button.quiet { background: transparent; color: #f1f6e8; border-color: transparent; }
.hero .button:is(.secondary, .quiet):hover { background: #315343; }
.hero :focus-visible { outline-color: #e0efa8; }

.pagehead, .titleline, .cardrow { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.pagehead { align-items: flex-start; flex-direction: column; gap: 0; margin-bottom: 27px; }
.pagehead.titleline { flex-direction: row; align-items: flex-end; margin-top: 0; gap: 16px; }
.pagehead .kicker { margin-bottom: 10px; }
.pagehead :is(.lead, .muted) { margin-top: 10px; max-width: 72ch; }
.titleline { margin-block: 30px 16px; }
.card .titleline, .panel .titleline { margin-top: 0; }
.muted, .lead, .fine { color: var(--muted); }
.lead { font-size: 1.04rem; line-height: 1.6; }
.fine, small { font-size: .82rem; line-height: 1.5; }
.cards, .entry-grid, .library-grid { display: grid; gap: 16px; align-items: stretch; }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.entry-grid, .library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero + .entry-grid { margin-top: 24px; }
.card, .panel {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; background: var(--surface);
}
.card .muted, .card h3 + p, .panel h2 + p { margin-top: .55rem; }
.card .actions, .panel .actions { margin-top: 1.1rem; }
.card > :first-child, .panel > :first-child { margin-top: 0; }
.cardrow { align-items: flex-start; }
.cardrow + .cardrow { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.entry-grid .card { position: relative; }
.entry-grid .card .kicker, .cards .card .kicker, .panel > .kicker { margin-bottom: 12px; }
.entry-grid .card h2, .cards .card h2 { font-size: clamp(1.34rem, 2.15vw, 1.8rem); margin-bottom: 9px; }
.entry-grid .card > p:not(.kicker), .cards .card > p:not(.kicker) { color: var(--muted); line-height: 1.55; }
.entry-grid .backlink { margin-top: 15px; color: var(--pine); border-bottom: 1px solid #96a992; }
.entry-grid .backlink:hover { border-bottom-color: var(--pine); }
.entry-grid .backlink::after { content: "→"; font-size: 1.04em; }
.panel + .panel { margin-top: 18px; }
.panel > h3 { margin-top: 22px; margin-bottom: 8px; }
.panel > a.button { margin-top: 12px; }
.panel > form { margin-top: 14px; }
.panel > fieldset, .formgrid + .card { margin-top: 24px; }
.panel > fieldset > legend { margin-bottom: 10px; }
.access-form > .muted, dialog h2 + p, dialog p + .field { margin-top: 12px; }
:is(.cards > .card, .workspace > .panel) > details { margin-top: 12px; }
:is(.cards > .card, .workspace > .panel) > details > summary { cursor: pointer; color: var(--pine); font-weight: 580; }
:is(.cards > .card, .workspace > .panel) > details[open] > summary { margin-bottom: 8px; }
.titleline .searchbar { margin: 0; }
.tablewrap td > small { display: block; color: var(--muted); }
:is(a,button).card { text-decoration: none; color: var(--text); text-align: left; }
:is(a,button).card:hover { border-color: #90aa8b; background: #fcfdf7; }
.badge {
  display: inline-flex; gap: .4rem; align-items: center; border-radius: 100px;
  padding: .22rem .64rem; background: #ebf1df; color: #3a583c; font-size: .76rem; font-weight: 650;
  line-height: 1.4; max-width: 100%;
}
.metricstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); margin-block: 19px 24px; border-block: 1px solid var(--line); }
.metric { display: grid; align-content: center; gap: 2px; padding: 15px 20px; min-width: 0; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric :is(strong,b) { font-weight: 650; color: var(--pine); font-size: 1.6rem; letter-spacing: -.045em; }
.metric :is(span,small) { font-size: .83rem; color: var(--muted); }
.tabs { display: flex; gap: 5px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-block: 20px; }
.tabs :is(button,a) {
  border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 0;
  background: transparent; color: var(--muted); padding: 10px 12px; font-weight: 570; text-decoration: none;
}
.tabs .active, .tabs [aria-selected="true"] { border-bottom-color: var(--pine); color: var(--pine); }
.tabs :is(a,button):hover { background: var(--soft); }
.backlink { color: var(--muted); font-weight: 570; font-size: .89rem; border: 0; background: transparent; padding: 4px 0; }
.backlink:hover { color: var(--pine-dark); text-decoration: underline; }

.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: .38rem; min-width: 0; }
.field, legend, label { color: var(--text); }
.field > :is(span, label, strong):first-child, .field > label, legend { font-weight: 610; font-size: .91rem; }
.span2 { grid-column: 1/-1; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
  width: 100%; min-width: 0; min-height: 43px; padding: .61rem .78rem;
  color: var(--text); background: #fffefa; border-radius: 7px; border: 1px solid #aebdae;
}
input::placeholder, textarea::placeholder { color: #65756a; opacity: 1; }
input[type="file"] { font-size: .9rem; }
input[type="file"]::file-selector-button { font: inherit; border: 0; border-radius: 4px; background: var(--soft); color: var(--pine); margin-right: .55rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--pine); width: 17px; height: 17px; flex: none; }
textarea { resize: vertical; min-height: 88px; }
fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,215px),1fr)); gap: 9px; }
.intake-catalog details { padding: 10px 0; border-bottom: 1px solid var(--line); }
.intake-catalog summary { cursor: pointer; font-weight: 600; }
.intake-catalog .choices, .intake-catalog .field { margin-top: 12px; }
.choice {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 9px; cursor: pointer;
}
.choice input { margin: 2px 0 0; }
.choice span { min-width: 0; }
.choice strong, .choice small { display: block; }
.choice strong { font-size: .9rem; font-weight: 620; }
.choice small { color: var(--muted); margin-top: 2px; }
.choice:has(input:checked) { background: #f0f5e5; border-color: #7c9971; }
.choice:hover { border-color: #859881; }
.access-form { max-width: 40rem; }
.access-form .actions { margin-top: 16px; }
.searchbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 16px 0; }
.searchbar > input, .searchbar > .field { flex: 1 1 220px; }
.searchbar > select { width: auto; flex: 0 1 230px; }
.tablewrap { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-spacing: 0; border-collapse: collapse; font-size: .9rem; text-align: left; }
th,td { vertical-align: middle; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
th { font-size: .75rem; font-weight: 680; color: #4a604f; background: #eef2e7; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f7f9f1; }
.list { display: grid; gap: .65rem; }
ul.list, ol.list { padding-left: 1.3rem; }
.empty { padding: clamp(24px, 4vw, 46px); text-align: center; color: var(--muted); border: 1px dashed #b5c3ad; border-radius: 12px; background: #f3f5ec; }
.empty :is(h2,h3,strong) { color: var(--pine); }
.empty > * + * { margin-top: .45rem; }
.library-grid { align-items: start; }
.library-grid a { overflow-wrap: anywhere; }
dialog { max-width: min(38rem, calc(100% - 28px)); max-height: 88vh; overflow: auto; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
dialog::backdrop { background: rgba(15,35,24,.46); }
dialog .actions { margin-top: 17px; }
.notice {
  position: fixed; z-index: 20; bottom: 18px; left: 50%; transform: translateX(-50%); width: max-content;
  max-width: calc(100% - 24px); padding: .7rem 1rem; background: var(--pine-dark); color: white;
  border-radius: 8px; box-shadow: 0 3px 14px #18372a26; font-size: .92rem;
}
.notice:empty, [hidden] { display: none !important; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: .81rem; }
.foot, .foot > .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.foot > .wrap { min-height: 58px; }
.foot:not(:has(> .wrap)) { padding: 17px max(44px, calc((100% - 1152px) / 2)); }
.foot.wrap { padding-inline: 0; }

@media (max-width: 900px) {
  .wrap { width: min(1152px, calc(100% - 48px)); }
  .topbar:has(> .brand), .foot:not(:has(> .wrap)):not(.wrap) { padding-inline: 24px; }
  .hero { grid-template-columns: 1.05fr .95fr; }
  .hero-copy { padding: 34px 30px; }
  .hero h1 { font-size: clamp(2.55rem, 5.3vw, 3.3rem); }
}
@media (max-width: 680px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { gap: 6px; }
  .topbar > .wrap { min-height: 60px; gap: 7px; }
  .topbar { min-height: 61px; }
  .topbar:has(> .brand), .foot:not(:has(> .wrap)):not(.wrap) { padding-inline: 16px; }
  .brand { font-size: 1.21rem; gap: 7px; }
  .brand img { width: 29px; height: 29px; }
  .topnav { gap: 1px; justify-content: flex-end; }
  .topnav :is(button,a) { font-size: .78rem; padding: 7px 8px; }
  .workspace { padding-block: 18px 38px; }
  .hero { grid-template-columns: 1fr; border-radius: 15px; }
  .hero-copy { padding: 28px 25px; }
  .hero h1 { font-size: clamp(2.65rem, 9.5vw, 3.5rem); margin-block: 13px; }
  .hero .actions { margin-top: 20px; gap: 7px; }
  .hero .button { padding-inline: .75rem; font-size: .85rem; }
  .hero-map { min-height: 170px; aspect-ratio: 2.4; }
  .hero-map img { object-position: 50% 52%; }
  .entry-grid, .library-grid, .formgrid { grid-template-columns: minmax(0,1fr); }
  .card, .panel { padding: 19px; border-radius: 12px; }
  .titleline, .pagehead, .cardrow { gap: 10px; }
  .titleline { flex-wrap: wrap; }
  .metricstrip { grid-template-columns: repeat(auto-fit,minmax(95px,1fr)); }
  .metric { padding: 10px; }
  .foot, .foot > .wrap { flex-wrap: wrap; }
  .foot > .wrap { padding-block: 10px; }
}
@media (max-width: 380px) {
  .topnav, .topbar > .wrap, .topbar:has(> .brand) { flex-wrap: wrap; }
  .hero-copy { padding: 24px 19px; }
  .card, .panel { padding: 16px; }
  .topnav :is(button,a) { padding-inline: 5px; }
}
@media print {
  body { background: white; }
  .workspace { padding: 0; }
  .wrap { width: 100%; }
  .topnav, .backlink, .notice { display: none; }
  .card, .panel { break-inside: avoid; }
}
