/* =========================================================================
   NextRead — Marketing site styles
   Layered on top of nextread-tokens.css (design-system foundation).
   Aesthetic: cream paper, sage signature, New York serif headlines,
   editorial whitespace. Not SaaS-y. Quiet, specific, confident.
   ========================================================================= */

@import url('./nextread-tokens.css');

/* ---- Marketing-only tokens ---- */
:root {
  --max-w: 1120px;
  --gutter: 24px;
  --nav-h: 64px;
  --rule: rgba(28, 28, 30, 0.10);
  --rule-soft: rgba(28, 28, 30, 0.06);
}

@media (min-width: 700px) {
  :root { --gutter: 40px; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-background);
  color: var(--c-text-primary);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

/* Paper texture — extremely subtle warm noise overlay to make the cream feel like paper */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(rgba(139, 107, 86, 0.06) 1px, transparent 1px),
    radial-gradient(rgba(139, 107, 86, 0.04) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  opacity: 0.5;
  mix-blend-mode: multiply;
}

main, header, footer, section { position: relative; z-index: 1; }

/* =================== Layout =================== */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* =================== Top nav =================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(247, 243, 238, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-text-primary);
}
.brand__mark { width: 28px; height: 28px; }
.brand__word {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__link {
  font-size: 15px;
  color: var(--c-text-primary);
  text-decoration: none;
  opacity: 0.78;
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.nav__link:hover { opacity: 1; }
.nav__link[aria-current="page"] { opacity: 1; font-weight: 500; }

/* =================== Buttons =================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font: 500 15px/1 var(--font-ui);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  background: var(--c-primary);
  color: #fff;
  transition: transform var(--dur-fast) var(--ease-standard),
              background var(--dur-fast) var(--ease-standard),
              opacity var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
}
.btn:hover { background: #3D7A75; }
.btn:active { transform: scale(0.98); opacity: 0.92; }

.btn--ghost {
  background: transparent;
  color: var(--c-text-primary);
  border-color: var(--rule);
}
.btn--ghost:hover { background: var(--c-secondary-bg); }

.btn--sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }

.btn .ico { width: 16px; height: 16px; flex: none; }
.btn--lg .ico { width: 18px; height: 18px; }

/* =================== Hero =================== */
.hero {
  padding: 56px 0 72px;
}
@media (min-width: 900px) {
  .hero { padding: 80px 0 96px; }
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 72px;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

h1.display,
.display {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(40px, 6.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  color: var(--c-text-primary);
  margin: 18px 0 22px;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-weight: 500;
  color: var(--c-primary);
}

.lede {
  font-family: var(--font-ui);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.5;
  color: var(--c-text-secondary);
  max-width: 38ch;
  margin: 0 0 28px;
  text-wrap: pretty;
}

/* =================== Email form =================== */
.email-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 6px;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.email-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 14px;
  font: 400 16px/1 var(--font-ui);
  color: var(--c-text-primary);
  outline: none;
}
.email-form input::placeholder { color: var(--c-text-tertiary); }
.email-form .btn { height: 42px; }
.form__caption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--c-text-tertiary);
  max-width: 460px;
}
.form__caption a { color: var(--c-text-secondary); text-decoration: underline; text-underline-offset: 2px; }

.hero__cta-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.hero__or {
  color: var(--c-text-tertiary);
  font-size: 14px;
}
.text-link {
  color: var(--c-primary);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 140, 135, 0.35);
  padding-bottom: 1px;
}
.text-link:hover { border-bottom-color: var(--c-primary); }

/* =================== Section primitives =================== */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--rule-soft);
}
@media (min-width: 900px) {
  .section { padding: 112px 0; }
}
.section--alt { background: #FBF8F3; }
.section--ink {
  background: #1A1816;
  color: #F7F3EE;
  border-color: rgba(255,255,255,0.08);
}
.section--ink .lede,
.section--ink .meta,
.section--ink .t-secondary { color: rgba(247,243,238,0.7); }

.section__head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin: 0 0 56px;
}
.section__kicker {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-primary);
}
.section--ink .section__kicker { color: #A9D2CF; }

h2.section__title,
.section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h3.section__title { font-size: clamp(26px, 3.4vw, 36px); }

.section__sub {
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-text-secondary);
  margin: 0;
  max-width: 56ch;
}

/* =================== Steps (How it works) =================== */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}
.step {
  position: relative;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.step__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--c-primary);
}
.step__h {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 10px 0 10px;
}
.step__b {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--c-text-secondary);
  margin: 0;
  text-wrap: pretty;
}

