@font-face {
  font-family: "SchoolFolder Display";
  src: url("../fonts/fraunces-variable.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

@font-face {
  font-family: "SchoolFolder Sans";
  src: url("../fonts/public-sans-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "SchoolFolder Mono";
  src: url("../fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #101712;
  --paper: #fcfcf4;
  --green: #1d6b4f;
  --green-dark: #164c3a;
  --wattle: #f4c430;
  --blue: #2357c6;
  --red: #d74737;
  --pale-green: #e4f1e7;
  --pale-blue: #e4ebfa;
  --warm: #f4f0df;
  --grey: #6b716c;
  --line: #101712;
  --soft-line: #c8cbbd;
  --display: "SchoolFolder Display", Georgia, "Times New Roman", serif;
  --sans: "SchoolFolder Sans", Arial, Helvetica, sans-serif;
  --mono: "SchoolFolder Mono", "Courier New", monospace;
  --page: min(1440px, calc(100vw - 40px));
  --small-page: min(980px, calc(100vw - 40px));
  --shadow: 5px 5px 0 var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.app-body { background: #f0f1e9; }

img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--wattle);
  outline-offset: 3px;
}

::selection { color: var(--paper); background: var(--blue); }

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-140%);
}
.skip-link:focus { transform: translateY(0); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.container { width: var(--page); margin-inline: auto; }
.container--small { width: var(--small-page); margin-inline: auto; }
.mono, .eyebrow, .kicker, .meta, .stamp, time, .index-no, .record-type, .field-help code {
  font-family: var(--mono);
  letter-spacing: .03em;
}
.eyebrow, .kicker {
  margin: 0 0 12px;
  font-size: .74rem;
  line-height: 1.3;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.kicker::before { content: "// "; color: var(--red); }

h1, h2, h3, h4, p { overflow-wrap: anywhere; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.035em;
}
h1 { font-size: clamp(3.3rem, 8vw, 8.5rem); }
h2 { font-size: clamp(2.55rem, 5.2vw, 5.8rem); }
h3 { font-size: clamp(1.45rem, 2.5vw, 2.35rem); line-height: 1.05; }
p { margin: 0 0 1em; }
.lede { max-width: 760px; font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.35; }
.quiet { color: var(--grey); }
.danger-text { color: #a42f24; }

.button, button.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  color: var(--paper);
  background: var(--ink);
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { box-shadow: 3px 3px 0 var(--wattle); transform: translate(-1px, -1px); }
.button--paper { color: var(--ink); background: var(--paper); }
.button--yellow { color: var(--ink); background: var(--wattle); }
.button--green { background: var(--green); }
.button--blue { background: var(--blue); }
.button--danger { background: var(--red); }
.button--ghost { color: var(--ink); background: transparent; }
.button--small { min-height: 36px; padding: 7px 11px; font-size: .88rem; }
.button[disabled], .button.is-disabled { opacity: .52; cursor: not-allowed; box-shadow: none; transform: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Public masthead */
.site-header {
  position: relative;
  z-index: 50;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: stretch;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-right: 22px;
  border-right: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand-mark {
  position: relative;
  width: 26px; height: 31px;
  border: 2px solid currentColor;
  background: var(--wattle);
}
.brand-mark::after {
  content: "";
  position: absolute;
  width: 10px; height: 5px;
  top: -7px; left: 2px;
  border: 2px solid currentColor;
  border-bottom: 0;
  background: var(--wattle);
}
.site-nav { display: flex; justify-content: center; align-items: stretch; }
.site-nav a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  border-right: 1px solid var(--soft-line);
  font-size: .85rem;
  font-weight: 720;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--pale-green); }
.site-actions { display: flex; align-items: center; gap: 8px; padding-left: 16px; }
.nav-toggle { display: none; }

.masthead-note {
  border-bottom: 1px solid var(--ink);
  background: var(--wattle);
}
.masthead-note .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 7px;
  font: 700 .72rem/1.2 var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Homepage */
.hero {
  position: relative;
  min-height: min(840px, calc(100vh - 98px));
  display: grid;
  align-items: stretch;
  color: var(--paper);
  background: var(--green-dark) url("../images/schoolfolder-workspace.jpg") center / cover no-repeat;
  border-bottom: 4px solid var(--ink);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(4, 21, 14, .88) 0%, rgba(4, 21, 14, .62) 48%, rgba(4, 21, 14, .05) 76%);
}
.hero__inner {
  width: var(--page);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, .45fr);
  grid-template-rows: auto 1fr auto;
  gap: 20px;
  padding: 34px 0 26px;
}
.hero__meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(252,252,244,.65);
  font: 700 .72rem/1.2 var(--mono);
  text-transform: uppercase;
}
.hero__copy { align-self: center; max-width: 1020px; }
.hero h1 { max-width: 1050px; text-wrap: balance; text-shadow: 0 2px 15px rgba(0,0,0,.22); }
.hero .lede { max-width: 720px; margin: 30px 0 26px; color: #fff; }
.hero .button--paper:hover { box-shadow: 4px 4px 0 var(--wattle); }
.hero__annotation {
  align-self: end;
  justify-self: end;
  width: min(310px, 100%);
  padding: 18px;
  border: 1px solid rgba(252,252,244,.8);
  background: rgba(16,23,18,.74);
  transform: rotate(-1deg);
}
.hero__annotation strong { display: block; margin-bottom: 8px; color: var(--wattle); font: 700 .75rem var(--mono); text-transform: uppercase; }
.hero__foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(252,252,244,.65);
  font: .72rem var(--mono);
}
.stamp {
  display: inline-block;
  padding: 7px 10px 5px;
  border: 2px solid currentColor;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

.index-band {
  color: var(--paper);
  background: var(--ink);
  border-bottom: 3px solid var(--ink);
}
.index-band__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.index-step {
  min-height: 220px;
  padding: 24px;
  border-right: 1px solid #667068;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.index-step:last-child { border-right: 0; }
.index-step:nth-child(2) { color: var(--ink); background: var(--wattle); }
.index-step:nth-child(3) { background: var(--blue); }
.index-step:nth-child(4) { background: var(--green); }
.index-no { font-size: .75rem; }
.index-step h3 { max-width: 190px; }
.index-step p { margin: 12px 0 0; max-width: 230px; font-size: .9rem; }

.section { padding: clamp(76px, 10vw, 150px) 0; border-bottom: 2px solid var(--ink); }
.section--compact { padding-block: 70px; }
.section-head {
  display: grid;
  grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  margin-bottom: clamp(50px, 8vw, 100px);
}
.section-head h2 { max-width: 1050px; }
.section-head .lede { margin-top: 24px; }
.rule-label { padding-top: 10px; border-top: 3px solid var(--ink); }

.scatter-list { border-top: 3px solid var(--ink); }
.scatter-row {
  display: grid;
  grid-template-columns: 80px 1fr minmax(180px, .5fr);
  gap: 24px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--ink);
}
.scatter-row:nth-child(even) .scatter-source { transform: translateX(5vw); }
.scatter-source { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 4.4rem); font-weight: 650; line-height: 1; }
.scatter-row p { margin: 0; }

.feature-ledger { display: grid; gap: 0; border-top: 3px solid var(--ink); }
.feature-entry {
  display: grid;
  grid-template-columns: 92px minmax(210px, .7fr) minmax(280px, 1.3fr);
  min-height: 230px;
  border-bottom: 1px solid var(--ink);
}
.feature-entry > * { padding: 28px 24px; border-right: 1px solid var(--ink); }
.feature-entry > *:last-child { border-right: 0; }
.feature-entry:nth-child(2) { background: var(--pale-blue); }
.feature-entry:nth-child(3) { background: var(--pale-green); }
.feature-entry:nth-child(4) { color: var(--paper); background: var(--green); }
.feature-entry__detail { display: flex; flex-direction: column; justify-content: space-between; }
.feature-entry ul { columns: 2; margin: 0; padding-left: 18px; }
.feature-entry li { margin-bottom: 9px; break-inside: avoid; }

.workflow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}
.workflow::before {
  content: "";
  position: absolute;
  left: 7%; right: 7%; top: 51px;
  border-top: 2px dashed var(--ink);
}
.workflow__step { position: relative; padding: 26px; min-height: 300px; border-right: 1px solid var(--ink); background: var(--paper); }
.workflow__step:last-child { border-right: 0; }
.workflow__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 55px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--wattle);
  font: 700 .75rem var(--mono);
}
.workflow__step:nth-child(2) .workflow__dot { background: var(--pale-blue); }
.workflow__step:nth-child(3) .workflow__dot { background: var(--red); color: #fff; }
.workflow__step:nth-child(4) .workflow__dot { background: var(--green); color: #fff; }

.privacy-band { color: var(--paper); background: var(--green-dark); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 70px; align-items: start; }
.privacy-grid h2 { max-width: 900px; }
.privacy-principles { border-top: 2px solid var(--paper); }
.privacy-principle { display: grid; grid-template-columns: 48px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid rgba(252,252,244,.5); }
.privacy-principle strong { color: var(--wattle); font-family: var(--mono); }

.pricing-ledger { border: 3px solid var(--ink); }
.price-row {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(170px, .55fr) minmax(280px, 1.3fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--ink);
}
.price-row:last-child { border-bottom: 0; }
.price-row > * { padding: 24px; border-right: 1px solid var(--ink); }
.price-row > *:last-child { border-right: 0; }
.price-row--featured { background: var(--wattle); }
.price-name h3 { font-size: 1.8rem; }
.price { font-family: var(--display); font-size: 3rem; font-weight: 750; line-height: 1; }
.price small { display: block; margin-top: 7px; font: .72rem var(--mono); }
.price-features { margin: 0; padding-left: 18px; columns: 2; }
.price-action { display: flex; align-items: center; min-width: 160px; }

.faq-list { border-top: 3px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--ink); }
.faq-list summary {
  position: relative;
  list-style: none;
  display: grid;
  grid-template-columns: 70px 1fr 34px;
  gap: 18px;
  padding: 24px 0;
  cursor: pointer;
  font-family: var(--display);
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 650;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--mono); text-align: center; }
.faq-list details[open] summary::after { content: "−"; }
.faq-answer { max-width: 850px; margin-left: 88px; padding: 0 0 28px; font-size: 1.05rem; }

