:root {
  --ink: #17332c;
  --muted: #64756f;
  --paper: #f6f7f1;
  --white: #ffffff;
  --forest: #123f34;
  --forest-2: #1b5848;
  --leaf: #72a82f;
  --lime: #b9d45b;
  --cyan: #2e9e9a;
  --sky: #5b9fd6;
  --coral: #e46e52;
  --sand: #e9e5d8;
  --line: #dce3dc;
  --shadow: 0 16px 40px rgba(20, 56, 47, .12);
  --radius: 6px;
  --font: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  letter-spacing: 0;
}
#app:focus { outline: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.1rem, 4vw, 4rem); line-height: 1.02; font-weight: 560; margin-bottom: 14px; overflow-wrap: anywhere; }
h2 { font-size: 1.55rem; line-height: 1.15; font-weight: 600; margin-bottom: 8px; }
h3 { font-size: 1rem; line-height: 1.25; }
p { line-height: 1.6; color: var(--muted); }
small { font-size: .75rem; }

.demo-rail {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  color: white;
  background: var(--coral);
  font-size: 11px;
  text-transform: uppercase;
}
.demo-rail strong { letter-spacing: .14em; }

.app-header {
  height: 72px;
  padding: 0 34px;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  align-items: center;
  position: sticky;
  top: 28px;
  z-index: 90;
  background: rgba(248, 249, 244, .95);
  border-bottom: 1px solid rgba(23, 51, 44, .1);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; }
.brand-mark { width: 34px; height: 34px; position: relative; display: inline-block; }
.brand-mark i { position: absolute; display: block; background: var(--forest); transform: skewY(-28deg); }
.brand-mark i:nth-child(1) { width: 11px; height: 28px; left: 2px; bottom: 1px; }
.brand-mark i:nth-child(2) { width: 11px; height: 22px; left: 13px; bottom: 4px; background: var(--leaf); }
.brand-mark i:nth-child(3) { width: 9px; height: 16px; left: 24px; bottom: 7px; background: var(--cyan); }
.brand > span:last-child { display: grid; }
.brand strong { font-size: 19px; letter-spacing: .06em; }
.brand small { color: var(--muted); font-size: 10px; }
.main-nav { display: flex; justify-content: center; align-items: stretch; height: 100%; }
.main-nav a {
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-size: 13px;
  color: var(--muted);
  position: relative;
}
.main-nav a::after { content: ""; position: absolute; height: 2px; bottom: -1px; left: 15px; right: 15px; background: var(--forest); transform: scaleX(0); transition: .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--forest); }
.main-nav a.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.language-picker {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px 0 9px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255,255,255,.55);
  color: var(--forest);
}
.language-picker > span { font-size: 12px; font-weight: 800; }
.language-picker select {
  width: 43px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--forest);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.icon-button {
  width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; color: var(--forest);
  display: inline-grid; place-items: center; border-radius: 50%; font-weight: 700;
}
.icon-button:hover { border-color: var(--forest); background: white; }
.profile-button { border: 0; background: transparent; display: flex; align-items: center; gap: 8px; text-align: left; color: var(--ink); }
.profile-button > span:last-child { display: grid; }
.profile-button strong { font-size: 12px; }
.profile-button small { color: var(--muted); }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; background: var(--forest); color: white; border-radius: 50%; font-size: 11px; }
.mobile-menu { display: none; border: 0; background: none; font-size: 24px; color: var(--forest); }

