:root {
  --paper: #dfc793;
  --paper-light: #f7eccd;
  --paper-dark: #c59f62;
  --paper-shadow: rgba(104, 67, 24, 0.12);
  --ink: #130d08;
  --ink-soft: #3e2d1c;
  --ink-faint: #857056;
  --red: #7a2417;
  --red-dark: #52130c;
  --brass: #9e7533;
  --rule: rgba(74, 52, 27, 0.36);
  --rule-soft: rgba(74, 52, 27, 0.18);
  --focus: #8f6a2e;
  --shadow: rgba(63, 42, 19, 0.18);
  --hero-width: min(100% - 1.5rem, 84rem);
  --title-width: min(100% - 1.5rem, 76rem);
  --leaf-width: min(100% - 1.5rem, 72rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 249, 236, 0.92), transparent 24rem),
    radial-gradient(circle at 12% 14%, rgba(160, 111, 37, 0.22), transparent 22rem),
    radial-gradient(circle at 88% 16%, rgba(168, 121, 48, 0.22), transparent 21rem),
    radial-gradient(circle at 50% 70%, rgba(114, 76, 24, 0.08), transparent 44rem),
    linear-gradient(180deg, #d4b47d 0%, #ead8ae 18%, #ddc18b 100%);
  font-family: "Libre Caslon Text", "Iowan Old Style", Baskerville, Georgia, serif;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(123, 84, 30, 0.09), transparent 18rem),
    radial-gradient(circle at 88% 16%, rgba(123, 84, 30, 0.08), transparent 18rem),
    radial-gradient(circle at 50% 100%, rgba(79, 48, 16, 0.08), transparent 26rem),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0 5px,
      rgba(92, 65, 28, 0.012) 5px 6px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0) 0 8px,
      rgba(89, 62, 28, 0.01) 8px 9px
    );
  mix-blend-mode: multiply;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(73, 47, 16, 0.11), transparent 11%, transparent 89%, rgba(73, 47, 16, 0.11)),
    radial-gradient(circle at center, transparent 56%, rgba(63, 41, 16, 0.12));
  opacity: 0.72;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 30;
  padding: 0.7rem 0.95rem;
  color: var(--paper-light);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.folio {
  position: relative;
  z-index: 1;
  padding: clamp(0.8rem, 2vw, 1.5rem) 0 4rem;
}

