/* Lapis gallery: system Didone display, old-style reading type, salmon mounts. */
:root {
  color-scheme: dark;
  --canvas: #24529b;
  --ink: #fff4ed;
  --quiet: #f2dcd1;
  --rose: #f0b1a3;
  --rose-light: #f8c9be;
  --plate-ink: #183e7a;
  --wash: #2d5da4;
  --display: "Bodoni 72", Didot, "Bodoni MT", "Times New Roman", serif;
  --text: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  border-top: 8px solid var(--rose);
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--text);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.7;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--display); font-weight: 400; }
a { color: var(--rose-light); text-decoration-thickness: 1.5px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 3px; }
button, input, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: rgb(248 201 190 / 25%); }
button, summary { cursor: pointer; }
input, textarea { min-width: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--rose-light); color: var(--plate-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }

.skip-link {
  position: fixed; top: 1rem; left: 1rem; z-index: 5;
  display: inline-flex; align-items: center; min-height: 48px;
  padding: 0.6rem 1.2rem; background: var(--rose-light); color: var(--plate-ink);
  transform: translateY(-220%);
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  max-width: 1440px; margin: 0 auto;
  padding: 1.3rem clamp(1.25rem, 5vw, 5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  border-bottom: 2px solid var(--rose);
}
.guide-name {
  display: flex; flex-direction: column; justify-content: center; min-height: 48px;
  font-family: var(--display); font-size: 30px; line-height: 1.1;
  text-decoration: none; color: var(--ink);
}
.guide-kind { margin-top: 0.35rem; color: var(--quiet); font-family: var(--text); font-size: 18px; font-style: italic; }
.chapter-menu { position: relative; }
.menu-toggle {
  display: flex; align-items: center; gap: 1.1rem; min-height: 48px;
  padding: 0.6rem 0; border-bottom: 2px solid var(--rose);
  color: var(--ink); font-size: 19px; line-height: 1.4; list-style: none;
}
.menu-toggle::-webkit-details-marker { display: none; }
.menu-toggle::after { content: "+"; color: var(--rose-light); font-size: 28px; line-height: 1; }
.chapter-menu[open] .menu-toggle::after { content: "−"; }
.menu-toggle:hover { border-color: var(--ink); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 1.1rem); z-index: 3;
  width: min(720px, calc(100vw - 2.5rem)); padding: 2rem;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 2rem;
  background: var(--rose-light); color: var(--plate-ink);
  max-height: min(75vh, 780px); overflow-y: auto; overscroll-behavior: contain;
  border-bottom: 6px solid var(--ink);
}
.menu-panel :focus-visible { outline-color: var(--plate-ink); }
.chapter-group { min-width: 0; }
.chapter-heading {
  margin: 0 0 0.7rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--rose);
  color: var(--rose-light); font-size: 23px; font-weight: 400; font-style: italic; line-height: 1.4;
}
.chapter-list { margin: 0; padding: 0; list-style: none; }
.chapter-item { margin: 0; }
.chapter-link {
  display: flex; align-items: center; min-height: 48px; padding: 0.6rem 0;
  color: var(--ink); font-size: 19px; line-height: 1.45;
  text-decoration: underline; text-decoration-color: var(--rose);
}
.chapter-link[aria-current] { font-weight: 700; text-decoration-thickness: 3px; }
.menu-panel .chapter-heading { color: var(--plate-ink); border-color: var(--plate-ink); }
.menu-panel .chapter-link { color: var(--plate-ink); text-decoration-color: currentColor; }