/* =================== Pull quote =================== */
.quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--c-text-primary);
  max-width: 22ch;
  margin: 0;
}
.quote__attr {
  margin-top: 24px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
}
.quote__attr::before {
  content: "—  ";
  color: var(--c-text-tertiary);
}

/* =================== Footer =================== */
.footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--rule-soft);
  background: #F2EDE6;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 760px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 48px;
  }
}
.footer__col h4 {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
  margin: 0 0 16px;
}
.footer__col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__col a {
  color: var(--c-text-primary);
  text-decoration: none;
  font-size: 15px;
  opacity: 0.85;
}
.footer__col a:hover { opacity: 1; color: var(--c-primary); }
.footer__about {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.5;
  color: var(--c-text-secondary);
  max-width: 32ch;
  margin: 14px 0 0;
}
.footer__legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--c-text-tertiary);
}

/* =================== Legal page typography =================== */
.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 0 96px;
}
.legal h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.legal .updated {
  color: var(--c-text-tertiary);
  font-size: 14px;
  margin-bottom: 40px;
}
.legal h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}
.legal p, .legal li {
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text-primary);
}
.legal a {
  color: var(--c-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(74,140,135,0.35);
}
.legal ul { padding-left: 20px; }

/* =================== Static iPhone mockup (priority-stack section) =================== */
.phone {
  --w: 320px;
  --r: 44px;
  width: var(--w);
  aspect-ratio: 320 / 660;
  background: #0E0D0C;
  border-radius: var(--r);
  padding: 10px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 60px -20px rgba(28,28,30,0.35),
    0 12px 24px -10px rgba(28,28,30,0.20);
  position: relative;
  margin: 0 auto;
  flex: none;
}
@media (min-width: 700px) {
  .phone { --w: 340px; }
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--c-background);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone__notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 28px;
  background: #0E0D0C;
  border-radius: 999px;
  z-index: 4;
}
.phone__statusbar {
  height: 44px;
  padding: 0 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font: 600 13px/1 var(--font-ui);
  color: var(--c-text-primary);
  padding-bottom: 8px;
  flex: none;
}
.phone__statusbar .right { display: inline-flex; gap: 6px; align-items: center; }
.phone__statusbar svg { width: 14px; height: 10px; }

.phone__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 4px;
  flex: none;
}
.phone__nav-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
}
.phone__nav-btn {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: var(--c-secondary-bg);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--c-primary);
  font-size: 14px;
}

.phone__body {
  padding: 0 16px 12px;
  overflow: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.book-hero {
  display: flex;
  gap: 14px;
  padding: 14px 0 6px;
}
.book-cover {
  width: 76px;
  height: 114px;
  border-radius: var(--r-1);
  flex: none;
  box-shadow: var(--shadow-cover);
  background: linear-gradient(155deg, #5B7C8E 0%, #3D5C70 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px;
}
.book-cover--ph {
  background: linear-gradient(155deg, #B07A55 0%, #8B5A3B 100%);
}
.book-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 20% 0%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.18) 100%);
}
.book-cover__title {
  position: relative;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 10px;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.01em;
  z-index: 1;
}
.book-meta__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  margin: 2px 0 4px;
}
.book-meta__author {
  font-size: 13px;
  color: var(--c-text-secondary);
  margin: 0 0 6px;
}
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--c-accent);
  font-size: 11px;
}

.section-h {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
  margin: 10px 0 6px;
}