.title-page,
.hero-card,
.editorial-note,
.list-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.28), transparent 18rem),
    radial-gradient(circle at 14% 16%, rgba(156, 111, 42, 0.12), transparent 15rem),
    radial-gradient(circle at 86% 18%, rgba(150, 110, 47, 0.12), transparent 15rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)),
    linear-gradient(180deg, var(--paper-light), var(--paper));
  box-shadow:
    0 0.95rem 1.9rem var(--shadow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.title-page::before,
.hero-card::before,
.editorial-note::before,
.list-section::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(84, 58, 29, 0.12);
  box-shadow:
    inset 0 0 5rem rgba(140, 103, 43, 0.08),
    inset 0 0 12rem rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.title-page::after,
.hero-card::after,
.editorial-note::after,
.list-section::after {
  content: "";
  position: absolute;
  inset: 0.6rem;
  border: 1px solid rgba(84, 58, 29, 0.1);
  pointer-events: none;
}

.title-page,
.hero-card,
.editorial-note,
.list-section {
  width: var(--hero-width);
  margin: 0 auto 1.3rem;
}

.title-page {
  width: var(--title-width);
  min-height: min(72svh, 42rem);
  padding: clamp(1.6rem, 3.2vw, 2.7rem) clamp(1.4rem, 3vw, 2.5rem) clamp(1.8rem, 3vw, 2.2rem);
}

.title-page__copy {
  position: relative;
  z-index: 1;
  width: min(100%, 48rem);
  margin: 0 auto;
  text-align: center;
}

.title-page__meta,
.title-page__eyebrow,
.section-label,
.featured-number,
.field span,
.checkbox span,
.stat span,
.results-copy,
.saying-card__number,
.saying-card__star {
  font-family: "IM Fell English SC", "Libre Caslon Text", serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.title-page__meta,
.section-label {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.76rem;
  letter-spacing: 0.28em;
}

.title-page__meta {
  margin-bottom: clamp(1rem, 2vw, 1.4rem);
}

.title-page__eyebrow {
  margin: 0 0 0.9rem;
  color: var(--red);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.title-page__title {
  margin: 0;
  font-family: "Cormorant Garamond", "Libre Caslon Display", "Iowan Old Style", Baskerville, Georgia, serif;
  font-weight: 600;
  width: min(100%, 41rem);
  margin-inline: auto;
  font-size: clamp(4.5rem, 10.8vw, 8rem);
  line-height: 0.86;
  letter-spacing: -0.055em;
  text-shadow: 0.01em 0.015em 0 rgba(56, 38, 17, 0.18);
  text-wrap: balance;
}

.title-page__title span {
  display: block;
}

.title-page__title span:first-child {
  font-size: 0.92em;
}

.title-page__title span:last-child {
  margin-top: -0.01em;
  font-size: 1.02em;
}

.title-page__subtitle {
  max-width: 26rem;
  margin: clamp(1rem, 2vw, 1.3rem) auto 0;
  font-family: "Cormorant Garamond", "Libre Caslon Display", "Iowan Old Style", Baskerville, Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.48rem, 2.8vw, 2.25rem);
  line-height: 1.05;
}

.title-page__deck,
.title-page__credit,
.featured-note,
.hero-card__jump,
.editorial-note__copy p {
  margin: 0;
  color: var(--ink-soft);
}

.title-page__deck {
  max-width: 32rem;
  margin: 1.1rem auto 0;
  font-size: clamp(1.08rem, 1.75vw, 1.38rem);
  line-height: 1.42;
}

.title-page__credit {
  margin: 0.45rem 0 0;
  color: var(--ink-faint);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.title-page__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  width: min(100%, 24rem);
  margin: 1.05rem auto 0;
}

.title-page__rule span:first-child,
.title-page__rule span:last-child {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(86, 59, 29, 0.42), transparent);
}

.title-page__rule span:nth-child(2) {
  width: 0.62rem;
  height: 0.62rem;
  border: 1px solid rgba(86, 59, 29, 0.4);
  background: rgba(152, 112, 47, 0.16);
  transform: rotate(45deg);
}

.title-page__imprint {
  margin: clamp(1.45rem, 3vw, 2.15rem) auto 0;
  color: var(--red);
  font-family: "IM Fell English SC", "Libre Caslon Text", serif;
  font-size: clamp(0.9rem, 1.15vw, 1.06rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.title-page__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1rem;
  max-width: 37rem;
  margin: 0.95rem auto 0;
  padding: 0.85rem 0 0.25rem;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid rgba(84, 58, 29, 0.1);
}

.title-link {
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-family: "IM Fell English SC", "Libre Caslon Text", serif;
  font-size: 0.96rem;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.title-link::after {
  content: "/";
  margin-left: 1.05rem;
  color: var(--ink-faint);
}

.title-page__nav > *:last-child::after {
  content: none;
}

.title-link:hover {
  color: var(--red-dark);
}

.title-link--primary {
  color: var(--red);
}

.title-link--button {
  appearance: none;
}

.title-link--external::before {
  content: "↗ ";
  font-size: 0.88em;
}

.title-page__mark {
  position: relative;
  width: clamp(5.4rem, 7vw, 6.6rem);
  aspect-ratio: 1;
  margin: 1.25rem auto 0;
  padding: 0.78rem;
  border: 1.5px solid rgba(93, 66, 33, 0.38);
  border-radius: 1.1rem;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.72), rgba(214, 187, 129, 0.96)),
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.48), transparent 42%);
  box-shadow:
    0 1.2rem 2.1rem -1.4rem rgba(63, 42, 19, 0.42),
    inset 0 0 0 1px rgba(90, 62, 30, 0.12);
}

.title-page__mark::before {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid rgba(93, 66, 33, 0.16);
  border-radius: 0.8rem;
}

.title-page__mark-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(0.95) contrast(1.08);
}

.layout {
  display: grid;
  gap: 0;
}

.hero-card {
  width: var(--leaf-width);
  padding: clamp(1.9rem, 4vw, 3.2rem) clamp(1.5rem, 4vw, 3rem) clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
}

.hero-card__ornament {
  display: inline-flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.hero-card__ornament span {
  width: 0.48rem;
  height: 0.48rem;
  background: color-mix(in srgb, var(--red) 82%, black);
  opacity: 0.84;
  transform: rotate(45deg);
}

.hero-card__ornament span:nth-child(2) {
  width: 0.6rem;
  height: 0.6rem;
  background: var(--brass);
}

.featured-number {
  margin: 0.6rem 0 0;
  color: var(--red-dark);
  font-size: 0.82rem;
}

.featured-text {
  width: min(100%, 40rem);
  margin: 1rem auto 0;
  font-family: "Cormorant Garamond", "Libre Caslon Display", "Iowan Old Style", Baskerville, Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.75rem, 5vw, 5.45rem);
  line-height: 0.93;
  letter-spacing: -0.04em;
  text-shadow: 0.01em 0.015em 0 rgba(56, 38, 17, 0.12);
  text-wrap: balance;
}

.hero-card__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem 1rem;
  margin-top: 1.75rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(84, 58, 29, 0.12);
}

.featured-note,
.hero-card__jump {
  font-size: 1rem;
}

