/*
 * Cloudflare domain & email tutorial · Brclio Design System.
 * Adapted from assets/template-tutorial.html, with component-library
 * section headers, editorial columns, note, flow, CTA, accordion and checklist.
 * © 2026 Brclio · https://github.com/Brclio/brclio-design-system
 * CC BY-NC-SA 4.0
 */
:root {
  --_brclio-ds: "brclio-v1";
  --blue: #2b7fd8;
  --blue-deep: #1e5ba8;
  --yellow: #f4d758;
  --yellow-soft: #fff3cd;
  --red: #e84a5f;
  --cream: #fefcf6;
  --cream-dark: #faf6eb;
  --ink: #1a1a2e;
  --ink-light: #4a4a5a;
  --ink-faint: #686574;
  --line: rgba(26, 26, 46, .15);
  --serif: "Fraunces", "Noto Serif SC", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; scroll-padding-top: 112px; }
body {
  min-width: 320px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--cream);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue-deep); outline-offset: 5px; }
a { color: var(--blue-deep); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button { cursor: pointer; color: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
strong { font-weight: 700; }
h1, h2, h3, h4 { text-wrap: pretty; }
p, li, dd, a, code, strong, small { overflow-wrap: anywhere; }
[hidden] { display: none !important; }
.container { width: min(100% - clamp(36px, 6.5vw, 104px), 1240px); margin-inline: auto; }
.skip-link {
  position: fixed; top: 12px; left: 16px; z-index: 100;
  padding: 12px 18px; background: var(--yellow); color: var(--ink);
  transform: translateY(-160%); font-weight: 700;
}
.skip-link:focus { transform: none; }
.eyebrow {
  display: block; color: var(--blue-deep); font-size: .71rem;
  font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  line-height: 1.65;
}
.hl-yellow { background: linear-gradient(transparent 65%, rgba(244, 215, 88, .65) 65%); }
mark { color: inherit; background: linear-gradient(transparent 65%, rgba(244, 215, 88, .7) 65%); padding: 0; }
.small { font-size: .79rem; color: var(--ink-faint); line-height: 1.75; }

/* A quiet masthead, leaving the tutorial itself in charge. */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.brand-word { font-family: var(--serif); font-size: 1.2rem; font-weight: 900; letter-spacing: -.025em; }
.brand-word small { display: block; font: 500 .62rem/1.5 var(--sans); color: var(--ink-faint); letter-spacing: .09em; }
.header-actions { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.header-actions a, .header-actions button {
  min-height: 44px; display: inline-flex; align-items: center; padding: 8px 0;
  background: none; border: 0; font-size: .78rem; font-weight: 600;
  color: var(--ink-light); text-decoration: none; white-space: nowrap;
}
.header-actions a:hover, .header-actions button:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Template hero, adapted to an asymmetric editorial cover. */
.hero {
  display: grid; grid-template-columns: 1.15fr .9fr; align-items: center;
  gap: clamp(28px, 4.5vw, 70px); padding-block: clamp(62px, 7vw, 104px) 60px;
  min-height: 660px;
}
.hero-copy { min-width: 0; position: relative; z-index: 2; }
.hero h1 {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(2.8rem, 5.1vw, 4.4rem); line-height: 1.18;
  letter-spacing: -.055em; margin-block: 22px 25px;
}
.hero h1 em { color: var(--blue-deep); font-style: normal; }
.hero-lead { max-width: 520px; color: var(--ink-light); font-size: 1.03rem; line-height: 1.95; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .74rem; color: var(--ink-faint); margin-top: 21px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px; padding: 12px 22px; border: 1px solid transparent;
  border-radius: 5px; background: var(--blue-deep); color: var(--cream);
  font-size: .85rem; line-height: 1.55; font-weight: 700; text-decoration: none;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1);
}
.button:hover { transform: translateY(-2px); text-decoration: underline; text-underline-offset: 4px; }
.button--outline { border-color: var(--line); color: var(--ink); background: transparent; }
.hero-art {
  position: relative; min-width: 0; height: 455px; isolation: isolate;
  background: radial-gradient(ellipse at 56% 48%, rgba(244, 215, 88, .19), transparent 68%);
}
.postmark {
  position: absolute; top: 8px; right: 40px; display: grid; place-content: center;
  width: 106px; height: 106px; border: 1px dashed rgba(26, 26, 46, .35);
  border-radius: 50%; text-align: center; font: italic .78rem/1.45 var(--serif);
  color: var(--ink-faint); padding: 15px;
}
.postmark strong { font-size: 1.45rem; color: var(--blue-deep); }
.postmark b { font-size: .87rem; color: var(--blue-deep); white-space: nowrap; }
.mail-envelope {
  position: absolute; left: 0; top: 114px; width: 82%; min-height: 254px;
  padding: 110px 28px 27px; background: #f7edcf; border: 1px solid rgba(26, 26, 46, .13);
  box-shadow: 0 14px 35px rgba(90, 68, 22, .08); isolation: isolate;
}
.mail-envelope::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 105px;
  background: #f0e0af; clip-path: polygon(0 0, 100% 0, 50% 100%); z-index: -1;
}
.mail-envelope small { display: block; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.mail-envelope strong { display: block; margin-block: 7px; font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.85rem); line-height: 1.35; color: var(--blue-deep); letter-spacing: -.02em; }
.mail-envelope p { font-size: .77rem; color: var(--ink-light); }
.hero-art .character { position: absolute; bottom: 10px; right: -18px; width: 62%; object-fit: contain; z-index: 2; }
.hand-note { position: absolute; bottom: 10px; left: 8px; max-width: 62%; color: var(--blue-deep); font: 500 1.15rem/1.5 "Caveat", var(--serif); }

.route-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.route-strip a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 14px; gap: 2px 16px; align-content: start; padding: 24px 24px 24px 0; text-decoration: none; min-width: 0; }
.route-strip a + a { padding-left: 27px; border-left: 1px solid var(--line); }
.route-strip em { grid-row: span 2; font: italic 2rem/1.15 var(--serif); color: var(--blue-deep); }
.route-strip span { font-size: .95rem; font-weight: 700; color: var(--ink); }
.route-strip small { display: block; margin-top: 3px; font-size: .72rem; font-weight: 400; color: var(--ink-faint); }
.route-strip a > b { color: var(--blue-deep); font-weight: 400; }
.route-strip a:hover span { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 4px; text-underline-offset: 4px; }

