/* ==========================================================================
   theshore.ai — Into Alignment
   Night ocean / eclipse moon theme, from the novel's cover:
   midnight navy #0a1628 · blood moon #d4622e · cream #efe5d0
   ========================================================================== */

:root {
  --night-0: #060d1a;   /* deepest sky */
  --night-1: #0a1628;   /* page */
  --night-2: #101f36;   /* elevated */
  --night-3: #16273f;   /* raised edge */
  --ink: #efe5d0;       /* cream text */
  --ink-dim: #b6ab96;   /* muted cream */
  --ink-faint: #8a8172;
  --moon: #d4622e;      /* eclipse amber */
  --moon-bright: #e8946a;
  --ember: #c44536;
  --line: rgba(239, 229, 208, 0.14);
  --line-soft: rgba(239, 229, 208, 0.07);
  --moon-x: 50%;          /* default: centered (mobile / narrow) */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--night-1);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--moon-bright); text-decoration: none; }
a:hover { color: var(--moon); }

/* ---------- shared bits ---------- */

.kicker {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moon-bright);
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.6rem;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  min-height: 44px;
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--moon-bright) 0%, var(--moon) 55%, var(--ember) 100%);
  color: #1c0d05;
}
.btn-primary:hover { color: #1c0d05; filter: brightness(1.07); }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: rgba(239,229,208,0.34); color: var(--ink); background: rgba(239,229,208,0.05); }

:focus-visible { outline: 2px solid var(--moon-bright); outline-offset: 3px; border-radius: 2px; }

/* ---------- nav ---------- */

.nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); opacity: 0.85; }

.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 2.5vw, 2.2rem); }
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.nav-links a:hover { color: var(--ink); }

.nav-buy {
  border: 1px solid rgba(212,98,46,0.55);
  color: var(--moon-bright) !important;
  padding: 0.5rem 1.05rem;
  border-radius: 2px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nav-buy:hover { background: rgba(212,98,46,0.12); border-color: var(--moon); }

@media (max-width: 640px) {
  .nav-links a:not(.nav-buy) { display: none; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--night-0);
}

/* sky with a soft glow toward the moon (upper-center-right) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 46% at var(--moon-x) 20%,
      rgba(212, 98, 46, 0.13) 0%,
      rgba(212, 98, 46, 0.05) 42%,
      transparent 72%),
    linear-gradient(180deg,
      #0b1830 0%,
      #081225 34%,
      var(--night-0) 78%);
  z-index: 0;
}

.sky {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.stars { position: absolute; inset: 0; }

.star {
  position: absolute;
  background: #f4ead8;
  border-radius: 50%;
}

@keyframes twinkle {
  0%, 100% { opacity: var(--o, 0.6); }
  50%      { opacity: calc(var(--o, 0.6) * 0.25); }
}

/* ---- Moon placement ----
   Wide (≥1160px): the moon hangs in the open sky between the title column
   and the book column — the ~200px gap that tracks the centered 1120px
   content box. Disc clears title, cover, and nav at every width.
   Mid (901–1159px): moon rides high and small, centered — measured clear.
   Mobile (≤900px): the moon and its reflection are hidden; the cover's own
   eclipse does the work, and stars + horizon-light keep the sky alive. */

.moon {
  position: absolute;
  top: clamp(4rem, 9vh, 6.5rem);
  left: var(--moon-x);
  translate: -50% 0;
  width: clamp(150px, 15vw, 165px);
  height: auto;
  filter: drop-shadow(0 0 42px rgba(212, 98, 46, 0.25));
}

@media (min-width: 1160px) {
  /* Gap between the title column and the book column tracks the centered
     content box; its center sits ~83px right of the viewport center. */
  :root { --moon-x: calc(50% + 83px); }
}

/* Mid viewports (two-column hero, cramped sky): moon rides high and smaller */
@media (max-width: 1159px) and (min-width: 901px) {
  .moon { width: clamp(120px, 13vw, 150px); top: 3.6rem; }
  .reflection { width: clamp(70px, 9vw, 100px); }
}

/* Mobile: no room for a moon in the cramped sky — the book cover's own
   eclipse carries the theme. Stars and horizon remain. */
@media (max-width: 900px) {
  .moon, .reflection { display: none; }
}

/* the sea */
.sea {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  z-index: 1;
  background:
    linear-gradient(180deg,
      rgba(16, 31, 54, 0.0) 0%,
      rgba(13, 24, 44, 0.85) 12%,
      #0a1424 55%,
      #081120 100%);
  border-top: 1px solid rgba(212, 98, 46, 0.18);
  pointer-events: none;
}

/* faint horizontal wave texture */
.sea::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg,
      transparent 0px,
      transparent 9px,
      rgba(239, 229, 208, 0.022) 10px,
      transparent 11px,
      transparent 23px,
      rgba(239, 229, 208, 0.014) 24px,
      transparent 25px);
}

