:root {
  color-scheme: light;
  --canvas: #faf7f1;
  --surface: #faf7f1;
  --sidebar: #f4f0e8;
  --surface-hover: #f0eae0;
  --ink: #29251f;
  --muted: #696257;
  --line: #ded7ca;
  --strong-line: #8a8072;
  --accent: #a83325;
  --accent-bg: #f8e8e4;
  --selected: #f8e8e4;
  --selected-ink: #a83325;
  --button: #a83325;
  --button-ink: #fff;
  --tag: #eee7dc;
  --radius: 2px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Iowan Old Style", Palatino, Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #211f1c; --surface: #211f1c; --sidebar: #28241f; --surface-hover: #332e27;
    --ink: #f5eee2; --muted: #bcb2a3; --line: #494136; --strong-line: #8b7e6c;
    --accent: #ffb2a3; --accent-bg: #49302e; --selected: #49302e; --selected-ink: #ffb2a3;
    --button: #ffb2a3; --button-ink: #261712; --tag: #393127;
  }
}
:root[data-theme="dark"] {
  --canvas: #211f1c; --surface: #211f1c; --sidebar: #28241f; --surface-hover: #332e27;
  --ink: #f5eee2; --muted: #bcb2a3; --line: #494136; --strong-line: #8b7e6c;
  --accent: #ffb2a3; --accent-bg: #49302e; --selected: #49302e; --selected-ink: #ffb2a3;
  --button: #ffb2a3; --button-ink: #261712; --tag: #393127;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-wrap: anywhere; margin: 0; background: var(--canvas); color: var(--ink); font: 1rem/1.55 var(--sans); }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
button, input { font: inherit; }
button { cursor: pointer; }
a, button, input, summary { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
#main:focus, #page-title:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h2 { font: 500 1.75rem/1.2 var(--serif); letter-spacing: -0.02em; }
h3 { font: 500 1.5rem/1.25 var(--serif); }
p + p { margin-top: 12px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; inset: 12px auto auto 12px; width: auto; height: auto; clip-path: none; background: var(--button); color: var(--button-ink); padding: 12px 16px; border-radius: 6px; }
.app-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; overflow-y: auto; display: flex; flex-direction: column; padding: 30px 16px 22px; background: var(--canvas); border-right: 1px solid var(--line); }
.sidebar > * { flex-shrink: 0; }
.wordmark { flex-wrap: wrap; min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 8px; text-decoration: none; font: 600 1.3125rem/1.05 var(--serif); letter-spacing: -0.4px; }
.wordmark > span { min-width: 0; }
.brand-mark { display: block; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 6px; }
.nav-label { margin: 42px 12px 10px; color: var(--muted); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 5px; }
.side-nav a { display: flex; align-items: center; min-height: 46px; padding: 10px 12px; gap: 10px; border-radius: 0; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.side-nav a:hover { background: var(--surface); color: var(--ink); }
.side-nav a[aria-current="page"] { background: var(--selected); color: var(--selected-ink); border-left-color: var(--accent); font-weight: 650; }
.side-nav a[aria-current="page"] .icon { stroke-width: 2; }
.sidebar-bottom { margin-top: auto; padding: 24px 10px 0; font-size: 0.875rem; }
.sidebar-bottom p { font-weight: 600; margin-bottom: 16px; }
.sidebar-bottom p span { font-weight: 400; color: var(--muted); }
.sidebar-bottom a { gap: 4px; display: inline-flex; align-items: center; min-height: 44px; padding-block: 10px; color: var(--muted); font-size: 0.875rem; }
.app-content { min-width: 0; }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 66px; padding: 10px 48px; background: transparent; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--muted); }
#breadcrumb-page { color: var(--ink); font-weight: 500; }
.theme-button { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 0.875rem; }
.theme-button:hover { background: var(--tag); color: var(--ink); }
main { max-width: 1160px; margin-inline: auto; padding: 32px 48px 24px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
h1 { overflow-wrap: anywhere; max-width: 22ch; font: 500 clamp(2.5rem, 4.5vw, 4rem)/1.05 var(--serif); letter-spacing: -0.045em; text-wrap: balance; }
#page-description { color: var(--muted); margin-top: 14px; max-width: 630px; font-size: 1.0625rem; }
.view + .view { margin-top: 32px; }
.enhanced .view { margin-top: 0; }
.about-layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 22px; align-items: start; }
.panel, .context-column, .edition-options > div, .page-heading > div { min-width: 0; }
.panel { background: transparent; border: 0; border-top: 1px solid var(--line); }
.context-column { display: flex; flex-direction: column; gap: 22px; }
.status-label { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 4px; background: var(--accent-bg); color: var(--accent); font-size: 0.875rem; line-height: 1.4; font-weight: 600; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.primary { background: transparent; border-color: var(--accent); color: var(--accent); }
.primary:hover { background: var(--accent-bg); }
.workspace-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); font-size: 0.875rem; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); align-items: center; }
.workspace-footer a { min-height: 44px; display: inline-flex; align-items: center; }
.development-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; padding: 0; margin-bottom: 28px; }
.development-notice p { max-width: 66ch; }
.development-notice .button { flex-shrink: 0; }
.development-notice .status-label { flex: 0 0 auto; }
.development-notice p { color: var(--muted); font-size: 0.875rem; }
.panel-heading { padding: 22px 24px; }
.panel-heading p { color: var(--muted); font-size: 0.875rem; margin-top: 6px; }
.workflow-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; margin: 0; padding: 0; list-style: none; }
.workflow-list > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-content: start; gap: 8px 12px; padding: 26px 0; border-top: 1px solid var(--line); }
.step-number { padding-top: 2px; color: var(--accent); font: 500 0.9375rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.workflow-list > li > div { display: contents; }
.workflow-list h3 { margin: 0; }
.workflow-list p { grid-column: 1 / -1; }
.workflow-list p { color: var(--muted); max-width: 36ch; }
.workflow-panel { container-type: inline-size; }
.workflow-panel .panel-heading { padding: 0 0 8px; }
.workflow-panel .panel-heading h2 { font-size: 2rem; color: var(--accent); font-style: italic; }
.workflow-next { margin: 0 0 24px; }
.compact-panel { padding: 24px 0; }
.compact-panel > p { margin-top: 16px; font-size: 1rem; color: var(--muted); }
.editions-panel { margin-top: 0; }
.edition-features { padding-left: 18px; color: var(--muted); font-size: 0.875rem; margin: 18px 0 0; }
.edition-features li + li { margin-top: 10px; }
.deployment-panel { margin-top: 40px; padding: 28px 0; }
.deployment-panel p { max-width: 760px; color: var(--muted); margin-top: 10px; }
.edition-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); border-top: 1px solid var(--line); }
.edition-options > div { padding: 28px 24px; }
.edition-options > div + div { border-top: 1px solid var(--line); }
.edition-price { display: block; color: var(--accent); font-size: 0.875rem; margin-top: 6px; }
.edition-options p { color: var(--muted); font-size: 0.875rem; margin-top: 12px; }
.about-panel { padding: 24px 0; border: 0; }
.about-panel h2 { font: 500 1.875rem/1.2 var(--serif); margin: 8px 0 22px; }
.about-panel p { color: var(--muted); max-width: 66ch; }
.about-panel h3 { margin: 32px 0 12px; color: var(--accent); font-style: italic; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; margin-top: 22px; }
.evidence-details { margin-top: 32px; border-block: 1px solid var(--line); padding-block: 12px; }
.evidence-details summary { cursor: pointer; min-height: 48px; padding-block: 12px; font-weight: 600; }
.evidence-details > p { color: var(--muted); padding-block: 12px; max-width: 66ch; }
.evidence-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 20px 32px; padding-left: 24px; margin-block: 20px; }
.evidence-list li { padding-left: 4px; color: var(--muted); }
.evidence-list strong { display: block; color: var(--ink); }
.evidence-source { font-size: .875rem; }
.evidence-source a { display: inline-block; padding-block: 10px; }
/* The shared error page keeps its working recovery links. */
.error-main { min-height: 100svh; display: grid; place-items: center; }
.error-record { max-width: 640px; padding: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.error-code { color: var(--accent); font-size: 0.875rem; }
.error-record h1 { margin: 24px 0 16px; font-size: clamp(1.625rem, 5vw, 2.375rem); }
.error-record > p:not(.error-code) { color: var(--muted); }
.error-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button-primary { background: var(--button); color: var(--button-ink); }
.button-text { border-color: var(--strong-line); }

@media (min-width: 1600px) {
  main { padding-top: 44px; }
}
@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 204px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .topbar { padding-inline: 24px; }
  main { padding: 28px 24px 20px; }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 960px) {
  .about-layout { grid-template-columns: minmax(0, 1fr); }
  .context-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: static; height: auto; padding: 18px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .wordmark { padding: 0 48px 0 0; font-size: 1.125rem; }
  .wordmark br { display: none; }
  .wordmark > span:last-child { display: inline; }
  .brand-mark { width: 36px; height: 36px; }
  .nav-label, .sidebar-bottom { display: none; }
  .side-nav { flex-direction: row; flex-wrap: wrap; margin-top: 14px; gap: 4px; }
  .side-nav a { border-left: 0; border-bottom: 2px solid transparent; flex: 1 1 5.5em; justify-content: center; padding: 10px 5px; font-size: 0.875rem; gap: 6px; min-height: 44px; }
  .side-nav a[aria-current="page"] { background: transparent; border-bottom-color: var(--accent); }
  .side-nav .icon { display: none; }
  .topbar { position: absolute; top: 18px; right: 16px; min-height: 44px; padding: 0; background: transparent; border: 0; }
  .breadcrumb { display: none; }
  .theme-button { width: 44px; height: 44px; justify-content: center; padding: 0; }
  #theme-label { display: none; }
  main { padding: 32px 24px 16px; }
  h1 { font-size: 2.375rem; line-height: 1.05; max-width: 16ch; }
  .page-heading { margin-bottom: 22px; gap: 10px; }
  #page-description { line-height: 1.55; }
  .context-column { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .development-notice { flex-direction: row; gap: 8px 12px; margin-bottom: 24px; }
  .development-notice p { flex-basis: auto; }
  .panel-heading { padding: 18px; }
  .workflow-list { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .workflow-list > li { grid-template-columns: 24px minmax(0, 1fr); gap: 8px 12px; padding-block: 24px; }
  .workflow-list h3 { font-size: 1.375rem; }
  .workflow-next .button { width: 100%; }
  .edition-options { grid-template-columns: minmax(0, 1fr); }
  .edition-options > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .about-panel { padding: 8px 0 24px; border: 0; background: transparent; }
  .about-layout { gap: 32px; }
  .edition-options > div { padding: 28px 22px; }
  .error-record { padding: 24px; }
}
@media (max-width: 370px) {
  .side-nav .icon { display: none; }
  .side-nav a { font-size: 0.875rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Paper artwork uses the same rendering palette in both interface themes. */
.brand-banner, .brand-mark, .workflow-visual { color-scheme: only light; }
.brand-banner { margin: 0 0 24px; padding: 28px 32px; background: #f4efdf; border: 1px solid #cfc5ae; border-radius: var(--radius); }
.brand-banner picture { display: block; }
.brand-caption { display: none; }
.brand-banner img { display: block; width: min(100%, 800px); height: auto; margin-inline: auto; }
.workflow-visual { margin: 0 0 40px; padding: 24px; border: 1px solid #cfc5ae; border-radius: 2px; background: #f4efdf; }
.workflow-visual figcaption { color: #4c483d; font-size: 0.875rem; text-align: center; padding: 4px 8px 8px; }
.workflow-diagram { display: block; width: 100%; height: auto; }
.workflow-diagram--mobile { display: none; max-width: 360px; margin-inline: auto; }
@container (max-width: 600px) {
  .workflow-diagram--wide { display: none; }
  .workflow-diagram--mobile { display: block; }
}
@media (max-width: 700px) {
  .workflow-diagram--wide { display: none; }
  .workflow-diagram--mobile { display: block; }
}
@media (max-width: 700px) {
  .brand-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px 16px; }
  .brand-banner picture { flex: 0 0 72px; }
  .brand-caption { display: block; flex: 1 1 8rem; min-width: 0; font: 600 1.375rem/1.1 var(--serif); color: #15130f; }
  .brand-caption span { display: block; margin-top: 8px; font: 0.875rem/1.5 var(--sans); color: #4c483d; }
  .workflow-visual { margin: 0 -8px 40px; padding: 12px; width: calc(100% + 16px); }
}

@media print {
  :root, :root[data-theme], :root:not([data-theme="light"]) {
    color-scheme: light;
    --canvas: white; --surface: white; --sidebar: white; --surface-hover: white;
    --ink: black; --muted: #444; --line: #bbb; --strong-line: #888;
    --selected: #eee; --selected-ink: black; --accent: #8d261b; --accent-bg: #f8e8e4;
    --button: white; --button-ink: black; --tag: #eee;
  }
  .app-shell { display: block; }
  .sidebar, .topbar, .search-controls, .workspace-footer, .skip-link { display: none !important; }
  main { max-width: none; padding: 0; }
  .about-layout { grid-template-columns: minmax(0, 1fr); }
  .panel { border-color: #bbb; }
  .button { border-color: #888; }
}

.demo-caption { max-width: 34ch; margin: .65rem 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.5; }

/* Connector guide: readable names and purpose, with original functional icons. */
.connector-notice { margin-bottom: 12px; }
.connector-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 0 36px; list-style: none; padding: 0; margin: 0; }
.connector-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 18px; padding: 30px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.connector-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); background: var(--sidebar); border-radius: 8px; color: var(--accent); }
.connector-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.connector-copy { min-width: 0; }
.connector-copy .connector-category { font: 600 .75rem/1.5 var(--sans); color: var(--muted); margin: 0 0 6px; letter-spacing: .035em; text-transform: uppercase; }
.connector-copy h2 { font: 600 1.15rem/1.35 var(--sans); letter-spacing: -.01em; }
.connector-copy .connector-alias { margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.connector-copy > p:last-child { margin-top: 14px; max-width: 34ch; color: var(--muted); font-size: .9375rem; }
.connector-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 14px 32px; margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.connector-bottom p { max-width: 48ch; color: var(--muted); font-size: .9375rem; }
.connector-bottom .text-link { margin: 0; }
@media (max-width: 700px) {
  .connector-item { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 25px 0; }
  .connector-mark { width: 40px; height: 40px; }
  .connector-mark svg { width: 26px; height: 26px; }
  .connector-copy > p:last-child { font-size: 1rem; margin-top: 12px; }
}
@media (max-width: 480px) {
  .side-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Feature explanations stay short until a reader asks for detail. */
.feature-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.feature-doc-link { border-color: var(--line); color: var(--ink); }
.feature-formats { margin-top: 24px; padding-top: 28px; border-top: 1px solid var(--line); }
.feature-formats > p { color: var(--muted); margin-top: 12px; max-width: 60ch; }
.format-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.format-summary section { min-width: 0; padding: 22px; border: 1px solid var(--line); background: var(--sidebar); }
.format-summary h4 { font: 600 1.05rem/1.5 var(--sans); margin-bottom: 12px; }
.format-summary p { color: var(--muted); line-height: 1.65; }
.format-summary p + p { margin-top: 14px; }
.format-summary .format-extensions { color: var(--ink); font: .9rem/1.8 ui-monospace, monospace; overflow-wrap: anywhere; }
.feature-formats > a { display: inline-flex; align-items: center; min-height: 48px; margin-top: 12px; }
@media (max-width: 700px) { .format-summary { grid-template-columns: minmax(0, 1fr); } }
.feature-details { grid-column: 1 / -1; margin-top: 8px; font-size: .9375rem; }
.feature-details summary { cursor: pointer; min-height: 48px; padding: 12px 0; color: var(--accent); font-weight: 600; }
.feature-details ul { margin: 10px 0; padding-left: 20px; color: var(--muted); }
.feature-details li + li { margin-top: 12px; }
.feature-details a, .feature-history a { display: inline-flex; align-items: center; min-height: 48px; padding-block: 10px; }
.feature-history { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); align-items: center; gap: 32px; padding: 32px 0; margin-top: 16px; border-block: 1px solid var(--line); }
.feature-kicker { margin-bottom: 12px; font: 600 .8rem/1.5 var(--sans); color: var(--accent); text-transform: uppercase; letter-spacing: .035em; }
.feature-history h3 { margin-bottom: 14px; }
.feature-history p:not(.feature-kicker) { color: var(--muted); max-width: 44ch; }
.feature-reference { display: grid; gap: 14px; min-width: 0; padding: 24px; background: var(--sidebar); border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.feature-reference span { color: var(--muted); font-size: .8125rem; }
.feature-reference strong { font: 500 clamp(1rem, 2vw, 1.35rem)/1.4 ui-monospace, monospace; overflow-wrap: anywhere; }
@media (max-width: 700px) { .feature-history { grid-template-columns: minmax(0, 1fr); } .feature-actions { display: grid; grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .side-nav > a[href="/docs/"] { grid-column: 1 / -1; } }
