:root {
  color-scheme: light;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #132e38;
  background: #f0f4f3;
  --ink: #132e38;
  --muted: #47626b;
  --line: #cbd9d7;
  --teal: #075b52;
  --base: #fff;
  --serif: "Georgia", "Times New Roman", serif;
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; line-height: 1.55 }
[hidden] { display: none !important }
a { color: var(--teal); text-underline-offset: .22em }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #087b77; outline-offset: 4px }
img { max-width: 100%; height: auto }
.shell { max-width: 78rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem) }
.skip { position: absolute; left: 1rem; z-index: 5; transform: translateY(-160%); background: white; padding: .75rem }
.skip:focus { transform: translateY(0) }
.header { background: #fff; border-bottom: 1px solid var(--line) }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5rem; padding-block: .7rem }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 750 }
.brand small { display: block; color: var(--muted); font-weight: 500 }
.mark { width: 2rem; aspect-ratio: 1; border-radius: .45rem; display: grid; place-items: center; background: var(--teal); color: white; font-size: 1.35rem }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1.2rem }
nav a { font-weight: 650; font-size: .9rem; text-decoration: none }
nav a:hover, .link-list a:hover { text-decoration: underline }
main.shell { min-height: 72vh }
.footer { margin-top: 3.2rem; border-top: 1px solid var(--line); padding-block: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .85rem }
.hero { position: relative; overflow: hidden; min-height: 27rem; background: #112f3a; color: #f3fcfc; margin-top: 2rem; border-radius: 1rem; display: grid; grid-template-columns: 1fr .9fr; align-items: center }
.hero-copy { padding: clamp(1.25rem, 5vw, 4rem); z-index: 1 }
.eyebrow { font-size: .8rem; font-weight: 750; color: var(--teal); letter-spacing: .045em; margin: 0 0 .7rem }
.hero .eyebrow { color: #a9e2d2 }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .8em }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.25rem, 5.6vw, 4.4rem); letter-spacing: -.045em }
.hero h1 { margin-bottom: .4em; font-size: clamp(2.4rem, 4.5vw, 4.1rem) }
.hero h1 span { white-space: nowrap }
.hero-copy > p:not(.eyebrow) { max-width: 39ch; color: #d3e5e7; margin-bottom: 1.6rem }
.hero-diagram { align-self: stretch; width: 100%; height: 100%; max-height: 33rem; object-fit: contain; object-position: center; padding: 1.25rem }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1.1rem }
.button, button { display: inline-flex; gap: .35rem; justify-content: center; align-items: center; border: 1px solid var(--teal); background: var(--teal); color: #fff; padding: .63rem .95rem; border-radius: .55rem; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; width: fit-content }
.button:hover, button:hover { filter: brightness(.91) }
.button:disabled, button:disabled { cursor: default; opacity: .48 }
.button.small { padding: .38rem .72rem }
.button.ghost { color: var(--teal); background: transparent }
.hero .button { color: #0c3027; background: #9ee0ca; border-color: #9ee0ca }
.hero .button.ghost { color: #f0fafa; border-color: #9ab9ba; background: transparent }
.resource-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 1.4rem; gap: 1rem }
.resource-strip > div { border-top: 2px solid var(--teal); padding: 1rem .1rem }
.resource-strip p { color: var(--muted); margin-block: .4rem 0 }
.page-head { margin-block: clamp(1.6rem, 6vw, 4rem) 1.6rem }
.page-head h1 { margin-bottom: .2em; font-size: clamp(2.3rem, 5vw, 3.6rem) }
.intro { color: var(--muted); max-width: 70ch; font-size: 1.1rem }
.layout-two, .document-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(2,minmax(0,1fr)) }
.document-grid { grid-template-columns: minmax(0, 2.4fr) minmax(12rem, .8fr); align-items: start }
.card, .prose { background: var(--base); border: 1px solid var(--line); padding: clamp(1rem, 3vw, 1.7rem); border-radius: .75rem }
.card p { max-width: 72ch }
.card form { margin-top: .6rem }
.form-card { max-width: 31rem }
.lower { margin-top: 1.2rem }
.stack, .inline-fields { display: grid; gap: 1rem }
.inline-fields { grid-template-columns: repeat(auto-fit,minmax(9rem,1fr)); align-items: end }
label { font-weight: 640; display: grid; gap: .35rem; font-size: .92rem }
label.check { display: flex; align-items: center }
input, select, textarea { background: #f9fbfb; border: 1px solid #a4bdbd; border-radius: .4rem; padding: .56em .65em; color: var(--ink); font: inherit; width: 100%; min-width: 0 }
input[type="checkbox"] { width: auto }
textarea { resize: vertical }
small { color: var(--muted) }
.error { color: #a01936; font-weight: 650 }
.success { color: #075346; border-left: 3px solid #179c81; padding-left: .65rem }
.link-list { display: grid }
.link-list a { display: flex; gap: .75rem; padding-block: .65rem; border-top: 1px solid var(--line); font-weight: 650; text-decoration: none }
.link-list span { color: var(--muted) }
.history { list-style: none; padding-left: 0 }
.history li { padding: .6rem 0; border-top: 1px solid var(--line) }
.history small { display: block }
.table-scroll { overflow-x: auto }
table { border-collapse: collapse; width: 100%; text-align: left }
th, td { border-bottom: 1px solid var(--line); padding: .55rem; vertical-align: top }
th { background: #e8f1ef }
.prose { font-family: var(--serif); font-size: 1.075rem; line-height: 1.65; overflow-wrap: anywhere }
.prose.plain { padding: 0; border: 0; border-radius: 0 }
.prose > :first-child { margin-top: 0 }
.prose > :last-child { margin-bottom: 0 }
.prose h2, .prose h3, .prose h4 { margin: 1.25em 0 .55em; color: #173b41 }
.prose ul, .prose ol { padding-left: 1.5em }
.prose pre { overflow: auto; font-size: .88em; line-height: 1.4; padding: .7rem; border-radius: .3rem; background: #edf4f3 }
.prose table { font-size: .9em }
.prose blockquote { margin-inline: 0; background: #e9f4f1; border-left: 3px solid var(--teal); padding: .65rem }
.resource-files a { overflow-wrap: anywhere }
.contents { display: grid; align-content: start; gap: .55rem }
.contents h2 { font-size: 1.15rem; margin-bottom: .1rem }
.contents ol { margin: 0; padding-left: 1.3rem }
.contents li { margin-top: .45rem; font-size: .9rem }
.contents a[aria-current] { font-weight: bold }
.reader { display: grid; grid-template-columns: minmax(11rem, 15rem) minmax(0,1fr); gap: 1.2rem }
.reader-tools { padding: .55rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: .4rem; color: var(--muted) }
.book-spread { display: grid; grid-template-columns: repeat(var(--visible-pages, 2),minmax(0,1fr)); gap: .25rem }
.book-page { background: #fffef8; border-radius: .25rem .55rem .55rem .25rem; box-shadow: inset .6rem 0 1rem -.8rem #4a5d52; min-width: 0; align-self: stretch; position: relative; padding-bottom: 3.4rem }
.turn { animation: turn .32s ease-out }
@keyframes turn { from { transform: translateX(.6rem) rotateY(-3deg); opacity: .72 } to { transform: none; opacity: 1 } }
.page-number { position: absolute; inset: auto .6rem 1rem; text-align: center; color: var(--muted); font-size: .9rem }
.metadata { display: grid; grid-template-columns: auto 1fr; gap: .3rem .8rem }
.metadata dt { font-weight: 680 }
.metadata dd { margin: 0 }
.multiline { white-space: pre-wrap; overflow-wrap: anywhere }
@media (max-width: 850px) {
  .reader { grid-template-columns: 1fr }
  .contents ol { columns: 2 }
  .document-grid { grid-template-columns: 1fr }
}
@media (max-width: 650px) {
  .bar, .footer { align-items: flex-start; flex-direction: column }
  .layout-two, .resource-strip, .hero { grid-template-columns: 1fr }
  .hero-diagram { max-height: 16rem; padding: 0 1rem 1rem }
  .hero h1 { font-size: clamp(2rem, 8vw, 3.2rem) }
  .contents ol { columns: 1 }
}
@media (prefers-reduced-motion: reduce) { .turn { animation: none } }
.toolbox { display: grid; gap: 1.2rem }
.calculator .formula { font-family: Georgia,serif; font-size:1.12rem; padding:.8rem; background:#e8f1ef }
.tool-output { padding:1rem 0 }
.tool-figure { width: min(100%,40rem); height: auto; display: block; margin-block: 1rem }
.facsimile { padding: 0; overflow: hidden }
.facsimile > a { display: block; cursor: zoom-in }
.facsimile img { display: block; width: 100%; height: auto }
.transcript { padding: .55rem .7rem; font-size: .85rem; background: #fffef8 }
.transcript summary { cursor: pointer }
.transcript .multiline { padding-top: .6rem }
.contents-disclosure > summary { font-weight:700; font-size:1.15rem; cursor:pointer; margin-bottom:1rem }
.contents-disclosure ol { max-height:55vh; overflow:auto; padding-right:.5rem }
@media(max-width:850px){.contents-disclosure ol {max-height:14rem}}