/* Reading frame: navigable on desktop and fully present on small screens. */
.reading-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(38px, 6vw, 88px); align-items: start; padding-top: clamp(70px, 8vw, 110px); }
.toc { position: sticky; top: 110px; padding-top: 4px; font-size: .79rem; }
.toc-kicker { font-size: .65rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; margin-bottom: 18px; }
.toc nav { display: grid; gap: 3px; }
.toc nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; margin-left: -12px; color: var(--ink-light); text-decoration: none; line-height: 1.55; border-radius: 3px; }
.toc nav a:hover { background: var(--cream-dark); }
.toc nav a.active, .toc nav a[aria-current="location"] { color: var(--blue-deep); font-weight: 700; background: rgba(244, 215, 88, .26); }
.toc nav a span { color: var(--ink-faint); font: .78rem var(--serif); margin-right: 12px; }
.toc-progress { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: .72rem; line-height: 1.8; }
.toc-progress strong { color: var(--blue-deep); }
.toc > .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: .72rem; margin-top: 12px; }
.article-content { min-width: 0; padding-bottom: 12px; }
.chapter { scroll-margin-top: 0; margin-bottom: clamp(78px, 8vw, 122px); }
.chapter-head { display: grid; grid-template-columns: 59px minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 33px; }
.chapter-no { font: italic 3.5rem/.98 var(--serif); color: var(--blue-deep); opacity: .32; padding-top: 2px; }
.chapter-head .eyebrow { font-size: .65rem; letter-spacing: .15em; }
.chapter h2 { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.65rem); line-height: 1.32; letter-spacing: -.045em; font-weight: 900; margin-block: 8px 14px; }
.chapter-head p { color: var(--ink-light); font-size: .95rem; max-width: 680px; line-height: 1.9; }
.chapter > p { margin-bottom: 20px; color: var(--ink-light); }
.chapter h3 { font-family: var(--serif); font-size: clamp(1.12rem, 1.6vw, 1.4rem); line-height: 1.55; font-weight: 700; }
.chapter h4 { line-height: 1.55; }
.chapter p + p { margin-top: 14px; }
.source-inline { margin-top: 24px; color: var(--ink-faint); font-size: .74rem !important; line-height: 1.9; }

