/* Existing PRD identity: charcoal, paper, system sans and Iowan/Charter serif.
   Adapted from resk-intelligence-prd-template.html; no app UI or new assets. */
:root {
  --ink: #1a1a1a;
  --muted: #6f625b;
  --canvas: #f3ebe6;
  --paper: #faf4f0;
  --line: #decfc7;
  --line-dark: #bdaea5;
  --focus: #8f351b;
  --serif: "Iowan Old Style", "Palatino Linotype", Charter, "Bitstream Charter", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: var(--sans); font-size: 17px; line-height: 1.65; text-rendering: optimizeLegibility; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: 1rem; transform: translateY(-200%); padding: .65rem 1rem; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); }
.skip-link:focus { transform: translateY(0); }
.shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); max-width: 1600px; margin: 0 auto; background: var(--paper); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: auto; background: var(--ink); color: #fff; padding: 2rem 1.4rem; }
.rail-brand { font-family: var(--serif); font-size: 2rem; line-height: 1.15; margin: 0 0 .7rem; }
.rail-subtitle { margin: 0 0 1.6rem; color: #d9d0ca; font-size: .85rem; line-height: 1.5; }
nav ul { list-style: none; margin: 0; padding: 0; }
.rail nav a { display: block; padding: .55rem .5rem; margin: .1rem 0; color: #ebe4df; text-decoration: none; font-size: .85rem; line-height: 1.45; }
.rail nav a:hover { color: #fff; background: #343434; }
.rail nav a[aria-current="location"] { color: #fff; font-weight: 750; background: #343434; }
.rail a:focus-visible { outline-color: #eee4ca; }
.rail-actions { margin-top: 1.7rem; padding: 1rem .5rem 0; font-size: .82rem; }
main { min-width: 0; }
.cover { padding: 3.5rem clamp(1.5rem, 5vw, 5.5rem) 2.7rem; background: var(--paper); }
.cover-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.cover h1 { margin: 2.4rem 0 1.3rem; font-family: var(--serif); font-size: clamp(2.7rem, 5vw, 4.7rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; }
.cover-intro { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; margin: 0 0 1.8rem; color: #4d423c; }
.document-metadata { font-size: .88rem; color: #4d423c; }
.document-metadata p { margin: 0; }
.status-note { font-size: .94rem; font-weight: 550; margin-top: 1.5rem; }
.document-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.3rem; margin-top: 1.3rem; }
.document-actions a, .document-actions button { min-height: 44px; display: inline-flex; align-items: center; font: inherit; font-size: .88rem; font-weight: 600; padding: .6rem 0; }
.document-actions button { border: 0; border-radius: 0; background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.document-actions button:hover { text-decoration-thickness: 2px; }
#copy-status { font-size: .86rem; margin: .5rem 0 0; min-height: 1.5em; }
.doc-section { position: relative; padding: 3rem clamp(1.5rem, 5vw, 5.5rem) 3.5rem; }
.doc-section:nth-of-type(even) { background: #f6efea; }
h2, h3, h4, h5, h6 { scroll-margin-top: 1.5rem; }
h2 { font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 1.7rem; }
h3 { font-family: var(--serif); font-size: clamp(1.45rem, 2.25vw, 2rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; margin: 2.5rem 0 1rem; }
h4, h5, h6 { font-size: 1rem; line-height: 1.4; margin: 2rem 0 .8rem; }
.heading-link { font-family: var(--sans); font-size: .7em; font-weight: 400; letter-spacing: 0; color: var(--muted); text-decoration: none; display: inline-block; min-width: 28px; padding: .05em .1em; }
.heading-link:hover { color: var(--ink); }
p { max-width: 76ch; margin: 1rem 0; }
li { margin: .45rem 0; }
ul, ol { padding-left: 1.5rem; }
li > p { margin: .5rem 0; }
blockquote { margin: 1.7rem 0; padding: .3rem 1.3rem; background: #eee4ca; color: #4e3b12; }
blockquote p { margin: .65rem 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84em; }
code { overflow-wrap: anywhere; }
pre { white-space: pre; overflow: auto; padding: 1.1rem 1.3rem; background: var(--ink); color: #faf4f0; line-height: 1.65; margin: 1.5rem 0; max-width: 100%; }
pre code { font-size: inherit; overflow-wrap: normal; }
.table-scroll { overflow-x: auto; margin: 1.6rem 0 2rem; max-width: 100%; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .89rem; line-height: 1.55; }
th, td { padding: .8rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-dark); overflow-wrap: anywhere; }
th { font-weight: 700; border-bottom: 2px solid var(--ink); }
tbody tr:last-child td { border-bottom-color: var(--line); }
.anchor-alias { position: absolute; width: 0; height: 0; scroll-margin-top: 1.5rem; }
.document-footer { padding: 2rem clamp(1.5rem, 5vw, 5.5rem) 3rem; background: var(--ink); color: #faf4f0; font-size: .9rem; }
.document-footer > a { display: inline-block; min-height: 44px; padding: .5rem 0; }
.document-footer p { color: #d9d0ca; }
.mobile-nav { display: none; }
@media (max-width: 1050px) {
  .shell { grid-template-columns: 245px minmax(0, 1fr); }
  .cover, .doc-section, .document-footer { padding-left: 2rem; padding-right: 2rem; }
  .cover-meta { display: block; }
  .cover-meta span { display: block; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .shell { display: block; }
  .rail { display: none; }
  .mobile-nav { display: block; position: sticky; top: 0; z-index: 20; color: #fff; background: var(--ink); }
  .mobile-nav summary { padding: .85rem 1.2rem; cursor: pointer; font-weight: 650; min-height: 52px; }
  .mobile-nav nav { padding: 0 .8rem 1rem; max-height: 65vh; max-height: 65dvh; overflow: auto; }
  .mobile-nav nav a { display: block; padding: .7rem .4rem; color: #ebe4df; line-height: 1.35; text-decoration: none; }
  .mobile-nav a:focus-visible, .mobile-nav summary:focus-visible { outline-color: #eee4ca; outline-offset: -4px; }
  .cover { padding: 2rem 1.2rem; }
  .cover h1 { margin-top: 2rem; font-size: clamp(2.6rem, 9vw, 3.5rem); }
  .doc-section { padding: 2.4rem 1.2rem 2.8rem; }
  .document-footer { padding: 2rem 1.2rem; }
  h2, h3, h4, h5, h6, .anchor-alias { scroll-margin-top: 5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  .table-scroll { margin-left: 0; margin-right: 0; }
  .document-actions { gap: .2rem 1rem; }
}
@media print {
  @page { size: A4; margin: 15mm; }
  body { background: white; color: black; font-size: 10pt; }
  .rail, .mobile-nav, .skip-link, .document-actions, .heading-link, #copy-status { display: none !important; }
  .shell { display: block; max-width: none; }
  .cover { padding: 0 0 6mm; }
  .cover h1 { font-size: 32pt; margin: 10mm 0 6mm; }
  .doc-section { padding: 8mm 0; background: white !important; }
  h2 { font-size: 23pt; }
  h3 { font-size: 16pt; }
  h2, h3, h4 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; width: 100%; font-size: 8pt; }
  th, td { padding: 2mm; }
  tr { break-inside: avoid; }
  thead { display: table-header-group; }
  pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow: visible; background: #f6efea; color: black; }
  .document-footer { background: white; color: black; padding: 5mm 0; }
  .document-footer p { color: black; }
}
