* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #171313;
  --text: #2d2927;
  --muted: #6b625e;
  --line: #dfd6ce;
  --paper: #fffdf8;
  --surface: #fffaf2;
  --surface-clean: #fffdf8;
  --warm: #f5efe7;
  --green: #dbead9;
  --green-strong: #3b6d4f;
  --teal: #0b6f76;
  --midnight: #171313;
  --blue: #d8e9f1;
  --rose: #f4d7d1;
  --gold: #f0c77a;
  --button: #171313;
  --button-text: #fffdf8;
  --max: 1120px;
  --radius: 8px;
  --shadow-soft: 0 18px 48px rgba(23, 19, 19, 0.12);
  --shadow-card: 0 12px 30px rgba(23, 19, 19, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(219, 234, 217, 0.22), rgba(255, 253, 248, 0) 34rem),
    var(--paper);
  line-height: 1.55;
}

body.simple {
  background:
    linear-gradient(180deg, rgba(245, 239, 231, 0.78), rgba(255, 253, 248, 0) 360px),
    var(--paper);
}

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

a {
  color: var(--green-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #254735;
}

a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  padding: 0.6rem 0.85rem;
  color: var(--button-text);
  background: var(--button);
  border-radius: var(--radius);
  transform: translateY(-160%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(23, 19, 19, 0.1);
  background: rgba(255, 253, 248, 0.93);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 28px rgba(23, 19, 19, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0.85rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(23, 19, 19, 0.12);
  border-radius: 8px;
  background: var(--green);
  color: var(--ink);
  font-weight: 780;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.55rem 0.35rem;
  color: var(--text);
  font-size: 0.94rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--green-strong);
}

.nav-links a.nav-button {
  min-height: 40px;
  padding: 0.45rem 0.8rem;
  border: 2px solid var(--green-strong);
  border-radius: var(--radius);
  background: var(--green-strong);
  color: #fffdf8;
  font-weight: 760;
}

.nav-links a.nav-button:hover,
.nav-links a.nav-button:focus-visible {
  color: #fffdf8;
  background: #254735;
  border-color: #254735;
}

.nav-links a.github-link {
  gap: 0.42rem;
  min-height: 40px;
  padding: 0.45rem 0.72rem;
  border: 1px solid rgba(23, 19, 19, 0.18);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 720;
}

.nav-links a.github-link:hover,
.nav-links a.github-link:focus-visible {
  color: #fffdf8;
  background: var(--ink);
  border-color: var(--ink);
}

.github-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.hero {
  min-height: min(720px, 72svh);
  display: grid;
  align-items: end;
  border-bottom: 1px solid rgba(23, 19, 19, 0.1);
  background:
    linear-gradient(90deg, rgba(19, 16, 15, 0.88), rgba(19, 16, 15, 0.6) 40%, rgba(19, 16, 15, 0.18) 76%),
    linear-gradient(0deg, rgba(19, 16, 15, 0.42), rgba(19, 16, 15, 0) 42%),
    url("book-cover-hero.png") center / cover no-repeat;
}

.hero-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) 1rem clamp(4.5rem, 8vw, 6.5rem);
}

.hero-copy {
  max-width: 610px;
  color: #fffdf8;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.46);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.08;
}

.hero h1 {
  color: #fffdf8;
  font-size: clamp(3.15rem, 7vw, 6.15rem);
  letter-spacing: 0;
}

.hero-lede {
  max-width: 570px;
  margin: 1rem 0 0;
  color: rgba(255, 253, 248, 0.94);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  line-height: 1.28;
}

.free-emphasis {
  font-weight: 860;
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.12em;
}

.hero-support {
  max-width: 540px;
  margin: 1rem 0 0;
  color: rgba(255, 253, 248, 0.9);
  font-size: 1rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.76rem 1.05rem;
  border: 2px solid var(--button);
  border-radius: var(--radius);
  background: var(--button);
  color: var(--button-text);
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  color: var(--button-text);
  background: #2b2523;
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  box-shadow: 0 0 0 2px rgba(23, 19, 19, 0.6);
}

.button.secondary {
  border-color: rgba(255, 253, 248, 0.86);
  background: rgba(23, 19, 19, 0.68);
  color: #fffdf8;
}

.button.secondary:hover {
  background: rgba(23, 19, 19, 0.82);
}

.button.light {
  border-color: rgba(23, 19, 19, 0.16);
  background: #fffdf8;
  color: var(--ink);
}

.button.light:hover {
  border-color: rgba(23, 19, 19, 0.28);
  background: #edf5ec;
  color: var(--ink);
}

.section {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 1rem;
}

.section.tight {
  padding-top: clamp(2.2rem, 4vw, 3.4rem);
  padding-bottom: clamp(2.2rem, 4vw, 3.4rem);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.55fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.7rem;
}