.final-cta { padding: clamp(80px, 12vw, 170px) 0; color: var(--paper); background: var(--blue); border-bottom: 3px solid var(--ink); }
.final-cta__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(240px, .4fr); gap: 60px; align-items: end; }
.final-cta h2 { max-width: 1000px; }
.final-cta .button-row { justify-content: flex-end; }

.site-footer { color: var(--paper); background: var(--ink); }
.site-footer__main { display: grid; grid-template-columns: minmax(230px, 1.2fr) repeat(3, minmax(130px, .5fr)); gap: 40px; padding: 65px 0; }
.site-footer h2 { font-size: 2rem; margin-bottom: 16px; }
.site-footer h3 { margin-bottom: 14px; font: 700 .76rem var(--mono); text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: inherit; }
.safety-copy { padding: 20px 0; border-top: 1px solid #667068; font-size: .78rem; color: #cbd0c8; }
.safety-copy p { margin: 0 0 6px; }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0 24px; border-top: 1px solid #667068; font: .7rem var(--mono); }

/* Interior public pages */
.page-hero { padding: 70px 0 55px; border-bottom: 3px solid var(--ink); background: var(--pale-green); }
.page-hero--blue { background: var(--pale-blue); }
.page-hero--yellow { background: var(--wattle); }
.page-hero__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .4fr); gap: 50px; align-items: end; }
.page-hero h1 { font-size: clamp(3.4rem, 7vw, 7rem); max-width: 1050px; }
.page-hero .stamp { justify-self: end; }
.prose { padding-block: 70px 110px; }
.prose h2 { margin: 2em 0 .5em; font-size: clamp(2rem, 4vw, 3.5rem); }
.prose h3 { margin: 1.8em 0 .5em; }
.prose p, .prose li { max-width: 780px; }
.prose li { margin-bottom: 8px; }
.prose .legal-meta { padding-bottom: 20px; border-bottom: 1px solid var(--ink); font: .75rem var(--mono); }
.contact-grid { display: grid; grid-template-columns: .65fr 1.35fr; gap: 60px; padding: 80px 0 110px; }
.contact-note { padding: 24px; border: 2px solid var(--ink); background: var(--wattle); transform: rotate(-1deg); }