/* Adapted magazine columns: typographic grouping without nested cards. */
.prep-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-block: 32px 38px; counter-reset: prep; }
.prep-grid > div { position: relative; padding-top: 30px; counter-increment: prep; }
.prep-grid > div::before { content: "0" counter(prep); position: absolute; top: 0; font: italic .88rem var(--serif); color: var(--blue-deep); }
.prep-grid strong { display: block; font-size: 1rem; margin-bottom: 8px; }
.prep-grid p { color: var(--ink-light); font-size: .85rem; line-height: 1.9; }
.plain-list, .detail-list, .mini-steps { margin-block: 20px; }
.plain-list li, .detail-list li { padding-left: 21px; position: relative; margin-block: 11px; color: var(--ink-light); }
.plain-list li::before, ul.detail-list > li::before, .detail-list ul > li::before { content: ""; position: absolute; top: .77em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.detail-list ol, ol.detail-list { counter-reset: detail; }
.detail-list ol > li, ol.detail-list > li { counter-increment: detail; padding-left: 27px; }
.detail-list ol > li::before, ol.detail-list > li::before { content: counter(detail) "."; position: absolute; left: 0; top: 0; color: var(--blue-deep); font-family: var(--serif); font-weight: 700; }
.quote-note {
  position: relative; padding: 27px 28px 25px; margin-block: 32px;
  background: var(--cream-dark); border: 1px dashed rgba(26, 26, 46, .25); border-radius: 5px;
}
.quote-note-tag { position: absolute; top: -14px; left: 18px; background: var(--cream); padding: 0 10px; font-size: .77rem; font-weight: 700; color: var(--blue-deep); }
.quote-note p { font-size: .9rem; color: var(--ink-light); line-height: 1.95; }
.quote-note strong { color: var(--ink); }
.wide-note { margin-block: 27px; padding: 22px 25px; background: var(--yellow-soft); color: var(--ink-light); font-size: .87rem; line-height: 1.9; }
.wide-note strong { color: var(--ink); }

/* Step headings stay outside the screenshots; the page remains an article. */
.step { margin-top: clamp(42px, 5vw, 66px); }
.step-heading { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 23px; }
.step-badge { flex: 0 0 34px; min-height: 34px; display: grid; place-items: center; background: var(--yellow); border-radius: 50%; color: var(--ink); font: 700 .96rem var(--serif); margin-top: 3px; }
.step-heading > div { min-width: 0; }
.step-heading h3 { margin-bottom: 8px; }
.step-heading p { color: var(--ink-light); font-size: .9rem; line-height: 1.9; }
.step > p, .step-body > p { color: var(--ink-light); font-size: .93rem; margin-block: 18px; }
.path { display: inline-flex; flex-wrap: wrap; gap: 4px 7px; max-width: 100%; margin-block: 10px 4px; padding: 7px 11px; background: var(--cream-dark); color: var(--blue-deep); font-size: .75rem; line-height: 1.85; border-radius: 3px; overflow-wrap: anywhere; }
.screenshot { min-width: 0; margin-block: 24px 30px; }
.zoom-trigger { position: relative; display: block; width: 100%; min-height: 44px; padding: 0; background: #f7f3e8; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; cursor: zoom-in; text-align: left; }
.zoom-trigger img { width: 100%; height: auto; }
.zoom-hint { position: absolute; bottom: 12px; right: 12px; padding: 7px 11px; background: var(--cream); border: 1px solid var(--line); color: var(--ink); border-radius: 3px; font-size: .68rem; line-height: 1.4; }
.zoom-trigger:hover .zoom-hint { background: var(--yellow-soft); }
.screenshot figcaption { display: block; margin-top: 12px; font-size: .72rem; color: var(--ink-faint); line-height: 1.85; }
.capture-tag { display: inline-block; margin-right: 8px; font-size: .62rem; letter-spacing: .03em; color: var(--blue-deep); font-weight: 700; text-transform: uppercase; }
.step-split { display: grid; grid-template-columns: .95fr 1.2fr; align-items: start; gap: 30px; margin-top: 40px; }
.step-split .screenshot { margin: 0; }
.step-split .step-heading { margin-bottom: 14px; }
.step-split .step-body { min-width: 0; }
.mini-steps { counter-reset: mini; display: grid; gap: 15px; }
.mini-steps li { counter-increment: mini; position: relative; padding-left: 30px; color: var(--ink-light); font-size: .9rem; line-height: 1.9; }
.mini-steps li::before { content: counter(mini, decimal-leading-zero); position: absolute; left: 0; top: 2px; font: italic .82rem/1.9 var(--serif); color: var(--blue-deep); }
.field-guide { margin-block: 26px; }
.field-guide dl, dl.field-guide { display: grid; }
.field-guide dl > div, dl.field-guide > div { display: grid; grid-template-columns: minmax(120px, .32fr) minmax(0, 1fr); gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.field-guide dt { font-size: .87rem; font-weight: 700; color: var(--ink); }
.field-guide dd { color: var(--ink-light); font-size: .87rem; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .88em; background: var(--cream-dark); padding: .1em .25em; border-radius: 3px; }
.code-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-block: 17px; padding: 9px 10px 9px 18px; background: var(--cream-dark); border: 1px solid var(--line); border-radius: 4px; }
.code-line code { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .87rem; line-height: 1.9; }
.copy-button { flex-shrink: 0; min-width: 52px; min-height: 44px; padding: 9px 11px; background: var(--cream); color: var(--blue-deep); border: 1px solid var(--line); border-radius: 3px; font-size: .74rem; }
.copy-button:hover { background: var(--yellow-soft); }
.dns-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; margin-block: 30px; }
.dns-grid > div { padding-block: 18px 0; border-top: 1px solid var(--line); min-width: 0; }
.record-type { display: inline-block; margin-bottom: 12px; color: var(--blue-deep); font: italic 1.5rem/1.2 var(--serif); }
.dns-grid h4 { font-size: .96rem; margin-bottom: 8px; }
.dns-grid p { font-size: .82rem; color: var(--ink-light); line-height: 1.9; }

/* Flow Arrow component, placed on one generous brand-blue panel. */
.flow-panel { background: var(--blue-deep); color: var(--cream); padding: clamp(25px, 3.6vw, 43px); margin-block: 36px; }
.flow-panel h3 { color: var(--cream); font-size: 1.35rem; }
.flow-panel .eyebrow { color: var(--yellow); margin-bottom: 10px; }
.flow-panel > p { margin-top: 22px; font-size: .85rem; color: var(--cream); opacity: .9; }
.system-flow { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.system-flow > div { flex: 1; min-width: 0; padding-block: 10px; }
.system-flow small { display: block; margin-bottom: 10px; font-size: .65rem; color: var(--yellow); letter-spacing: .07em; }
.system-flow strong { display: block; color: var(--cream); font-size: .99rem; line-height: 1.7; }
.system-flow .flow-arrow { flex-shrink: 0; font: 1.5rem var(--serif); color: var(--yellow); }
.flow-panel code { background: transparent; color: var(--cream); padding: 0; }
.flow-panel a { color: var(--cream); }
.flow-panel :focus-visible { outline-color: var(--yellow); }

/* A small workbench and checklist provide an actual learning loop. */
.example-workbench { padding: clamp(24px, 3.2vw, 36px); background: var(--cream-dark); margin-block: 32px; }
.example-workbench h3 { margin-bottom: 12px; }
.example-workbench h4 { font-family: var(--serif); font-size: 1.2rem; margin-block: 10px 12px; }
.example-workbench > p { font-size: .88rem; color: var(--ink-light); }
.example-workbench form { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr .65fr; gap: 18px; }
.form-grid label { display: grid; gap: 8px; font-size: .79rem; font-weight: 600; min-width: 0; }
.form-grid input { width: 100%; min-width: 0; min-height: 47px; padding: 10px 12px; border: 1px solid rgba(26, 26, 46, .3); border-radius: 3px; background: var(--cream); color: var(--ink); font-size: .92rem; }
.form-grid input::placeholder { color: var(--ink-faint); }
.example-workbench form > .button { margin-top: 18px; }
.example-output { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 21px; }
.example-output dl { display: grid; gap: 13px; }
.example-output dl > div { display: grid; grid-template-columns: 112px 1fr; gap: 15px; }
.example-output dt { font-size: .78rem; color: var(--ink-faint); }
.example-output dd { font-size: .9rem; font-weight: 600; color: var(--blue-deep); }
.example-output > p:not(.status) { font-size: .82rem; color: var(--ink-light); line-height: 1.9; }
.status { font-size: .76rem; color: var(--ink-faint); margin-top: 15px; min-height: 1.8em; }
.status[data-state="error"], .status.error { color: #b42c41; }
.checklist { margin-top: 27px; }
.checklist label { display: flex; align-items: flex-start; gap: 17px; min-height: 60px; padding: 19px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.checklist input { width: 22px; height: 22px; flex: 0 0 22px; accent-color: var(--blue-deep); margin-top: 4px; cursor: pointer; }
.checklist label > span { display: grid; gap: 4px; }
.checklist strong { font-size: .96rem; }
.checklist small { display: block; font-size: .82rem; color: var(--ink-light); line-height: 1.85; }
.checklist input:checked + span strong { text-decoration: line-through; text-decoration-color: var(--blue); color: var(--ink-faint); }
.progress-line { display: flex; align-items: center; flex-wrap: wrap; gap: 13px 18px; margin-top: 22px; }
progress { appearance: none; -webkit-appearance: none; width: min(160px, 35%); height: 6px; border: 0; border-radius: 9px; background: #e8e3d6; overflow: hidden; }
progress::-webkit-progress-bar { background: #e8e3d6; }
progress::-webkit-progress-value { background: var(--blue-deep); }
progress::-moz-progress-bar { background: var(--blue-deep); }
.progress-copy { font-size: .78rem; color: var(--ink-faint); }
.text-button { min-height: 44px; padding: 9px 0; border: 0; background: transparent; color: var(--blue-deep); font-size: .78rem; text-decoration: underline; text-underline-offset: 4px; }
.progress-line .text-button { margin-left: auto; }

.editorial-rows { margin-top: 26px; border-top: 1px solid var(--line); }
.editorial-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 23px; padding-block: 30px; border-bottom: 1px solid var(--line); }
.editorial-num { font: italic 2.3rem/1.2 var(--serif); color: var(--blue-deep); opacity: .55; }
.editorial-row h3 { margin-bottom: 10px; }
.editorial-row p { color: var(--ink-light); font-size: .92rem; line-height: 1.95; }
.editorial-row a { display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; margin-top: 8px; }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-item:first-of-type { border-top: 1px solid var(--line); }
.accordion-item summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; padding: 19px 0; cursor: pointer; list-style: none; }
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary h3 { font-family: var(--sans); font-weight: 600; font-size: .98rem; line-height: 1.75; }
.accordion-item summary > span { flex-shrink: 0; color: var(--blue-deep); font-size: 1.3rem; }
.accordion-item summary:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.accordion-item[open] summary > span { color: var(--ink-faint); }
.accordion-body { padding-bottom: 26px; max-width: 740px; }
.accordion-body p, .accordion-body li { color: var(--ink-light); font-size: .9rem; line-height: 1.95; }
.source-list { counter-reset: source; margin-top: 29px; }
.source-list li { counter-increment: source; display: grid; grid-template-columns: 29px minmax(0, 1fr); gap: 14px; padding-block: 14px; border-bottom: 1px solid var(--line); font-size: .85rem; }
.source-list li::before { content: counter(source, decimal-leading-zero); font: italic .85rem/1.9 var(--serif); color: var(--ink-faint); }
.source-list li a { display: inline-flex; align-items: center; min-height: 44px; }
.source-list small { display: block; font-size: .76rem; color: var(--ink-faint); margin-top: 3px; }
.source-list li > small { grid-column: 2; }
.source-list li > span { grid-column: 2; font-size: .77rem; color: var(--ink-faint); margin-top: -12px; }

.site-footer { border-top: 1px solid var(--line); padding-block: 38px 44px; display: grid; grid-template-columns: 1fr auto; gap: 20px 38px; }
.footer-brand { display: flex; align-items: center; gap: 17px; font-family: var(--serif); font-weight: 700; font-size: 1.03rem; }
.footer-brand img { width: 56px; height: 56px; border-radius: 50%; }
.footer-brand p { font-family: var(--sans); font-size: .78rem; color: var(--ink-light); font-weight: 400; margin-top: 4px; }
.footer-brand span, .footer-brand small { display: block; font-family: var(--sans); font-size: .77rem; font-weight: 400; color: var(--ink-faint); margin-top: 6px; }
.footer-links { display: flex; align-items: start; flex-wrap: wrap; gap: 14px 22px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .78rem; }
.site-footer > .small { grid-column: 1 / -1; max-width: 940px; }

/* Native dialog, visible focus and no off-screen controls. */
.image-dialog { width: min(1440px, calc(100vw - 32px)); height: min(1020px, calc(100dvh - 40px)); max-width: none; max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--cream); color: var(--ink); overflow: hidden; box-shadow: 0 25px 70px rgba(26, 26, 46, .22); }
.image-dialog[open] { display: flex; flex-direction: column; }
.image-dialog::backdrop { background: rgba(26, 26, 46, .72); }
.dialog-bar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 18px; background: var(--cream); border-bottom: 1px solid var(--line); }
.dialog-bar p { font-size: .8rem; line-height: 1.6; }
.dialog-bar button { min-width: 44px; min-height: 44px; flex-shrink: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--cream-dark); font-size: .8rem; }
.image-tools { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 12px 18px 0; }
.image-mode-group, .image-file-actions { display: flex; align-items: center; gap: 8px; }
.image-mode-button, .image-file-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 14px; font-size: .77rem; line-height: 1.5; border: 1px solid var(--line); border-radius: 4px; background: var(--cream); color: var(--blue-deep); text-decoration: none; }
.image-mode-button[aria-pressed="true"] { background: var(--yellow-soft); color: var(--ink); font-weight: 700; }
.image-mode-button:hover, .image-file-actions a:hover { text-decoration: underline; text-underline-offset: 4px; }
.image-mode-button:disabled { cursor: wait; color: var(--ink-faint); opacity: .65; }
.image-info { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 3px 18px; padding: 10px 18px 13px; color: var(--ink-faint); font-size: .7rem; line-height: 1.7; }
#image-dimensions { color: var(--ink-light); }
.image-scale { font-variant-numeric: tabular-nums; }
#image-guidance { margin-left: auto; }
.image-viewport { flex: 1 1 auto; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; background: var(--cream-dark); border-top: 1px solid var(--line); scrollbar-color: var(--blue-deep) var(--cream-dark); }
.image-viewport:focus-visible { outline-offset: -5px; }
.image-stage { display: grid; place-items: center; width: max-content; height: max-content; min-width: 100%; min-height: 100%; padding: 16px; }
.image-stage img { max-width: none; max-height: none; width: auto; height: auto; margin: 0; image-rendering: auto; }
.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 38px); padding: 11px 18px; background: var(--ink); color: var(--cream); border-radius: 4px; font-size: .82rem; text-align: center; pointer-events: none; }
.toast:empty { display: none; }
.back-top { position: fixed; right: 23px; bottom: 24px; z-index: 15; display: grid; place-items: center; width: 46px; min-height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--cream); color: var(--blue-deep); text-decoration: none; font-size: 1.15rem; }
.back-top:hover { background: var(--yellow-soft); }