.section h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0;
}

.section-header p,
.wide-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.app-preview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) max(1rem, calc((100vw - var(--max)) / 2 + 1rem));
  border-bottom: 1px solid var(--line);
  background: #f5efe7;
  color: var(--text);
}

.app-preview::before,
.app-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.app-preview::before {
  z-index: -2;
  background:
    url("appScreens/home.png") 0 18% / 22rem auto no-repeat,
    url("appScreens/casting.png") 100% 70% / 24rem auto no-repeat;
  filter: blur(20px) saturate(1.06);
  opacity: 0.13;
  transform: scale(1.08);
}

.app-preview::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(245, 239, 231, 0.98), rgba(245, 239, 231, 0.86) 46%, rgba(245, 239, 231, 0.68)),
    linear-gradient(0deg, rgba(255, 253, 248, 0.72), rgba(255, 253, 248, 0));
}

.app-preview-copy {
  max-width: 520px;
}

.app-preview h2 {
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 4.15rem);
}

.app-preview p:not(.eyebrow) {
  margin: 1rem 0 0;
  color: var(--text);
  font-size: 1.1rem;
}

.preview-phone-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(9rem, 1fr));
  gap: clamp(0.75rem, 2vw, 1.1rem);
  align-items: end;
  justify-self: end;
  width: min(100%, 610px);
  overflow-x: auto;
  padding: 0.35rem 0 1.1rem;
  scroll-snap-type: x proximity;
}

.preview-phone {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(23, 19, 19, 0.18);
  border-radius: 24px;
  background: #211d1c;
  box-shadow: 0 22px 54px rgba(23, 19, 19, 0.2);
  scroll-snap-align: start;
}

.preview-phone.featured {
  transform: translateY(1.25rem);
}

.preview-phone img {
  width: 100%;
  aspect-ratio: 9 / 19.2;
  object-fit: cover;
  object-position: top;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.feature-card,
.link-card,
.faq-preview,
.resource-card,
.screenshot-resource {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.feature-card {
  padding: 1.05rem;
}

.feature-overview .feature-card {
  min-height: 9.5rem;
  padding: 1.2rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(255, 250, 242, 0.96)),
    var(--surface);
}

.feature-overview .feature-card h2 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.feature-card h3,
.link-card h3,
.faq-preview h3,
.resource-card h3,
.screenshot-resource h3 {
  font-size: 1.04rem;
}

.feature-card p,
.link-card p,
.faq-preview p,
.resource-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.feature-list {
  display: grid;
  gap: 1rem;
}

.feature-detail {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  box-shadow: var(--shadow-card);
}

.feature-detail:nth-child(even) {
  background: #fffaf2;
}

.feature-detail::before,
.feature-detail::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.feature-detail::before {
  z-index: -2;
  background: var(--feature-bg) right center / 26rem auto no-repeat;
  filter: blur(20px) saturate(1.08);
  opacity: 0.16;
  transform: scale(1.06);
}

.feature-detail::after {
  z-index: -1;
  background: linear-gradient(90deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.92) 55%, rgba(255, 253, 248, 0.72));
}

.feature-detail:nth-child(even)::after {
  background: linear-gradient(90deg, rgba(255, 250, 242, 0.98), rgba(255, 250, 242, 0.92) 55%, rgba(255, 250, 242, 0.72));
}

.feature-discover {
  --feature-bg: url("appScreens/home.png");
}

.feature-search {
  --feature-bg: url("appScreens/author-search.png");
}

.feature-details {
  --feature-bg: url("appScreens/book-detail.png");
}

.feature-chapters {
  --feature-bg: url("../image-resources/ui-captures/13-player-chapters-panel.png");
}

.feature-cast {
  --feature-bg: url("appScreens/casting.png");
}

.feature-speed {
  --feature-bg: url("appScreens/playback-speed.png");
}

.feature-timer {
  --feature-bg: url("../image-resources/ui-captures/16-sleep-timer.png");
}

.feature-bookmarks {
  --feature-bg: url("../image-resources/ui-captures/14-player-bookmark-notes.png");
}

.feature-offline {
  --feature-bg: url("phoneScreenshots/06-offline-listening.png");
}

.feature-library {
  --feature-bg: url("phoneScreenshots/05-library-progress.png");
}

.feature-settings {
  --feature-bg: url("appScreens/language-settings.png");
}

.feature-permissions {
  --feature-bg: url("appScreens/permissions.png");
}

.feature-copy {
  max-width: 620px;
}