/* a tiny warm light on the horizon */
.horizon-light {
  position: absolute;
  top: -3px;
  left: 24%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffb26b;
  box-shadow: 0 0 10px 2px rgba(255, 178, 107, 0.5);
}

/* the moon's broken reflection down the water */
.reflection {
  position: absolute;
  top: 6%;
  left: var(--moon-x);
  translate: -50% 0;
  width: clamp(80px, 10vw, 130px);
  height: 88%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.reflection i {
  display: block;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(232, 148, 106, var(--a, 0.3)) 22%,
    rgba(212, 98, 46, var(--a, 0.3)) 50%,
    rgba(232, 148, 106, var(--a, 0.3)) 78%,
    transparent 100%);
  border-radius: 2px;
  margin-top: var(--gap, 9px);
  width: var(--w, 60%);
  height: var(--h, 3px);
  filter: blur(0.4px);
}

@keyframes shimmer {
  0%, 100% { opacity: 0.75; transform: translateX(0); }
  50%      { opacity: 1;    transform: translateX(var(--dx, 3px)); }
}

/* Mid viewports (two-column hero, cramped sky): moon rides high and smaller */
@media (max-width: 1159px) and (min-width: 901px) {
  .moon { width: clamp(120px, 13vw, 150px); top: 3.4rem; }
  .reflection { width: clamp(70px, 9vw, 100px); }
}

/* hero content */

.hero-inner {
  position: relative;
  z-index: 5;
  flex: 1;
  width: min(1120px, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(7rem, 14vh, 10rem) 0 clamp(4.5rem, 9vh, 6.5rem);
}

.hero-copy { max-width: 34rem; }

.title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.4rem, 9.5vw, 6.8rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 1.1rem;
}

.subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--moon-bright);
  margin-bottom: 2.1rem;
}

.hook {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: var(--ink-dim);
  max-width: 30rem;
  margin-bottom: 2.4rem;
  font-style: italic;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* the book itself */
.hero-book { justify-self: center; }

.hero-book img {
  width: clamp(220px, 24vw, 330px);
  border-radius: 3px;
  box-shadow:
    0 0 0 1px rgba(239, 229, 208, 0.08),
    0 30px 70px -18px rgba(0, 0, 0, 0.75),
    0 0 90px -10px rgba(212, 98, 46, 0.22);
}

/* scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  translate: -50% 0;
  z-index: 6;
  width: 26px;
  height: 42px;
  border: 1.5px solid rgba(239, 229, 208, 0.35);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
}
.scroll-cue span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: rgba(239, 229, 208, 0.55);
  animation: cue-drop 2.2s ease-in-out infinite;
}
@keyframes cue-drop {
  0%   { transform: translateY(0);    opacity: 0.9; }
  70%  { transform: translateY(12px); opacity: 0.15; }
  100% { transform: translateY(0);    opacity: 0.9; }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 2.8rem;
    padding-top: 8.5rem;
  }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .cta-row { justify-content: center; }
  .hero-book img { width: clamp(190px, 42vw, 240px); }
  .hook { margin-inline: auto; }
}

/* ---------- sections ---------- */

.section { position: relative; }

/* the premise */
.section-story {
  background:
    radial-gradient(ellipse 70% 40% at 50% -6%, rgba(16, 31, 54, 0.9), transparent 70%),
    var(--night-1);
  padding: clamp(5.5rem, 12vh, 9rem) 0;
}

.prose {
  width: min(42rem, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 0 auto;
}

.prose .kicker { text-align: center; }

.prose p {
  color: var(--ink-dim);
  margin-bottom: 1.6rem;
  font-size: 1.0938rem;
  text-wrap: pretty;
}

.prose p:first-of-type { color: var(--ink); }

.drop-cap::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  float: left;
  font-size: 4.4rem;
  line-height: 0.82;
  padding: 0.35rem 0.75rem 0 0;
  color: var(--moon);
}

.comp-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem !important;
  color: var(--ink) !important;
  text-align: center;
  margin-top: 2.6rem !important;
}