.reading-main { max-width: 1440px; margin: 0 auto; }
.home-opening {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center; gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3rem, 5.5vw, 5rem) clamp(1.25rem, 5vw, 5rem) clamp(3.5rem, 6vw, 6rem);
}
.page-intro { min-width: 0; }
.eyebrow { margin: 0 0 1.5rem; color: var(--rose-light); font-size: 21px; font-style: italic; line-height: 1.5; }
.page-heading {
  margin: 0; font-size: clamp(42px, 4.5vw, 66px); line-height: 1.06;
  letter-spacing: 0; overflow-wrap: break-word; text-wrap: balance;
}
.home-opening .page-heading { font-size: clamp(48px, 5.15vw, 74px); }
.intro-copy { max-width: 52ch; margin: 1.8rem 0 0; color: var(--quiet); font-size: 23px; line-height: 1.65; }
.start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }
.primary-pill {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 52px; padding: 0.75rem 1.15rem; border: 0;
  background: var(--rose); color: var(--plate-ink); font-size: 19px; line-height: 1.4; text-decoration: none;
}
.primary-pill:hover { background: var(--rose-light); text-decoration: underline; }
.outline-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 1rem;
  min-height: 52px; padding: 0.65rem 0; border-bottom: 2px solid var(--rose);
  color: var(--ink); font-size: 19px; line-height: 1.4; text-decoration: none;
}
.outline-pill:hover { border-color: var(--ink); text-decoration: underline; }
.photo-frame {
  width: 100%; max-width: 720px; margin: 3rem auto;
  padding: clamp(1.4rem, 3.2vw, 2.75rem);
  background: var(--rose); border-bottom: 10px solid var(--rose-light);
}
.editorial-image {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  color: var(--plate-ink); font-family: var(--text); font-size: 18px; line-height: 1.5;
}
.home-opening .photo-frame { margin: 2rem 0 0; padding-bottom: clamp(3rem, 5vw, 4.5rem); }
.home-opening .editorial-image { aspect-ratio: 4 / 5; object-position: 50% 50%; }
.home-body { max-width: 880px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem) 1rem; }
.article-opening { max-width: 1040px; margin: 0 auto; padding: clamp(3rem, 6.5vw, 6rem) clamp(1.25rem, 5vw, 3rem) 3rem; }
.article-opening .page-heading { max-width: 24ch; }
.article-opening .intro-copy { max-width: 55ch; }
.article-opening .photo-frame { margin-top: 3rem; margin-bottom: 0; }
.article-body { max-width: 880px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem) 1rem; }
.idea-section { padding: 2.6rem 0; border-top: 2px solid var(--rose); }
.section-heading { margin: 0 0 1.3rem; font-size: clamp(30px, 2.8vw, 40px); line-height: 1.2; text-wrap: balance; }
.copy { max-width: 66ch; margin: 1.1rem 0 0; color: var(--quiet); font-size: 21px; line-height: 1.8; }
.question-list { margin: 1.4rem 0 0; padding: 0; list-style: none; }
.question-line { position: relative; padding: 1rem 0 1rem 1.35rem; border-bottom: 2px solid var(--rose); font-size: 21px; line-height: 1.65; }
.question-line::before { content: "·"; position: absolute; left: 0; top: 1rem; color: var(--rose-light); }
.reading-section { padding: 2.8rem 0; border-top: 2px solid var(--rose); }
.reading-list { margin: 0; padding: 0; list-style: none; }
.reading-item { padding: 1.4rem 0; border-bottom: 2px solid var(--rose); }
.source-link { display: inline-flex; align-items: center; gap: 1rem; min-height: 44px; font-size: 21px; line-height: 1.5; overflow-wrap: anywhere; }
.source-link::after { content: "↗"; flex-shrink: 0; color: var(--rose-light); }
.source-note { max-width: 60ch; margin: 0.5rem 0 0; color: var(--quiet); font-size: 19px; line-height: 1.7; }
.index-section { padding: 3.5rem 0; border-top: 2px solid var(--rose); }
.index-heading { margin: 0 0 2.5rem; font-size: clamp(36px, 3.5vw, 48px); line-height: 1.15; }
.full-index { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem; }
.path-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; padding: 2rem 0; border-top: 2px solid var(--rose); }
.path-link { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 110px; padding: 0.5rem 0; text-decoration: none; }
.path-caption { color: var(--quiet); font-size: 18px; font-style: italic; line-height: 1.5; }
.path-name { margin-top: 0.5rem; font-size: 22px; line-height: 1.5; text-decoration: underline; text-underline-offset: 0.22em; }
.path-link:hover .path-name { text-decoration-thickness: 3px; }
.site-footer {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 3rem;
  max-width: 1440px; margin: 2rem auto 0; padding: 3rem clamp(1.25rem, 5vw, 5rem);
  border-top: 2px solid var(--rose);
}
.footer-copy { max-width: 43ch; margin: 0; color: var(--quiet); font-size: 19px; line-height: 1.7; }
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; }
.footer-link { display: inline-flex; align-items: center; min-height: 48px; font-size: 18px; line-height: 1.5; }