@media (max-width: 1100px) {
  .hero { min-height: 615px; gap: 25px; }
  .hero-art { height: 400px; }
  .hero-art .character { bottom: 5px; right: -10px; }
  .postmark { right: 8px; top: 0; }
  .mail-envelope { top: 100px; padding-inline: 20px; width: 89%; }
  .hand-note { bottom: -11px; font-size: 1rem; }
  .reading-layout { grid-template-columns: 153px minmax(0, 1fr); gap: 37px; }
}
@media (max-width: 900px) {
  html { scroll-padding-top: 96px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 56px 42px; gap: 25px; }
  .hero h1 { font-size: clamp(2.9rem, 7.2vw, 4.25rem); max-width: 720px; }
  .hero-lead { max-width: 660px; }
  .hero-art { width: min(520px, 100%); height: 370px; margin-inline: auto; }
  .mail-envelope { top: 75px; min-height: 235px; width: 78%; }
  .hero-art .character { width: 54%; bottom: 6px; right: 0; }
  .hand-note { bottom: 8px; }
  .postmark { right: 30px; top: -8px; width: 95px; height: 95px; }
  .route-strip a { grid-template-columns: 31px minmax(0, 1fr) 12px; gap: 2px 10px; padding-right: 16px; }
  .route-strip a + a { padding-left: 18px; }
  .route-strip em { font-size: 1.75rem; }
  .route-strip span { font-size: .87rem; }
  .reading-layout { grid-template-columns: 1fr; gap: 45px; padding-top: 46px; }
  .toc { position: static; padding: 0 0 25px; border-bottom: 1px solid var(--line); }
  .toc-kicker { margin-bottom: 13px; }
  .toc nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 12px; }
  .toc nav a { margin-left: 0; padding: 10px; }
  .toc nav a span { margin-right: 8px; }
  .toc-progress { border: 0; padding: 0; margin-top: 15px; }
  .chapter { scroll-margin-top: 0; }
  .chapter-head { grid-template-columns: 55px 1fr; }
  .step-split { grid-template-columns: 1fr 1.12fr; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  html { scroll-padding-top: 112px; }
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 91px; flex-wrap: wrap; gap: 0; padding-block: 10px 4px; }
  .brand { gap: 8px; }
  .brand img { width: 33px; height: 33px; }
  .brand-word { font-size: 1.02rem; }
  .brand-word small { font-size: .55rem; }
  .header-actions { width: 100%; justify-content: space-between; gap: 13px; }
  .header-actions a, .header-actions button { font-size: .67rem; }
  .hero { padding-block: 42px 30px; gap: 30px; }
  .hero h1 { font-size: clamp(1.8rem, 8.5vw, 3.5rem); letter-spacing: -.055em; margin-block: 19px; }
  .hero .eyebrow { font-size: .62rem; letter-spacing: .12em; }
  .hero-lead { font-size: .91rem; line-height: 1.95; }
  .hero-meta { font-size: .67rem; gap: 5px 14px; margin-top: 17px; }
  .hero-actions { gap: 10px; margin-top: 23px; }
  .button { padding: 11px 17px; font-size: .8rem; }
  .hero-art { height: 304px; max-width: 400px; }
  .mail-envelope { top: 64px; padding: 83px 18px 20px; min-height: 202px; width: 83%; }
  .mail-envelope::before { height: 77px; }
  .mail-envelope small { font-size: .55rem; }
  .mail-envelope strong { font-size: clamp(1.05rem, 4.6vw, 1.4rem); max-width: 230px; }
  .mail-envelope p { font-size: .66rem; max-width: 190px; }
  .hero-art .character { width: 54%; right: -7px; bottom: 0; }
  .postmark { width: 84px; height: 84px; right: 18px; top: -10px; padding: 10px; font-size: .56rem; }
  .postmark b { font-size: .68rem; }
  .postmark strong { font-size: 1.18rem; }
  .hand-note { bottom: -5px; left: 0; font-size: .87rem; max-width: 63%; }
  .route-strip { grid-template-columns: 1fr; }
  .route-strip a { padding: 16px 0; grid-template-columns: 33px minmax(0, 1fr) 14px; gap: 0 14px; }
  .route-strip a + a { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .route-strip em { font-size: 1.85rem; }
  .route-strip span { font-size: .91rem; }
  .route-strip small { font-size: .69rem; }
  .reading-layout { padding-top: 34px; gap: 37px; }
  .toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 9px; }
  .toc nav a { font-size: .77rem; }
  .chapter { margin-bottom: 74px; scroll-margin-top: 0; }
  .chapter-head { grid-template-columns: 39px minmax(0, 1fr); gap: 12px; margin-bottom: 27px; }
  .chapter-no { font-size: 2.4rem; }
  .chapter-head .eyebrow { font-size: .58rem; letter-spacing: .13em; }
  .chapter h2 { font-size: clamp(1.57rem, 6.5vw, 2.1rem); letter-spacing: -.04em; margin-block: 6px 13px; }
  .chapter-head p { font-size: .87rem; line-height: 1.95; }
  .prep-grid { grid-template-columns: 1fr; gap: 25px; margin-block: 28px 33px; }
  .prep-grid > div { padding: 0 0 0 32px; }
  .prep-grid > div::before { top: 3px; left: 0; }
  .prep-grid strong { font-size: .96rem; margin-bottom: 5px; }
  .prep-grid p { font-size: .85rem; }
  .quote-note { padding: 24px 20px 21px; margin-block: 29px; }
  .quote-note p { font-size: .85rem; }
  .quote-note-tag { left: 11px; font-size: .7rem; }
  .wide-note { padding: 19px 20px; font-size: .83rem; }
  .step { margin-top: 39px; }
  .step-heading { gap: 12px; margin-bottom: 18px; }
  .step-badge { flex-basis: 29px; min-height: 29px; font-size: .87rem; }
  .step-heading h3 { font-size: 1.1rem; line-height: 1.65; }
  .step-heading p, .step > p, .step-body > p { font-size: .86rem; }
  .step-split { grid-template-columns: 1fr; gap: 22px; margin-top: 32px; }
  .path { font-size: .69rem; padding: 7px 9px; }
  .screenshot { margin-block: 19px 25px; }
  .screenshot figcaption { font-size: .67rem; margin-top: 10px; }
  .zoom-hint { right: 7px; bottom: 7px; font-size: .58rem; padding: 5px 7px; }
  .field-guide dl > div, dl.field-guide > div { grid-template-columns: 1fr; gap: 4px; padding-block: 14px; }
  .field-guide dt, .field-guide dd { font-size: .83rem; }
  .code-line { gap: 9px; padding-left: 12px; }
  .code-line code { font-size: .77rem; }
  .dns-grid { grid-template-columns: 1fr; gap: 23px; }
  .dns-grid > div { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 3px 17px; }
  .record-type { grid-row: span 2; font-size: 1.32rem; margin: 0; padding-top: 3px; }
  .dns-grid h4 { margin-bottom: 3px; }
  .dns-grid p { font-size: .83rem; }
  .flow-panel { padding: 25px 22px; margin-block: 28px; }
  .flow-panel h3 { font-size: 1.14rem; }
  .system-flow { flex-direction: column; align-items: stretch; gap: 4px; margin-top: 22px; }
  .system-flow > div { padding-block: 6px; }
  .system-flow small { margin-bottom: 5px; }
  .system-flow strong { font-size: 1rem; }
  .system-flow .flow-arrow { align-self: flex-start; transform: rotate(90deg); margin: 5px 0 5px 4px; }
  .example-workbench { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .example-output dl > div { grid-template-columns: 1fr; gap: 3px; }
  .checklist label { gap: 13px; padding-block: 17px; }
  .checklist strong { font-size: .89rem; }
  .checklist small { font-size: .8rem; }
  .progress-line { gap: 8px 11px; }
  .progress-copy, .text-button { font-size: .71rem; }
  .editorial-row { grid-template-columns: 33px minmax(0, 1fr); gap: 15px; padding-block: 25px; }
  .editorial-num { font-size: 1.8rem; }
  .editorial-row p { font-size: .87rem; }
  .accordion-item summary { gap: 18px; padding-block: 18px; }
  .accordion-item summary h3 { font-size: .9rem; }
  .accordion-body p, .accordion-body li { font-size: .85rem; }
  .source-list li { gap: 10px; grid-template-columns: 24px minmax(0, 1fr); font-size: .8rem; }
  .site-footer { grid-template-columns: 1fr; gap: 18px; padding-block: 30px 75px; }
  .footer-links { gap: 10px 20px; }
  .image-dialog { width: calc(100vw - 16px); height: calc(100dvh - 24px); max-height: calc(100dvh - 24px); }
  .dialog-bar { padding: 8px 11px; gap: 12px; }
  .dialog-bar p { font-size: .7rem; }
  .image-tools { padding: 10px 11px 0; gap: 8px; }
  .image-mode-group, .image-file-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .image-mode-button, .image-file-actions a { padding-inline: 9px; font-size: .72rem; }
  .image-info { padding: 9px 11px 11px; gap: 3px 12px; font-size: .65rem; }
  #image-guidance { margin-left: 0; flex-basis: 100%; }
  .back-top { right: 15px; bottom: 15px; width: 44px; min-height: 44px; }
  .toast { bottom: 68px; font-size: .76rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  @page { margin: 17mm 15mm; }
  html { scroll-behavior: auto; }
  body { min-width: 0; background: var(--cream); font-size: 10pt; line-height: 1.7; }
  .container { width: 100%; max-width: none; }
  .site-header, .header-actions, .hero-actions, .route-strip, .toc, .zoom-hint,
  .copy-button, .text-button, .back-top, .toast, .image-dialog, .skip-link,
  .example-workbench form, .footer-links { display: none !important; }
  .hero { display: block; min-height: 0; padding-block: 0 25px; }
  .hero h1 { font-size: 30pt; }
  .hero-lead { max-width: none; font-size: 11pt; }
  .hero-art { display: none; }
  .hero-meta { font-size: 8pt; }
  .reading-layout { display: block; padding-top: 20px; }
  .chapter { margin-bottom: 36px; scroll-margin: 0; }
  .chapter-head { break-after: avoid; margin-bottom: 18px; }
  .chapter h2 { font-size: 21pt; }
  .chapter h3 { font-size: 13pt; }
  .step { margin-top: 25px; }
  .step-heading { break-after: avoid; }
  .screenshot { break-inside: avoid; margin-block: 17px; }
  .zoom-trigger { border: 1px solid var(--line); cursor: default; }
  .screenshot img { max-height: 160mm; object-fit: contain; }
  .quote-note, .wide-note, .prep-grid, .dns-grid, .flow-panel, .editorial-row, .example-workbench, .mini-steps li, .checklist label, dl.field-guide > div { break-inside: avoid; }
  .flow-panel { print-color-adjust: exact; -webkit-print-color-adjust: exact; padding: 24px; }
  .accordion-item { break-inside: avoid; }
  .accordion-item summary { min-height: 0; padding-block: 13px; }
  .accordion-item summary > span { display: none; }
  .accordion-body { padding-bottom: 15px; }
  .source-list li { break-inside: avoid; padding-block: 7px; }
  .source-list li a { min-height: 0; }
  a { text-decoration: none; }
  .site-footer { display: block; padding-block: 22px 0; }
  .site-footer > .small { margin-top: 10px; }
}