/* the books */
.section-books {
  border-top: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, var(--night-1) 0%, #0b1526 50%, var(--night-1) 100%);
  padding: clamp(5rem, 11vh, 8rem) 0;
}

.section-head { width: min(1120px, 100% - clamp(2.5rem, 8vw, 6rem)); margin: 0 auto 3.5rem; }

.books-grid {
  width: min(1120px, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: stretch;
}

.book-card {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 1fr;
  gap: clamp(1.4rem, 3vw, 2.2rem);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(22, 39, 63, 0.35), rgba(10, 22, 40, 0.35));
}

.book-card-novel {
  border-color: rgba(212, 98, 46, 0.28);
  background:
    radial-gradient(ellipse 90% 70% at 18% 8%, rgba(212, 98, 46, 0.07), transparent 60%),
    linear-gradient(160deg, rgba(22, 39, 63, 0.5), rgba(10, 22, 40, 0.4));
}

.book-cover img {
  width: 100%;
  border-radius: 2px;
  box-shadow:
    0 0 0 1px rgba(239, 229, 208, 0.07),
    0 18px 44px -12px rgba(0, 0, 0, 0.65);
  transition: transform 0.25s ease;
}
.book-cover:hover img { transform: translateY(-4px); }

.book-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.book-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.3rem;
  text-wrap: balance;
}

.book-sub {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moon-bright);
  margin-bottom: 1.1rem;
}

.book-desc {
  font-size: 0.98rem;
  color: var(--ink-dim);
  margin-bottom: 1.7rem;
  text-wrap: pretty;
}

.book-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: auto; padding-top: 0.5rem; }
.book-links .btn { padding: 0.62rem 1.25rem; font-size: 0.875rem; }

.series-line {
  width: min(1120px, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 2.4rem auto 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.95rem;
}
.series-line a { border-bottom: 1px solid rgba(212, 98, 46, 0.4); }

@media (max-width: 860px) {
  .books-grid { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: minmax(120px, 170px) 1fr; }
}

@media (max-width: 480px) {
  .book-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .book-info { align-items: center; }
  .book-links { justify-content: center; }
  .book-cover img { max-width: 190px; }
}

/* the author */
.section-author {
  border-top: 1px solid var(--line-soft);
  padding: clamp(4.5rem, 10vh, 7rem) 0;
  background:
    radial-gradient(ellipse 46% 60% at 82% 110%, rgba(212, 98, 46, 0.06), transparent 70%),
    var(--night-1);
}

.author-inner {
  width: min(42rem, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 0 auto;
  text-align: center;
}

.author-bio {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 1.6rem;
}

.author-more { font-size: 1rem; }
.author-more a { border-bottom: 1px solid rgba(212, 98, 46, 0.4); }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line-soft);
  padding: 3rem 0 3.5rem;
  background: var(--night-0);
}

.footer-inner {
  width: min(1120px, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 0 auto;
  text-align: center;
}

.footer-mark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  color: var(--ink-dim);
  margin-bottom: 0.9rem;
}

.footer-fine { font-size: 0.85rem; color: var(--ink-faint); }
.footer-fine a { color: var(--ink-faint); border-bottom: 1px solid var(--line-soft); }
.footer-fine a:hover { color: var(--ink-dim); }

