@font-face { font-family: "Fell"; src: url(fonts/IMFellEnglish.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Fell"; font-style: italic; src: url(fonts/IMFellEnglish-Italic.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Garamond"; font-weight: 400 600; src: url(fonts/EBGaramond.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Garamond"; font-style: italic; src: url(fonts/EBGaramond-Italic.woff2) format("woff2"); font-display: swap; }

:root {
  --parchment: #f7f1e3;
  --parchment-card: #fcf9f0;
  --parchment-tint: #efe6d1;
  --walnut: #261d14;
  --walnut-soft: #5c4b39;
  --brass: #9b6b1e;
  --brass-soft: #ceb88f;
  --rule: #d8c7a3;
  --vermilion: #983d30;
  --vermilion-dark: #742a20;
  --slate: #435f76;
  --moss: #4b5f31;
  --shadow: 0 14px 32px -22px rgba(38, 29, 20, .34), 0 4px 10px -6px rgba(38, 29, 20, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--walnut);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(255, 253, 246, .75), transparent 62%),
    radial-gradient(ellipse at 0% 100%, rgba(155, 107, 30, .08), transparent 52%),
    radial-gradient(ellipse at 100% 70%, rgba(155, 107, 30, .06), transparent 48%);
  font-family: "Garamond", Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, .fell {
  font-family: "Fell", "Garamond", Georgia, serif;
  font-weight: 400;
  color: var(--walnut);
}
a { color: var(--vermilion); }
button, input, textarea, select { font-family: inherit; }

/* ---- Unified Golden-Age Parchment Hero ---- */
.hero-stage {
  background: linear-gradient(180deg, #faf5e8 0%, var(--parchment) 100%);
  border-bottom: 1px solid var(--brass-soft);
  box-shadow: inset 0 -4px 0 var(--parchment), inset 0 -5px 0 var(--rule);
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--walnut);
}

.brand-mark {
  font-family: "Fell", Georgia, serif;
  font-size: 1.48rem;
  color: var(--walnut);
  letter-spacing: .01em;
  white-space: nowrap;
}

.brand-mark span {
  color: var(--brass);
}

.editorial-cov {
  margin: 0;
  font-size: .92rem;
  font-style: italic;
  color: var(--walnut-soft);
  letter-spacing: .01em;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 36px;
  align-items: center;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  font-family: "Fell", Georgia, serif;
  font-style: italic;
  color: var(--brass);
  font-size: 1.02rem;
  margin: 0 0 8px;
  letter-spacing: .02em;
}

.hero-copy h1 {
  font-size: clamp(2.05rem, 4.1vw, 3.25rem);
  line-height: 1.06;
  margin: 0 0 12px;
  color: var(--walnut);
}

.hero-copy h1 .child-title {
  color: var(--vermilion);
  font-style: italic;
  border-bottom: 1.5px solid var(--brass-soft);
  padding: 0 3px;
}

.hero-lede {
  margin: 0 0 14px;
  max-width: 34em;
  color: var(--walnut-soft);
  font-size: 1.12rem;
}

.hero-price-line {
  margin: 0 0 18px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  font-family: "Fell", Georgia, serif;
  font-size: 1.04rem;
  color: var(--walnut);
  letter-spacing: .01em;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px 10px;
  background: var(--vermilion);
  color: #fcf9f0;
  font-family: "Fell", Georgia, serif;
  font-size: 1.24rem;
  border-radius: 3px;
  text-decoration: none;
  box-shadow: 0 2px 0 var(--vermilion-dark), 0 10px 22px -14px rgba(116, 42, 32, .65);
  transition: background .14s, transform .14s;
}

.hero-cta:hover {
  background: #873227;
  transform: translateY(-1px);
}

/* Centered Archival Study-D Watercolor Plate */
.hero-plate-col {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.hero-plate-frame {
  margin: 0 auto;
  width: min(370px, 100%);
  background: var(--parchment-card);
  border: 1px solid var(--brass-soft);
  border-radius: 3px;
  padding: 12px 12px 10px;
  box-shadow:
    inset 0 0 0 4px var(--parchment-card),
    inset 0 0 0 5px var(--rule),
    var(--shadow);
  text-align: center;
}

.hero-plate-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto;
  background: #faf6ea;
  border-radius: 2px;
  transition: opacity .22s ease;
}

.hero-plate-frame img.is-fading,
.plate-box img.is-fading {
  opacity: .28;
}

.hero-plate-cap {
  margin: 9px 4px 2px;
  padding-top: 7px;
  border-top: 1px solid var(--rule);
  font-family: "Fell", Georgia, serif;
  font-style: italic;
  font-size: .88rem;
  color: var(--walnut-soft);
  text-align: center;
}

/* ---- Main Layout ---- */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--parchment-card);
  border: 1px solid var(--brass-soft);
  border-radius: 4px;
  padding: 22px 22px 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.book-frame {
  border: 1.5px solid var(--walnut);
  box-shadow:
    inset 0 0 0 5px var(--parchment-card),
    inset 0 0 0 6px var(--rule),
    var(--shadow);
}

.section-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.section-bar h2 {
  font-size: 1.32rem;
  margin: 0;
}

.section-bar-note {
  font-size: .9rem;
  font-style: italic;
  color: var(--walnut-soft);
}

/* Clean typographic editorial sample names (no bubble pills) */
.quick-names {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 14px;
  align-items: baseline;
  font-size: .92rem;
  color: var(--walnut-soft);
}

.try-link {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--brass-soft);
  padding: 1px 0;
  font-size: .94rem;
  color: var(--walnut);
  cursor: pointer;
}

.try-link:hover {
  color: var(--vermilion);
  border-bottom-color: var(--vermilion);
}

/* ---- Unlimited Sibling Cards ---- */
.children-list {
  display: grid;
  gap: 14px;
}

.child-card {
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--brass-soft);
  border-radius: 3px;
  padding: 14px 14px 15px;
  transition: border-color .16s, background .16s;
}