.avail-card {
  background: #fff;
  border-radius: var(--r-5);
  box-shadow: var(--shadow-card);
  padding: 12px;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  position: relative;
}
.avail-card__rank {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 20px; height: 20px;
  background: var(--c-text-primary);
  color: #fff;
  border-radius: 999px;
  font: 600 10px/1 var(--font-mono);
  display: inline-flex; align-items: center; justify-content: center;
  letter-spacing: 0;
}
.avail-card__icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.avail-card__icon[data-src="ku"]       { background: #FF9900; }
.avail-card__icon[data-src="libby"]    { background: #0077C8; }
.avail-card__icon[data-src="hoopla"]   { background: #00A0E3; }
.avail-card__icon[data-src="purchase"] { background: #555; }
.avail-card__icon svg { width: 18px; height: 18px; }
.avail-card__label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-primary);
  line-height: 1.2;
}
.avail-card__meta {
  font-size: 11px;
  color: var(--c-text-secondary);
  margin-top: 2px;
}
.avail-card__cta {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-primary);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.avail-card__cta[data-tone="muted"] { color: var(--c-text-tertiary); }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-2);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}
.badge[data-status="free"]     { color: #1E7B3E; background: rgba(52,168,83,0.14); }
.badge[data-status="wait"]     { color: #8A6300; background: rgba(251,188,4,0.20); }
.badge[data-status="purchase"] { color: #B43227; background: rgba(234,67,53,0.10); }
.badge[data-status="ku-check"] { color: #1A5FA8; background: rgba(26,95,168,0.12); }

/* =========================================================================
   INTERACTIVE PHONE COMPONENT  (hero-phone.js renders into these)
   Two states: shelf <-> book detail, swap on click.
   ========================================================================= */

.nrp {
  --nrp-w: 300px;
  width: var(--nrp-w);
  aspect-ratio: 300 / 600;
  background: #0E0D0C;
  border-radius: 42px;
  padding: 9px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 30px 60px -20px rgba(28,28,30,0.35),
    0 12px 24px -10px rgba(28,28,30,0.20);
  position: relative;
  margin: 0 auto;
  flex: none;
}
@media (min-width: 700px) { .nrp { --nrp-w: 318px; } }

.nrp__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--c-background);
  border-radius: 33px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nrp__island {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 24px;
  background: #0E0D0C;
  border-radius: 999px;
  z-index: 20;
}
.nrp__status {
  height: 40px;
  padding: 14px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 12px/1 var(--font-ui);
  color: var(--c-text-primary);
  flex: none;
  z-index: 10;
}
.nrp__status .right { display: inline-flex; gap: 5px; align-items: center; }
.nrp__status svg { width: 15px; height: 11px; }

/* View swap: only the active view is shown.
   Visibility is never gated on an animation clock. */
.nrp__track {
  position: relative;
  flex: 1;
  min-height: 0;
  display: block;
  overflow: hidden;
}
.nrp__view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nrp[data-view="shelf"]  .nrp__view--detail { display: none; }
.nrp[data-view="detail"] .nrp__view--shelf  { display: none; }

/* ---- Shelf nav ---- */
.nrp__shelf-nav {
  padding: 4px 16px 8px;
  flex: none;
}
.nrp__title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text-primary);
  margin: 0;
  line-height: 1.1;
}
.nrp__chips {
  display: flex;
  gap: 7px;
  padding: 12px 16px 10px;
  overflow-x: auto;
  flex: none;
  scrollbar-width: none;
}
.nrp__chips::-webkit-scrollbar { display: none; }
.nrp-chip {
  flex: none;
  font: 500 12.5px/1 var(--font-ui);
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: var(--c-secondary-bg);
  color: var(--c-text-secondary);
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.nrp-chip[aria-pressed="true"] { background: var(--c-primary); color: #fff; }

/* ---- Scroll body ---- */
.nrp__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 16px 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nrp__body::-webkit-scrollbar { display: none; }

/* ---- Shelf row ---- */
.nrp-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--c-card);
  border-radius: var(--r-5);
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 120ms var(--ease-standard), opacity 120ms var(--ease-standard);
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.nrp-row:active { transform: scale(0.98); opacity: 0.9; }

.nrp-cover {
  width: 44px;
  height: 64px;
  border-radius: var(--r-1);
  box-shadow: var(--shadow-cover);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 5px;
  flex: none;
}
.nrp-cover::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 60% at 18% 0%, rgba(255,255,255,0.22), transparent 55%),
    linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.22) 100%);
}
.nrp-cover__t {
  position: relative;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 7px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #fff;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.nrp-row__title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-text-primary);
  margin: 0;
}
.nrp-row__author {
  font-size: 11px;
  color: var(--c-text-secondary);
  margin: 3px 0 6px;
}
.nrp-row__chev { color: var(--c-text-tertiary); display: inline-flex; }

/* ---- Availability badge (shelf) ---- */
.nrp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-2);
  font: 600 10.5px/1 var(--font-ui);
  white-space: nowrap;
}
.nrp-badge .t-mono-num { font-size: 10.5px; }
.nrp-badge[data-status="free"]     { color: #1E7B3E; background: rgba(52,168,83,0.12); }
.nrp-badge[data-status="wait"]     { color: #8A6300; background: rgba(251,188,4,0.18); }
.nrp-badge[data-status="purchase"] { color: #B43227; background: rgba(234,67,53,0.10); }
.nrp-badge[data-status="ku-check"] { color: #1A5FA8; background: rgba(26,95,168,0.12); }

/* Tap hint — pulse on interactive rows */
.nrp-row[data-hint="1"] {
  border-color: rgba(74,140,135,0.45);
}
@media (prefers-reduced-motion: no-preference) {
  .nrp-row[data-hint="1"] { animation: nrpPulse 2.4s var(--ease-standard) infinite; }
}
@keyframes nrpPulse {
  0%, 100% { border-color: rgba(74,140,135,0.18); }
  50%       { border-color: rgba(74,140,135,0.65); }
}
.nrp-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: var(--c-primary-light);
  color: var(--c-primary-dark, #3D7A75);
  font: 600 11px/1 var(--font-ui);
}
.nrp-hint svg { width: 13px; height: 13px; }

/* ---- Detail nav ---- */
.nrp__detail-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 6px 12px 8px;
  flex: none;
  border-bottom: 1px solid var(--rule-soft);
}
.nrp-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--c-primary);
  font: 500 14px/1 var(--font-ui);
  padding: 4px 2px;
  white-space: nowrap;
}
.nrp-back svg { width: 16px; height: 16px; }
.nrp__detail-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text-primary);
  text-align: center;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Book hero (detail) ---- */