/* ---------- 404 ---------- */

body.err {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 60% 40% at 50% 22%, rgba(212, 98, 46, 0.10), transparent 70%),
    var(--night-0);
}

.err-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.err-moon { width: clamp(90px, 14vw, 130px); margin-bottom: 1.8rem; }

.err-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 4.5rem);
  color: var(--ink);
  line-height: 1;
  margin-bottom: 0.7rem;
}

.err-text {
  color: var(--ink-dim);
  font-style: italic;
  margin-bottom: 2.2rem;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .star, .reflection i, .scroll-cue span { animation: none !important; }
  .btn, .book-cover img { transition: none !important; }
}

/* ==========================================================================
   THE HALCYON WELCOME PACKET (/packet)
   Cream paper sheets on the night ocean. Ink navy #22354f, ember #c44536.
   ========================================================================== */

body.packet-body { background: var(--night-0); }

.subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(6, 13, 26, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.packet-intro {
  text-align: center;
  padding: clamp(3.5rem, 8vh, 5.5rem) 1.5rem 3rem;
}

.packet-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.05;
  color: var(--ink);
  margin-bottom: 1.3rem;
  text-wrap: balance;
}

.packet-blurb {
  max-width: 36rem;
  margin: 0 auto 0.9rem;
  color: var(--ink-dim);
  font-style: italic;
}

.packet-blurb-note {
  color: var(--moon-bright);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}

/* ---- the sheets ---- */

.sheets {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  width: min(46rem, calc(100% - 1.6rem));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.sheet {
  position: relative;
  background: linear-gradient(178deg, #f2ead8 0%, #ece1c8 100%);
  color: #22354f;
  border-radius: 3px;
  padding: clamp(2.2rem, 6vw, 3.4rem) clamp(1.5rem, 6vw, 3.4rem) clamp(3rem, 6vw, 3.6rem);
  box-shadow:
    0 26px 60px -18px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), transparent 14%);
  pointer-events: none;
}

.sheet-pagenum {
  position: absolute;
  bottom: 0.85rem;
  left: 50%;
  translate: -50% 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: rgba(34, 53, 79, 0.5);
}

.sheet-body { max-width: 34rem; margin: 0 auto; }

.sheet-centered .sheet-body {
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

/* cover */

.sheet-cover { text-align: center; }

.seal { display: block; margin: 0 auto; width: clamp(130px, 24vw, 175px); }

.seal text {
  font-family: var(--font-display);
  font-weight: 600;
  fill: #22354f;
}
.seal-word { font-size: 19px; letter-spacing: 7px; }
.seal-motto { font-size: 10.5px; letter-spacing: 2.6px; }

.sheet-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #22354f;
  margin: 1.7rem 0 0.3rem;
}

.sheet-doc {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c44536;
  margin-bottom: 1.6rem;
}

.sheet-tag { font-style: italic; color: rgba(34, 53, 79, 0.8); margin-bottom: 2.6rem; }

.sheet-sub {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(34, 53, 79, 0.55);
}

/* page one / page nine / last page — the big lines */

.big-line {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.7rem, 4.6vw, 2.5rem);
  line-height: 1.25;
  color: #22354f;
}

.big-em { font-weight: 600; }

.sheet-p9 .big-line { font-style: italic; font-weight: 400; }

.sheet-p9 .sheet-body { min-height: 13rem; }

.last-motto {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c44536;
  margin-top: 2.6rem;
}

.sheet-last .sheet-body { min-height: 12rem; }

/* the numbered guidelines */

.guidelines-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #22354f;
  border-bottom: 1px solid rgba(34, 53, 79, 0.25);
  padding-bottom: 0.8rem;
  margin-bottom: 1.6rem;
}

.rules { list-style: none; counter-reset: rule; }

.rules--cont { counter-reset: rule 6; }

.rules li {
  counter-increment: rule;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1.05rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #2a3f5c;
}

.rules li::before {
  content: counter(rule) ".";
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: #22354f;
}