.child-card.is-active {
  background: #fbf7ec;
  border-color: var(--brass);
  border-left: 3px solid var(--brass);
}

.child-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.child-select-btn {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  font-family: "Fell", Georgia, serif;
  font-size: 1.1rem;
  color: var(--walnut);
  cursor: pointer;
}

.child-select-btn:hover {
  color: var(--vermilion);
}

.child-preview-mark {
  font-family: "Garamond", Georgia, serif;
  font-style: italic;
  font-size: .86rem;
  color: var(--brass);
  margin-left: 8px;
}

.child-head-right {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
}

.child-price-tag {
  font-family: "Fell", Georgia, serif;
  font-size: 1rem;
  color: var(--walnut-soft);
}

.child-remove-btn {
  background: transparent;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0;
  font-size: .88rem;
  color: var(--vermilion);
  cursor: pointer;
}

.child-remove-btn:hover {
  border-bottom-color: var(--vermilion);
}

.field-label {
  display: block;
  font-size: .88rem;
  color: var(--walnut-soft);
  margin: 0 0 4px;
}

.name-input {
  width: 100%;
  min-width: 0;
  font-size: 1.28rem;
  font-family: "Fell", Georgia, serif;
  font-style: italic;
  color: var(--vermilion);
  background: #fffefb;
  border: 1px solid var(--brass-soft);
  border-radius: 3px;
  padding: 8px 11px;
}

.name-input:focus,
.text-input:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}

.status-line {
  margin: 7px 0 0;
  padding: 6px 10px;
  border-left: 2px solid var(--moss);
  background: rgba(75, 95, 49, .07);
  font-size: .92rem;
  color: var(--walnut);
}

.status-line.miss {
  border-left-color: var(--vermilion);
  background: rgba(152, 61, 48, .07);
}

.status-meaning {
  display: block;
  margin-top: 2px;
  font-style: italic;
  color: var(--walnut-soft);
  font-size: .88rem;
}

.middle-fallback {
  margin-top: 8px;
}

.text-input {
  width: 100%;
  min-width: 0;
  font-size: .96rem;
  padding: 7px 10px;
  background: #fffefb;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--walnut);
}

/* Archival square-cornered interest chips (bookbinder aesthetic, monochrome + brass) */
.chips-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 11px 0 6px;
  font-size: .86rem;
  color: var(--walnut-soft);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 5px 10px;
  border-radius: 2px;
  border: 1px solid var(--brass-soft);
  background: var(--parchment-card);
  color: var(--walnut);
  font-size: .9rem;
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}

.chip:hover {
  border-color: var(--walnut);
}

.chip[aria-pressed="true"] {
  background: var(--walnut);
  border-color: var(--walnut);
  color: var(--parchment-card);
}

.dedication-row {
  margin-top: 10px;
}

/* Add another child button */
.add-child-btn {
  width: 100%;
  margin-top: 14px;
  padding: 11px 16px;
  background: var(--parchment);
  border: 1.5px dashed var(--brass);
  border-radius: 3px;
  font-family: "Fell", Georgia, serif;
  font-size: 1.12rem;
  color: var(--walnut);
  cursor: pointer;
  transition: background .14s, border-color .14s;
}

.add-child-btn:hover {
  background: var(--parchment-tint);
  border-style: solid;
}

/* Honest order summary & shipping line */
.order-summary {
  margin-top: 14px;
  padding: 11px 13px;
  background: var(--parchment);
  border-top: 1px solid var(--brass-soft);
  border-bottom: 1px solid var(--brass-soft);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-family: "Fell", Georgia, serif;
  font-size: 1.08rem;
  color: var(--walnut);
}

