/* Nursing Essentials — design v2 (30-11-2026): editorial, sober, mobile first.
   Fonts self-hosted (SIL Open Font License, see fonts/). One accent (teal), used sparingly. */
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --night: #0f2b40;      /* navy of the logo: the main color */
  --navy: #173a55;
  --navy-2: #24506f;
  --teal: #00767b;       /* logo teal (#00cccc), darkened for text on light backgrounds */
  --teal-bright: #00cccc;/* logo teal: only thin rules and numerals on dark */
  --azure: #22aaff;      /* logo blue: focus ring only */
  --paper: #f7f5f0;      /* warm white */
  --paper-2: #eeeae2;
  --rule: #d8d1c5;
  --rule-strong: #b9b0a2;
  --ink: #15191f;
  --text: #2a2d31;
  --muted: #5f5a52;
  --white: #ffffff;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Montserrat", "Source Sans 3", system-ui, sans-serif;  /* short labels, nav, buttons */
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.65 var(--sans); color: var(--text); background: var(--white); font-kerning: normal; }
img { max-width: 100%; display: block; }
a { color: var(--navy-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--night); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; }
h1, h2, h3, h4, .h3 { font-family: var(--serif); color: var(--ink); margin: 0 0 .5em; text-wrap: balance; }
h1 { font-weight: 400; font-size: clamp(2.1rem, 5.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.015em; }
h2 { font-weight: 400; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; }
h3, .h3 { font-weight: 600; font-size: 1.22rem; line-height: 1.3; }
p { margin: 0 0 1em; }
code { font-size: .92em; background: var(--paper-2); padding: .05em .35em; border-radius: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.section { padding-top: 64px; padding-bottom: 72px; }
@media (min-width: 900px) { .section { padding-top: 96px; padding-bottom: 104px; } .wrap { padding-left: 40px; padding-right: 40px; } }
.small { font-size: .92rem; }
.muted { color: var(--muted); }
.lead { font-family: var(--serif); font-size: clamp(1.12rem, 2.2vw, 1.32rem); line-height: 1.55; color: var(--muted); max-width: 36em; }
.eyebrow { font: 600 .78rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 1.1em; }
.eyebrow-light { color: #7fe0e0; }
.eyebrow-mark { display: flex; align-items: center; gap: 10px; }
.eyebrow-mark img { width: 30px; height: auto; flex: none; }
.label { font-weight: 700; color: var(--ink); }
.note { border-left: 2px solid var(--teal); padding: 4px 0 4px 18px; color: var(--muted); }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-lead { color: var(--muted); font-size: 1.1rem; }

.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* parallax layers: fine monochrome texture, larger than the section so movement never shows an edge */
.hero, .books-band, .principles-band, .page-head, .book-head, .gate, .area-head { position: relative; overflow: hidden; isolation: isolate; }
.layer { position: absolute; left: 0; right: 0; top: -18%; bottom: -18%; z-index: -1; background-repeat: repeat; background-size: 1400px auto; will-change: transform; pointer-events: none; }
.layer-dark { background-image: url("texture-dark.svg"); }
.layer-light { background-image: url("texture-light.svg"); }

/* header with dropdown menus (desktop) and a Menu button (phones) */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); position: relative; z-index: 20; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--night); }
.brand .logo { height: 40px; width: auto; }
.menu-toggle { display: none; margin-left: auto; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; background: #fff; border: 1px solid var(--night);
  border-radius: 2px; font: 600 .86rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--night); cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: var(--night); position: relative; content: ""; }
