:root {
  --ink: #192c29;
  --muted: #516763;
  --line: #d9e4dd;
  --canvas: #f4f7f2;
  --accent: #157858;
  --forest: #102c28;
}
body { background: var(--canvas); color: var(--ink); font-family: system-ui, sans-serif; line-height: 1.6; }
a { color: #09694d; text-underline-offset: .18em; }
a:hover { color: #064c39; }
a:focus-visible, button:focus-visible { outline: 3px solid #38a979; outline-offset: 3px; }
h1,h2,legend { color: var(--ink); letter-spacing: -.035em; }
h2 { font-size: 1.25rem; font-weight: 720; }
h1 { font-size: clamp(2rem, 5vw, 3.05rem); font-weight: 760; }
.btn { font-weight: 650; border-radius: .6rem; }
.btn-primary { --bs-btn-bg: #157858; --bs-btn-border-color: #157858; --bs-btn-hover-bg: #0d5941; --bs-btn-hover-border-color: #0d5941; --bs-btn-active-bg: #0d5941; --bs-btn-active-border-color: #0d5941; }
.btn-outline-primary { --bs-btn-color: #0d664b; --bs-btn-border-color: #94b6a7; --bs-btn-hover-bg: #0d664b; --bs-btn-hover-border-color: #0d664b; --bs-btn-active-bg: #0d664b; --bs-btn-active-border-color: #0d664b; }
.btn-light { --bs-btn-bg: #edf4ee; --bs-btn-border-color: #edf4ee; }
.topbar { background: white; border-bottom: 1px solid var(--line); }
.top-inner { padding: .9rem clamp(1rem, 5vw, 3.5rem); max-width: 1600px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { color: var(--ink); font-size: 1.25rem; font-weight: 780; letter-spacing: -.045em; display: flex; align-items: center; gap: .6rem; text-decoration: none; white-space: nowrap; }
.brand-icon { width: 2rem; height: 2rem; display: grid; place-items: center; background: #176f55; color: #fff; border-radius: .65rem; font-family: Georgia, serif; }
.public-main { max-width: 1300px; margin: auto; padding: clamp(1rem, 4vw, 3rem); }
.hero { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: clamp(1.5rem, 3vw, 3rem); color: #edf9f0; background: radial-gradient(ellipse at right,#205345,var(--forest) 66%); border-radius: 1.5rem; padding: clamp(1.5rem, 6vw, 5rem); overflow: hidden; }
.hero h1 { color: #fffef8; font-family: Georgia, serif; font-weight: normal; font-size: clamp(3rem, 7vw, 6.2rem); line-height: .99; margin-bottom: 1.25rem; letter-spacing: -.065em; }
.hero-copy { color: #d2e6dd; max-width: 28rem; font-size: 1.12rem; }
.eyebrow { font-size: .7rem; letter-spacing: .14em; font-weight: 800; }
.hero .eyebrow { color: #aee4bf; }
.hero-art { padding: .75rem .4rem; }
.preview-sheet { position: relative; color: var(--ink); padding: clamp(1rem, 3vw, 2rem); background: #fffdf5; border: 1px solid #eef2de; border-radius: .8rem; transform: rotate(-4deg); box-shadow: 9px 10px 0 #6aa990, 0 24px 45px #111f1b88; }
.preview-sheet .eyebrow { color: #246b50; }
.preview-sheet h2 { font-family: Georgia, serif; font-size: clamp(1.3rem, 3vw, 2.2rem); }
.preview-meta { display: flex; flex-wrap: wrap; gap: .8rem; color: var(--muted); font-size: .8rem; }
.preview-tag { display: inline-block; margin-top: 1.25rem; padding: .28rem .55rem; border-radius: .4rem; background: #e6f2e7; color: #115640; font-size: .75rem; font-weight: 700; }
.workspace { max-width: 1600px; margin: auto; display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: calc(100vh - 62px); }
.sidebar { background: #eaf1eb; padding: 2rem 1rem; border-right: 1px solid var(--line); }
.side-label { display: block; padding: 0 .7rem .65rem; color: var(--muted); font-size: .72rem; font-weight: 770; letter-spacing: .12em; }
.sidebar nav { display: grid; gap: .25rem; }
.sidebar a { padding: .56rem .7rem; border-radius: .5rem; color: var(--muted); font-weight: 650; text-decoration: none; }
.sidebar a:hover,.sidebar a.active { color: #0e654a; background: #d5eadd; }
.side-account { border-top: 1px solid var(--line); margin: 1.3rem .7rem 0; padding-top: 1rem; overflow-wrap: anywhere; }
.side-account span,.table small,.paper-items small { display:block; color: var(--muted); }
.workspace-main { padding: clamp(1rem, 4vw, 3.3rem); min-width: 0; }
.page-heading { margin-bottom: 1.45rem; }
.page-heading p,.panel p.help,.help,.empty { color: var(--muted); margin-bottom: .6rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: .9rem; padding: clamp(1rem, 2.4vw, 1.65rem); margin: 1rem 0; min-width: 0; overflow-wrap: anywhere; }
.panel p:last-child { margin-bottom: 0; }
.auth { max-width: 460px; margin-inline: auto; }
.form-panel { max-width: 920px; }
.feature-grid,.field-grid,.split-grid { display: grid; gap: 1rem; }
.feature-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.feature-grid .panel { margin-bottom: 0; }
.field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 1.15rem; row-gap: 0; }
.split-grid { grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); align-items: start; }
.field { display: grid; gap: .33rem; margin-bottom: 1rem; }
.field[hidden] { display: none; }
.field span { font-weight: 670; font-size: .9rem; }
.form-control,.form-select { border-color: #bdcec3; border-radius: .55rem; }
.form-control:focus,.form-select:focus,.form-check-input:focus { border-color: #37926e; box-shadow: 0 0 0 .22rem #cfeadb; }
.form-check-input:checked { background-color: #157858; border-color: #157858; }
.actions,.action-panel { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.action-panel { justify-content: space-between; }
.metric strong { display: block; font-size: clamp(1.25rem, 3vw, 2.1rem); line-height: 1.3; }
.metric span { color: var(--muted); }
.table { --bs-table-color: var(--ink); --bs-table-border-color: var(--line); margin-bottom: 0; }
.table th { white-space: nowrap; }
.paper-items li,.mark-item { border-bottom: 1px solid var(--line); margin-bottom: .8rem; padding-bottom: .8rem; }
.paper-items details { margin-top: .4rem; }
.mark-item legend { font-size: 1rem; font-weight: 750; }
.roster { max-height: 16rem; overflow: auto; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.paper-shell { max-width: 860px; margin: auto; padding: 1.5rem; }
.print-sheet { background: white; margin-top: 1rem; padding: clamp(1rem, 5vw, 3rem); border: 1px solid var(--line); }
.print-question { margin-top: 1.25rem; break-inside: avoid; }
.print-question h2 { display: flex; justify-content: space-between; }
.writing-lines { height: 1.8rem; border-bottom: 1px solid #bfc9c3; }
@media (max-width: 820px) {
  .workspace { grid-template-columns: minmax(0,1fr); }
  .sidebar { padding: .5rem 1rem; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .side-label,.side-account { display: none; }
}
@media (max-width: 590px) {
  .hero,.feature-grid,.field-grid,.split-grid { grid-template-columns: minmax(0,1fr); }
  .feature-grid { gap: .35rem; }
  .hero-art { margin: .4rem 1rem; }
  .top-inner { gap: .35rem; }
  .brand { font-size: 1.12rem; }
}
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; color: #000; }
  .topbar,.sidebar,.no-print,.alert,.visually-hidden-focusable { display: none !important; }
  .workspace,.workspace-main,.paper-shell,.print-sheet { display: block; width: auto; max-width: none; border: 0; padding: 0; margin: 0; }
  .panel { border: 0; padding: 0; margin-bottom: 12pt; }
  .split-grid { display: block; }
  .table-responsive { overflow: visible; }
  h1,h2 { color: #000; }
  h2 { break-after: avoid; }
  tr { break-inside: avoid; }
}
.ai-review { background: #edf5ef; border-left: 3px solid var(--accent); padding: .65rem .8rem; margin: .55rem 0 1rem; }
.summary-section { margin: 1.15rem 0; }
.summary-section h2 { break-after: avoid; }