.rules li em { font-style: normal; color: #22354f; }

/* page twelve — the script */

.script-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.5;
  color: #22354f;
  margin-bottom: 1.5rem;
}

.script-text {
  border: 1px solid rgba(34, 53, 79, 0.35);
  border-left: 3px solid #c44536;
  padding: 1.4rem 1.5rem;
  font-size: 1.04rem;
  line-height: 1.75;
  color: #2a3f5c;
  background: rgba(255, 255, 255, 0.28);
}

.script-slot {
  font-family: var(--font-display);
  font-style: italic;
  color: #c44536;
  letter-spacing: 0.04em;
}

.script-note {
  margin-top: 1.3rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(34, 53, 79, 0.6);
  text-align: right;
}

/* fine print — printed like fine print, meant to be read aloud */

.sheet-body-fine { text-align: center; padding: 1.4rem 0 0.6rem; }

.fine-print {
  font-size: 0.98rem;
  line-height: 1.8;
  font-style: italic;
  color: #2a3f5c;
  max-width: 26rem;
  margin: 0 auto;
}

/* the acknowledgment form */

.ack-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1.4rem 0 2.6rem;
  color: #22354f;
}

.sig-line { border-bottom: 1px solid rgba(34, 53, 79, 0.5); height: 2.6rem; width: 18rem; max-width: 100%; }

.ack-due {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c44536;
}

.ack-note { margin-top: 0.4rem; font-size: 0.9rem; font-style: italic; color: rgba(34, 53, 79, 0.65); }

/* the closing section */

.packet-close {
  text-align: center;
  padding: clamp(3.5rem, 9vh, 5.5rem) 1.5rem clamp(4rem, 9vh, 6rem);
  border-top: 1px solid var(--line-soft);
  background:
    radial-gradient(ellipse 60% 50% at 50% 115%, rgba(212, 98, 46, 0.08), transparent 70%),
    var(--night-1);
}

.packet-close-line {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 34rem;
  margin: 0 auto 2.2rem;
  text-wrap: balance;
}

.packet-close .cta-row { justify-content: center; }

/* ==========================================================================
   HALCYON NOTES — Bob's morning message & Skip's log entries
   ========================================================================== */

.halcyon-note {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  width: min(20.5rem, calc(100vw - 2.5rem));
  padding: 0.95rem 2rem 1rem 1.2rem;
  border-radius: 4px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.65);
}

.halcyon-note.is-in { opacity: 1; transform: none; }

.halcyon-note--bob {
  background: linear-gradient(160deg, #182a44, #101d33);
  border: 1px solid rgba(212, 98, 46, 0.42);
  box-shadow:
    0 0 0 1px rgba(239, 229, 208, 0.05),
    0 18px 50px -12px rgba(0, 0, 0, 0.65),
    0 0 60px -18px rgba(212, 98, 46, 0.35);
  cursor: pointer;
}

.halcyon-note--bob:hover { border-color: rgba(212, 98, 46, 0.7); }

.hal-bob-msg {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.5;
}

.hal-bob-sig {
  font-family: var(--font-display);
  color: var(--moon-bright);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
}

.halcyon-note--skip {
  background: rgba(6, 13, 26, 0.94);
  border: 1px solid var(--line);
}

.hal-skip-log {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 0.45rem;
}

.hal-skip-line {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--ink-dim);
  line-height: 1.5;
}

.halcyon-note-x {
  position: absolute;
  top: 0.35rem;
  right: 0.45rem;
  background: none;
  border: 0;
  color: var(--ink-faint);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.3rem;
}

.halcyon-note-x:hover { color: var(--ink); }