.worksheet-section { padding: 2.8rem 0; border-top: 2px solid var(--rose); }
.cost-form { margin-top: 2rem; }
.cost-group { min-width: 0; margin: 0 0 2.5rem; padding: 1.2rem 0 0; border: 0; border-top: 2px solid var(--rose); }
.group-legend { padding: 0 1rem 0 0; color: var(--rose-light); font-size: 23px; font-weight: 400; font-style: italic; line-height: 1.6; }
.amount-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(130px, 180px); align-items: center; gap: 1.5rem; padding: 0.8rem 0; }
.amount-label { display: flex; align-items: center; min-height: 44px; font-size: 21px; line-height: 1.6; }
.amount-input {
  width: 100%; min-height: 52px; padding: 0.6rem 0.85rem; border: 2px solid var(--rose);
  background: var(--ink); color: var(--plate-ink); font-size: 19px; line-height: 1.5;
  font-variant-numeric: tabular-nums; color-scheme: light;
}
.amount-input::placeholder { color: var(--plate-ink); opacity: 1; }
.amount-input[aria-invalid="true"] { border: 4px solid var(--plate-ink); outline: 3px solid var(--rose-light); }
.terms-group { min-width: 0; margin: 0 0 2rem; padding: 1rem 0 0; border: 0; }
.terms-group .group-legend { padding: 0; }
.check-label { display: flex; align-items: center; gap: 1rem; min-height: 52px; padding: 0.65rem 0; cursor: pointer; }
.check-input {
  appearance: none; width: 44px; height: 44px; flex-shrink: 0; margin: 0;
  border: 2px solid var(--rose); background: var(--ink); color: var(--plate-ink); cursor: pointer;
}
.check-input:checked { background: var(--rose-light); }
.check-input:checked::after { content: "✓"; display: block; text-align: center; font-size: 30px; line-height: 40px; }
.check-text { font-size: 21px; line-height: 1.6; }
.notes-label { display: flex; align-items: center; min-height: 44px; font-size: 21px; line-height: 1.6; }
.notes-input {
  display: block; width: 100%; min-height: 180px; margin-top: 0.6rem; padding: 1rem;
  resize: vertical; border: 2px solid var(--rose); background: var(--ink); color: var(--plate-ink);
  font-size: 20px; line-height: 1.7; color-scheme: light;
}
.notes-input::placeholder { color: var(--plate-ink); opacity: 1; }
.form-error { color: var(--rose-light); font-size: 21px; line-height: 1.7; }
.worksheet-actions { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; margin-top: 1.5rem; }
.pill-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0.75rem 1.15rem; border: 0;
  background: var(--rose); color: var(--plate-ink); font-size: 19px; line-height: 1.5;
}
.pill-button:hover { background: var(--rose-light); text-decoration: underline; }
.quiet-button {
  min-height: 52px; padding: 0.75rem 0; border: 0; background: transparent; color: var(--ink);
  font-size: 19px; line-height: 1.5; text-decoration: underline; text-underline-offset: 0.25em;
}
.quiet-button:hover { color: var(--rose-light); }
.cost-results { min-height: 110px; margin-top: 2.5rem; padding: 2rem; border-top: 4px solid var(--rose); background: var(--wash); }
.result-note { margin: 0.5rem 0; color: var(--quiet); font-size: 21px; line-height: 1.7; }
.result-heading { margin: 1.25rem 0 0.4rem; font-size: 30px; line-height: 1.3; }
.result-heading:first-child { margin-top: 0; }
.result-amount { margin: 0.25rem 0; color: var(--ink); font-size: 32px; line-height: 1.5; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.result-list { margin: 0.5rem 0; padding-left: 1.2rem; color: var(--quiet); font-size: 19px; line-height: 1.8; }
.print-notes { display: none; }

@media (max-width: 900px) {
  .home-opening { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .home-opening .page-heading { max-width: 20ch; }
  .home-opening .photo-frame { max-width: 520px; margin: 2rem auto 0; }
  .home-opening .editorial-image { aspect-ratio: 3 / 2; }
  .site-footer { flex-direction: column; gap: 1.5rem; }
}

@media (max-width: 560px) {
  body { font-size: 20px; }
  .site-header { padding-top: 1rem; padding-bottom: 1rem; gap: 1rem; }
  .guide-name { font-size: 25px; }
  .guide-kind { font-size: 17px; }
  .menu-toggle { max-width: 155px; gap: 0.65rem; padding: 0.65rem 0; font-size: 17px; }
  .menu-panel {
    position: fixed; top: 122px; right: 1.25rem; left: 1.25rem; width: auto;
    max-height: calc(100dvh - 145px); padding: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
  }
  .home-opening { padding-top: 2.6rem; padding-bottom: 3rem; }
  .page-heading { font-size: 43px; }
  .home-opening .page-heading { font-size: 46px; }
  .eyebrow { margin-bottom: 1.2rem; font-size: 20px; }
  .intro-copy { margin-top: 1.4rem; font-size: 21px; }
  .start-actions { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .photo-frame { padding: 1.5rem; margin-top: 2.5rem; }
  .home-opening .photo-frame { padding-bottom: 2.5rem; }
  .article-opening { padding-top: 2.6rem; padding-bottom: 2.5rem; }
  .idea-section { padding: 2.2rem 0; }
  .section-heading { font-size: 32px; }
  .copy, .question-line { font-size: 20px; }
  .full-index, .path-nav { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .path-link { min-height: 96px; }
  .amount-row { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
  .amount-input { max-width: 100%; }
  .cost-results { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  :root { color-scheme: light; --canvas: #ffffff; --ink: #183e7a; --quiet: #183e7a; --rose: #183e7a; --rose-light: #183e7a; --wash: #ffffff; }
  body { border: 0; font-size: 16px; }
  .site-header, .photo-frame, .worksheet-actions, .path-nav, .footer-nav, .skip-link, .index-section { display: none; }
  .article-opening, .home-opening { padding: 1rem 0; }
  .home-opening { display: block; }
  .article-body, .home-body { max-width: none; padding: 0; }
  .page-heading, .home-opening .page-heading { font-size: 32px; }
  .idea-section, .reading-section, .worksheet-section { padding: 1rem 0; }
  .cost-group { break-inside: avoid; }
  .amount-input, .notes-input { background: #ffffff; color: var(--plate-ink); }
  .notes-input { min-height: 180px; }
  body[data-worksheet-ready] .notes-input, body[data-worksheet-ready] .notes-label { display: none; }
  .print-notes { display: block; margin: 1rem 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 18px; line-height: 1.7; }
  .site-footer { margin-top: 1rem; padding: 1rem 0; }
  .source-link::after { content: ""; }
  .reading-item { break-inside: avoid; }
}