/* Auth */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, .72fr) minmax(480px, 1.28fr); }
.auth-aside { position: relative; padding: clamp(30px, 5vw, 80px); color: var(--paper); background: var(--green-dark); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.auth-aside::after { content: "PRIVATE / PARENT-OWNED / ORGANISED"; position: absolute; right: -120px; bottom: 90px; font: 800 4.8rem/1 var(--mono); color: rgba(255,255,255,.06); transform: rotate(-90deg); }
.auth-aside .brand { width: max-content; border: 0; color: var(--paper); }
.auth-aside h1 { font-size: clamp(3rem, 5vw, 6rem); max-width: 600px; }
.auth-main { display: grid; place-items: center; padding: 50px 24px; background: var(--paper); }
.auth-panel { width: min(560px, 100%); }
.auth-panel h2 { margin-bottom: 14px; font-size: clamp(2.4rem, 5vw, 4.2rem); }
.auth-panel__head { margin-bottom: 34px; padding-bottom: 24px; border-bottom: 3px solid var(--ink); }
.auth-links { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--soft-line); }

/* Forms */
.form-stack { display: grid; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field legend { display: block; margin-bottom: 7px; font-size: .88rem; font-weight: 780; }
.field .required { color: var(--red); }
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(35,87,198,.17); outline: 0; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--red); }
.field-help { display: block; margin-top: 6px; color: var(--grey); font-size: .78rem; }
.field-error { display: block; margin-top: 6px; color: #a42f24; font-size: .8rem; font-weight: 700; }
.check-row { display: flex; align-items: flex-start; gap: 10px; }
.check-row input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green); }
fieldset.field { margin: 0; padding: 0; border: 0; }
.form-section { margin-top: 30px; padding-top: 24px; border-top: 2px solid var(--ink); }
.form-section h3 { margin-bottom: 20px; font-size: 1.55rem; }
.input-action { position: relative; }
.input-action input { padding-right: 76px !important; }
.input-action button { position: absolute; right: 6px; top: 6px; min-height: 36px; padding: 5px 9px; border: 0; background: transparent; font-size: .78rem; font-weight: 700; cursor: pointer; }
.upload-zone { padding: 25px; border: 2px dashed var(--ink); background: var(--pale-blue); text-align: center; }
.upload-preview { display: flex; gap: 12px; margin-top: 12px; align-items: center; }
.upload-preview img { width: 90px; height: 70px; object-fit: cover; border: 1px solid var(--ink); }

