/* Fielding Town - demonstration build. Shared stylesheet for every page. */

:root {
  /* Color tokens: two structural tones (field green, straw paper), one rationed accent (seal lime). */
  --green-950: #0a2a1a;
  --green-900: #0c3320;
  --green-800: #114a2e;
  --green-700: #006b34;
  --green-600: #00773a;
  --green-500: #009748;
  --lime: #c5d82f;
  --lime-soft: #e4ec9c;
  --paper: #f8f6ef;
  --paper-2: #eee8d6;
  --paper-3: #e2dbc4;
  --white: #ffffff;
  --ink: #15231a;
  --ink-2: #3a473e;
  --ink-3: #56625a;
  --rule: #d6cfb8;
  --rule-dark: rgba(255, 255, 255, .18);
  --on-dark: #f4f2ea;
  --on-dark-2: #c9d3cb;
  --notice: #8a3a1f;
  --notice-bg: #f6e7df;
  --focus: #1f5fbf;

  /* Type tokens */
  --font-display: "Zilla Slab", "Rockwell", Georgia, serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --fs-lg: clamp(1.125rem, 1.05rem + .35vw, 1.3rem);
  --fs-h3: clamp(1.25rem, 1.12rem + .6vw, 1.55rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.6rem);
  --fs-h1: clamp(2.4rem, 1.7rem + 3.4vw, 4.4rem);
  --fs-doc-h1: clamp(1.8rem, 1.4rem + 1.9vw, 2.9rem);

  /* Shape, depth, motion */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-1: 0 1px 2px rgba(10, 42, 26, .08), 0 2px 8px rgba(10, 42, 26, .06);
  --shadow-2: 0 10px 30px rgba(10, 42, 26, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 420ms;

  /* Layout */
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(64px, 8vw, 104px);

  /* Signature motif: the curved furrow rows from the town seal, as a mask. */
  --furrows: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='black' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M-10 58 C 120 6, 260 0, 410 22'/%3E%3Cpath d='M-10 70 C 120 18, 260 12, 410 34'/%3E%3Cpath d='M-10 82 C 120 30, 260 24, 410 46'/%3E%3Cpath d='M-10 94 C 120 42, 260 36, 410 58'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible, .hero :focus-visible { outline-color: var(--lime); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--green-900); color: var(--white); padding: 10px 16px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

/* Demonstration banner */
.demo-bar { background: var(--green-950); color: var(--on-dark-2); font-size: var(--fs-xs); text-align: center; padding: 7px var(--gutter); }
.demo-bar strong { color: var(--lime); font-weight: 600; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { width: 54px; height: 54px; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1; display: block; }
.brand-sub { font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .04em; display: block; margin-top: 3px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: var(--fs-sm); }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--green-700); box-shadow: inset 0 -3px 0 var(--green-500); border-radius: 0; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 9px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.nav-toggle svg { vertical-align: -3px; margin-right: 6px; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-2); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .nav a { padding: 12px 8px; font-size: var(--fs-base); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--green-500); padding-left: 14px; }
  .no-js .nav { display: block; position: static; box-shadow: none; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; font-size: var(--fs-sm); line-height: 1.2; cursor: pointer; font-family: inherit; transition: transform 160ms var(--ease), background-color 160ms var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--green-700); color: var(--white); }
.btn-primary:hover { background: var(--green-800); }
.btn-lime { background: var(--lime); color: var(--green-950); }
.btn-lime:hover { background: var(--lime-soft); }
.btn-ghost { border-color: currentColor; color: var(--green-700); background: transparent; }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: var(--white); background: rgba(10,42,26,.25); }
.btn-ghost-light:hover { background: rgba(10,42,26,.5); }