.feature-copy h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.feature-copy p:not(.eyebrow) {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.feature-phone {
  justify-self: center;
  width: min(100%, 300px);
  margin: 0;
  padding: 0.45rem;
  border: 1px solid rgba(23, 19, 19, 0.18);
  border-radius: 28px;
  background: #211d1c;
  box-shadow: 0 18px 44px rgba(23, 19, 19, 0.15);
}

.feature-phone img {
  width: 100%;
  border-radius: 22px;
}

.features-page .page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(calc(100% - 2rem), var(--max));
  margin-top: clamp(1rem, 3vw, 2rem);
  padding: clamp(3rem, 8vw, 5.5rem) clamp(1.2rem, 5vw, 3rem);
  border: 1px solid rgba(23, 19, 19, 0.14);
  border-radius: var(--radius);
  background: #171313;
}

.features-page .feature-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: clamp(1.6rem, 5vw, 4rem);
  align-items: center;
  min-height: min(680px, 72svh);
}

.features-page .page-hero::before,
.features-page .page-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.features-page .page-hero::before {
  z-index: -2;
  background:
    url("appScreens/author-search.png") 76% 34% / 21rem auto no-repeat,
    url("appScreens/casting.png") 100% 46% / 25rem auto no-repeat;
  filter: blur(15px) saturate(1.12);
  opacity: 0.4;
  transform: scale(1.06);
}

.features-page .page-hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(23, 19, 19, 0.93), rgba(23, 19, 19, 0.68) 58%, rgba(23, 19, 19, 0.36)),
    linear-gradient(0deg, rgba(219, 234, 217, 0.12), rgba(255, 253, 248, 0));
}

.features-page .page-hero h1,
.features-page .page-hero p {
  color: #fffdf8;
}

.features-page .page-hero .eyebrow {
  color: var(--gold);
}

.feature-hero-copy {
  max-width: 590px;
}

.feature-hero-visual {
  position: relative;
  display: grid;
  min-height: 450px;
  align-items: center;
  justify-items: center;
}

.hero-phone {
  overflow: hidden;
  width: min(42vw, 230px);
  min-width: 150px;
  margin: 0;
  border: 1px solid rgba(255, 253, 248, 0.22);
  border-radius: 26px;
  background: #211d1c;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.hero-phone img {
  width: 100%;
  aspect-ratio: 9 / 19.2;
  object-fit: cover;
  object-position: top;
}

.hero-phone-back,
.hero-phone-front {
  position: absolute;
  width: min(34vw, 190px);
  opacity: 0.92;
}

.hero-phone-back {
  left: 0;
  transform: rotate(-7deg) translateY(1rem);
}

.hero-phone-main {
  position: relative;
  z-index: 2;
  width: min(44vw, 250px);
}

.hero-phone-front {
  right: 0;
  z-index: 3;
  transform: rotate(6deg) translateY(2.2rem);
}

.cta-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

.cta-strip h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.cta-strip p:not(.eyebrow) {
  max-width: 650px;
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--warm);
}

.value-strip {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  align-items: center;
}

.value-points {
  display: grid;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value-points li {
  padding: 1rem;
  border: 1px solid rgba(23, 19, 19, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.72);
}

.value-points strong {
  display: block;
  color: var(--ink);
}

.value-points span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
}

.screens {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  gap: 1rem;
  align-items: start;
}

.screen-shot {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  box-shadow: var(--shadow-card);
}

.screen-shot img {
  width: 100%;
}

.screen-shot figcaption {
  padding: 0.8rem 0.9rem 0.95rem;
  color: #f6efe8;
  background: #1e1a19;
  font-size: 0.94rem;
}

.tool-screens {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-screens .screen-shot:first-child {
  grid-column: auto;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.9rem;
}

.link-card {
  padding: 1rem;
}

.link-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.7rem;
  padding: 0.1rem 0;
  font-weight: 700;
}

.resources-showcase {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 1rem clamp(2rem, 4vw, 3rem);
}

.resource-banner {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #edf8ef;
}

.resource-banner img {
  width: 100%;
  aspect-ratio: 100 / 38;
  object-fit: cover;
  object-position: center;
}

.resource-banner figcaption {
  padding: 0.85rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.96rem;
}

.tool-asset-banner {
  margin-bottom: 1rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.resource-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem;
}

.resource-card-wide {
  grid-column: 1 / -1;
}

.resource-card img {
  width: 100%;
  border: 1px solid rgba(23, 19, 19, 0.12);
  border-radius: var(--radius);
  background: #eff8f1;
}

.resource-icon img {
  justify-self: center;
  max-width: 320px;
}

.resource-text-only {
  align-items: start;
  grid-template-columns: 1fr;
  background: #edf5ec;
}

.asset-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
  margin-top: 0.75rem;
}

.asset-link-list a,
.screenshot-resource a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
}

.screenshot-resource-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.screenshot-resource {
  padding: 0.75rem;
  background: #fffdf8;
}