@media (max-width: 640px) {
  .halcyon-note {
    right: 0.8rem;
    left: 0.8rem;
    bottom: 0.8rem;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .halcyon-note { transition: none; }
}

/* the packet teaser on the homepage */

.section-packet {
  border-top: 1px solid var(--line-soft);
  padding: clamp(4.5rem, 10vh, 7rem) 0;
  background:
    radial-gradient(ellipse 50% 70% at 18% 50%, rgba(212, 98, 46, 0.05), transparent 65%),
    var(--night-1);
}

.packet-teaser {
  width: min(1120px, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(200px, 290px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.mini-sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(1.8rem, 4vw, 2.6rem) clamp(1.2rem, 3vw, 2rem) clamp(1.6rem, 3vw, 2rem);
  background: linear-gradient(178deg, #f2ead8 0%, #ece1c8 100%);
  border-radius: 3px;
  box-shadow:
    0 22px 50px -16px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 0 70px -20px rgba(212, 98, 46, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mini-sheet:hover {
  transform: translateY(-4px);
  box-shadow:
    0 26px 60px -16px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 0 90px -18px rgba(212, 98, 46, 0.4);
}

.mini-sheet .seal { width: clamp(92px, 12vw, 120px); }

.mini-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #22354f;
  margin: 1.2rem 0 0.15rem;
}

.mini-doc {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c44536;
  margin-bottom: 0.7rem;
}

.mini-tag {
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(34, 53, 79, 0.75);
}

.packet-teaser-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1rem;
  text-wrap: balance;
}

.packet-teaser-text {
  color: var(--ink-dim);
  max-width: 32rem;
  margin-bottom: 1.8rem;
  text-wrap: pretty;
}

.packet-more {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.packet-more a {
  color: var(--ink-dim);
  border-bottom: 1px solid rgba(212, 98, 46, 0.4);
}

.packet-more a:hover { color: var(--moon-bright); }

@media (max-width: 760px) {
  .packet-teaser {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .packet-teaser-copy { display: flex; flex-direction: column; align-items: center; }
  .mini-sheet { width: min(300px, 100%); }
}

/* ---------- the recall letter (/recall) ---------- */

.recall-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #c44536;
  margin-bottom: 0.9rem;
}

.recall-head {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.45rem, 3.6vw, 2rem);
  line-height: 1.15;
  color: #22354f;
  margin-bottom: 0.5rem;
}

.recall-meta {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(34, 53, 79, 0.55);
  border-bottom: 1px solid rgba(34, 53, 79, 0.25);
  padding-bottom: 0.9rem;
  margin-bottom: 1.8rem;
}

.recall-strong {
  font-weight: 600;
  color: #22354f;
  margin: 1.4rem 0 0.6rem;
}

.sheet-body p { margin-bottom: 0.9rem; line-height: 1.65; color: #2a3f5c; }

.faq-q {
  font-weight: 600;
  color: #22354f;
  margin-top: 1.6rem;
}

.faq-a {
  margin-bottom: 0.4rem;
  font-style: italic;
}

.recall-sign {
  margin-top: 2.2rem;
  font-style: italic;
  line-height: 1.6;
}

.recall-sign-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: normal;
  color: #22354f;
}

.recall-sign-note {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(34, 53, 79, 0.5);
}

.sheet-memo .memo-rule {
  border-left: 3px solid #c44536;
  padding: 0.55rem 0 0.55rem 1.1rem;
  margin: 1.2rem 0;
  background: rgba(255, 255, 255, 0.28);
}

.memo-line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  color: #22354f;
}

.memo-note {
  margin-top: 1.6rem;
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(34, 53, 79, 0.7);
  border-top: 1px solid rgba(34, 53, 79, 0.2);
  padding-top: 1rem;
}

/* ---------- the playlist (/playlist) ---------- */

.playlist {
  width: min(58rem, 100% - 1.6rem);
  margin: 0 auto;
  padding-bottom: 2rem;
}

.pl-note-box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--moon);
  background: rgba(16, 31, 54, 0.5);
  border-radius: 4px;
  padding: 1.5rem 1.7rem;
  margin-bottom: 3rem;
}

.pl-note-box p {
  color: var(--ink-dim);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.pl-note-fine {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem !important;
  color: var(--ink-faint) !important;
  margin-bottom: 0 !important;
}

.pl-side { margin-bottom: 3.2rem; }

.pl-side-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.pl-side-sub {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-bright);
  margin-bottom: 1.4rem;
}

.pl-list { list-style: none; counter-reset: none; }

.pl-track {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0 1.1rem;
  padding: 1.05rem 0.2rem;
  border-top: 1px solid var(--line-soft);
}

.pl-track:last-child { border-bottom: 1px solid var(--line-soft); }

.pl-num {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
  padding-top: 0.28rem;
}

.pl-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.pl-artist {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moon-bright);
  margin-left: 0.5rem;
}

