/* Brackenrow Press v3: one mobile-first stylesheet, system fonts only. */
:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 18px; line-height: 1.6; -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; background: var(--page); color: var(--ink); overflow-wrap: break-word; }
img { max-width: 100%; }

body.home, body.legal { --page:#f6f4ef; --surface:#fff; --ink:#22282c; --muted:#4a5258; --accent:#22333d; --accent-ink:#fff; --line:#dcd8cf; --hero:#ece7dc; --soft:#f0ece3; --serif:Georgia,"Times New Roman",serif; }
body.amish { --page:#fbf6ee; --surface:#fffdf9; --ink:#2b2a22; --muted:#55524a; --accent:#7b2531; --accent-ink:#fff; --line:#e2d4c2; --hero:#f3e6d3; --soft:#f6ecdf; --tick:#2f5d46; --serif:Georgia,"Times New Roman",serif; }
body.mara { --page:#0f1f30; --surface:#1b3045; --ink:#f4f2ea; --muted:#cfd9e0; --accent:#e9c77f; --accent-ink:#14222f; --line:#3b5468; --hero:#152a3f; --soft:#172d42; --tick:#e9c77f; --serif:Georgia,"Times New Roman",serif; color-scheme: dark; }
body.puzzles { --page:#f5fafb; --surface:#fff; --ink:#15303e; --muted:#3c5664; --accent:#08617a; --accent-ink:#fff; --line:#bfd8de; --hero:#e2f1f4; --soft:#eaf5f7; --tick:#08617a; --serif:-apple-system,"Segoe UI",Roboto,Arial,sans-serif; font-size: 19px; }

.wrap { width: min(100%, 1120px); margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 9; padding: 10px 16px; background: var(--surface); color: var(--ink); border: 3px solid var(--accent); }
.skip-link:focus { top: 12px; }
a { color: var(--accent); text-underline-offset: .18em; }
a:focus-visible, .btn:focus-visible, .door:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
body.mara a:focus-visible { outline-color: #ffd98e; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.18; margin: 0 0 14px; }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 14px; }

.masthead { background: var(--page); border-bottom: 1px solid var(--line); }
.masthead .wrap { padding-top: 14px; padding-bottom: 12px; }
.brand { font-weight: 750; color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.brand-note { font-weight: 400; color: var(--muted); margin-left: 10px; }

/* hero */
.hero { background: var(--hero); padding: 30px 0 34px; }
.hero-grid { display: grid; gap: 26px; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: .09em; font-size: .85rem; font-weight: 750; color: var(--muted); margin-bottom: 8px; }
.lead { font-size: 1.12rem; max-width: 60ch; }
.hero-actions { margin: 20px 0 12px; }
.jump { color: var(--muted); font-size: 1rem; margin: 0; }
.jump a { display: inline-block; padding: 6px 4px; margin: 0 2px; font-weight: 700; }

/* fanned covers */
.fan { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 210px; }
.fan-img { width: 118px; height: auto; border-radius: 4px; box-shadow: 0 10px 24px rgba(0,0,0,.28); margin: 0 -22px; position: relative; }
.fan-img:nth-child(1) { transform: rotate(-7deg) translateY(10px); z-index: 1; }
.fan-img:nth-child(2) { transform: rotate(-2deg); z-index: 2; }
.fan-img:nth-child(3) { transform: rotate(3deg) translateY(4px); z-index: 3; }
.fan-img:nth-child(4) { transform: rotate(8deg) translateY(14px); z-index: 4; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 20px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 750; text-decoration: none; border: 2px solid var(--accent); line-height: 1.2; text-align: center; }
.btn:hover { filter: brightness(.92); }
.btn-big { min-height: 54px; padding: 12px 28px; font-size: 1.08rem; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--line); cursor: default; }
.btn-ghost:hover { filter: none; }

/* expect ticks */
.expect { padding: 22px 0 4px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding: 12px 14px 12px 46px; background: var(--soft); border-radius: 10px; font-weight: 600; }
.ticks li::before { content: "\2713"; position: absolute; left: 14px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--tick); color: var(--page); font-size: .8rem; display: grid; place-items: center; font-weight: 800; }

/* books */
.books { padding: 34px 0 8px; }
.book-grid { display: grid; gap: 18px; }
.book-card { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; scroll-margin-top: 16px; }
.book-card:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
.cover img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 6px 16px rgba(0,0,0,.22); }
.book-info { display: flex; flex-direction: column; min-width: 0; }
.book-number { font-size: .92rem; font-weight: 750; color: var(--muted); margin-bottom: 6px; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .85rem; }
.byline { color: var(--muted); font-size: .95rem; margin: -6px 0 8px; }
.blurb { color: var(--muted); }
.bonus { font-size: .95rem; font-style: italic; color: var(--muted); }
.card-actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.next-hint { margin: 0; font-size: .95rem; color: var(--muted); }

/* faq, gift, about */
.faq, .about { padding: 26px 0 4px; }
.gift { padding: 26px 0 4px; }
.gift-box { background: var(--surface); border: 2px dashed var(--line); border-radius: 14px; padding: 22px; }
.gift-top { padding-top: 22px; }
.gift-box p:last-child { margin-bottom: 0; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.chips a { display: inline-flex; align-items: center; min-height: 46px; padding: 8px 18px; border-radius: 99px; background: var(--surface); border: 2px solid var(--accent); font-weight: 700; text-decoration: none; }
.chips a:hover { background: var(--accent); color: var(--accent-ink); }

/* home doors */
.home-hero h1 { max-width: 18ch; }
.doors { display: grid; gap: 18px; }
.door { display: grid; grid-template-columns: 1fr; border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.06); transition: transform .15s, box-shadow .15s; }
.door:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.door-fan { height: 190px; padding-top: 22px; }
.door-fan .fan-img { width: 100px; }
.door-amish .door-fan { background: #f3e6d3; }
.door-mara .door-fan { background: #152a3f; }
.door-puzzles .door-fan { background: #e2f1f4; }
.door-text { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 20px; }
.door-kicker { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; color: var(--muted); }
.door strong { font-family: Georgia, serif; font-size: 1.4rem; line-height: 1.2; }
.door-cta { margin-top: 8px; font-weight: 750; color: var(--accent); }

.policy h2 { font-size: 1.35rem; margin-top: 26px; }
.footer { margin-top: 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
.footer .wrap { padding-top: 20px; padding-bottom: 28px; }
.footer-main { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer a { color: var(--ink); }

@media (max-width: 380px) {
  .wrap { padding: 0 14px; }
  .book-card { grid-template-columns: 92px minmax(0,1fr); gap: 12px; padding: 13px; }
  .fan-img { width: 98px; }
  .btn { padding: 10px 14px; }
}
@media (min-width: 720px) {
  .wrap { padding: 0 30px; }
  .hero { padding: 48px 0 52px; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 40px; }
  .fan { height: 300px; }
  .fan-img { width: 165px; margin: 0 -30px; }
  .ticks { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .book-card { grid-template-columns: 150px minmax(0,1fr); gap: 22px; padding: 22px; }
  .doors { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .door-fan .fan-img { width: 96px; margin: 0 -18px; }
}
@media (min-width: 1000px) {
  .book-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .book-card { grid-template-columns: 140px minmax(0,1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .door { transition: none; } .door:hover { transform: none; } }

/* v3.1 book pages + links */
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { text-decoration: underline; color: var(--accent); }
.crumbs { font-size: .92rem; color: var(--muted); padding-top: 12px; padding-bottom: 12px; }
.crumbs a { color: var(--muted); }
.book-hero { padding-top: 22px; }
.book-grid-hero { display: grid; gap: 24px; align-items: center; }
.book-cover-big { max-width: 260px; margin: 0 auto; }
.book-cover-big img { display: block; width: 100%; height: auto; border-radius: 5px; box-shadow: 0 14px 34px rgba(0,0,0,.3); }
.book-hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.subtitle { font-size: 1.1rem; color: var(--muted); font-style: italic; }
.byline-big { font-weight: 700; }
.kicker a { color: inherit; }
.description { padding: 30px 0 0; }
.description ul { padding-left: 1.2em; }
.description li { margin-bottom: 8px; }
.series-nav { padding: 30px 0 0; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.strip-wide { grid-template-columns: repeat(2, minmax(0,1fr)); }
.strip-item { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--muted); font-size: .9rem; font-weight: 700; text-align: center; }
.strip-item img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.strip-item.is-current img { outline: 3px solid var(--accent); outline-offset: 3px; }
.strip-item.is-current { color: var(--ink); }
.prev-next { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-ghost-link { background: transparent; color: var(--accent); }
@media (min-width: 720px) {
  .book-grid-hero { grid-template-columns: 280px minmax(0,1fr); gap: 44px; }
  .book-cover-big { max-width: none; }
  .strip-wide { grid-template-columns: repeat(4, minmax(0,1fr)); }
}

/* v3.2 phone first-screen fixes */
@media (max-width: 719px) {
  .hero-grid .fan { order: -1; height: 170px; }
  .hero-grid .fan .fan-img { width: 96px; margin: 0 -18px; }
  .book-cover-big { max-width: 170px; }
  .book-hero { padding-top: 14px; padding-bottom: 22px; }
  .book-grid-hero { gap: 16px; text-align: left; }
}