.nrp-hero {
  display: flex;
  gap: 14px;
  padding: 16px 0 8px;
}
.nrp-hero .nrp-cover { width: 64px; height: 94px; }
.nrp-hero .nrp-cover__t { font-size: 9px; }
.nrp-hero__title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 2px 0 4px;
  color: var(--c-text-primary);
}
.nrp-hero__author { font-size: 12.5px; color: var(--c-text-secondary); margin: 0 0 7px; }
.nrp-stars { display: inline-flex; gap: 2px; color: var(--c-accent); font-size: 12px; letter-spacing: 1px; }

.nrp-secthead { margin: 14px 0 10px; }
.nrp-secthead__k {
  font: 600 11px/1 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text-secondary);
}
.nrp-secthead__s {
  font-size: 11.5px;
  color: var(--c-text-tertiary);
  margin-top: 3px;
}

/* ---- Availability cards (detail) ---- */
.nrp-card {
  background: var(--c-card);
  border-radius: var(--r-5);
  box-shadow: var(--shadow-card);
  padding: 13px;
  margin-bottom: 10px;
  position: relative;
}
.nrp-card__top {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: center;
}
.nrp-card__rank {
  position: absolute;
  top: -6px; left: -6px;
  width: 19px; height: 19px;
  background: var(--c-text-primary);
  color: #fff;
  border-radius: 999px;
  font: 600 10px/1 var(--font-mono);
  display: inline-flex; align-items: center; justify-content: center;
}
.nrp-card__icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.nrp-card__icon svg { width: 18px; height: 18px; }
.nrp-card__label { font: 600 14px/1.1 var(--font-ui); color: var(--c-text-primary); }
.nrp-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--c-text-secondary);
}
.nrp-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  flex: none;
}
.nrp-dot[data-tone="green"] { background: var(--c-available-now); }
.nrp-dot[data-tone="amber"] { background: var(--c-waitlist); }
.nrp-dot[data-tone="gray"]  { background: var(--c-text-tertiary); }
.nrp-status .t-mono-num { color: var(--c-text-primary); font-size: 11.5px; }

.nrp-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 11px;
  height: 38px;
  border: 0;
  border-radius: var(--r-3);
  font: 600 12.5px/1 var(--font-ui);
  cursor: pointer;
  transition: opacity 120ms var(--ease-standard), transform 120ms var(--ease-standard);
}
.nrp-action:active { transform: scale(0.98); opacity: 0.85; }
.nrp-action svg { width: 14px; height: 14px; }
.nrp-action[data-tint="ku"]     { background: rgba(255,153,0,0.12);  color: #B36B00; }
.nrp-action[data-tint="libby"]  { background: rgba(0,119,200,0.12);  color: #0066AC; }
.nrp-action[data-tint="kindle"] { background: var(--c-secondary-bg); color: var(--c-text-primary); }
.nrp-action[data-tint="amazon"] { background: rgba(255,153,0,0.12);  color: #B36B00; }
.nrp-action[data-muted="1"]     { background: var(--c-secondary-bg); color: var(--c-text-tertiary); }
.nrp-card__note { margin: 6px 0 0; font-size: 10px; line-height: 1.4; color: var(--c-text-tertiary); }

/* =================== Utilities =================== */
.t-mono-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.meta { color: var(--c-text-secondary); font-size: 14px; }

/* ======= Reveal-on-load =======
   Only translate — no opacity fade — so content is always visible even
   in rendering contexts where the animation clock is frozen. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 600ms var(--ease-standard) both; }
  .reveal[data-delay="1"] { animation-delay: 70ms; }
  .reveal[data-delay="2"] { animation-delay: 140ms; }
  .reveal[data-delay="3"] { animation-delay: 210ms; }
  .reveal[data-delay="4"] { animation-delay: 280ms; }
}
@keyframes rise {
  from { transform: translateY(7px); }
  to   { transform: none; }
}
