@font-face {
  font-family: 'KoBOLD Display';
  src: url('assets/fonts/KoBOLDDisplay-v2-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'KoBOLD Story Serif';
  src: url('assets/fonts/KoBOLDStorySerif-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'KoBOLD Story Serif';
  src: url('assets/fonts/KoBOLDStorySerif-Medium.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
:root {
  --paper: #f6f3ed;
  --card: #fffdf7;
  --ink: #203e33;
  --muted: #586457;
  --line: #d5d9ca;
  --green: #214f3b;
  --amber: #9a590d;
  --error: #8b3526;
  --serif: 'KoBOLD Story Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
button, input, textarea { font: inherit; }
button, a, input, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: inherit; text-underline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #a45e19; outline-offset: 4px; }
[hidden] { display: none !important; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; background: var(--ink); color: #f7f4ea; padding: 28px 20px; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 13px 10px; border-radius: 9px; text-decoration: none; background: var(--card); color: var(--ink); }
.brand img { width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0; }
.brand-text { min-width: 0; }
.wordmark { display: block; font: 600 29px/1.1 'KoBOLD Display', Georgia, serif; letter-spacing: -.7px; font-feature-settings: 'ss01' 1; white-space: nowrap; }
.wordmark>span:first-child { color: #214f3b; }
.wordmark>span:last-child { color: var(--amber); }
.brand-sub { display: block; font: 400 12px/1.4 var(--serif); margin-top: 5px; white-space: nowrap; }
.side-intro { color: #d5dfd1; font-size: 16px; line-height: 1.6; margin: 30px 10px 24px; }
nav a { display: flex; gap: 12px; padding: 13px 10px; margin: 4px 0; color: #d5dfd1; text-decoration: none; font-size: 14px; border-radius: 5px; border: 1px solid transparent; }
nav a[aria-current=page] { color: white; background: #335345; border-color: #789281; }
nav a:hover:not([aria-disabled=true]) { background: #335345; }
nav a span { font-size: 12px; align-self: center; }
nav a[aria-disabled=true] { opacity: .55; cursor: not-allowed; }
.sidebar a:focus-visible { outline-color: #f1bb6c; }
.side-bottom { margin: auto 10px 0; padding-top: 36px; font-size: 12px; }
.small-dot { display: inline-block; background: #dfb466; border-radius: 50%; width: 6px; height: 6px; margin-right: 7px; }
.side-bottom p { color: #d5dfd1; margin: 12px 0 22px; }
.version { color: #c5d2c8; }
.workspace { margin-left: 250px; }
header { min-height: 80px; padding: 16px 6%; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.breadcrumb, .eyebrow, .step-label { font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }
.header-right { display: flex; gap: 22px; align-items: center; }
.pill { font-size: 12px; border: 1px solid #bbc5b6; border-radius: 20px; padding: 5px 12px; color: var(--muted); }
.text-button { background: none; border: 0; color: var(--green); padding: 10px 0; font-size: 14px; text-decoration: none; }
.text-button:hover { text-decoration: underline; }
main { padding: 38px 6% 48px; max-width: 1260px; margin: 0 auto; }
.eyebrow { margin: 0 0 14px; }
h1 { font: 400 clamp(38px, 4.4vw, 62px)/1.12 var(--serif); letter-spacing: -1.5px; margin: 0 0 20px; }
h1 em { font-style: normal; color: #53674d; }
h2 { font: 500 26px/1.3 var(--serif); margin: 8px 0 13px; }
h3 { font: 500 21px/1.4 var(--serif); margin: 12px 0 9px; }
.lede { color: var(--muted); max-width: 660px; font-size: 16px; line-height: 1.8; margin-bottom: 24px; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin: 0 0 28px; }
.hero-actions>span { font-size: 14px; color: var(--muted); }
.primary, .secondary { border-radius: 5px; padding: 12px 18px; font-size: 14px; min-height: 46px; line-height: 1.5; white-space: normal; transition: background .15s; }
.primary { color: white; background: var(--green); border: 1px solid var(--green); }
.primary:hover:not(:disabled) { background: #32664c; }
.primary span { margin-left: 22px; }
.secondary { background: var(--card); color: var(--green); border: 1px solid #a4b29c; }
.secondary:hover:not(:disabled) { background: #e9edde; }
.tunnel-hero { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: 28px; background: #203e33; }
.explainer-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-bottom: 38px; }
.explainer-cards article { border: 1px solid var(--line); border-radius: 9px; background: var(--card); overflow: hidden; }
.explainer-cards img { display: block; width: 100%; height: auto; }
.explainer-cards article>div { padding: 20px; }
.explainer-cards .eyebrow { font-size: 12px; letter-spacing: 1px; margin: 0 0 10px; }
.explainer-cards h2 { font-size: 25px; margin: 0 0 10px; }
.explainer-cards p:last-child { color: var(--muted); font-size: 14px; margin: 0; }
.compat-panel { border-top: 1px solid var(--line); padding-top: 28px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px; }
.compat-panel p { font-size: 14px; color: var(--muted); margin: 8px 0; }
.compat-panel .eyebrow { font-size: 12px; }
.compat-row { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 10px 0; font-size: 14px; gap: 12px; flex-wrap: wrap; }
.compat-row small { display: block; color: var(--muted); font-size: 12px; }
.badge { font-size: 12px; border-radius: 4px; padding: 4px 9px; }
.good { color: #345436; background: #e4ebda; }
.amber { color: #75501a; background: #f3e6c9; }
.fine { font-size: 12px; color: var(--muted); line-height: 1.8; }
.two-up { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 22px; min-width: 0; }
.card p { color: var(--muted); font-size: 14px; }
.backup-card { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.backup-card>div { flex: 1; min-width: min(250px, 100%); }
progress { width: 100%; accent-color: var(--green); height: 12px; }
.backup-card .fine { width: 100%; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
label { font-size: 14px; display: block; color: var(--ink); min-width: 0; }
label small { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
input:not([type=checkbox]), textarea { width: 100%; padding: 11px 12px; background: #fffefa; border: 1px solid #aab99f; border-radius: 4px; margin-top: 7px; color: var(--ink); }
textarea { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; resize: vertical; line-height: 1.8; }
.optional { font-size: 12px; color: var(--muted); }
.check { display: flex; flex-wrap: wrap; gap: 9px; align-items: baseline; margin: 20px 0; font-size: 14px; }
.check input { accent-color: var(--green); width: 18px; height: 18px; flex-shrink: 0; }
.check-detail { display: block; margin-left: 27px; color: var(--muted); font-size: 12px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.external { display: inline-block; font-size: 14px; color: var(--green); margin: 15px 0; }
.callout { padding: 20px 24px; background: #f1e6ce; border-left: 3px solid var(--amber); border-radius: 4px; margin: 26px 0; font-size: 14px; }
.callout p { font-size: 14px; margin: 5px 0; color: #674c24; }
.journey { padding: 0; list-style: none; }
.journey li { display: flex; gap: 20px; border-bottom: 1px solid var(--line); padding: 23px 0; }
.journey li>span { flex: 0 0 30px; height: 30px; border: 1px solid #94a486; border-radius: 50%; text-align: center; line-height: 28px; font-size: 12px; margin-top: 7px; }
.journey h2 { margin: 4px 0; font-size: 21px; }
.journey p { font-size: 14px; color: var(--muted); max-width: 650px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
dl { font-size: 12px; border-top: 1px solid var(--line); margin-top: 22px; padding-top: 12px; display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 6px 12px; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
#notice, .browser-support, .page-notice { padding: 16px 20px; border: 1px solid #b5c6a5; background: #e8efdf; border-radius: 5px; margin-bottom: 24px; font-size: 14px; overflow-wrap: anywhere; }
.browser-support { background: #f1e6ce; border-color: #c8ac72; }
.browser-support h2 { font: 600 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; margin: 0 0 7px; }
.browser-support p { margin: 0; }
#notice.error, .page-notice.error { background: #f8e8df; border-color: #bd8f79; color: var(--error); }
#policy-findings { font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.conflict { color: var(--error); }
footer { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); padding: 25px 6%; border-top: 1px solid var(--line); max-width: 1260px; margin: auto; }
.skip { position: fixed; top: -100px; left: 10px; z-index: 10; background: white; padding: 10px; }
.skip:focus { top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
code { font-size: .92em; overflow-wrap: anywhere; }
.backup-status { border-top: 1px solid var(--line); padding-top: 16px; }
.backup-card>.backup-status { flex: 0 0 100%; min-width: 0; }
.backup-status h3 { margin: 0 0 10px; font: 600 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.backup-meter { display: flex; align-items: center; gap: 15px; }
.backup-meter progress { flex: 1; min-width: 0; }
.backup-meter span { font-size: 12px; min-width: 38px; }
.backup-status dl { margin: 0; border: 0; padding: 0; }
.backup-status dd { min-height: 20px; }
.backup-status p { margin: 8px 0; }
.backup-status[data-outcome=failed] h3, .backup-status[data-outcome=failed] #backup-failure { color: var(--error); }
.backup-status[data-outcome=completed] h3 { color: #345436; }
.backup-status pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
summary { cursor: pointer; font-size: 14px; }
dialog { max-width: 560px; width: calc(100% - 40px); max-height: 85vh; overflow: auto; padding: 28px; border: 1px solid #aab99f; border-radius: 8px; background: var(--card); color: var(--ink); }
dialog::backdrop { background: #12231b99; }
dialog p { font-size: 14px; line-height: 1.7; }
dialog .button-row { margin-top: 18px; }
dialog .button-row button { flex: 1; }
dialog .external { margin: 4px 0; }
.copy-feedback { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 130px; }
.copy-feedback [role=status] { min-height: 1.6em; font-size: 12px; color: #345436; }
.copy-feedback .error, .field-error { color: var(--error); }
.field-error { display: block; font-size: 12px; margin-top: 6px; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error); }
.session-bar { font-size: 12px; color: var(--muted); margin-bottom: 24px; display: flex; gap: 12px 18px; flex-wrap: wrap; align-items: center; }
.session-bar:not(:has(> :not([hidden]))) { display: none; }
.session-bar .text-button { font-size: 12px; }
.operation-status { margin: 12px 0; font-size: 14px; max-width: 100%; width: 100%; }
.operation-status strong { display: block; white-space: pre-line; }
.operation-status progress { display: block; width: 100%; height: 12px; margin: 8px 0; }
.operation-detail { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.operation-status[data-state=failed] { color: var(--error); }
.operation-status[data-state=complete], .completion-label { color: #345436; }
.completion-label { display: inline-block; margin: 0 14px; font-weight: 600; }
.usb-instructions { border: 2px solid #718967; background: #edf2e8; }
.collection-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
#prepare-collection-feedback[data-state=complete] { display: none; }
#collection-files-dialog, #payload-audit-dialog { max-width: min(800px, 95vw); }
#collection-files-dialog pre, #payload-audit-results { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 50vh; overflow: auto; font-size: 12px; }
@media (max-width: 1050px) {
  .sidebar { width: 210px; padding: 24px 12px; }
  .workspace { margin-left: 210px; }
  .brand { flex-direction: column; text-align: center; }
  .brand img { width: 56px; height: 56px; }
  .breadcrumb { display: none; }
  header { justify-content: flex-end; }
  .two-up, .form-grid, .compat-panel { grid-template-columns: 1fr; }
  .compat-panel { gap: 16px; }
}
@media (max-width: 1000px) {
  .explainer-cards { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: auto; padding: 20px; overflow: visible; }
  .side-intro, .side-bottom { display: none; }
  .brand { display: inline-flex; flex-direction: row; text-align: left; padding: 10px 14px; }
  .brand img { width: 48px; height: 48px; }
  nav { display: flex; overflow-x: auto; gap: 14px; margin-top: 20px; padding: 4px; }
  nav a { flex-shrink: 0; padding: 9px; white-space: nowrap; }
  nav a span { display: none; }
  .workspace { margin: 0; }
  header { min-height: 68px; padding: 12px 6%; }
  .header-right { width: 100%; justify-content: space-between; gap: 12px; }
  .pill { font-size: 12px; }
  main { padding-top: 28px; }
  h1 { font-size: 40px; letter-spacing: -1px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 10px; }
  .card { padding: 20px; }
  .explainer-cards { gap: 24px; }
  .session-bar { gap: 8px 18px; }
  .journey li { gap: 12px; }
  footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}

/* Page artwork keeps its proportions and stays outside action/status controls. */
.overview-banner { display: block; width: auto; max-width: 100%; height: auto; max-height: 32vh; border-radius: 9px; margin: 0 auto 28px; }
.page-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 34%); gap: 24px; align-items: center; margin-bottom: 24px; }
.page-intro .lede { margin-bottom: 0; }
.step-art { display: block; width: 100%; height: auto; border-radius: 8px; }
.emblem-intro { grid-template-columns: minmax(0, 1fr) 140px; }
@media (max-width: 1050px) {
  .page-intro { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .step-art { max-width: 360px; }
  .emblem-intro { grid-template-columns: minmax(0, 1fr) 100px; gap: 12px; }
}
@media (max-width: 480px) {
  .emblem-intro { grid-template-columns: minmax(0, 1fr); }
  .emblem-intro .step-art { width: 100px; }
}