.bars::before { position: absolute; top: -6px; } .bars::after { position: absolute; top: 6px; }
.main-nav { width: 100%; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-top { display: inline-block; color: var(--night); text-decoration: none; font: 600 .9rem/1.4 var(--display); letter-spacing: .02em; padding: 10px 0; }
.nav-top[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--teal-bright); }
.sub-toggle { display: none; }
.sub { list-style: none; margin: 0; padding: 0 0 8px 14px; }
.sub a { display: block; padding: 6px 0; color: var(--text); text-decoration: none; font-size: .98rem; }
.sub a:hover { color: var(--night); text-decoration: underline; }
.btn-access { margin: 10px 0 6px; }
/* phones and tablets: the Menu button opens the list (only when JavaScript runs; otherwise the list is simply shown) */
@media (max-width: 1023px) {
  .js .menu-toggle { display: inline-flex; }
  .js .main-nav { display: none; }
  .js .main-nav.open { display: block; border-top: 1px solid var(--rule); padding-top: 6px; }
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }
  .nav-item { border-bottom: 1px solid var(--rule); }
}
@media (min-width: 1024px) {
  .header-row { flex-wrap: nowrap; padding-top: 18px; padding-bottom: 18px; }
  .brand .logo { height: 48px; }
  .main-nav { width: auto; margin-left: auto; display: flex; align-items: center; gap: 28px; }
  .nav-list { display: flex; gap: 26px; }
  .nav-item.has-sub { display: flex; align-items: center; gap: 2px; }
  .sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 32px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--night); }
  .chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
  .sub-toggle[aria-expanded="true"] .chev { transform: rotate(-135deg) translateY(-1px); }
  .sub { display: none; position: absolute; top: 100%; left: -18px; min-width: 270px; background: #fff; border: 1px solid var(--rule); border-top: 2px solid var(--night);
    padding: 10px 0; box-shadow: 0 16px 32px -16px rgba(15,43,64,.35); z-index: 30; }
  .sub a { padding: 8px 18px; font-size: .95rem; }
  .sub a:hover { background: var(--paper); text-decoration: none; }
  .has-sub:not(.suppress):hover .sub, .sub-toggle[aria-expanded="true"] + .sub { display: block; }
  .btn-access { margin: 0; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px; border-radius: 2px; border: 1px solid var(--night);
  background: var(--night); color: #fff; font: 600 .92rem/1.2 var(--display); letter-spacing: .04em; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; text-decoration: none; }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: .86rem; }
.btn-outline { background: transparent; color: var(--night); }
.btn-outline:hover { background: var(--night); color: #fff; }
.btn-light { background: #fff; color: var(--night); border-color: #fff; }
.btn-light:hover { background: var(--paper-2); border-color: var(--paper-2); color: var(--night); }
.btn-disabled { background: transparent; color: var(--muted); border: 1px dashed var(--rule-strong); cursor: default; }
.btn-disabled:hover { background: transparent; color: var(--muted); border-color: var(--rule-strong); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 30px 0 8px; }
.link-arrow { font: 600 .92rem/1.4 var(--display); letter-spacing: .03em; text-decoration: none; color: var(--night); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.link-arrow::after { content: " →"; }
.link-light { color: #fff; }
.link-light:hover { color: #dfe8f1; }

/* covers: book proportion, soft shadow, slight spine; placeholder is plainly typographic */
.cover { position: relative; margin: 0; width: 100%; container-type: inline-size; border-radius: 1px 3px 3px 1px; overflow: hidden; background: #f3f0e9;
  box-shadow: 0 1px 1px rgba(13,31,51,.12), 0 6px 12px -4px rgba(13,31,51,.18), 0 24px 44px -18px rgba(13,31,51,.42); }
.cover::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 5%; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.16), rgba(255,255,255,.14) 55%, rgba(0,0,0,0)); }
.cover picture, .cover img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.cover img { object-fit: cover; }
.cover-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 11cqi 10cqi 9cqi;
  border: 1px solid #ddd6c9; box-shadow: inset 0 0 0 4.5cqi #f3f0e9, inset 0 0 0 calc(4.5cqi + 1px) #cfc7b8; color: var(--night); }
.ph-top { font: 600 4.2cqi/1.2 var(--serif); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.ph-rule { width: 18cqi; height: 1px; background: var(--rule-strong); margin: 8cqi 0 8cqi; }
.ph-title { font: 400 9.6cqi/1.15 var(--serif); color: var(--night); text-wrap: balance; }
.ph-note { margin-top: auto; font: 400 3.8cqi/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #8a8378; }

/* hero */
.hero { background: var(--night); color: #dfe7ef; }
.hero-grid { display: grid; gap: 48px; padding-top: 56px; padding-bottom: 64px; align-items: center; }
.hero h1 { color: #fff; max-width: 12em; }
.hero .lead { color: #c4d1de; }
.hero-short .hero-grid { padding-top: 64px; padding-bottom: 72px; }
.hero-card { background: #fff; color: var(--text); padding: 28px; border-top: 3px solid var(--teal-bright); max-width: 440px; }
.hero-card h2 { margin-bottom: .4em; }
@media (min-width: 900px) { .hero-short .hero-grid { grid-template-columns: 1.4fr 1fr; padding-top: 104px; padding-bottom: 112px; gap: 72px; } .hero-card { justify-self: end; } }

/* featured book */
.featured { background: var(--paper); border-bottom: 1px solid var(--rule); }
.featured-grid { display: grid; gap: 40px; padding-top: 64px; padding-bottom: 72px; align-items: center; }
.featured-cover { width: min(70%, 300px); }
@media (min-width: 900px) { .featured-grid { grid-template-columns: 340px 1fr; gap: 88px; padding-top: 96px; padding-bottom: 104px; } .featured-cover { width: 100%; } }
.featured h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }

/* quick access */
.quick { background: var(--white); }
.quick-grid { display: grid; gap: 0; padding-top: 56px; padding-bottom: 72px; }
@media (min-width: 900px) { .quick-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; padding-top: 88px; padding-bottom: 104px; } }
.quick-card { display: block; border-top: 1px solid var(--ink); padding: 22px 0 28px; text-decoration: none; color: var(--text); }
.quick-card .eyebrow { display: block; margin-bottom: .6em; }
.quick-title { display: block; font: 400 1.6rem/1.2 var(--serif); color: var(--ink); margin-bottom: .4em; }
.quick-title::after { content: " →"; font-family: var(--display); font-size: 1.1rem; color: var(--teal); }
.quick-text { display: block; color: var(--muted); }
.quick-card:hover .quick-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }

/* reader access strip */
.access-strip { background: var(--white); border-bottom: 1px solid var(--rule); }
.strip-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 26px; padding-bottom: 26px; }
.strip-row p { margin: 0; max-width: 46em; }
.strip-label { display: block; font: 600 .78rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 4px; }

/* books band */
.books-band { background: var(--paper); border-bottom: 1px solid var(--rule); }
.books-band-plain .layer { display: none; }
.shelf + .shelf { margin-top: 72px; }
.shelf-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: 36px; }
.shelf-head h3 { font: 600 .82rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.shelf-head p { margin: 0; color: var(--muted); }
.shelf-books { display: grid; gap: 48px 32px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .shelf-books { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .shelf-books { grid-template-columns: repeat(3, 1fr); gap: 56px 48px; } .shelf-four { grid-template-columns: repeat(4, 1fr); gap: 40px 32px; } }
.book { display: flex; flex-direction: column; }
.book-link { display: block; width: 100%; max-width: 300px; margin-bottom: 26px; transition: transform .35s ease; }
.book-link:hover { transform: translateY(-4px); }
.book-status { font: 600 .76rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .5em; }
.book-title { font-size: 1.3rem; margin-bottom: .45em; }
.book-title a { color: var(--ink); text-decoration: none; }
.book-title a:hover { text-decoration: underline; }
.book-for { color: var(--muted); margin-bottom: .6em; }
.book-res { font-size: .92rem; color: var(--teal); font-weight: 600; margin: 0; }

/* resources showcase */
.showcase { background: var(--white); border-bottom: 1px solid var(--rule); padding: 64px 0 72px; }
@media (min-width: 900px) { .showcase { padding: 96px 0 104px; } }
.tools { list-style: none; padding: 0; margin: 0; display: grid; gap: 48px; }
@media (min-width: 900px) { .tools { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.tool-shot { aspect-ratio: 4 / 3; background: var(--paper); border: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 22px; padding: 14px; }
.tool-shot picture { display: block; width: 100%; height: 100%; }
.tool-shot img { width: 100%; height: 100%; object-fit: contain; box-shadow: 0 1px 2px rgba(13,31,51,.12), 0 10px 24px -12px rgba(13,31,51,.35); background: #fff; }
.tool-shot .shot-workbook img { object-fit: contain; box-shadow: none; filter: drop-shadow(0 8px 14px rgba(13,31,51,.25)); background: transparent; }
.tool-kind { font: 600 .76rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .5em; }
.tool-name { font-size: 1.3rem; }
.tool-for { border-top: 1px solid var(--rule); padding-top: 12px; color: var(--muted); font-size: .97rem; }
.tool-for span { display: block; font-weight: 600; color: var(--ink); }
.path { margin-top: 56px; border-top: 1px solid var(--ink); padding-top: 28px; display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .path { grid-template-columns: 1fr auto; gap: 48px; } }
.path-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
@media (min-width: 700px) { .path-steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.path-steps li { display: flex; gap: 14px; align-items: baseline; }
.num { font: 600 1.6rem/1 var(--display); color: var(--teal); flex: none; }

/* audience */
.audience-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 40px; }
@media (min-width: 900px) { .audience-list { grid-template-columns: repeat(3, 1fr); gap: 48px; } }
.audience-list li { border-top: 1px solid var(--rule-strong); padding-top: 20px; }
.roman { display: block; font: 600 .95rem/1 var(--display); color: var(--teal); letter-spacing: .1em; margin-bottom: 14px; }

/* principles */
.principles-band { background: var(--night); color: #cfd9e3; }
.principles-band h2, .principles-band h3 { color: #fff; }
.principles-band a { color: #fff; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 64px; }
@media (min-width: 900px) { .principles { grid-template-columns: repeat(2, 1fr); } }
.principles li { border-top: 1px solid rgba(0,204,204,.45); padding: 24px 0 28px; }
.principles p { margin: 0; max-width: 32em; }

/* page heads (help, about, legal) */
.page-head { background: var(--paper); border-bottom: 1px solid var(--rule); padding: 56px 0 48px; }
@media (min-width: 900px) { .page-head { padding: 96px 0 72px; } }
.page-head .lead { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-top: 1.8em; }
.prose > h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--muted); }

/* book pages */
.book-head { background: var(--paper); border-bottom: 1px solid var(--rule); }
.book-head-grid { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 56px; }
.book-head-cover { width: min(72%, 300px); }
@media (min-width: 900px) {
  .book-head-grid { grid-template-columns: minmax(260px, 380px) 1fr; gap: 80px; padding-top: 88px; padding-bottom: 96px; align-items: center; }
  .book-head-cover { width: 100%; }
}
.book-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.subtitle { font: italic 400 1.2rem/1.5 var(--serif); color: var(--muted); max-width: 34em; }
.byline { font-weight: 600; color: var(--ink); }
.book-status-line { font: 600 .82rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; margin: 32px 0 0; border-top: 1px solid var(--rule-strong); max-width: 560px; }
.facts div { border-bottom: 1px solid var(--rule); padding: 10px 0; }
.facts dt { font: 600 .74rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; color: var(--ink); }
.facts-wide { grid-template-columns: 1fr; }
.two-col { display: grid; gap: 48px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 80px; align-items: start; } }
.side { display: grid; gap: 36px; }
.aside-block { border-top: 1px solid var(--ink); padding-top: 18px; }
.aside-block ul { padding-left: 1.2em; }
.aside-block li { margin-bottom: .5em; }
.steps li { margin-bottom: .4em; }
.toc { border-top: 1px solid var(--rule-strong); padding-top: 8px; }
.toc h3 { font: 600 .8rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 1.6em 0 .6em; }
.toc ol { margin: 0; padding-left: 2em; font-family: var(--serif); }
.toc li { margin-bottom: .25em; }
.toc li::marker { color: var(--muted); font-family: var(--sans); font-size: .9em; }

/* reader access list */
.access-list { list-style: none; padding: 0; margin: 0 0 32px; }
.access-row { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: start; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); padding: 28px 0; }
.access-row h2 { margin-bottom: .35em; }
.access-row p { color: var(--muted); }
@media (min-width: 640px) { .access-row { grid-template-columns: 130px 1fr; gap: 36px; } }

/* gate */
.gate { background: var(--paper); border-bottom: 1px solid var(--rule); }
.gate-grid { display: grid; gap: 36px; padding-top: 44px; padding-bottom: 56px; }
.gate-cover { width: 150px; }
@media (min-width: 900px) {
  .gate-grid { grid-template-columns: 300px 1fr; gap: 80px; padding-top: 80px; padding-bottom: 96px; align-items: center; }
  .gate-cover { width: 100%; }
}
.gate h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.code-form { background: var(--white); border: 1px solid var(--rule-strong); border-top: 3px solid var(--night); padding: 24px; margin-top: 28px; max-width: 600px; }
.code-form label { display: block; font: 600 1.15rem/1.3 var(--serif); color: var(--ink); }
.hint { color: var(--muted); margin: .25em 0 .8em; }
.code-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.code-row input { flex: 1 1 220px; min-height: 52px; font: 600 1.25rem/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 8px 14px;
  border: 1px solid #857c70; border-radius: 2px; color: var(--ink); background: #fff; }
.code-row input:focus { border-color: var(--night); outline: 3px solid var(--azure); outline-offset: 1px; }
.code-row input[aria-invalid="true"] { border-color: #9b2c1f; border-width: 2px; }
.code-row .btn { flex: 1 1 170px; min-height: 52px; }
.msg { padding: 10px 14px; margin-bottom: 16px; font-weight: 600; border-left: 3px solid; }
.msg-error { background: #fbefec; color: #8a2a1b; border-color: #9b2c1f; }
.msg-info { background: #edf2f6; color: var(--night); border-color: var(--night); }
.inside-list { list-style: none; padding: 0; margin: 24px 0 32px; }
.inside-list li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; border-top: 1px solid var(--rule); padding: 20px 0; align-items: start; }
.inside-list h3 { margin-bottom: .3em; }
.inside-list p { margin: 0; color: var(--muted); }
.mini-shot { background: var(--paper); border: 1px solid var(--rule); aspect-ratio: 4 / 3; padding: 6px; }
.mini-shot picture, .mini-shot img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 640px) { .inside-list li { grid-template-columns: 160px 1fr; gap: 28px; } }

/* resources area */
.area-head { background: var(--night); color: #d4dde7; }
.area-grid { display: grid; grid-template-columns: 90px 1fr; gap: 24px; align-items: center; padding-top: 40px; padding-bottom: 44px; }
@media (min-width: 900px) { .area-grid { grid-template-columns: 150px 1fr; gap: 48px; padding-top: 64px; padding-bottom: 64px; } }
.area-head h1 { color: #fff; font-size: clamp(1.6rem, 4.2vw, 2.7rem); }
.area-head .lead { color: #c4d1de; margin: 0; font-size: 1.05rem; }
.res-cards { list-style: none; padding: 0; margin: 0 0 64px; display: grid; gap: 0; }
.res-card { display: grid; gap: 24px; border-top: 1px solid var(--ink); padding: 32px 0 36px; }
@media (min-width: 900px) { .res-card { grid-template-columns: 340px 1fr; gap: 56px; align-items: center; } }
.res-shot { aspect-ratio: 4 / 3; background: var(--paper); border: 1px solid var(--rule); padding: 12px; }
.res-shot picture, .res-shot img { width: 100%; height: 100%; object-fit: contain; }
.res-body h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
.res-body p { max-width: 36em; }
.res-type { font: 600 .76rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.res-num { font: 700 1.1rem/1 var(--display); letter-spacing: 0; color: var(--teal); margin-right: 8px; }
.area-help { margin-top: 8px; }
@media (min-width: 900px) { .area-help { grid-template-columns: 1fr 1fr; } }
.related { margin-top: 56px; border-top: 1px solid var(--rule); padding-top: 16px; color: var(--muted); }

/* footer */
.site-footer { background: var(--night); color: #b9c6d3; padding: 64px 0 40px; font-size: .95rem; }
.site-footer a { color: #e6edf4; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.brand-footer { color: #fff; }
.brand-footer:hover { color: #fff; text-decoration: none !important; }
.brand-footer .logo { height: 44px; width: auto; }
.footer-line { margin-top: 14px; max-width: 26em; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 36px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.2fr 1.5fr 1fr 1fr .7fr; gap: 40px; } .footer-brand { grid-column: auto; } }
.footer-head { font: 600 .74rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #8fa3b8; margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-links a { display: inline-block; padding: 3px 0; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.16); padding-top: 22px; font-size: .86rem; color: #9fb0c1; }
.footer-legal strong { color: #dfe7ef; }

/* phones: parallax is off (parallax.js); nothing moves */
@media (prefers-reduced-motion: reduce) { .book-link { transition: none; } .book-link:hover { transform: none; } }
@media print { .site-header, .site-footer, .actions, .layer { display: none; } }

/* v3: structure */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow-left { max-width: 820px; }
.breadcrumb { margin-bottom: 28px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font: 500 .82rem/1.5 var(--display); letter-spacing: .02em; color: var(--muted); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin: 0 10px; color: var(--rule-strong); }
.breadcrumb a { color: var(--navy-2); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }
.page-head-dark .breadcrumb ol, .area-head .breadcrumb ol { color: #b9c6d3; }
.area-head .breadcrumb a { color: #fff; }
.area-head .breadcrumb [aria-current] { color: #dfe7ef; }
.page-head { padding: 40px 0 48px; }
@media (min-width: 900px) { .page-head { padding: 56px 0 72px; } }
.book-head .wrap > .breadcrumb, .gate .wrap > .breadcrumb { padding-top: 32px; margin-bottom: 0; }
.area-head .wrap > .breadcrumb { padding-top: 28px; margin-bottom: 0; }
.book-head-grid { padding-top: 32px; }
.gate-grid { padding-top: 32px; }
.area-grid { padding-top: 24px; }

/* catalog filter */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.filter-btn { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border: 1px solid var(--rule-strong); border-radius: 2px; background: #fff;
  color: var(--night); text-decoration: none; font: 600 .86rem/1 var(--display); letter-spacing: .04em; }
.filter-btn:hover { border-color: var(--night); }
.filter-btn[aria-current="true"] { background: var(--night); border-color: var(--night); color: #fff; }
.shelf[hidden] { display: none; }
.shelf-head h2 { font: 600 .82rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; margin: 0; color: var(--ink); }

/* in-page sub navigation on book pages */
.subnav { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--rule); backdrop-filter: blur(6px); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.subnav a { display: inline-block; padding: 14px 0; white-space: nowrap; color: var(--night); text-decoration: none; font: 600 .84rem/1 var(--display); letter-spacing: .03em; }
.subnav a:hover { box-shadow: inset 0 -2px 0 var(--teal-bright); }
section[id] { scroll-margin-top: 64px; }

/* contents of a book */
.toc-front { font-family: var(--serif); margin: .2em 0; }
.toc-chs { list-style: none; padding: 0; margin: 0; }
.toc-ch { border-bottom: 1px solid var(--rule); }
.toc-ch summary { cursor: pointer; padding: 10px 0; font-family: var(--serif); font-size: 1.05rem; color: var(--ink); list-style: none; display: flex; gap: 12px; align-items: baseline; }
.toc-ch summary::-webkit-details-marker { display: none; }
.toc-ch summary::after { content: "+"; margin-left: auto; font-family: var(--display); color: var(--teal); }
.toc-ch details[open] summary::after { content: "–"; }
.ch-n { font: 600 .82rem/1 var(--display); color: var(--muted); min-width: 1.6em; }
.toc-secs { list-style: none; margin: 0 0 14px; padding: 0 0 0 2.4em; font-size: .97rem; color: var(--text); }
.toc-secs li { margin: .25em 0; }
.sec-n { font: 500 .8rem/1 var(--display); color: var(--muted); margin-right: 6px; }
.toc-ref { padding-left: 1.2em; font-family: var(--serif); }
.maps { columns: 2 260px; column-gap: 40px; padding-left: 1.6em; font-family: var(--serif); }
.maps li { margin-bottom: .45em; break-inside: avoid; }
.maps li::marker { font: 600 .85rem var(--display); color: var(--teal); }

/* help FAQ, tables, side links */
.faq { border-bottom: 1px solid var(--rule); }
.faq:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font: 600 1.08rem/1.4 var(--serif); color: var(--ink); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font: 500 1.2rem var(--display); color: var(--teal); }
.faq[open] summary::after { content: "–"; }
.faq > div { padding: 0 0 12px; }
.table-wrap { overflow-x: auto; margin: 24px 0; }
.table { width: 100%; border-collapse: collapse; font-size: .98rem; }
.table th, .table td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table thead th { font: 600 .74rem/1.3 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }
.table tbody th { font-weight: 600; }
.side-links { list-style: none; padding: 0 !important; margin: 0; }
.side-links a { display: block; padding: 6px 0; text-decoration: none; }
.side-links a:hover { text-decoration: underline; }

/* resources hub */
.res-book { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: center; margin-bottom: 48px; border-top: 1px solid var(--ink); padding-top: 28px; }
@media (min-width: 900px) { .res-book { grid-template-columns: 150px 1fr; gap: 48px; } }
.path-plain { margin-top: 0; border-top: 0; padding-top: 0; }