.alert { position: relative; margin-bottom: 20px; padding: 15px 44px 15px 16px; border: 2px solid var(--ink); border-radius: 2px; background: var(--pale-blue); box-shadow: 3px 3px 0 var(--ink); }
.alert--success { background: var(--pale-green); }
.alert--error { background: #f8ded9; }
.alert--warning { background: #fff0ae; }
.alert__close { position: absolute; right: 8px; top: 6px; border: 0; background: transparent; font-size: 1.4rem; cursor: pointer; }
.error-summary { margin-bottom: 24px; padding: 18px; border-left: 7px solid var(--red); background: #f8ded9; }
.error-summary h2 { font: 800 1rem var(--sans); margin-bottom: 8px; }
.error-summary ul { margin: 0; }

/* Logged-in workspace */
.command-bar {
  position: sticky;
  z-index: 80;
  top: 0;
  min-height: 58px;
  color: var(--paper);
  background: var(--ink);
  border-bottom: 3px solid var(--wattle);
}
.command-bar__inner { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; min-height: 58px; }
.command-bar .brand { margin-right: 16px; padding-right: 18px; border-color: #59615b; color: var(--paper); font-size: 1.18rem; }
.command-context { min-width: 0; display: flex; align-items: center; gap: 10px; font-size: .84rem; }
.command-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.command-actions { display: flex; align-items: center; gap: 6px; }
.command-actions a, .command-actions button { color: var(--paper); }
.command-actions .button--yellow { color: var(--ink); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; padding: 9px 10px; border: 1px solid #667068; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 210px; padding: 8px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); box-shadow: var(--shadow); }
.user-menu__panel a, .user-menu__panel button { display: block; width: 100%; padding: 10px; border: 0; background: transparent; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.user-menu__panel a:hover, .user-menu__panel button:hover { background: var(--pale-green); }

.app-shell { width: 100%; display: grid; grid-template-columns: 182px minmax(0, 1fr); min-height: calc(100vh - 58px); }
.context-rail { position: sticky; top: 58px; align-self: start; height: calc(100vh - 58px); overflow-y: auto; border-right: 2px solid var(--ink); background: var(--paper); }
.context-rail__section { padding: 17px 13px; border-bottom: 1px solid var(--ink); }
.context-rail__label { display: block; margin-bottom: 9px; font: 700 .66rem var(--mono); text-transform: uppercase; color: var(--grey); }
.context-rail nav { display: grid; gap: 3px; }
.context-rail a { display: flex; align-items: center; gap: 8px; padding: 8px 7px; border-left: 4px solid transparent; font-size: .82rem; font-weight: 680; line-height: 1.2; text-decoration: none; }
.context-rail a:hover { background: var(--pale-green); }
.context-rail a[aria-current="page"] { border-color: var(--green); background: var(--pale-green); }
.rail-count { margin-left: auto; font: .66rem var(--mono); }
.workspace { min-width: 0; padding: 28px clamp(20px, 3.5vw, 56px) 70px; }
.workspace__inner { max-width: 1460px; margin-inline: auto; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: end; margin-bottom: 30px; padding-bottom: 22px; border-bottom: 3px solid var(--ink); }
.page-head h1 { font-size: clamp(2.5rem, 5vw, 5.2rem); }
.page-head__meta { margin-top: 12px; color: var(--grey); font-size: .9rem; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.stats-ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 2px solid var(--ink); background: var(--paper); }
.stat { min-height: 128px; padding: 17px; border-right: 1px solid var(--ink); }
.stat:last-child { border-right: 0; }
.stat:nth-child(2) { background: var(--pale-green); }
.stat:nth-child(3) { background: #fff4c4; }
.stat:nth-child(4) { background: var(--pale-blue); }
.stat__label { display: block; font: .68rem var(--mono); text-transform: uppercase; }
.stat__value { display: block; margin-top: 19px; font-family: var(--display); font-size: 2.9rem; font-weight: 750; line-height: 1; }
.stat__note { display: block; margin-top: 6px; color: var(--grey); font-size: .72rem; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr); gap: 26px; margin-top: 28px; }
.workspace-grid--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; border: 1.5px solid var(--ink); background: var(--paper); }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 17px; border-bottom: 1px solid var(--ink); background: #f5f5ec; }
.panel__head h2 { font: 780 1rem var(--sans); letter-spacing: 0; }
.panel__body { padding: 17px; }
.panel--yellow .panel__head { background: var(--wattle); }
.panel--green .panel__head { background: var(--pale-green); }

.quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.quick-actions a { min-height: 70px; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; border: 1px solid var(--ink); background: var(--paper); font-size: .8rem; font-weight: 750; text-decoration: none; }
.quick-actions a:hover { background: var(--wattle); }
.quick-actions b { font: 700 .68rem var(--mono); color: var(--grey); }

.record-list { border-top: 2px solid var(--ink); }
.record-row { position: relative; display: grid; grid-template-columns: 12px 105px minmax(200px, 1fr) minmax(110px, .3fr) auto; gap: 14px; align-items: center; min-height: 78px; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--ink); text-decoration: none; background: var(--paper); }
.record-row:hover { background: #f7f4e7; }
.record-row__bar { align-self: stretch; background: var(--green); }
.record-row[data-type="incident"] .record-row__bar { background: var(--red); }
.record-row[data-type="communication"] .record-row__bar { background: var(--blue); }
.record-row[data-type="meeting"] .record-row__bar { background: var(--wattle); }
.record-row[data-type="document"] .record-row__bar { background: #7671b8; }
.record-row[data-type="follow_up"] .record-row__bar { background: #d97928; }
.record-date { font: .72rem var(--mono); }
.record-title { min-width: 0; }
.record-title strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-title small { color: var(--grey); }
.record-type { font-size: .66rem; text-transform: uppercase; }
.record-actions { display: flex; gap: 6px; }

.badge { display: inline-flex; align-items: center; gap: 5px; width: max-content; max-width: 100%; padding: 4px 7px; border: 1px solid currentColor; border-radius: 2px; font: 700 .64rem/1.1 var(--mono); text-transform: uppercase; letter-spacing: .03em; }
.badge--active, .badge--completed, .badge--resolved { color: #155a3f; background: var(--pale-green); }
.badge--waiting, .badge--monitoring, .badge--pending { color: #6e5500; background: #fff0ae; }
.badge--overdue, .badge--urgent, .badge--serious { color: #9f2d23; background: #f8ded9; }
.badge--archived, .badge--cancelled { color: #565b57; background: #e7e8df; }
.badge--blue { color: #17439f; background: var(--pale-blue); }

.folder-tabs { display: flex; overflow-x: auto; border-bottom: 2px solid var(--ink); margin-bottom: 26px; scrollbar-width: thin; }
.folder-tabs a { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--ink); border-bottom: 0; margin-right: -1px; background: var(--paper); font-size: .79rem; font-weight: 720; text-decoration: none; }
.folder-tabs a[aria-current="page"] { background: var(--wattle); }

.timeline { position: relative; margin-left: 18px; padding-left: 35px; border-left: 3px solid var(--ink); }
.timeline-day { margin: 30px 0 12px -55px; }
.timeline-day:first-child { margin-top: 0; }
.timeline-day span { display: inline-block; padding: 6px 10px; border: 2px solid var(--ink); background: var(--wattle); font: 700 .7rem var(--mono); }
.timeline-item { position: relative; margin-bottom: 16px; padding: 16px 18px; border: 1px solid var(--ink); background: var(--paper); }
.timeline-item::before { content: ""; position: absolute; left: -44px; top: 20px; width: 15px; height: 15px; border: 2px solid var(--ink); border-radius: 50%; background: var(--green); }
.timeline-item[data-type="incident"]::before { background: var(--red); }
.timeline-item[data-type="communication"]::before { background: var(--blue); }
.timeline-item[data-type="meeting"]::before { background: var(--wattle); }
.timeline-item__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 8px; font: .68rem var(--mono); text-transform: uppercase; }
.timeline-item h3 { margin-bottom: 9px; font: 780 1.1rem var(--sans); letter-spacing: 0; }
.timeline-item p { margin: 0; }

.filters { margin-bottom: 24px; border: 1px solid var(--ink); background: var(--paper); }
.filters__toggle { display: none; width: 100%; padding: 12px; border: 0; background: var(--pale-blue); font-weight: 750; text-align: left; }
.filters__body { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; gap: 10px; align-items: end; padding: 14px; }
.filters .field label { font-size: .72rem; }
.filters .field input, .filters .field select { min-height: 39px; padding: 7px 9px; }

.empty-state { padding: clamp(36px, 7vw, 80px) 24px; border: 2px dashed var(--ink); background: var(--paper); text-align: center; }
.empty-state__mark { width: 58px; height: 68px; margin: 0 auto 20px; border: 3px solid var(--ink); background: var(--pale-green); box-shadow: 7px 7px 0 var(--wattle); transform: rotate(-2deg); }
.empty-state h2 { margin-bottom: 12px; font-size: 2.1rem; }
.empty-state p { max-width: 520px; margin: 0 auto 20px; }
.loading-state { display: grid; gap: 9px; padding: 20px; }
.loading-line { height: 14px; background: #e4e5dc; animation: loading 1.1s ease-in-out infinite alternate; }
@keyframes loading { to { opacity: .45; } }

.progress-index { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 35px; border: 2px solid var(--ink); }
.progress-step { position: relative; padding: 12px; border-right: 1px solid var(--ink); font-size: .76rem; }
.progress-step:last-child { border: 0; }
.progress-step.is-current { background: var(--wattle); }
.progress-step.is-complete { background: var(--pale-green); }
.progress-step b { display: block; font: 700 .65rem var(--mono); }
.privacy-helper { padding: 13px 15px; border-left: 6px solid var(--green); background: var(--pale-green); font-size: .84rem; }
.safety-helper { padding: 13px 15px; border-left: 6px solid var(--blue); background: var(--pale-blue); font-size: .82rem; }

.usage-meter { height: 10px; border: 1px solid var(--ink); background: #fff; }
.usage-meter span { display: block; height: 100%; max-width: 100%; background: var(--green); }
.usage-note { display: flex; justify-content: space-between; margin-top: 6px; font: .68rem var(--mono); }

.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.document-tile { min-width: 0; border: 1px solid var(--ink); background: var(--paper); }
.document-preview { height: 150px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--ink); background: var(--pale-blue); font: 700 1.4rem var(--mono); }
.document-preview img { width: 100%; height: 100%; object-fit: cover; }
.document-meta { padding: 12px; }
.document-meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.document-meta small { color: var(--grey); }

.not-found { min-height: calc(100vh - 73px); display: grid; grid-template-columns: .7fr 1.3fr; }
.not-found__code { display: grid; place-items: center; color: var(--paper); background: var(--red); font: 800 clamp(8rem, 20vw, 19rem)/1 var(--display); border-right: 3px solid var(--ink); }
.not-found__copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(35px, 8vw, 120px); }
.not-found__copy h1 { font-size: clamp(3rem, 7vw, 7rem); margin-bottom: 22px; }

/* Report */
.report-sheet { width: min(940px, 100%); margin-inline: auto; padding: 45px; border: 1px solid var(--ink); background: #fff; }
.report-header { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; padding-bottom: 24px; border-bottom: 4px solid var(--ink); }
.report-header h1 { font-size: 3.7rem; }
.report-meta { text-align: right; font: .72rem var(--mono); }
.report-section { padding: 28px 0; border-bottom: 1px solid var(--ink); }
.report-section h2 { margin-bottom: 18px; font-size: 2.1rem; }
.report-entry { display: grid; grid-template-columns: 120px 1fr; gap: 22px; padding: 13px 0; border-top: 1px solid var(--soft-line); }
.report-entry time { font-size: .72rem; }
.report-disclaimer { margin-top: 28px; padding: 16px; border: 2px solid var(--ink); font-size: .76rem; }

@media (max-width: 1120px) {
  :root { --page: min(100% - 30px, 1200px); --small-page: min(100% - 30px, 900px); }
  .site-nav a { padding-inline: 9px; }
  .site-nav a:nth-last-child(-n+2) { display: none; }
  .hero__inner { grid-template-columns: 1fr .38fr; }
  .feature-entry { grid-template-columns: 75px .7fr 1.3fr; }
  .price-row { grid-template-columns: .8fr .55fr 1.2fr; }
  .price-action { grid-column: 1 / -1; border-top: 1px solid var(--ink); }
  .stats-ledger { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .filters__body { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 850px) {
  html { scroll-padding-top: 65px; }
  .site-header__inner { grid-template-columns: 1fr auto; min-height: 64px; }
  .brand { min-height: 64px; border-right: 0; }
  .nav-toggle { display: inline-grid; place-items: center; width: 45px; height: 42px; border: 2px solid var(--ink); background: var(--paper); cursor: pointer; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; padding: 8px 15px 15px; border-bottom: 3px solid var(--ink); background: var(--paper); box-shadow: 0 8px 0 rgba(16,23,18,.14); }
  .site-nav.is-open { display: grid; }
  .site-nav a, .site-nav a:nth-last-child(-n+2) { display: block; padding: 12px; border-right: 0; border-bottom: 1px solid var(--soft-line); }
  .site-actions { display: none; }
  .masthead-note span:last-child { display: none; }
  .hero { min-height: 780px; background-position: 58% center; }
  .hero::before { background: rgba(4,21,14,.68); }
  .hero__inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto auto; }
  .hero__annotation { justify-self: start; width: min(430px, 100%); }
  .hero__foot { grid-column: 1; }
  .index-band__grid { grid-template-columns: repeat(2, 1fr); }
  .index-step { min-height: 190px; border-bottom: 1px solid #667068; }
  .section-head, .privacy-grid, .final-cta__grid, .page-hero__grid, .contact-grid { grid-template-columns: 1fr; }
  .section-head { gap: 22px; }
  .scatter-row { grid-template-columns: 55px 1fr; }
  .scatter-row p { grid-column: 2; }
  .scatter-row:nth-child(even) .scatter-source { transform: none; }
  .feature-entry { grid-template-columns: 65px 1fr; }
  .feature-entry__detail { grid-column: 1 / -1; border-top: 1px solid var(--ink); }
  .workflow { grid-template-columns: repeat(2, 1fr); }
  .workflow::before { display: none; }
  .workflow__step { min-height: 245px; border-bottom: 1px solid var(--ink); }
  .workflow__dot { margin-bottom: 35px; }
  .price-row { grid-template-columns: 1fr 1fr; }
  .price-detail { grid-column: 1 / -1; border-top: 1px solid var(--ink); }
  .site-footer__main { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { min-height: 300px; }
  .auth-aside p { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .context-rail { position: static; width: 100%; height: auto; border-right: 0; border-bottom: 2px solid var(--ink); }
  .context-rail__section { display: none; }
  .context-rail__section:first-child { display: block; padding: 8px 15px; overflow-x: auto; }
  .context-rail__section:first-child .context-rail__label { display: none; }
  .context-rail nav { display: flex; width: max-content; }
  .context-rail a { flex: 0 0 auto; border-left: 0; border-bottom: 4px solid transparent; }
  .context-rail a[aria-current="page"] { border-bottom-color: var(--green); }
  .workspace { padding: 23px 15px 65px; }
  .workspace-grid, .workspace-grid--even { grid-template-columns: 1fr; }
  .document-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  :root { --page: calc(100% - 24px); --small-page: calc(100% - 24px); }
  body { font-size: 15px; }
  h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
  h2 { font-size: clamp(2.3rem, 12vw, 3.8rem); }
  .masthead-note .container { font-size: .62rem; }
  .hero { min-height: 730px; }
  .hero__inner { padding-top: 22px; }
  .hero__meta span:last-child, .hero__foot span:last-child { display: none; }
  .hero .lede { margin: 20px 0; font-size: 1.05rem; }
  .hero__annotation { font-size: .84rem; }
  .index-band__grid { grid-template-columns: 1fr; }
  .index-step { min-height: 155px; }
  .scatter-row { grid-template-columns: 40px 1fr; gap: 12px; }
  .feature-entry { grid-template-columns: 48px 1fr; }
  .feature-entry > * { padding: 20px 15px; }
  .feature-entry ul { columns: 1; }
  .workflow { grid-template-columns: 1fr; box-shadow: 3px 3px 0 var(--ink); }
  .workflow__step { min-height: 210px; }
  .price-row { grid-template-columns: 1fr; }
  .price-row > * { border-right: 0; border-bottom: 1px solid var(--ink); }
  .price-row > *:last-child { border-bottom: 0; }
  .price-features { columns: 1; }
  .faq-list summary { grid-template-columns: 38px 1fr 26px; gap: 9px; }
  .faq-answer { margin-left: 47px; }
  .final-cta .button-row { justify-content: flex-start; }
  .site-footer__main { grid-template-columns: 1fr; }
  .site-footer__bottom { flex-direction: column; }
  .page-hero .stamp { justify-self: start; }
  .contact-grid { padding-block: 50px 80px; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .auth-aside { min-height: 260px; padding: 25px; }
  .auth-main { padding: 40px 15px; }
  .command-bar__inner { grid-template-columns: auto 1fr auto; }
  .command-bar .brand { margin-right: 8px; padding-right: 10px; font-size: 0; }
  .command-bar .brand-mark { width: 24px; }
  .command-context { font-size: .72rem; }
  .command-actions > a:not(.mobile-primary), .command-actions .search-link { display: none; }
  .page-head { grid-template-columns: 1fr; gap: 15px; align-items: start; }
  .page-head__actions { justify-content: flex-start; }
  .stats-ledger { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 105px; padding: 12px; }
  .stat__value { font-size: 2.2rem; }
  .record-row { grid-template-columns: 8px 82px minmax(0, 1fr) auto; gap: 9px; }
  .record-type { display: none; }
  .record-actions .button:not(:first-child) { display: none; }
  .filters__toggle { display: block; }
  .filters__body { display: none; grid-template-columns: 1fr 1fr; }
  .filters.is-open .filters__body { display: grid; }
  .document-grid { grid-template-columns: 1fr; }
  .progress-index { grid-template-columns: 1fr 1fr; }
  .progress-step:nth-child(2) { border-right: 0; }
  .progress-step:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
  .not-found { grid-template-columns: 1fr; }
  .not-found__code { min-height: 35vh; border-right: 0; border-bottom: 3px solid var(--ink); }
  .report-sheet { padding: 24px 15px; }
  .report-header { grid-template-columns: 1fr; }
  .report-meta { text-align: left; }
  .report-entry { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { color: #000; background: #fff; font-size: 10pt; }
  .command-bar, .context-rail, .site-header, .site-footer, .no-print, .button, .filters, .alert { display: none !important; }
  .app-shell { display: block; }
  .workspace { padding: 0; }
  .report-sheet { width: 100%; margin: 0; padding: 0; border: 0; }
  .report-header h1 { font-size: 28pt; }
  .report-section { break-inside: avoid; }
  .report-entry { break-inside: avoid; }
  a { text-decoration: none; }
}