.summary-total {
  font-size: 1.24rem;
  color: var(--vermilion);
}

.shipping-note {
  margin: 5px 0 0;
  font-size: .88rem;
  font-style: italic;
  color: var(--walnut-soft);
}

.shipping-note.is-highlighted {
  margin-top: 7px;
  padding: 5px 9px;
  border-left: 2px solid var(--brass);
  background: rgba(155, 107, 30, .1);
  color: var(--walnut);
  font-style: normal;
}

/* Preview code + CTA */
.code-block {
  margin-top: 14px;
}

.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.code-row input { flex: 1 1 auto; }

.code-btn {
  padding: 7px 14px;
  border-radius: 3px;
  border: 1px solid var(--walnut);
  background: var(--parchment);
  color: var(--walnut);
  font-family: "Fell", Georgia, serif;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
}

.code-btn:hover {
  background: var(--walnut);
  color: var(--parchment-card);
}

.code-msg {
  font-size: .86rem;
  margin: 5px 0 0;
  color: var(--moss);
  font-style: italic;
}

.cta-wrap { margin-top: 16px; }

.btn-primary {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-family: "Fell", Georgia, serif;
  font-size: 1.32rem;
  color: #fcf9f0;
  background: var(--vermilion);
  border: 0;
  border-radius: 3px;
  padding: 12px 18px 10px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--vermilion-dark), 0 10px 22px -14px rgba(116, 42, 32, .7);
}

.btn-primary:hover { background: #873227; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  margin-top: 10px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-family: "Fell", Georgia, serif;
  font-size: 1.1rem;
  color: var(--walnut);
  background: var(--parchment);
  border: 1px solid var(--brass);
  border-radius: 3px;
  padding: 9px 16px;
  cursor: pointer;
}

.btn-secondary:hover { background: var(--parchment-tint); }

.guarantee {
  margin: 9px 0 0;
  font-size: .86rem;
  color: var(--walnut-soft);
  text-align: center;
}

/* ---- Right Column: Live Book Preview ---- */
.preview-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.preview-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 2px 2px 4px;
  font-family: "Fell", Georgia, serif;
  font-size: 1.02rem;
  color: var(--walnut-soft);
  cursor: pointer;
}

.preview-tab[aria-selected="true"] {
  color: var(--walnut);
  border-bottom-color: var(--brass);
}

.preview-top {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.plate-box {
  margin: 0;
  background: #faf6ea;
  border: 1px solid var(--brass-soft);
  border-radius: 3px;
  padding: 6px;
}

.plate-box img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto;
  transition: opacity .22s ease;
}

.plate-cap {
  font-size: .78rem;
  font-style: italic;
  color: var(--walnut-soft);
  text-align: center;
  margin-top: 5px;
}

.book-meta h2 {
  font-size: 1.48rem;
  line-height: 1.12;
  margin: 0 0 6px;
}

.book-meta p {
  margin: 0 0 6px;
  font-size: .94rem;
  color: var(--walnut-soft);
}

.order-line {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid var(--rule);
  font-family: "Fell", Georgia, serif;
  font-style: italic;
  font-size: .92rem;
  color: var(--brass);
}

.chapters-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 14px 0 10px;
}

.chapters-head h3 { font-size: 1.2rem; margin: 0; }
.chapters-head span { font-size: .86rem; color: var(--walnut-soft); font-style: italic; }

.chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.chapter-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 3px;
  background: var(--parchment);
  border: 1px solid var(--rule);
}

.chapter-card.matched {
  border-color: var(--brass-soft);
  border-left: 3px solid var(--brass);
  background: #fffdf7;
}

.chapter-thumb {
  width: 58px;
  height: 58px;
  border-radius: 2px;
  object-fit: contain;
  border: 1px solid var(--rule);
  background: #faf6ea;
}

.chapter-eyebrow {
  font-family: "Fell", Georgia, serif;
  font-size: .82rem;
  color: var(--walnut-soft);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.chapter-eyebrow em {
  color: var(--brass);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}

.chapter-name {
  font-family: "Fell", Georgia, serif;
  font-size: 1.08rem;
  color: var(--walnut);
  margin: 1px 0 2px;
}

.chapter-years {
  font-family: "Garamond", Georgia, serif;
  font-size: .86rem;
  color: var(--walnut-soft);
  font-style: italic;
  margin-left: 4px;
}

.chapter-hook {
  margin: 0;
  font-size: .9rem;
  color: var(--walnut-soft);
  line-height: 1.38;
}

.chapter-topics {
  margin: 3px 0 0;
  font-size: .8rem;
  font-style: italic;
  color: var(--slate);
}

/* ---- Study-D Plate Library ---- */
.section-head { margin: 46px 0 18px; text-align: center; }
.section-head h2 { font-size: clamp(1.55rem, 3.1vw, 2.05rem); margin: 0 0 4px; }
.section-head p { margin: 0 auto; max-width: 38em; color: var(--walnut-soft); }

.plate-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.plate-tile {
  background: var(--parchment-card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .14s;
}

.plate-tile:hover { border-color: var(--brass); }

.plate-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #faf6ea;
}

.plate-tile strong {
  display: block;
  font-family: "Fell", Georgia, serif;
  font-weight: 400;
  font-size: .96rem;
  margin-top: 6px;
  color: var(--walnut);
}

/* ---- SSA Stats Strip ---- */
.stats-strip {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--parchment-card);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--brass-soft);
  border-radius: 3px;
  padding: 16px 12px;
  text-align: center;
}