.view { display: none; min-height: calc(100vh - 100px); }
.view.active { display: block; animation: view-in .35s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-shell { max-width: 1460px; margin: 0 auto; padding: 48px 48px 72px; }
.page-intro { margin-bottom: 38px; }
.page-intro p { max-width: 760px; margin-bottom: 0; }
.page-intro.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.page-intro.split > * { min-width: 0; }
.page-intro.split h1 { max-width: 1000px; }
.eyebrow { display: block; font-size: 10px; font-weight: 750; letter-spacing: .14em; color: var(--cyan); margin-bottom: 10px; }
.eyebrow.light { color: rgba(255,255,255,.78); }
.intro-actions { display: flex; align-items: center; gap: 14px; padding-bottom: 8px; }
.primary-button, .secondary-button, .ghost-button, .text-button {
  min-height: 42px;
  border-radius: 4px;
  border: 1px solid transparent;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.primary-button { background: var(--forest); color: white; }
.primary-button:hover { background: var(--forest-2); transform: translateY(-1px); }
.primary-button.coral { background: var(--coral); }
.primary-button.small { min-height: 34px; padding: 0 12px; font-size: 11px; }
.secondary-button { border-color: var(--line); background: white; color: var(--forest); }
.secondary-button.full { width: 100%; }
.ghost-button { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.36); }
.ghost-button:hover { background: rgba(255,255,255,.2); }
.text-button { border: 0; background: none; color: var(--cyan); padding: 0; min-height: auto; }
.text-button:hover { color: var(--forest); }

.atlas-hero { min-height: 620px; position: relative; overflow: hidden; color: white; background: var(--forest); }
.atlas-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.84) contrast(.95); }
.atlas-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,35,29,.74) 0%, rgba(8,35,29,.24) 48%, rgba(8,35,29,.4) 100%), linear-gradient(0deg, rgba(8,35,29,.7), transparent 45%); }
.atlas-grid { position: absolute; inset: 0; opacity: .13; background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px); background-size: 80px 80px; transform: perspective(800px) rotateX(52deg) scale(1.8); transform-origin: center bottom; }
.watermark { position: absolute; right: -10px; top: 80px; font-size: clamp(8rem, 18vw, 18rem); line-height: 1; font-weight: 900; color: rgba(255,255,255,.055); pointer-events: none; }
.atlas-head { max-width: 1460px; margin: 0 auto; padding: 56px 48px; position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.atlas-head h1 { max-width: 700px; }
.atlas-head p { color: rgba(255,255,255,.82); max-width: 580px; font-size: 16px; }
.atlas-tools { display: flex; gap: 10px; }
.atlas-summary {
  position: absolute; z-index: 3; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1364px, calc(100% - 96px)); display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(247,248,242,.95); color: var(--ink); box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.atlas-summary article { padding: 22px 26px; min-height: 128px; border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.atlas-summary article:last-child { border-right: 0; }
.atlas-summary article.attention { border-top: 3px solid var(--coral); }
.atlas-summary span, .metrics-strip span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.atlas-summary strong { font-size: 28px; line-height: 1.2; margin: 7px 0 4px; }
.atlas-summary strong small { font-size: 13px; font-weight: 500; }
.atlas-summary em { font-size: 10px; color: var(--muted); font-style: normal; }
.mini-progress { width: 100%; height: 4px; background: #dfe5df; overflow: hidden; margin-top: 9px; }
.mini-progress i { height: 100%; display: block; background: var(--leaf); }
.map-pin { position: absolute; z-index: 3; border: 0; background: none; color: white; display: flex; align-items: center; gap: 8px; }
.map-pin span { width: 34px; height: 38px; display: grid; place-items: center; padding-bottom: 6px; background: var(--cyan); border: 2px solid rgba(255,255,255,.9); clip-path: polygon(50% 100%, 5% 48%, 9% 25%, 25% 8%, 50% 2%, 75% 8%, 91% 25%, 95% 48%); box-shadow: 0 8px 22px rgba(0,0,0,.35); }
.map-pin b { opacity: 0; transform: translateX(-6px); background: rgba(10,40,33,.9); padding: 8px 10px; font-size: 11px; font-weight: 600; transition: .2s; white-space: nowrap; }
.map-pin:hover b, .map-pin.active b { opacity: 1; transform: none; }
.pin-1 { left: 37%; top: 42%; }
.pin-2 { left: 62%; top: 36%; }
.pin-3 { left: 73%; top: 57%; }
.layer-panel { display: none; position: absolute; z-index: 8; right: 48px; top: 115px; width: 250px; padding: 18px; background: rgba(250,251,247,.96); color: var(--ink); box-shadow: var(--shadow); }
.layer-panel.open { display: grid; gap: 13px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.panel-title > span { color: var(--muted); font-size: 11px; }
.panel-title button:not(.primary-button) { border: 0; background: none; font-size: 20px; color: var(--muted); }
.layer-panel label { font-size: 12px; display: flex; gap: 9px; align-items: center; }
.layer-panel input { accent-color: var(--leaf); }
.content-band { max-width: 1460px; margin: 0 auto; padding: 46px 48px 70px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.section-heading.compact { align-items: center; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 6px; }
.segmented { padding: 3px; background: #e8ece6; display: flex; }
.segmented button { border: 0; color: var(--muted); background: transparent; min-height: 32px; padding: 0 13px; font-size: 11px; }
.segmented button.active { background: white; color: var(--forest); box-shadow: 0 2px 8px rgba(20,50,42,.08); }
.project-list { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.project-item { display: grid; grid-template-rows: auto auto 1fr; padding: 24px 24px 22px 0; margin-right: 24px; border-bottom: 1px solid var(--line); }
.project-item + .project-item { border-left: 1px solid var(--line); padding-left: 24px; }
.project-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.project-number { color: var(--cyan); font-weight: 800; font-size: 12px; }
.status-pill { border-radius: 100px; padding: 6px 10px; background: #e8eee8; color: var(--forest); font-size: 10px; font-weight: 750; }
.status-pill.monitoring { background: #e0f0eb; color: #217064; }
.status-pill.design { background: #e5edf4; color: #3c6c92; }
.status-pill.review { background: #fff0ec; color: #a94b36; }
.project-item h3 { font-size: 19px; margin-bottom: 8px; }
.project-item p { font-size: 12px; margin-bottom: 18px; }
.project-item-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.project-item-metrics span { color: var(--muted); font-size: 10px; display: grid; gap: 3px; }
.project-item-metrics strong { color: var(--ink); font-size: 13px; }
.project-link { margin-top: 18px; justify-self: start; }

.project-ribbon { display: grid; grid-template-columns: repeat(6, 1fr); margin-bottom: 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-ribbon > div { display: flex; align-items: center; gap: 10px; padding: 17px 10px; position: relative; color: var(--muted); }
.project-ribbon > div:not(:last-child)::after { content: ""; position: absolute; right: 0; width: 1px; height: 28px; background: var(--line); }
.project-ribbon i { width: 24px; height: 24px; display: grid; place-items: center; border: 1px solid #bdc8c1; border-radius: 50%; font-size: 9px; font-style: normal; }
.project-ribbon span { display: grid; font-size: 11px; font-weight: 700; }
.project-ribbon small { font-weight: 400; color: #94a19b; margin-top: 2px; }
.project-ribbon .done i { background: var(--forest); border-color: var(--forest); color: white; }
.project-ribbon .current { color: var(--forest); background: #edf3eb; }
.project-ribbon .current i { background: var(--leaf); border-color: var(--leaf); color: white; }
.metrics-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--forest); color: white; margin-bottom: 38px; }
.metrics-strip > div { padding: 23px 25px; border-right: 1px solid rgba(255,255,255,.13); display: grid; gap: 6px; }
.metrics-strip span, .metrics-strip small { color: rgba(255,255,255,.62); }
.metrics-strip strong { font-size: 20px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, .7fr); gap: 48px; }
.plain-panel { border-top: 2px solid var(--forest); padding-top: 18px; margin-bottom: 34px; }
.narrative-timeline { display: grid; }
.timeline-event { display: grid; grid-template-columns: 90px 24px 1fr auto; gap: 16px; min-height: 104px; }
.timeline-event time { color: var(--muted); font-size: 11px; padding-top: 4px; }
.timeline-axis { position: relative; }
.timeline-axis::before { content: ""; position: absolute; left: 50%; top: 10px; bottom: -10px; width: 1px; background: var(--line); }
.timeline-axis i { position: relative; z-index: 1; width: 12px; height: 12px; margin: 2px auto; display: block; border: 3px solid var(--paper); background: var(--cyan); border-radius: 50%; box-shadow: 0 0 0 1px var(--cyan); }
.timeline-event:last-child .timeline-axis::before { display: none; }
.timeline-copy h3 { margin: 0 0 5px; }
.timeline-copy p { font-size: 12px; margin-bottom: 0; }
.timeline-tag { align-self: start; color: var(--muted); border: 1px solid var(--line); padding: 5px 8px; font-size: 9px; text-transform: uppercase; }
.task-list { display: grid; gap: 3px; }
.task-item { display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task-item input { margin-top: 2px; accent-color: var(--leaf); }
.task-item span { display: grid; font-size: 12px; font-weight: 650; }
.task-item small { color: var(--muted); margin-top: 4px; font-weight: 400; }
.task-item em { color: var(--coral); font-size: 9px; font-style: normal; text-transform: uppercase; }
.methodology-note { background: #e8f0e7; padding: 22px; border-top-color: var(--leaf); }
.methodology-note p { font-size: 12px; }

.scenario-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(350px, .7fr); gap: 34px; align-items: start; }
.scenario-editor { background: white; border: 1px solid var(--line); }
.scenario-columns { display: grid; grid-template-columns: 1fr 48px 1fr; }
.scenario-column { padding: 28px; }
.scenario-column.baseline { background: #f0f1ec; }
.scenario-column.project-column { background: #f1f6ee; }
.scenario-arrow { display: grid; place-items: center; font-size: 22px; color: var(--cyan); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.column-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 28px; }
.column-head > span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--forest); border-radius: 50%; font-size: 9px; }
.column-head small { color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.column-head h2 { margin: 2px 0 0; font-size: 18px; }
.field-label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 17px; }
.field-label select { width: 100%; min-height: 42px; border: 1px solid #ced7cf; color: var(--ink); background: white; padding: 0 34px 0 12px; border-radius: 0; text-transform: none; letter-spacing: 0; font-size: 12px; }
.factor-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 11px; }
.factor-row em { font-size: 8px; color: var(--coral); font-style: normal; }
.parameter-band { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding: 23px 28px; border-top: 1px solid var(--line); background: #fbfcf9; }
.parameter-band label { font-size: 10px; color: var(--muted); display: grid; gap: 10px; }
.parameter-band label span { color: var(--ink); font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--leaf); }
.result-lab { color: white; background: var(--forest); padding: 28px; position: sticky; top: 125px; }
.result-head { display: flex; justify-content: space-between; gap: 15px; align-items: start; }
.result-head h2 { margin: 0; }
.run-id { font-family: Consolas, monospace; color: rgba(255,255,255,.65); font-size: 9px; padding-top: 4px; }
.result-primary { padding: 32px 0 16px; border-bottom: 1px solid rgba(255,255,255,.15); }
.result-primary span { display: block; color: rgba(255,255,255,.65); font-size: 11px; }
.result-primary strong { font-size: clamp(3.2rem, 5vw, 5rem); display: block; line-height: .95; margin-top: 9px; font-weight: 520; }
.result-primary small { color: var(--lime); }
#forecastChart { width: 100%; height: 150px; margin: 18px 0 8px; }
.result-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.15); border-bottom: 1px solid rgba(255,255,255,.15); }
.result-breakdown > div { display: grid; gap: 4px; }
.result-breakdown span { color: rgba(255,255,255,.58); font-size: 9px; text-transform: uppercase; }
.result-breakdown strong { font-size: 13px; }
.result-lab details { padding: 16px 0; font-size: 11px; }
.result-lab summary { cursor: pointer; color: var(--lime); }
.result-lab code { display: block; white-space: normal; line-height: 1.5; background: rgba(255,255,255,.07); padding: 12px; margin-top: 10px; }
.result-lab details p { color: rgba(255,255,255,.64); font-size: 10px; margin: 8px 0 0; }
.result-warning { padding: 14px; border-left: 3px solid var(--coral); background: rgba(228,110,82,.13); }
.result-warning strong { font-size: 11px; }
.result-warning p { color: rgba(255,255,255,.7); font-size: 10px; margin: 3px 0 0; line-height: 1.45; }

.monitoring-summary { display: grid; grid-template-columns: 150px 1fr auto; gap: 32px; align-items: center; padding: 28px 34px; color: white; background: var(--forest); margin-bottom: 38px; }
.quality-dial { --size: 104px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--lime) calc(var(--value) * 1%), rgba(255,255,255,.12) 0); position: relative; }
.quality-dial::before { content: ""; position: absolute; inset: 8px; background: var(--forest); border-radius: 50%; }
.quality-dial > div { position: relative; display: grid; text-align: center; }
.quality-dial strong { font-size: 24px; }
.quality-dial span { color: rgba(255,255,255,.64); font-size: 9px; }
.quality-copy h2 { margin-bottom: 7px; }
.quality-copy p { color: rgba(255,255,255,.68); font-size: 12px; max-width: 680px; margin: 0; }
.quality-actions { display: flex; gap: 24px; }
.quality-actions > div { display: grid; text-align: center; }
.quality-actions span { color: rgba(255,255,255,.58); font-size: 9px; }
.quality-actions strong { font-size: 22px; }
.monitoring-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .55fr); gap: 54px; }
.stream-month { display: flex; gap: 18px; align-items: center; margin: 22px 0; color: var(--muted); font-size: 9px; letter-spacing: .13em; }
.stream-month i { height: 1px; background: var(--line); flex: 1; }
.monitor-event { display: grid; grid-template-columns: 58px 42px 1fr auto; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.event-date { display: grid; text-align: center; }
.event-date strong { font-size: 22px; }
.event-date span { color: var(--muted); font-size: 9px; }
.event-symbol { width: 38px; height: 38px; display: grid; place-items: center; color: white; font-weight: 800; background: var(--cyan); }
.event-symbol.satellite { background: var(--sky); }
.event-symbol.document { background: var(--forest); }
.event-symbol.sampling { background: var(--coral); }
.event-type { color: var(--cyan); font-size: 8px; font-weight: 750; letter-spacing: .12em; }
.event-body h3 { margin: 3px 0 4px; }
.event-body p { margin: 0; font-size: 11px; }
.evidence-state { align-self: center; font-size: 9px; padding: 5px 8px; background: #e1f0e6; color: #39794c; }
.evidence-state.pending { background: #f4eadf; color: #966836; }
.monitor-event.future { opacity: .7; }
.source-list { display: grid; }
.source-list > div { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.source-list span { display: grid; font-size: 11px; font-weight: 650; }
.source-list small { color: var(--muted); font-weight: 400; margin-top: 2px; }
.source-list strong { font-size: 11px; }
.source-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--leaf); }
.source-dot.blue { background: var(--sky); }
.source-dot.cyan { background: var(--cyan); }
.source-dot.coral { background: var(--coral); }
.check-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; font-size: 11px; }
.check-list li::before { content: "○"; color: var(--coral); margin-right: 8px; }
.check-list li.done::before { content: "✓"; color: var(--leaf); }

.document-layout { display: grid; grid-template-columns: 245px minmax(500px, 1fr) 250px; background: white; border: 1px solid var(--line); min-height: 700px; }
.document-tree { border-right: 1px solid var(--line); padding: 20px 0; background: #f1f3ed; }
.tree-head { display: flex; justify-content: space-between; padding: 0 18px 17px; font-size: 12px; }
.tree-head span { color: var(--muted); font-size: 10px; }
.tree-item { width: 100%; border: 0; border-left: 3px solid transparent; padding: 13px 16px; background: transparent; display: grid; grid-template-columns: 32px 1fr; gap: 10px; text-align: left; color: var(--ink); }
.tree-item > span { width: 30px; height: 34px; display: grid; place-items: center; background: white; border: 1px solid var(--line); font-size: 8px; font-weight: 800; }
.tree-item > div { display: grid; gap: 3px; }
.tree-item strong { font-size: 11px; }
.tree-item small { color: var(--muted); font-size: 9px; }
.tree-item.active { background: white; border-left-color: var(--leaf); }
.document-preview { min-width: 0; background: #e7e9e4; }
.doc-toolbar { min-height: 68px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: white; border-bottom: 1px solid var(--line); }
.doc-toolbar > div { display: flex; align-items: center; gap: 10px; }
.doc-toolbar > div:first-child { display: grid; gap: 3px; }
.doc-toolbar strong { font-size: 12px; }
.doc-toolbar span { color: var(--muted); font-size: 9px; }
.paper { width: min(660px, calc(100% - 50px)); min-height: 780px; margin: 28px auto; padding: 48px 56px; position: relative; background: white; box-shadow: 0 5px 22px rgba(26,49,43,.12); overflow: hidden; }
.paper-demo { position: absolute; top: 48%; left: 5%; transform: rotate(-28deg); font-size: 58px; font-weight: 900; color: rgba(228,110,82,.07); white-space: nowrap; }
.paper-kicker { color: var(--cyan); font-size: 9px; letter-spacing: .12em; }
.paper h2 { font-size: 28px; margin-top: 8px; }
.paper .lead { border-bottom: 1px solid var(--line); padding-bottom: 20px; font-size: 12px; }
.paper-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0 30px; }
.paper-meta > div { display: grid; gap: 4px; }
.paper-meta span { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.paper-meta strong { font-size: 11px; }
.paper h3 { margin-top: 25px; font-size: 13px; }
.paper p { font-family: Georgia, serif; color: #4e5c57; font-size: 11px; line-height: 1.7; }
.paper mark { background: #fff1c9; }
.source-callout { border-left: 3px solid var(--cyan); padding: 10px 12px; background: #edf5f3; display: grid; gap: 3px; }
.source-callout strong { font-size: 9px; text-transform: uppercase; }
.source-callout span { color: var(--muted); font-size: 9px; }
.document-status { border-left: 1px solid var(--line); padding: 22px; }
.document-status section { margin-bottom: 30px; }
.doc-score strong { font-size: 30px; }
.count { min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #e8ede8; font-size: 9px; }
.coral-count { color: white; background: var(--coral); }
.issue-list { list-style: none; padding: 0; margin: 0; }
.issue-list li { display: grid; grid-template-columns: 8px 1fr; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.issue-list i { width: 7px; height: 7px; margin-top: 3px; background: var(--coral); border-radius: 50%; }
.issue-list span { display: grid; font-size: 10px; font-weight: 650; }
.issue-list small { color: var(--muted); margin-top: 2px; font-weight: 400; }
.approval-list { display: grid; }
.approval-list > div { display: grid; grid-template-columns: 25px 1fr; gap: 10px; min-height: 52px; position: relative; }
.approval-list > div::after { content: ""; position: absolute; left: 11px; top: 25px; bottom: -4px; width: 1px; background: var(--line); }
.approval-list > div:last-child::after { display: none; }
.approval-list i { width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 8px; font-style: normal; background: white; z-index: 1; }
.approval-list span { display: grid; font-size: 10px; font-weight: 650; }
.approval-list small { color: var(--muted); font-weight: 400; margin-top: 2px; }
.approval-list .complete i { background: var(--forest); color: white; }
.approval-list .current i { background: var(--leaf); color: white; }

.farmer-view { position: relative; background: #164337; }
.farmer-backdrop { position: absolute; inset: 0 0 auto 0; height: 440px; background: linear-gradient(90deg, rgba(12,53,43,.88), rgba(12,53,43,.48)), url("assets/afic-agri-atlas.png") center 48%/cover; }
.farmer-shell { max-width: 1260px; margin: 0 auto; padding: 58px 48px 80px; position: relative; z-index: 1; }
.farmer-intro { display: flex; justify-content: space-between; gap: 30px; color: white; min-height: 220px; }
.farmer-intro p { color: rgba(255,255,255,.78); }
.weather { display: grid; align-self: start; text-align: right; }
.weather strong { font-size: 40px; font-weight: 400; }
.weather span { font-size: 11px; color: rgba(255,255,255,.7); }
.farmer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.farmer-grid > section { background: #f7f8f2; padding: 24px; }
.farmer-focus { grid-column: span 2; display: grid; grid-template-columns: 80px 1fr; gap: 24px; align-items: center; border-top: 4px solid var(--coral); }
.focus-date { display: grid; text-align: center; border-right: 1px solid var(--line); padding-right: 20px; }
.focus-date span, .focus-date small { color: var(--coral); font-size: 9px; font-weight: 800; }
.focus-date strong { font-size: 42px; font-weight: 500; }
.farmer-focus h2 { font-size: 24px; }
.farmer-focus p { margin-bottom: 18px; font-size: 12px; }
.farmer-stat { display: flex; flex-direction: column; justify-content: center; min-height: 140px; }
.farmer-stat span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.farmer-stat strong { font-size: 26px; margin: 8px 0 4px; }
.farmer-stat.result { color: white; background: var(--forest); }
.farmer-stat.result span, .farmer-stat.result small { color: rgba(255,255,255,.65); }
.parcel-live { grid-column: span 2; }
.sync-state { color: var(--leaf); font-size: 9px; }
.parcel-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.parcel-strip button { border: 1px solid var(--line); background: white; padding: 8px; text-align: left; display: grid; color: var(--ink); }
.parcel-strip button.active { border-color: var(--leaf); box-shadow: inset 0 -3px var(--leaf); }
.parcel-thumb { height: 84px; margin-bottom: 9px; background: url("assets/afic-agri-atlas.png") center/cover; }
.parcel-thumb.p2 { background-position: 65% 30%; }
.parcel-thumb.p3 { background-position: 30% 65%; }
.parcel-strip strong { font-size: 11px; }
.parcel-strip small { color: var(--muted); margin-top: 3px; }
.season-track { grid-column: 1 / -1; }
.season-line { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 24px; }
.season-line > div { position: relative; display: grid; gap: 4px; padding-top: 18px; }
.season-line > div::before { content: ""; height: 2px; background: var(--line); position: absolute; top: 4px; left: 0; right: 0; }
.season-line i { position: absolute; width: 10px; height: 10px; border: 2px solid var(--paper); background: #bdc7c0; border-radius: 50%; top: 0; z-index: 1; box-shadow: 0 0 0 1px #bdc7c0; }
.season-line .done::before { background: var(--leaf); }
.season-line .done i { background: var(--leaf); box-shadow: 0 0 0 1px var(--leaf); }
.season-line .current i { width: 13px; height: 13px; top: -2px; background: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.season-line strong { font-size: 10px; }
.season-line small { color: var(--muted); }

.review-shell { max-width: 1540px; }
.review-access { display: grid; text-align: right; padding: 12px 17px; border-left: 3px solid var(--coral); background: white; box-shadow: var(--shadow); }
.review-access span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.review-access strong { font-size: 13px; }
.review-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) 370px; gap: 0; border: 1px solid var(--line); background: white; }
.review-document { min-width: 0; background: #e7e9e4; }
.review-doc-head { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 24px; background: white; border-bottom: 1px solid var(--line); }
.review-doc-head > div { display: grid; gap: 4px; }
.review-doc-head span { color: var(--muted); font-size: 9px; }
.review-doc-head strong { font-size: 12px; }
.review-paper { width: min(680px, calc(100% - 60px)); min-height: 650px; margin: 30px auto; padding: 50px 58px; background: white; box-shadow: 0 5px 22px rgba(26,49,43,.12); position: relative; }
.review-paper p { font-family: Georgia, serif; font-size: 12px; }
.review-paper table { width: 100%; border-collapse: collapse; font-size: 10px; margin-top: 30px; }
.review-paper th, .review-paper td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.review-paper .highlight { background: #fff0ec; }
.review-anchor { margin-top: 22px; padding: 10px; border-left: 3px solid var(--coral); color: var(--coral); background: #fff5f2; font-size: 10px; font-weight: 700; }
.findings { padding: 24px; border-left: 1px solid var(--line); }
.finding { padding: 15px; margin-bottom: 10px; border-left: 3px solid var(--coral); background: #f8f8f4; }
.finding > div { display: grid; gap: 4px; }
.finding span { color: var(--coral); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.finding strong { font-size: 12px; }
.finding p { font-size: 10px; margin: 9px 0; line-height: 1.5; }
.finding small { color: var(--muted); }
.finding.answered { border-left-color: var(--sky); }
.finding.answered span { color: var(--sky); }
.finding.closed { border-left-color: var(--leaf); opacity: .75; }
.finding.closed span { color: var(--leaf); }
.reproduction { margin-top: 30px; padding-top: 20px; border-top: 2px solid var(--forest); }
.reproduction > div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.reproduction .match { color: #39794c; background: #e8f3e9; padding: 10px; font-size: 10px; margin-top: 12px; }

footer { min-height: 64px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #0d3028; color: rgba(255,255,255,.65); font-size: 10px; }
footer strong { color: white; }
footer button { border: 0; background: none; color: var(--lime); padding: 0; font-size: inherit; }
.modal-backdrop { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(7,30,25,.68); backdrop-filter: blur(6px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: white; padding: 32px; position: relative; box-shadow: var(--shadow); }
.modal-close { position: absolute; right: 12px; top: 10px; border: 0; background: none; color: var(--muted); font-size: 24px; }
.modal h2 { padding-right: 30px; }
.modal-form { display: grid; gap: 15px; margin-top: 22px; }
.modal-form label { display: grid; gap: 6px; font-size: 10px; color: var(--muted); text-transform: uppercase; }
.modal-form input, .modal-form select, .modal-form textarea { width: 100%; min-height: 42px; border: 1px solid var(--line); padding: 10px 12px; color: var(--ink); background: white; }
.modal-form textarea { min-height: 92px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.demo-notice { padding: 13px; border-left: 3px solid var(--coral); background: #fff2ed; font-size: 11px; color: #914a38; }
.toast { position: fixed; z-index: 300; right: 24px; bottom: 24px; max-width: 360px; padding: 14px 18px; color: white; background: var(--forest); box-shadow: var(--shadow); font-size: 12px; transform: translateY(30px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: none; opacity: 1; }

@media (max-width: 1120px) {
  .app-header { grid-template-columns: 220px 1fr auto; padding: 0 20px; }
  .main-nav a { padding: 0 8px; font-size: 11px; }
  .profile-button > span:last-child { display: none; }
  .page-shell, .content-band, .atlas-head, .farmer-shell { padding-left: 28px; padding-right: 28px; }
  .atlas-summary { width: calc(100% - 56px); }
  .scenario-layout { grid-template-columns: 1fr; }
  .result-lab { position: relative; top: auto; }
  .parameter-band { grid-template-columns: repeat(3, 1fr); }
  .document-layout { grid-template-columns: 210px minmax(460px, 1fr); }
  .document-status { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (max-width: 820px) {
  .demo-rail span { display: none; }
  .app-header { height: 62px; top: 28px; grid-template-columns: 1fr auto; }
  .main-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; height: auto; padding: 10px; flex-direction: column; background: white; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { min-height: 42px; padding: 0 14px; }
  .main-nav a::after { display: none; }
  .header-actions .icon-button, .profile-button { display: none; }
  .language-picker { display: inline-flex; }
  .mobile-menu { display: block; }
  .page-shell, .content-band, .atlas-head, .farmer-shell { padding-left: 18px; padding-right: 18px; }
  .page-shell { padding-top: 34px; }
  .page-intro.split, .atlas-head, .farmer-intro { flex-direction: column; align-items: flex-start; }
  .page-intro.split > div { width: 100%; max-width: 100%; }
  .page-intro .primary-button { max-width: 100%; height: auto; min-height: 42px; padding-top: 9px; padding-bottom: 9px; white-space: normal; text-align: center; }
  h1 { font-size: 2.35rem; }
  .atlas-hero { min-height: 710px; }
  .atlas-head { padding-top: 38px; }
  .atlas-tools { width: 100%; }
  .atlas-summary { width: calc(100% - 36px); grid-template-columns: 1fr 1fr; }
  .atlas-summary article { padding: 15px; min-height: 105px; }
  .atlas-summary strong { font-size: 21px; }
  .map-pin b { display: none; }
  .pin-1 { left: 24%; top: 40%; }
  .pin-2 { left: 58%; top: 38%; }
  .pin-3 { left: 72%; top: 53%; }
  .project-list { grid-template-columns: 1fr; }
  .project-item, .project-item + .project-item { margin: 0; padding: 20px 0; border-left: 0; }
  .project-ribbon { grid-template-columns: repeat(3, 1fr); }
  .metrics-strip { grid-template-columns: 1fr 1fr; }
  .workspace-grid, .monitoring-layout, .review-layout { grid-template-columns: 1fr; }
  .scenario-columns { grid-template-columns: 1fr; }
  .scenario-arrow { min-height: 44px; transform: rotate(90deg); }
  .parameter-band { grid-template-columns: 1fr 1fr; }
  .monitoring-summary { grid-template-columns: 90px 1fr; padding: 22px; }
  .quality-dial { --size: 80px; }
  .quality-actions { grid-column: 1 / -1; justify-content: space-around; border-top: 1px solid rgba(255,255,255,.13); padding-top: 16px; }
  .document-layout { grid-template-columns: 1fr; }
  .document-tree { border-right: 0; border-bottom: 1px solid var(--line); }
  .document-status { grid-template-columns: 1fr; }
  .document-preview { min-width: 0; }
  .paper { padding: 36px 25px; width: calc(100% - 20px); }
  .paper-meta { grid-template-columns: 1fr; }
  .farmer-intro { min-height: 250px; }
  .weather { text-align: left; }
  .farmer-grid { grid-template-columns: 1fr 1fr; }
  .farmer-focus, .parcel-live, .season-track { grid-column: 1 / -1; }
  .farmer-stat.result { grid-column: 1 / -1; }
  .parcel-strip { grid-template-columns: 1fr; }
  .season-line { grid-template-columns: 1fr; gap: 12px; }
  .season-line > div { padding: 0 0 0 22px; }
  .season-line > div::before { width: 2px; height: auto; top: 0; bottom: -12px; left: 4px; right: auto; }
  .season-line i { left: 0; }
  .findings { border-left: 0; border-top: 1px solid var(--line); }
  footer { align-items: flex-start; flex-direction: column; padding: 20px; }
}

@media (max-width: 520px) {
  .brand small { display: none; }
  .atlas-summary { grid-template-columns: 1fr 1fr; }
  .atlas-summary article:nth-child(2) strong { font-size: 17px; }
  .project-ribbon { grid-template-columns: 1fr 1fr; }
  .metrics-strip { grid-template-columns: 1fr; }
  .parameter-band { grid-template-columns: 1fr; }
  .monitor-event { grid-template-columns: 45px 32px 1fr; gap: 10px; }
  .event-symbol { width: 30px; height: 30px; }
  .evidence-state { grid-column: 3; justify-self: start; }
  .farmer-grid { grid-template-columns: 1fr; }
  .farmer-focus { grid-template-columns: 1fr; }
  .focus-date { grid-template-columns: auto auto auto; align-items: baseline; justify-content: start; gap: 8px; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
  .focus-date strong { font-size: 24px; }
  .farmer-stat { grid-column: 1 / -1; }
  .review-paper { width: calc(100% - 18px); padding: 32px 20px; }
  .review-paper table { font-size: 8px; }
}

@media print {
  .demo-rail, .app-header, footer, .doc-toolbar, .document-tree, .document-status { display: none !important; }
  .view { display: none !important; }
  .view[data-view="documents"] { display: block !important; }
  .page-intro { display: none; }
  .page-shell { padding: 0; }
  .document-layout { display: block; border: 0; }
  .document-preview { background: white; }
  .paper { margin: 0; width: 100%; box-shadow: none; }
}