/* Hero */
.hero { position: relative; color: var(--white); background: var(--green-900); isolation: isolate; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,42,26,.93) 0%, rgba(10,42,26,.78) 42%, rgba(10,42,26,.25) 75%, rgba(10,42,26,.1) 100%), linear-gradient(0deg, rgba(10,42,26,.6) 0%, rgba(10,42,26,0) 40%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: end; padding-block: clamp(64px, 10vw, 128px) clamp(72px, 9vw, 112px); }
.hero .eyebrow { color: var(--lime); }
.hero h1 { font-size: var(--fs-h1); font-weight: 700; margin-bottom: .3em; max-width: 13ch; }
.hero-lede { font-size: var(--fs-lg); color: var(--on-dark); max-width: 44ch; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card { background: rgba(10, 42, 26, .82); border: 1px solid var(--rule-dark); border-radius: var(--radius-lg); padding: 26px; backdrop-filter: blur(6px); }
.hero-card h2 { font-size: 1.3rem; margin-bottom: .8em; color: var(--white); }
.hero-card dl { margin: 0; display: grid; gap: 14px; }
.hero-card dt { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--lime); font-weight: 600; }
.hero-card dd { margin: 2px 0 0; color: var(--on-dark); }
.hero-card a { color: var(--white); }
.furrow-edge { position: absolute; left: 0; right: 0; bottom: -1px; height: 46px; background: var(--paper); -webkit-mask: var(--furrows) center / 100% 100% no-repeat; mask: var(--furrows) center / 100% 100% no-repeat; opacity: .9; }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; align-items: start; }
  .hero::before { background: linear-gradient(180deg, rgba(10,42,26,.86) 0%, rgba(10,42,26,.8) 60%, rgba(10,42,26,.92) 100%); }
}

/* Page hero for interior pages */
.page-hero { background: var(--green-900); color: var(--white); position: relative; overflow: hidden; }
.page-hero .wrap { position: relative; padding-block: clamp(48px, 7vw, 88px) clamp(56px, 7vw, 92px); }
.page-hero h1 { font-size: var(--fs-h1); font-weight: 700; margin: 0 0 .25em; }
.page-hero p { color: var(--on-dark); font-size: var(--fs-lg); max-width: 58ch; margin: 0; }
.page-hero .seal-ghost { position: absolute; right: -40px; top: 50%; width: clamp(220px, 30vw, 380px); transform: translateY(-50%); opacity: .09; pointer-events: none; }
.page-hero.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,42,26,.94) 0%, rgba(10,42,26,.82) 55%, rgba(10,42,26,.55) 100%); }
.page-hero.has-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero.has-photo .wrap { z-index: 1; }

.eyebrow { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--green-700); margin: 0 0 12px; display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: currentColor; border-radius: 2px; }
.on-dark .eyebrow, .page-hero .eyebrow { color: var(--lime); }

.breadcrumb { font-size: var(--fs-sm); margin-bottom: 16px; color: var(--on-dark-2); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--on-dark-2); }
.breadcrumb a { color: var(--on-dark); }

/* Sections */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--paper-2); }
.section-white { background: var(--white); }
.section-dark { background: var(--green-900); color: var(--on-dark); position: relative; overflow: hidden; }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 { margin: 0; max-width: 22ch; }
.section-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 56ch; }
.lead { font-size: var(--fs-lg); color: var(--ink-2); }

/* Task cards */
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.task { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease); }
.task:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--green-500); }
.task-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--paper-2); color: var(--green-700); display: grid; place-items: center; }
.task h3 { font-size: 1.2rem; margin: 4px 0 0; }
.task p { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); }
.task .more { margin-top: auto; font-weight: 600; font-size: var(--fs-sm); color: var(--green-700); }