.stat-val {
  font-family: "Fell", Georgia, serif;
  font-size: 1.85rem;
  color: var(--vermilion);
  line-height: 1.05;
}

.stat-lbl {
  margin-top: 4px;
  font-size: .88rem;
  color: var(--walnut-soft);
}

/* ---- Interactive Multi-Page Book Preview Modal (query67spider) ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(38, 29, 20, .74);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}

.modal-backdrop[hidden] { display: none !important; }

.book-modal {
  width: min(920px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--parchment);
  border: 2px solid var(--walnut);
  border-radius: 4px;
  padding: 20px 22px 22px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .45);
}

.modal-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.modal-bar h2 { margin: 0; font-size: 1.32rem; }

.close-btn {
  border: 1px solid var(--walnut);
  background: var(--parchment-card);
  color: var(--walnut);
  border-radius: 3px;
  padding: 5px 12px;
  cursor: pointer;
  font-family: "Fell", Georgia, serif;
  font-size: 1rem;
}

.modal-child-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
}

.spread-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--brass-soft);
  border: 1px solid var(--brass-soft);
  border-radius: 3px;
  overflow: hidden;
  min-height: 400px;
}

.spread-leaf {
  background: var(--parchment-card);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spread-leaf.art-leaf {
  background: #faf6ea;
  align-items: center;
  text-align: center;
}

.spread-leaf img {
  width: min(340px, 100%);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.leaf-kicker {
  font-family: "Fell", Georgia, serif;
  font-style: italic;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: .86rem;
  margin: 0 0 6px;
}

.leaf-title {
  font-family: "Fell", Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.12;
  margin: 0 0 8px;
}

.leaf-who { font-style: italic; color: var(--walnut-soft); margin: 0 0 12px; }
.leaf-body { margin: 0 0 14px; font-size: 1.05rem; line-height: 1.56; }
.leaf-folio { margin-top: auto; text-align: center; font-size: .86rem; color: var(--walnut-soft); padding-top: 12px; }

.modal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.nav-btn {
  padding: 7px 15px;
  border-radius: 3px;
  border: 1px solid var(--walnut);
  background: var(--parchment-card);
  color: var(--walnut);
  font-family: "Fell", Georgia, serif;
  font-size: 1rem;
  cursor: pointer;
}

.nav-btn:disabled { opacity: .4; cursor: not-allowed; }

.page-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-dot {
  padding: 3px 9px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: var(--parchment-card);
  color: var(--walnut-soft);
  font-size: .84rem;
  cursor: pointer;
}

.page-dot[aria-current="page"] {
  background: var(--walnut);
  border-color: var(--walnut);
  color: var(--parchment-card);
}

footer {
  text-align: center;
  color: var(--walnut-soft);
  font-size: .92rem;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

/* ---- Tablet & Mobile Breakpoints ---- */
@media (max-width: 859px) {
  .hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }
  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  .hero-lede {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-row {
    justify-content: center;
  }
  .hero-plate-col {
    width: 100%;
    display: flex;
    justify-content: center;
  }
  .hero-plate-frame {
    width: min(290px, 100%);
    margin: 0 auto;
  }
  .builder-grid { grid-template-columns: 1fr; }
  .plate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .hero-inner { padding: 14px 16px 26px; }
  .topbar {
    justify-content: center;
    text-align: center;
    margin-bottom: 18px;
  }
  .hero-copy h1 { font-size: 2rem; }
  .hero-plate-frame {
    width: min(256px, 100%);
    padding: 10px 10px 8px;
    margin: 0 auto;
  }
  main { padding: 20px 14px 52px; }
  .panel { padding: 16px 14px 18px; }
  .preview-top { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .plate-box { width: min(200px, 100%); margin: 0 auto; }
  .spread-stage { grid-template-columns: 1fr; }
  .spread-leaf { padding: 16px; }
  .code-row { flex-direction: column; align-items: stretch; }
}

[hidden] { display: none !important; }
