:root {
  color-scheme: light;
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #1a2c25;
  --muted: #50645a;
  --green: #185841;
  --forest: #0d3024;
  --lime: #d5ed9b;
  --paper: #f5f6f2;
  --white: #fff;
  --line: #dce4dc;
  --radius: 1.1rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input, textarea, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--green); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.06em; margin-bottom: .65rem; }
h2 { font-size: 1.35rem; letter-spacing: -.035em; line-height: 1.25; margin-bottom: .45rem; }
h3 { font-size: 1rem; margin-bottom: .45rem; }
p { margin-bottom: .8rem; }
:focus-visible { outline: 3px solid #b36c14; outline-offset: 3px; }
[hidden] { display: none !important; }

.skip { position: fixed; top: 8px; left: 8px; z-index: 5; transform: translateY(-200%); color: var(--forest); background: white; padding: .6rem 1rem; }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; padding: 1.8rem 1rem 1rem; background: var(--forest); color: #f0f6ed; display: flex; flex-direction: column; }
.brand { display: flex; gap: .8rem; align-items: center; margin: 0 .55rem 2.6rem; }
.brand strong { display: block; font-size: 1.6rem; line-height: 1; letter-spacing: -.06em; }
.brand small { font-size: .72rem; color: #c5d4ca; }
.brand-mark { width: 2.75rem; height: 2.75rem; display: grid; place-content: center; gap: 3px; border-radius: .8rem; background: var(--lime); }
.brand-mark i { display: block; height: 4px; width: 1.1rem; background: var(--forest); transform: skewX(-27deg); border-radius: 2px; }
.brand-mark i:nth-child(2) { width: .9rem; }
.brand-mark i:nth-child(3) { width: .66rem; }
.sidebar nav { display: grid; gap: .3rem; }
.nav-button { display: flex; align-items: center; gap: .65rem; text-align: left; font-size: .88rem; font-weight: 550; padding: .7rem .65rem; background: transparent; border: 1px solid transparent; color: #deebe1; border-radius: .65rem; }
.nav-button:hover { background: #1d4234; }
.nav-button[aria-current] { color: #ecf8d4; background: #28513d; border-color: #41644f; }
.nav-icon { width: 1.1rem; flex: 0 0 1.1rem; color: #c8e58b; text-align: center; line-height: 1; font-size: 1.2rem; }
.sidebar-footer { margin-top: auto; padding: .8rem .35rem; font-size: .76rem; color: #c8dbcf; }
.status-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #b5db72; margin-right: .4rem; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: #fcfdfa; border-bottom: 1px solid var(--line); padding: .85rem clamp(1rem, 3.4vw, 3.4rem); }
.project-indicator { min-width: 0; display: flex; flex-direction: column; }
#top-project { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
#save-status { color: var(--muted); font-size: .76rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.topbar .actions { flex: 0 0 auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.55rem; padding: .48rem .85rem; border: 1px solid var(--line); border-radius: .65rem; color: var(--ink); background: white; font-size: .86rem; font-weight: 700; text-decoration: none; }
.button:hover { border-color: #9ab1a2; background: #f0f5ed; }
.button.primary { background: var(--green); color: white; border-color: var(--green); }
.button.primary:hover { background: #104735; }
.button.light { background: var(--lime); color: #183821; border-color: var(--lime); }
.button.light:hover { background: #e4f5be; }
.button.subtle { background: transparent; }
.button.danger { color: #913728; }
.button.small { min-height: 2rem; font-size: .78rem; padding: .25rem .55rem; }
main { max-width: 1560px; margin: 0 auto; padding: clamp(1rem, 3.4vw, 3.4rem); }
main:focus { outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: .8rem; margin: .2rem 0 1.45rem; }
.page-heading p { margin-bottom: 0; color: var(--muted); max-width: 65ch; }
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) minmax(190px, .47fr); gap: 1rem; min-height: 240px; color: #f4fbf0; background: #174637; padding: clamp(1.4rem, 3.75vw, 3.5rem); border-radius: var(--radius); margin-bottom: 1rem; }
.hero h1 { max-width: 16ch; font-size: clamp(2rem, 4.6vw, 4.15rem); margin: .3rem 0 .65rem; overflow-wrap: anywhere; }
.hero p { max-width: 55ch; color: #dcebe1; margin-bottom: 1.1rem; }
.hero .button.subtle { border-color: #8ba69a; color: white; }
.hero .button.subtle:hover { background: #285e4b; }
.hero-art { align-self: stretch; min-height: 165px; position: relative; overflow: hidden; border: 1px solid #56826a; border-radius: .85rem; background: linear-gradient(155deg, #214d3e, #153d30); }
.hero-art i { display: block; position: absolute; inset: 12% -14% auto 4%; height: 63%; border: 1px solid #8db99a; border-radius: 44%; transform: rotate(-15deg) skewX(-13deg); }
.hero-art i:nth-child(2) { inset: 22% -10% auto 1%; border-color: #759a83; }
.hero-art i:nth-child(3) { inset: 32% -6% auto -2%; border-color: #789f6a; }
.hero-art i:nth-child(4) { inset: 42% -2% auto -5%; border-color: #afcc7b; }
.hero-art i:nth-child(5) { inset: 52% 2% auto -8%; border-color: #c1df85; }
.hero-art i:nth-child(6) { inset: 62% 6% auto -11%; border-color: #d9e799; }
.eyebrow { text-transform: uppercase; font-size: .69rem; font-weight: 800; letter-spacing: .12em; color: #48715c; }
.hero .eyebrow { color: var(--lime); }
.stats, .area-grid, .metrics { display: grid; gap: .8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats { margin-bottom: 1.6rem; }
.stat, .area-card, .metric, .card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.stat, .metric { padding: .85rem 1rem; }
.stat strong, .metric strong { letter-spacing: -.045em; display: block; font-size: clamp(1.1rem, 2.55vw, 1.75rem); line-height: 1.2; overflow-wrap: anywhere; }
.stat span, .metric span { color: var(--muted); font-size: .8rem; }
.metric strong small { font-size: .72rem; font-weight: 650; letter-spacing: 0; }
.area-grid { margin-bottom: 1.3rem; }
.area-card { text-align: left; padding: 1.05rem; color: inherit; }
.area-card:hover { border-color: #90a992; background: #fbfdf8; }
.area-card p { color: var(--muted); margin-bottom: 0; font-size: .84rem; }
.area-icon { display: inline-grid; place-content: center; color: #245b43; background: #e6efdf; border-radius: .55rem; width: 2rem; height: 2rem; margin-bottom: .65rem; font-size: 1.25rem; }
.card { padding: clamp(.95rem, 2.2vw, 1.5rem); margin-bottom: .9rem; min-width: 0; }
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: .7rem; flex-wrap: wrap; margin-bottom: .6rem; }
.card-heading p { margin: .15rem 0 0; color: var(--muted); font-size: .82rem; }
.section-label { margin: 1.35rem 0 .65rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(235px, .35fr); gap: .9rem; align-items: start; }
.split .analysis { min-width: 0; }
.analysis .card { margin: 0; }
.form-grid { display: grid; gap: .85rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.field > span, .field > label { font-size: .81rem; font-weight: 700; }
.field .hint { margin: 0; color: var(--muted); font-size: .75rem; }
input:not([type=checkbox], [type=file]), select, textarea { min-width: 0; width: 100%; border: 1px solid #bccbc0; border-radius: .52rem; background: #fff; color: var(--ink); padding: .48rem .56rem; }
input[type=checkbox] { accent-color: var(--green); width: 1rem; height: 1rem; flex: 0 0 auto; }
.checkbox-field, .checkline { display: flex; align-items: center; gap: .55rem; }
.checkbox-field span, .checkline span { font-size: .84rem; }
.card form + form, .form-section { margin-top: 1.15rem; }
.form-footer { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: 1.1rem; }
.muted { color: var(--muted); }
.small-text { font-size: .81rem; }
.empty { color: var(--muted); padding: 1rem 0; margin: 0; }
.notice { margin: .7rem 0; border-radius: .6rem; border: 1px solid #e8ce9f; background: #fff6e6; padding: .65rem .8rem; color: #673f0c; font-size: .84rem; }
.notice.error { color: #7f3024; background: #fcf0ec; border-color: #e9b9ae; }
.field-error { color: #842e24; margin: .35rem 0 0; }
[aria-invalid="true"] { border-color: #b04839 !important; }
.pill { display: inline-block; border-radius: 999px; padding: .21rem .58rem; background: #edf1ed; color: #3d5548; font-size: .74rem; font-weight: 750; white-space: nowrap; }
.pill.pass { background: #e0efdc; color: #20563b; }
.pill.fail { background: #fae8e4; color: #842e24; }
.pill.pending { background: #fff0cf; color: #694709; }
.pill.info { background: #e7eff4; color: #2f5669; }
.table-scroll { overflow: auto; border-radius: .55rem; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .83rem; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: .48rem .6rem; }
th { color: #2e5645; background: #eef3eb; font-size: .75rem; }
tr:last-child td { border-bottom: 0; }
.data-entry td { padding: .32rem; }
.data-entry input:not([type=checkbox]), .data-entry select { min-width: 5.1rem; }
.data-entry [type=checkbox] { margin: .55rem; }
.data-entry .button { white-space: nowrap; }
.record-list { padding: 0; list-style: none; margin: .45rem 0 0; display: grid; gap: .4rem; }
.record-list button { text-align: left; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .35rem; }
.record-list button[aria-current] { background: #e6f0e5; border-color: #8ba891; }
.result-block .metrics { grid-template-columns: repeat(auto-fit, minmax(min(100%, 122px), 1fr)); margin: .85rem 0; }
.result-block .metric { background: #f9fbf7; padding: .7rem; }
.chart { margin: 1rem 0; }
.chart canvas { display: block; width: 100%; height: 235px; }
.chart-legend { margin: .3rem 0; display: flex; flex-wrap: wrap; gap: .35rem 1rem; color: var(--muted); font-size: .75rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.legend-key { font-weight: 900; color: #174b34; }
.series-1 { color: #a35f14; }
.series-2 { color: #365e97; }
.series-3 { color: #8e476f; }
.chart details { margin-top: .45rem; }
summary { cursor: pointer; font-size: .8rem; font-weight: 700; }
.report-preview { max-width: 950px; }
.report-cover { border-top: 5px solid var(--green); padding-top: .85rem; }
.report-cover h2 { font-size: 2rem; }
.report-cover dl, .details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: .5rem 1rem; margin: .7rem 0; }
.details-grid dt, .report-cover dt { font-size: .74rem; font-weight: 700; color: var(--muted); }
.details-grid dd, .report-cover dd { margin: 0; overflow-wrap: anywhere; }
.report-article { border-top: 1px solid var(--line); padding-top: .85rem; margin-top: 1rem; }
.report-article h3 { font-size: 1.12rem; }
.report-result { margin: .75rem 0; }
.report-source { margin: 1rem 0; }
.report-source .table-scroll { margin-bottom: .5rem; }
.report-signoff { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.report-error { margin: 0 0 .9rem; }
.record-reference { color: var(--muted); font-size: .79rem; }
#print-document { display: none; }

@media (min-width: 1300px) { .split { grid-template-columns: minmax(0, 1fr) minmax(285px, .42fr); } }
@media (max-width: 1120px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: .7rem .75rem .6rem; }
  .brand { margin: 0 0 .55rem; }
  .brand strong { font-size: 1.35rem; }
  .brand-mark { height: 2.25rem; width: 2.25rem; }
  .sidebar nav { display: flex; overflow: auto; }
  .nav-button { flex: 0 0 auto; padding: .55rem .5rem; font-size: .77rem; }
  .sidebar-footer { display: none; }
  .topbar { padding: .65rem .8rem; }
  .topbar .button { padding: .35rem .52rem; font-size: .75rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { display: none; }
  .area-grid { grid-template-columns: 1fr; }
  .stat { padding: .6rem; }
}

@page { size: A4; margin: 15mm; }
@media print {
  :root { font-size: 10pt; }
  body { background: white; }
  .shell, .skip, noscript { display: none !important; }
  #print-document { display: block; }
  .report-cover { break-after: avoid; }
  .report-article { break-before: page; }
  .report-result, .chart, .report-signoff { break-inside: avoid; }
  .chart canvas { max-height: 55mm; }
  .table-scroll { overflow: visible; }
  td, th { overflow-wrap: anywhere; }
  tr { break-inside: avoid; }
  thead { display: table-header-group; }
  h2, h3 { break-after: avoid; }
  .pill, th { print-color-adjust: exact; }
}