/* Document list */
.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.doc-item { border-bottom: 1px solid var(--rule); }
.doc-item a { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 8px; text-decoration: none; color: var(--ink); transition: background-color 160ms var(--ease); }
.doc-item a:hover { background: var(--white); }
.doc-date { font-size: var(--fs-sm); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.doc-title { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.25; display: block; }
.doc-sum { display: block; color: var(--ink-2); font-size: var(--fs-sm); margin-top: 3px; }
.doc-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-block; font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.chip-render { background: #e3efe6; color: var(--green-700); }
.chip-pdf { background: var(--notice-bg); color: var(--notice); }
@media (max-width: 680px) {
  .doc-item a { grid-template-columns: 1fr; gap: 6px; }
  .doc-tags { justify-content: flex-start; }
}

/* Library controls */
.library { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.filters { position: sticky; top: 96px; display: grid; gap: 18px; }
.filters label, .filters .filter-label { font-weight: 600; font-size: var(--fs-sm); display: block; margin-bottom: 6px; }
.search { width: 100%; padding: 12px 14px; border: 1px solid var(--ink-3); border-radius: var(--radius-sm); font: inherit; background: var(--white); color: var(--ink); }
.cat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.cat-btn { width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 9px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; font: inherit; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.cat-btn:hover { background: var(--white); }
.cat-btn[aria-pressed="true"] { background: var(--white); border-color: var(--green-500); color: var(--green-700); font-weight: 600; }
.cat-btn .count { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.result-note { color: var(--ink-3); font-size: var(--fs-sm); margin: 0 0 12px; min-height: 1.5em; }
.no-js .filters-js { display: none; }
@media (max-width: 860px) {
  .library { grid-template-columns: 1fr; }
  .filters { position: static; }
  .cat-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .cat-btn { width: auto; border-color: var(--rule); background: var(--white); border-radius: 999px; }
}

/* Feature split */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.split-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.stat-row { display: flex; flex-wrap: wrap; gap: 28px; margin: 24px 0; padding: 0; list-style: none; }
.stat-row li { border-left: 3px solid var(--green-500); padding-left: 14px; }
.stat-row strong { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; color: var(--green-800); }
.stat-row span { font-size: var(--fs-sm); color: var(--ink-2); }

/* Dark feature band with the reader preview */
.reader-band .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.reader-band p { color: var(--on-dark); }
.reader-band ul { padding-left: 1.1em; color: var(--on-dark); }
.reader-band li { margin-bottom: 6px; }
.reader-band li::marker { color: var(--lime); }
.mock-reader { background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.35); overflow: hidden; }
.mock-tabs { display: flex; gap: 4px; padding: 10px 12px 0; background: var(--paper-2); }
.mock-tabs span { padding: 8px 14px; font-size: var(--fs-xs); font-weight: 600; border-radius: 8px 8px 0 0; color: var(--ink-2); }
.mock-tabs span.on { background: var(--paper); color: var(--green-700); }
.mock-body { padding: 22px 24px 26px; }
.mock-body h3 { font-size: 1.15rem; }
.mock-body p { font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: .6em; }
.furrow-bg { position: absolute; right: -120px; bottom: -40px; width: 620px; height: 200px; background: var(--lime); opacity: .08; -webkit-mask: var(--furrows) center / 100% 100% no-repeat; mask: var(--furrows) center / 100% 100% no-repeat; pointer-events: none; }
@media (max-width: 860px) { .reader-band .wrap { grid-template-columns: 1fr; } }

/* Info cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.25rem; margin-bottom: .4em; }
.card p:last-child, .card dl:last-child { margin-bottom: 0; }
.card .num { font-family: var(--font-display); font-weight: 700; color: var(--green-500); font-size: 1rem; letter-spacing: .06em; }
.kv { margin: 0; display: grid; gap: 8px; }
.kv div { display: grid; grid-template-columns: minmax(90px, 9.5em) minmax(0, 1fr); gap: 12px; }
@media (max-width: 420px) { .kv div { grid-template-columns: 1fr; gap: 2px; } }
.kv dt { color: var(--ink-3); font-size: var(--fs-sm); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* Business directory */
.biz { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0; border-top: 1px solid var(--rule); list-style: none; margin: 0; padding: 0; }
.biz li { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--rule); }
.biz strong { display: block; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.biz span { color: var(--ink-3); font-size: var(--fs-sm); }

/* Prose */
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; }
.pull { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.35; color: var(--green-800); border-left: 4px solid var(--lime); padding: 4px 0 4px 20px; margin: 0 0 1.4em; }

/* Mayor's message */
.message { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 32px; align-items: start; }
.message img { width: 140px; }
@media (max-width: 640px) { .message { grid-template-columns: 1fr; } .message img { width: 96px; } }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 36px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: var(--fs-sm); margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--ink-3); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: var(--white); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: var(--fs-sm); color: var(--ink-2); background: var(--paper); border-left: 3px solid var(--green-500); padding: 12px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.demo-flag { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--notice-bg); color: var(--notice); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.form-status { margin-top: 12px; font-weight: 600; color: var(--green-700); min-height: 1.5em; }

.callout { border: 1px solid var(--rule); border-left: 4px solid var(--notice); background: var(--white); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; }
.callout p:last-child { margin: 0; }

/* Document page */
.doc-head .meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; color: var(--on-dark); font-size: var(--fs-sm); margin-top: 14px; }
.doc-head .meta .chip { background: var(--lime); color: var(--green-950); }
.doc-head h1 { font-size: var(--fs-doc-h1); max-width: 30ch; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 960px) { .doc-layout { grid-template-columns: 1fr; } .doc-aside { order: -1; } }
.tablist { display: flex; gap: 4px; box-shadow: inset 0 -2px 0 var(--rule); overflow-x: auto; overflow-y: hidden; }
.tab { appearance: none; border: 0; background: transparent; font: inherit; font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); padding: 12px 18px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab[aria-selected="true"] { color: var(--green-700); border-bottom-color: var(--green-500); background: var(--white); }
.panel { background: var(--white); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: clamp(20px, 4vw, 44px); }
.no-js .panel + .panel { margin-top: 24px; border-top: 1px solid var(--rule); border-radius: var(--radius); }
.panel-label { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; margin: 0 0 18px; }
.doc-body { max-width: 72ch; font-size: 1.0625rem; }
.doc-body h2 { font-size: 1.45rem; margin-top: 1.6em; }
.doc-body h2:first-child, .doc-body h3:first-child { margin-top: 0; }
.doc-body h3 { font-size: 1.2rem; margin-top: 1.4em; }
.doc-body ol, .doc-body ul { padding-left: 1.4em; }
.doc-body li { margin-bottom: .35em; }
.doc-body table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin: 1em 0 1.4em; display: block; overflow-x: auto; }
.doc-body th, .doc-body td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc-body th { background: var(--paper); font-weight: 600; }
.doc-body dl { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); gap: 8px 18px; }
.doc-body dt { font-weight: 600; }
.doc-body dd { margin: 0; }
.doc-body dl.form-field dd { border-bottom: 1px dashed var(--ink-3); min-height: 1.6em; }
.doc-body .sig { margin-top: 1.6em; padding-top: 1em; border-top: 1px solid var(--rule); color: var(--ink-2); }
.original-frame { width: 100%; height: min(80vh, 1000px); border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper-2); }
.original-img { border: 1px solid var(--rule); border-radius: var(--radius-sm); margin-inline: auto; }
.doc-aside { display: grid; gap: 16px; position: sticky; top: 96px; }
.doc-aside .card { padding: 20px; }
.doc-aside h2 { font-size: 1.1rem; margin-bottom: .6em; }
.action-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.action { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 1px solid var(--rule); border-radius: var(--radius-sm); background: var(--paper); color: var(--ink); text-decoration: none; font: inherit; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; text-align: left; }
.action:hover { border-color: var(--green-500); background: var(--white); }
.action svg { color: var(--green-700); flex-shrink: 0; }
.toc ol { margin: 0; padding-left: 1.2em; max-height: 46vh; overflow-y: auto; font-size: var(--fs-sm); display: grid; gap: 4px; }
.doc-body [id] { scroll-margin-top: 100px; }
@media (max-width: 960px) { .toc ol { max-height: 220px; } }
.pending { text-align: center; padding: clamp(24px, 5vw, 56px) 12px; }
.pending img { width: 84px; margin: 0 auto 16px; opacity: .9; }
.pending p { max-width: 52ch; margin-inline: auto; color: var(--ink-2); }
.prevnext { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* Footer */
.site-footer { background: var(--green-950); color: var(--on-dark-2); padding-block: 64px 28px; position: relative; overflow: hidden; }
.site-footer a { color: var(--on-dark); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { width: 84px; flex-shrink: 0; }
.footer-brand strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--white); display: block; line-height: 1.1; margin-bottom: 6px; }
.site-footer h2 { font-family: var(--font-body); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .12em; color: var(--lime); margin-bottom: 14px; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer address { font-style: normal; }
.footer-base { border-top: 1px solid var(--rule-dark); margin-top: 44px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--fs-xs); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Reveal motion: content is visible by default; JS opts elements into an entrance from hidden. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { animation: rise var(--dur) var(--ease) both; animation-play-state: paused; }
  .js .reveal.in { animation-play-state: running; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Print: documents print as clean pages */
@media print {
  .demo-bar, .site-header, .site-footer, .doc-aside, .tablist, .breadcrumb, .skip-link, [data-panel="original"] { display: none !important; }
  body { background: #fff; }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
  .page-hero { background: #fff; color: #000; }
  .page-hero h1 { color: #000; }
  .page-hero .seal-ghost { display: none; }
  .page-hero .meta { color: #000; }
  .panel { border: 0; padding: 0; }
  .doc-layout { display: block; }
  [hidden][data-panel="text"] { display: block !important; }
}