.screenshot-resource img {
  width: 100%;
  border: 1px solid rgba(23, 19, 19, 0.12);
  border-radius: var(--radius);
  background: #eff8f1;
}

.screenshot-resource h3 {
  margin-top: 0.75rem;
}

.notice {
  margin-top: 1.5rem;
  padding: 1rem;
  border-left: 4px solid var(--green-strong);
  background: #edf5ec;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #171313;
  color: rgba(255, 253, 248, 0.78);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 2rem 1rem;
}

.site-footer a {
  color: #fffdf8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: flex-end;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

.page-hero {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) 1rem 2rem;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
}

.page-hero p {
  max-width: 700px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.12rem;
}

.legal {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 0 1rem clamp(3rem, 6vw, 5rem);
}

.legal article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf8;
  padding: clamp(1.2rem, 3vw, 2rem);
}

.legal article.faq-list {
  border: 0;
  background: transparent;
  padding: 0;
}

.legal h2 {
  margin-top: 2rem;
  font-size: 1.42rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal h3 {
  margin-top: 1.4rem;
  font-size: 1.08rem;
}

.legal p,
.legal li {
  color: var(--text);
}

.legal .muted {
  color: var(--muted);
}

.legal ul,
.legal ol {
  padding-left: 1.25rem;
}

.faq-list {
  display: grid;
  gap: 0.9rem;
}

.faq-preview {
  padding: 1rem;
}

.publishing-table {
  width: 100%;
  border-collapse: collapse;
}

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

.publishing-table th {
  color: var(--ink);
  font-size: 0.9rem;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  word-break: break-word;
}

@media (max-width: 900px) {
  .section-header,
  .app-preview,
  .feature-detail,
  .value-strip,
  .resource-card,
  .features-page .feature-hero,
  .cta-strip,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .feature-hero-visual {
    justify-items: start;
    min-height: 390px;
    width: min(100%, 580px);
  }

  .hero-phone {
    width: min(38vw, 210px);
  }

  .hero-phone-main {
    width: min(42vw, 235px);
    margin-left: clamp(4rem, 16vw, 8rem);
  }

  .hero-phone-back {
    left: 0;
  }

  .hero-phone-front {
    right: clamp(0rem, 12vw, 4rem);
  }

  .preview-phone-group {
    justify-self: start;
    width: 100%;
  }

  .feature-phone {
    justify-self: start;
    width: min(100%, 290px);
  }

  .feature-grid,
  .links-grid,
  .screenshot-resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-card-wide {
    grid-column: auto;
  }

  .screens {
    grid-template-columns: 1fr 1fr;
  }

  .screen-shot:first-child {
    grid-column: 1 / -1;
  }

  .tool-screens {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-screens .screen-shot:first-child {
    grid-column: auto;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .nav-links {
    align-self: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    justify-content: stretch;
    width: auto;
    max-width: 100%;
  }

  .nav-links a {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0.5rem 0.42rem;
    border: 1px solid rgba(23, 19, 19, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.72);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links a.nav-button {
    min-height: 44px;
    padding: 0.5rem 0.42rem;
  }

  .hero {
    min-height: 620px;
    background:
      linear-gradient(180deg, rgba(19, 16, 15, 0.78), rgba(19, 16, 15, 0.68) 52%, rgba(19, 16, 15, 0.82)),
      url("book-cover-hero.png") 54% center / cover no-repeat;
  }

  .app-preview::before {
    background:
      url("appScreens/home.png") 18% 20% / 18rem auto no-repeat,
      url("appScreens/casting.png") 88% 80% / 18rem auto no-repeat;
  }

  .preview-phone.featured {
    transform: none;
  }

  .feature-detail::before {
    background-position: center bottom;
    background-size: 18rem auto;
    opacity: 0.12;
  }

  .feature-detail::after {
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.94) 62%, rgba(255, 253, 248, 0.78));
  }

  .feature-detail:nth-child(even)::after {
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.98), rgba(255, 250, 242, 0.94) 62%, rgba(255, 250, 242, 0.78));
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .features-page .feature-hero {
    min-height: auto;
  }

  .feature-hero-visual {
    min-height: 310px;
  }

  .hero-phone,
  .hero-phone-back,
  .hero-phone-front,
  .hero-phone-main {
    width: min(38vw, 150px);
    min-width: 112px;
  }

  .hero-phone-main {
    margin-left: 30%;
  }

  .hero-phone-back {
    transform: rotate(-5deg) translateY(0.5rem);
  }

  .hero-phone-front {
    right: 0;
    transform: rotate(5deg) translateY(1.4rem);
  }

  .feature-grid,
  .links-grid,
  .resource-grid,
  .screenshot-resource-grid,
  .screens {
    grid-template-columns: 1fr;
  }

  .tool-screens {
    grid-template-columns: 1fr;
  }

  .resource-banner img {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
