:root {
  --bg: #f5efe3;
  --surface: #fffaf1;
  --surface-strong: #f1e6d2;
  --ink: #1f2430;
  --muted: #5c6577;
  --line: #d7cbb8;
  --brand: #0d5c63;
  --brand-strong: #084c52;
  --accent: #e9a93e;
  --accent-soft: #f7deb0;
  --success: #4f7a57;
  --shadow: 0 18px 48px rgba(31, 36, 48, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(233, 169, 62, 0.2), transparent 28%),
    linear-gradient(180deg, #f9f4ea 0%, #f2e9d9 100%);
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(249, 244, 234, 0.92);
  border-bottom: 1px solid rgba(215, 203, 184, 0.85);
}

.nav-wrap,
.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  font-size: 1.15rem;
}

.brand-tag {
  color: var(--muted);
  font-size: 0.8rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.95rem;
}

.button,
button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font: inherit;
  padding: 0.8rem 1.15rem;
  transition: transform 0.18s ease, background 0.18s ease;
}

.button.secondary,
.control-button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  background: var(--brand-strong);
}

.hero {
  padding: 4.5rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.hero-copy h1,
.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.98;
  margin: 0 0 1rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(13, 92, 99, 0.1);
  color: var(--brand-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy p,
.lede {
  font-size: 1.1rem;
  max-width: 65ch;
  color: #2d3545;
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.hero-card,
.card,
.story-shell,
.ad-shell,
.faq-item,
.reader-note {
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid rgba(215, 203, 184, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.4rem;
}

.home-demo {
  margin-top: 1.5rem;
  padding: 1.4rem;
}

.home-demo-head {
  margin-bottom: 1rem;
}

.home-demo-head p {
  max-width: 58ch;
}

.home-demo-controls {
  margin-top: 0;
}

.home-demo-pair {
  max-width: 760px;
}

.hero-card h2,
.section-head h2,
.story-intro h1,
.reader-header h2 {
  margin-top: 0;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.metric-list strong {
  display: block;
  font-size: 1.55rem;
}

.section {
  padding: 2rem 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head p {
  margin: 0;
  max-width: 58ch;
  color: var(--muted);
}

.grid-3,
.grid-2,
.story-grid,
.benefit-grid {
  display: grid;
  gap: 1rem;
}

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

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

.card {
  padding: 1.35rem;
}

.card h3,
.story-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

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

.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.85rem;
}

.meta-pill.highlight {
  background: var(--accent-soft);
}

.page-hero {
  padding: 3rem 0 1.5rem;
}

.story-grid {
  margin-top: 1.5rem;
}

.story-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  padding: 1.35rem;
  background: rgba(255, 250, 241, 0.95);
  border: 1px solid rgba(215, 203, 184, 0.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.story-card p {
  margin: 0;
}

.story-card .button {
  align-self: start;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 250, 241, 0.84);
  border: 1px solid rgba(215, 203, 184, 0.85);
  border-radius: var(--radius-md);
}

.filter-group {
  display: grid;
  gap: 0.35rem;
  min-width: 180px;
}

label {
  font-size: 0.9rem;
  font-weight: 700;
}

select,
input {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.ad-shell {
  padding: 1rem 1.1rem;
}

.ad-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ad-box {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed #c6b596;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(233, 169, 62, 0.15), rgba(13, 92, 99, 0.1));
  color: #4b5565;
  text-align: center;
  padding: 1rem;
}

.reader-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 0.95fr);
  align-items: start;
}

.story-shell {
  padding: 1.4rem;
}

.story-intro p,
.reader-header p {
  color: var(--muted);
}

.reader-controls {
  display: grid;
  gap: 1rem;
  margin: 1.35rem 0 1.25rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(241, 230, 210, 0.55);
}

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

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

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

.story-pair {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
}

.story-source,
.story-target {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
}

.story-source {
  background: #fcf7ef;
  border: 1px solid #e7d6ba;
}

.story-target {
  background: #f2f6f6;
  border: 1px solid #cbdedf;
}

.story-source h3,
.story-target h3 {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.story-source p,
.story-target p {
  margin: 0;
  font-size: 1.04rem;
}

.story-target[hidden] {
  display: none;
}

.reveal-button {
  justify-self: start;
}

.reader-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 5.6rem;
}

.checklist {
  margin: 0;
  padding-left: 1.15rem;
}

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

.faq-item {
  padding: 1.25rem;
}

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.site-footer {
  margin-top: 3rem;
  padding: 2.2rem 0;
  border-top: 1px solid rgba(215, 203, 184, 0.85);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1rem;
}

.footer-nav a {
  color: var(--muted);
}

.content-stack {
  display: grid;
  gap: 1rem;
}

.content-stack p,
.content-stack li {
  max-width: 72ch;
}

.content-stack ul {
  margin: 0;
  padding-left: 1.2rem;
}

.empty-state {
  padding: 1.4rem;
  background: rgba(255, 250, 241, 0.92);
  border: 1px solid rgba(215, 203, 184, 0.85);
  border-radius: var(--radius-md);
}

@media (max-width: 900px) {
  .hero-grid,
  .grid-3,
  .grid-2,
  .story-grid,
  .benefit-grid,
  .reader-layout,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .reader-sidebar {
    position: static;
  }

  .metric-list {
    grid-template-columns: 1fr;
  }
}

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

  .hero {
    padding-top: 3rem;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.5rem;
  }

  .story-shell,
  .card,
  .story-card,
  .hero-card {
    padding: 1.1rem;
  }
}