.hero-card__jump {
  color: var(--red-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.editorial-note {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 1rem;
  padding: clamp(1.2rem, 2.6vw, 2rem);
}

.editorial-note__stats {
  display: grid;
  gap: 0.8rem;
}

.stat {
  padding: 1rem 1rem 0.95rem;
  border: 1px solid rgba(88, 59, 31, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08)),
    rgba(255, 252, 245, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.stat strong {
  display: block;
  font-family: "Cormorant Garamond", "Libre Caslon Display", "Iowan Old Style", Baskerville, Georgia, serif;
  font-weight: 600;
  font-size: 2.35rem;
  line-height: 0.92;
  text-shadow: 0.01em 0.015em 0 rgba(56, 38, 17, 0.12);
}

.stat span {
  display: block;
  margin-top: 0.3rem;
  color: var(--ink-faint);
  font-size: 0.76rem;
}

.editorial-note__copy {
  position: relative;
  z-index: 1;
}

.editorial-note__copy p {
  margin-top: 0.75rem;
  font-size: 1.1rem;
  line-height: 1.55;
}

.editorial-note__star {
  color: var(--red-dark);
}

.list-section {
  padding: clamp(1.15rem, 2.6vw, 2rem);
}

.list-section__header {
  display: grid;
  align-items: end;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 29rem);
}

.list-section__header h2 {
  margin: 0.35rem 0 0;
  font-family: "Cormorant Garamond", "Libre Caslon Display", "Iowan Old Style", Baskerville, Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.95;
  text-shadow: 0.01em 0.015em 0 rgba(56, 38, 17, 0.1);
}

.controls {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(88, 59, 31, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.22);
}

.field {
  display: grid;
  gap: 0.38rem;
}

.field span,
.checkbox span {
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.field input {
  min-height: 3rem;
  padding: 0.78rem 0.95rem;
  color: var(--ink);
  border: 1px solid rgba(85, 58, 31, 0.28);
  background: rgba(255, 252, 245, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.field input::placeholder {
  color: color-mix(in srgb, var(--ink-faint) 75%, white);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.results-copy {
  margin: 1rem 0 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
}

.sayings-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.05rem;
}

.saying-card {
  position: relative;
  display: grid;
  gap: 0.7rem;
  width: 100%;
  padding: 1rem 1rem 1.05rem;
  text-align: left;
  border: 1px solid rgba(81, 55, 31, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.06) 60%),
    rgba(255, 251, 244, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.saying-card::before {
  content: "";
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  top: 0.55rem;
  border-top: 1px solid rgba(84, 58, 29, 0.12);
  pointer-events: none;
}

.saying-card:hover {
  transform: translateY(-1px);
  border-color: rgba(111, 45, 29, 0.34);
  box-shadow:
    0 14px 30px -24px rgba(55, 33, 14, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.saying-card.is-active {
  border-color: rgba(111, 45, 29, 0.62);
  box-shadow:
    0 20px 36px -30px rgba(111, 45, 29, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(245, 221, 209, 0.62), rgba(255, 255, 255, 0.04) 64%),
    rgba(255, 248, 241, 0.72);
}

.saying-card__topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.saying-card__number {
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.saying-card__star {
  padding: 0.12rem 0.45rem;
  border: 1px solid rgba(154, 115, 52, 0.36);
  color: var(--brass);
  font-size: 0.64rem;
}

.saying-card__text {
  font-size: 1.12rem;
  line-height: 1.34;
  color: var(--ink-soft);
}

.empty-state {
  padding: 2rem 1rem;
  border: 1px dashed rgba(81, 55, 31, 0.22);
  text-align: center;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.28);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.8rem 1rem;
  border: 1px solid rgba(81, 55, 31, 0.18);
  background: rgba(30, 24, 18, 0.92);
  color: #f7f1e5;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .title-page__title {
    font-size: clamp(4rem, 12vw, 7rem);
  }

  .title-page__mark {
    width: 5.6rem;
  }

  .editorial-note,
  .list-section__header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  .sayings-list {
    grid-template-columns: 1fr;
  }

  .title-page__nav {
    flex-direction: column;
    gap: 0.55rem;
  }

  .title-link::after {
    content: none;
  }
}

@media (max-width: 640px) {
  .folio {
    padding-top: 0.55rem;
  }

  .title-page,
  .hero-card,
  .editorial-note,
  .list-section {
    width: min(100% - 0.8rem, 84rem);
  }

  .title-page {
    min-height: auto;
    padding-inline: 1rem;
  }

  .title-page__deck {
    font-size: 1rem;
  }

  .featured-text {
    font-size: clamp(1.75rem, 8.8vw, 2.9rem);
  }

  .editorial-note,
  .list-section {
    padding-inline: 1rem;
  }

  .saying-card__text {
    font-size: 1.04rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