.pl-why {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-dim);
  font-style: italic;
}

.pl-links {
  grid-row: span 2;
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  padding-top: 0.3rem;
}

.pl-link {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint) !important;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.28rem 0.6rem;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.pl-link:hover {
  color: var(--moon-bright) !important;
  border-color: rgba(212, 98, 46, 0.55);
}

/* the import block */

.pl-import {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(16, 31, 54, 0.5);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  margin-top: 1rem;
}

.pl-import-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.pl-import-sub {
  color: var(--ink-dim);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.pl-import-details summary {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moon-bright);
  cursor: pointer;
  margin-bottom: 0.9rem;
}

.pl-import-details summary:hover { color: var(--moon); }

.pl-import-wrap { position: relative; }

.pl-import-text {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--ink-dim);
  background: var(--night-0);
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  white-space: pre;
}

.pl-copy {
  margin-top: 0.9rem;
}

@media (max-width: 640px) {
  .pl-track { grid-template-columns: 2rem minmax(0, 1fr); }
  .pl-links { grid-column: 2; grid-row: auto; justify-content: flex-start; }
  .pl-artist { display: block; margin-left: 0; margin-top: 0.15rem; }
}

/* ---------- packet print: the packet, and nothing else ---------- */

@media print {
  .subnav, .packet-intro, .packet-close, .footer, .halcyon-note { display: none !important; }
  body.packet-body { background: #fff; }
  .sheets { width: auto; gap: 0; }
  .sheet { box-shadow: none; border-bottom: 1px solid #ccc; border-radius: 0; }
}

/* ==========================================================================
.book-read { margin: 0.85rem 0 0; font-size: 0.85rem; }
.book-read a { color: var(--ink-faint); border-bottom: 1px solid var(--line-soft); }
.book-read a:hover { color: var(--ink-dim); border-bottom-color: var(--line); }

   /research — the companion, published to read
   ========================================================================== */

body.research-body {
  background:
    radial-gradient(ellipse 90% 46% at 50% -10%, rgba(21, 39, 63, 0.85), transparent 70%),
    var(--night-1);
}

.rw-page {
  width: min(46rem, 100% - clamp(2.5rem, 8vw, 6rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) 0 5rem;
}

/* ---------- section head ---------- */

.rw-head { text-align: center; margin-bottom: clamp(2.5rem, 6vh, 4rem); }

.rw-crumb {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moon-bright);
  margin-bottom: 1.4rem;
}

.rw-crumb a { color: inherit; }
.rw-crumb a:hover { color: var(--moon); }

.rw-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 1.2rem;
  text-wrap: balance;
}

.rw-note-line {
  color: var(--ink-faint);
  font-style: italic;
  font-size: 0.95rem;
}

/* ---------- column ---------- */

.rw-col { position: relative; }

.rw-col p {
  color: var(--ink-dim);
  font-size: 1.0938rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.rw-col p:first-of-type { color: var(--ink); }

.rw-col h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--ink);
  margin: 3rem 0 1.1rem;
  text-wrap: balance;
}

.rw-col h3:first-child { margin-top: 0; }

.rw-col ul, .rw-col ol {
  margin: 0 0 1.5rem 1.4rem;
}

.rw-col li {
  color: var(--ink-dim);
  margin-bottom: 0.55rem;
  line-height: 1.75;
  font-size: 1.0469rem;
  padding-left: 0.35rem;
}

.rw-col ul { list-style: none; }

.rw-col ul > li::marker { content: none; }

.rw-col ul > li { position: relative; }

.rw-col ul > li::before {
  content: "\2014";          /* em dash bullet, book-like */
  position: absolute;
  left: -1.4rem;
  color: var(--moon);
  opacity: 0.85;
}

.rw-col blockquote {
  border-left: 2px solid var(--moon);
  padding: 0.1rem 0 0.1rem 1.4rem;
  margin: 0 0 1.5rem;
  color: var(--ink-dim);
  font-style: italic;
}

.rw-col a { border-bottom: 1px solid rgba(232, 148, 106, 0.35); }

.rw-col a:hover { border-bottom-color: var(--moon-bright); }

/* drop cap on the first paragraph of body sections */

.rw-col > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  float: left;
  font-size: 3.6rem;
  line-height: 0.82;
  padding: 0.32rem 0.7rem 0 0;
  color: var(--moon);
}

/* glossary + related-work lists are definition-style: no bullets */


/* ---------- table ---------- */

.rw-table {
  margin: 0 0 1.8rem;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
}

.rw-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.98rem;
  line-height: 1.6;
}

.rw-table th, .rw-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
}

.rw-table th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moon-bright);
}

.rw-table tr:last-child td { border-bottom: none; }

/* ---------- notes ---------- */

.rw-notes {
  margin-top: 3.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

.rw-notes-head {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}

.rw-notes ol {
  list-style: none;
  counter-reset: rwnote;
  margin-left: 0;
}

.rw-notes li {
  counter-increment: rwnote;
  position: relative;
  padding-left: 2.1rem;
  color: var(--ink-faint);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}

.rw-notes li::before {
  content: counter(rwnote);
  position: absolute;
  left: 0;
  top: 0.06rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--moon-bright);
}

.rw-notes li a { color: var(--ink-dim); }
.rw-notes li a:hover { color: var(--ink); }

.fnback {
  margin-left: 0.4rem;
  color: var(--ink-faint);
  font-size: 0.8em;
  border-bottom: none;
}

sup.fnref, sup.fnsep { font-size: 0.72em; }
sup.fnref a { color: var(--moon-bright); border-bottom: none; margin-left: 0.08em; }
sup.fnref a:hover { color: var(--moon); }

/* ---------- pager ---------- */

.rw-pager {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.2rem;
  margin-top: 3.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
}

.rw-pager a { color: var(--ink-dim); font-size: 0.95rem; border-bottom: none; }
.rw-pager a:hover { color: var(--ink); }


.rw-pager-contents {
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.rw-blank { visibility: hidden; }

/* ---------- buy line ---------- */

.rw-buyline {
  margin-top: 2.8rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  color: var(--ink-faint);
  font-size: 0.92rem;
  line-height: 1.65;
  text-align: center;
}

.rw-buyline a { color: var(--ink-dim); border-bottom: none; }
.rw-buyline a:hover { color: var(--ink); }

/* ---------- hub ---------- */

.rw-head-hub { margin-bottom: clamp(2.8rem, 7vh, 4.5rem); }

.rw-blurb {
  max-width: 36rem;
  margin: 0 auto 1rem;
  color: var(--ink-dim);
  line-height: 1.8;
}

.rw-spoiler {
  color: var(--ink-faint);
  font-style: italic;
  font-size: 0.95rem;
}

.rw-toc {
  display: grid;
  gap: 0.4rem;
}

.rw-toc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--ink-dim);
  border-bottom-color: transparent;
}

.rw-toc-item:hover {
  border-color: var(--line-soft);
  background: rgba(16, 31, 54, 0.35);
  color: var(--ink);
}

.rw-toc-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--moon-bright);
}

.rw-toc-title { font-size: 1.02rem; line-height: 1.45; }

/* ---------- research print: paper without chrome ---------- */

@media print {
  .research-body .subnav, .research-body .footer,
  .research-body .rw-pager, .research-body .rw-buyline { display: none !important; }
  body.research-body { background: #fff; color: #111; }
  body.research-body .rw-col p, body.research-body .rw-col li,
  body.research-body .rw-notes li { color: #222; }
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .rw-pager { flex-wrap: wrap; }
  .rw-pager-contents { order: 3; flex-basis: 100%; margin-top: 0.8rem; }
}
