:root {
  --bg: #f7f3ea;
  --surface: #fffdf8;
  --surface-strong: #ede4d5;
  --text: #1f2623;
  --muted: #6f766f;
  --line: #ded4c5;
  --accent: #9f6b3f;
  --accent-dark: #5d3924;
  --ink: #17201e;
  --shadow: 0 24px 60px rgba(51, 39, 26, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  align-items: center;
  background: rgba(247, 243, 234, 0.92);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
}

.brand,
.nav-links {
  align-items: center;
  display: flex;
  gap: 12px;
}

.brand {
  align-items: center;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-logo {
  display: block;
  height: 52px;
  object-fit: contain;
  width: 52px;
}

.brand-wordmark {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  line-height: 1;
}

.brand-wordmark span:first-child {
  font-family: Georgia, serif;
  font-size: 1.28rem;
}

.brand-wordmark span:last-child {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
  padding-top: 4px;
}

.beta-badge {
  align-items: center;
  background: rgba(159, 107, 63, 0.11);
  border: 1px solid rgba(159, 107, 63, 0.35);
  color: var(--accent-dark);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  min-height: 24px;
  padding: 3px 8px;
  text-transform: uppercase;
}

.nav-links a {
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 8px 2px;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 700;
  list-style: none;
  padding: 8px 2px;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "v";
  font-size: 0.72rem;
  margin-left: 6px;
}

.nav-dropdown[open] summary,
.nav-dropdown.active summary,
.nav-dropdown summary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.nav-dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
  min-width: 210px;
  padding: 10px;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 30;
}

.nav-dropdown:not([open]) .nav-dropdown-menu {
  display: none;
}

.nav-dropdown-menu a {
  border-bottom: 0;
  display: block;
  padding: 9px 10px;
}

.nav-dropdown-menu a.active,
.nav-dropdown-menu a:hover {
  background: rgba(159, 107, 63, 0.1);
  color: var(--text);
}

.nav-links a.active,
.nav-links a:hover {
  border-color: var(--accent);
  color: var(--text);
}

main {
  margin: 0 auto;
  max-width: 1220px;
  padding: 0 clamp(18px, 4vw, 56px) 64px;
}

.hero {
  align-items: start;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  min-height: 560px;
  padding: clamp(56px, 9vw, 104px) 0 36px;
}

.catalog-hero {
  max-width: 760px;
  padding: clamp(42px, 8vw, 82px) 0 28px;
}

.page-hero {
  max-width: 860px;
  padding: clamp(58px, 9vw, 96px) 0 34px;
}

.page-hero p {
  color: var(--muted);
  font-size: 1.18rem;
  max-width: 720px;
}

.about-hero {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  padding: clamp(64px, 9vw, 106px) 0 46px;
}

.about-hero-copy {
  max-width: 940px;
}

.about-hero p {
  color: var(--muted);
  font-size: 1.24rem;
  max-width: 760px;
}

.about-hero-meta {
  border-left: 2px solid var(--accent);
  display: grid;
  gap: 12px;
  padding-left: 22px;
}

.about-hero-meta span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.08;
}

h1 {
  font-size: 5rem;
  max-width: 900px;
  margin-bottom: 22px;
}

h2 {
  font-size: 2.7rem;
  margin-bottom: 0;
}

h3 {
  font-size: 1rem;
}

.hero-copy p:not(.eyebrow),
.catalog-hero p {
  color: var(--muted);
  font-size: 1.16rem;
  max-width: 680px;
}

.hero-intro {
  max-width: 760px;
}

.hero-manifesto {
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-weight: 800;
  margin: 22px 0 14px;
  max-width: 680px;
  padding-left: 18px;
}

.hero-context {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero-panel {
  align-self: start;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.08), transparent 42%),
    var(--ink);
  border: 1px solid rgba(255, 250, 240, 0.12);
  color: var(--surface);
  margin-top: 38px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.matrix-score {
  align-items: end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr auto;
  margin-bottom: 16px;
  padding-bottom: 20px;
}

.score-number {
  color: #fffaf0;
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 4.4rem;
  grid-column: 2;
  grid-row: 1 / span 2;
  line-height: 1;
}

.score-label {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.score-label:first-child {
  color: #fffaf0;
  font-size: 1.05rem;
}

.matrix-breakdown {
  display: grid;
  gap: 10px;
}

.matrix-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
}

.matrix-row strong {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  white-space: nowrap;
}

.matrix-row small {
  align-items: center;
  background: rgba(255, 250, 240, 0.12);
  color: #fffaf0;
  display: inline-flex;
  font-size: 0.92rem;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 8px;
}

.matrix-row strong span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.section-block,
.rating-system,
.catalog-layout {
  padding-top: 48px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-block .section-heading {
  text-align: right;
}

.compact-section {
  padding-top: 58px;
}

.section-note {
  color: var(--muted);
  margin: 10px 0 0 auto;
  max-width: 620px;
}

.book-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.book-card {
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.book-card:hover,
.book-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.book-cover {
  aspect-ratio: 3 / 4.35;
  background:
    linear-gradient(145deg, var(--cover-start, #2f3632), var(--cover-end, #111614));
  color: #fffaf0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.book-cover::before {
  border: 1px solid rgba(255, 255, 255, 0.3);
  content: "";
  inset: 12px;
  position: absolute;
  z-index: 1;
}

.book-cover::after {
  background: var(--cover-accent, rgba(255, 255, 255, 0.35));
  content: "";
  position: absolute;
  z-index: 0;
}

.book-cover img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: 2;
}

.pattern-0::after {
  height: 56%;
  opacity: 0.22;
  right: -18%;
  top: -8%;
  transform: rotate(18deg);
  width: 44%;
}

.pattern-1::after {
  border-radius: 999px;
  height: 150px;
  opacity: 0.2;
  right: -58px;
  top: 46px;
  width: 150px;
}

.pattern-2::after {
  bottom: 0;
  height: 8px;
  left: 0;
  opacity: 0.72;
  width: 100%;
}

.pattern-3::after {
  bottom: -36px;
  height: 120px;
  left: -28px;
  opacity: 0.18;
  transform: rotate(-22deg);
  width: 78%;
}

.cover-author,
.cover-title,
.cover-coming-soon,
.cover-ornament {
  position: relative;
  z-index: 2;
}

.cover-author {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cover-title {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.15;
}

.cover-coming-soon {
  align-self: flex-end;
  background: rgba(255, 250, 240, 0.1);
  border: 1px solid rgba(255, 250, 240, 0.18);
  color: rgba(255, 250, 240, 0.64);
  font-size: 0.62rem;
  font-weight: 900;
  margin-top: 10px;
  padding: 4px 6px;
  text-transform: uppercase;
}

.cover-ornament {
  align-self: center;
  border-bottom: 1px solid rgba(255, 250, 240, 0.54);
  border-top: 1px solid rgba(255, 250, 240, 0.54);
  height: 38px;
  opacity: 0.72;
  width: 42%;
}

.tone-gold {
  background: linear-gradient(145deg, #bf8d3c, #3a2915);
}

.tone-blue {
  background: linear-gradient(145deg, #405a7f, #111827);
}

.tone-ink {
  background: linear-gradient(145deg, #39423f, #101514);
}

.tone-stone {
  background: linear-gradient(145deg, #8b8174, #2f2a24);
}

.tone-green {
  background: linear-gradient(145deg, #62705a, #1d2a1f);
}

.tone-copper {
  background: linear-gradient(145deg, #ad6741, #341d16);
}

.tone-silver {
  background: linear-gradient(145deg, #b9bab1, #343837);
}

.tone-white {
  background: linear-gradient(145deg, #ece7db, #746b60);
  color: #181916;
}

.tone-red {
  background: linear-gradient(145deg, #9e3f36, #2b1210);
}

.tone-teal {
  background: linear-gradient(145deg, #2f7b78, #132c2c);
}

.tone-navy {
  background: linear-gradient(145deg, #2c3d59, #101826);
}

.tone-yellow {
  background: linear-gradient(145deg, #d5aa3d, #3a2a0f);
}

.book-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.book-card-body h3 {
  margin-bottom: 6px;
}

.book-card-body p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.total-score {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.stars {
  color: var(--accent);
  font-size: 0.92rem;
  white-space: nowrap;
}

.rating-columns {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.rating-columns article {
  border-top: 2px solid var(--ink);
  background: rgba(255, 253, 248, 0.68);
  padding: 22px 0 0;
  text-align: center;
}

.rating-max {
  color: var(--accent);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 3.4rem;
  line-height: 1;
}

.rating-columns p {
  color: var(--muted);
}

.scale-list {
  color: var(--muted);
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.scale-list strong {
  color: var(--text);
}

.subjective-note {
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin: 26px 0 0;
  max-width: 780px;
  padding-top: 18px;
}

.subjective-note a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalog-layout {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(240px, 300px) 1fr;
}

.editorial-note,
.placeholder-panel {
  background: rgba(255, 253, 248, 0.72);
  border-left: 3px solid var(--accent);
  margin: 12px 0 30px;
  max-width: 780px;
  padding: 24px 28px;
}

.editorial-note h2,
.placeholder-panel h2 {
  font-size: 1.65rem;
  margin-bottom: 10px;
}

.editorial-note p,
.placeholder-panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.top10-editorial-section .section-heading {
  text-align: left;
}

.top10-editorial-section .section-note {
  margin-left: 0;
}

.top10-editorial-list {
  display: grid;
  gap: 26px;
}

.top10-feature {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid var(--line);
  cursor: pointer;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  outline: none;
  padding: 18px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.top10-feature:hover,
.top10-feature:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.top10-book-preview {
  display: grid;
  gap: 18px;
  grid-template-columns: 132px minmax(0, 1fr);
}

.top10-book-preview .book-cover {
  min-width: 0;
}

.top10-book-meta {
  align-self: center;
}

.top10-book-meta > span,
.top10-book-note > span {
  color: var(--accent);
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.top10-book-meta h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.top10-book-meta p {
  color: var(--muted);
  margin-bottom: 18px;
}

.top10-book-note {
  align-self: center;
  border-left: 1px solid var(--line);
  padding: 8px 12px 8px 34px;
}

.top10-book-note h2 {
  font-size: 2rem;
  margin-bottom: 14px;
}

.top10-book-note p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
}

.quote-feature {
  background: var(--ink);
  color: #fffaf0;
  margin: 10px 0 56px;
  padding: clamp(34px, 6vw, 64px);
}

.quote-feature span,
.quote-card span {
  color: var(--accent);
  display: block;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.quote-feature blockquote,
.quote-card blockquote {
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.18;
  margin: 0;
}

.quote-feature blockquote {
  font-size: clamp(2rem, 5vw, 4.1rem);
  max-width: 980px;
}

.quote-feature p {
  color: rgba(255, 250, 240, 0.68);
  margin: 26px 0 0;
}

.quote-section {
  padding-top: 44px;
}

.quote-heading {
  border-top: 2px solid var(--ink);
  display: block;
  padding-top: 34px;
}

.quote-heading .section-note {
  margin-right: 0;
  max-width: 470px;
}

.quote-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-card {
  background: rgba(255, 253, 248, 0.78);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 28px;
}

.quote-card.large {
  background: var(--surface-strong);
}

.quote-card blockquote {
  color: var(--ink);
  font-size: 1.55rem;
}

.quote-card p {
  color: var(--muted);
  margin: auto 0 0;
  padding-top: 24px;
}

.quote-card cite {
  color: var(--accent-dark);
  display: block;
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 900;
  margin-top: auto;
  padding-top: 26px;
}

.quote-card cite::before {
  content: "- ";
}

.investing-quotes {
  padding-bottom: 44px;
}

.ancient-principles,
.huna-principles,
.modern-rulebook,
.emerson-principles,
.peterson-rules,
.amazon-principles {
  padding-top: 38px;
}

.principle-heading {
  margin-bottom: 28px;
  text-align: center;
}

.principle-heading span {
  color: var(--accent);
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.principle-heading h2 {
  margin-left: auto;
  margin-right: auto;
  max-width: 760px;
}

.principle-heading .section-note {
  margin: 14px auto 0;
  max-width: 620px;
}

.principle-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.principle-grid article {
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid var(--line);
  min-height: 132px;
  padding: 20px;
}

.principle-grid span,
.huna-wheel span,
.open-book span {
  color: var(--accent);
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  line-height: 1;
}

.principle-grid span {
  font-size: 1.6rem;
  margin-bottom: 18px;
}

.principle-grid p,
.huna-wheel p,
.open-book p {
  color: var(--muted);
  margin: 0;
}

.huna-wheel {
  background:
    radial-gradient(circle at center, rgba(159, 107, 63, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 253, 248, 0.9), rgba(237, 228, 213, 0.64));
  border: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}

.huna-wheel article {
  background: rgba(255, 253, 248, 0.68);
  min-height: 190px;
  padding: 26px 18px;
}

.huna-wheel span {
  font-size: 1.35rem;
  margin-bottom: 22px;
}

.modern-rulebook {
  padding-bottom: 60px;
}

.commandment-heading {
  text-align: center;
}

.commandment-heading .section-note {
  margin-left: auto;
  margin-right: auto;
}

.open-book {
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(93, 57, 36, 0.26) 49.7%, rgba(93, 57, 36, 0.26) 50.3%, transparent 50.3%),
    linear-gradient(135deg, #fffdf8, #ede4d5);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  margin-top: 28px;
  padding: clamp(20px, 4vw, 38px);
  position: relative;
}

.open-book::before,
.open-book::after {
  background: rgba(159, 107, 63, 0.18);
  content: "";
  height: 1px;
  left: 6%;
  position: absolute;
  right: 6%;
}

.open-book::before {
  top: 18px;
}

.open-book::after {
  bottom: 18px;
}

.book-page {
  display: grid;
  gap: 16px;
  padding: clamp(12px, 3vw, 28px);
}

.book-page article {
  align-items: start;
  border-bottom: 1px solid rgba(222, 212, 197, 0.9);
  display: grid;
  gap: 18px;
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 86px;
  padding: 8px 0 18px;
}

.book-page article:last-child {
  border-bottom: 0;
}

.open-book span {
  font-size: 1.8rem;
}

.open-book p {
  color: var(--ink);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  line-height: 1.28;
}

.book-spine {
  background:
    linear-gradient(180deg, transparent, rgba(93, 57, 36, 0.28), transparent);
  min-height: 100%;
}

.principle-deck {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.principle-deck article,
.rule-list article,
.amazon-principle-grid article {
  background: rgba(255, 253, 248, 0.76);
  border: 1px solid var(--line);
}

.principle-deck article {
  min-height: 250px;
  padding: 28px;
}

.principle-deck span,
.rule-list span,
.amazon-principle-grid span {
  color: var(--accent);
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 700;
  line-height: 1;
}

.principle-deck span {
  font-size: 1.7rem;
  margin-bottom: 34px;
}

.principle-deck h3,
.rule-list h3,
.amazon-principle-grid h3 {
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 10px;
}

.principle-deck h3 {
  font-size: 1.12rem;
}

.principle-deck p,
.rule-list p,
.amazon-principle-grid p {
  color: var(--muted);
  margin-bottom: 0;
}

.rule-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rule-list article {
  display: grid;
  gap: 20px;
  grid-template-columns: 54px minmax(0, 1fr);
  padding: 22px;
}

.rule-list span {
  font-size: 1.45rem;
  grid-row: 1 / span 2;
}

.rule-list h3 {
  grid-column: 2;
  font-size: 1rem;
}

.rule-list p {
  grid-column: 2;
}

.amazon-principles {
  padding-bottom: 60px;
}

.amazon-principle-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.amazon-principle-grid article {
  min-height: 210px;
  padding: 22px;
}

.amazon-principle-grid span {
  font-size: 1.35rem;
  margin-bottom: 28px;
}

.amazon-principle-grid h3 {
  font-size: 1rem;
}

.about-principles {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 34px 0 70px;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.about-principles div {
  padding: 24px 26px 26px 0;
}

.about-principles div + div {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}

.about-principles span {
  color: var(--accent);
  display: block;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 16px;
}

.about-principles h2 {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 8px;
}

.about-principles p {
  color: var(--muted);
  margin-bottom: 0;
}

.about-layout {
  align-items: start;
  display: block;
  padding-bottom: 80px;
}

.about-content {
  counter-reset: about-section;
  display: grid;
  gap: 0;
  margin: 0 auto;
  max-width: 940px;
}

.about-section {
  border-top: 1px solid rgba(31, 38, 35, 0.78);
  counter-increment: about-section;
  display: grid;
  gap: 34px;
  grid-template-columns: 88px minmax(0, 1fr);
  padding: 34px 0 34px;
}

.about-section::before {
  color: var(--accent);
  content: counter(about-section, decimal-leading-zero);
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  grid-row: 1 / span 4;
  line-height: 1;
}

.about-section h2 {
  font-size: 2.05rem;
  grid-column: 2;
  margin-bottom: 16px;
}

.about-section p {
  color: var(--muted);
  font-size: 1.05rem;
  grid-column: 2;
  max-width: 760px;
}

.about-closing {
  border-color: var(--accent);
  margin-top: 10px;
  padding-bottom: 0;
}

.about-section a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 88px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select {
  background: #fbf8f1;
  border: 1px solid var(--line);
  color: var(--text);
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(159, 107, 63, 0.18);
}

.full-width {
  width: 100%;
}

.results-bar {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.results-bar span {
  color: var(--muted);
  font-weight: 700;
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 24px;
}

.modal {
  display: none;
}

.modal.is-open {
  display: block;
  inset: 0;
  position: fixed;
  z-index: 50;
}

.modal-backdrop {
  background: rgba(20, 18, 14, 0.62);
  inset: 0;
  position: absolute;
}

.modal-dialog {
  background: var(--surface);
  box-shadow: var(--shadow);
  left: 50%;
  max-height: min(86vh, 860px);
  max-width: 940px;
  overflow: auto;
  padding: clamp(18px, 3vw, 32px);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100vw - 28px), 940px);
}

.modal-close {
  background: var(--ink);
  border: 0;
  color: var(--surface);
  cursor: pointer;
  font-size: 1.6rem;
  height: 38px;
  line-height: 1;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 38px;
  z-index: 2;
}

.modal-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(210px, 300px) 1fr;
}

.modal-cover-column {
  align-self: start;
  display: grid;
  gap: 10px;
}

.cover-order-button {
  width: 100%;
}

.purchase-actions {
  display: grid;
  gap: 10px;
  position: relative;
}

.purchase-actions::before {
  background: rgba(255, 253, 248, 0.74);
  border: 1px solid rgba(159, 107, 63, 0.26);
  content: "";
  inset: -8px;
  position: absolute;
  z-index: 1;
}

.coming-soon-badge {
  background: var(--accent-dark);
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 900;
  left: 50%;
  padding: 6px 12px;
  position: absolute;
  text-transform: uppercase;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 2;
}

.purchase-actions .button {
  pointer-events: none;
  position: relative;
  z-index: 0;
}

.purchase-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.modal-cover-column .book-cover {
  margin-bottom: 6px;
}

.modal-content h2 {
  padding-right: 44px;
}

.modal-author {
  color: var(--muted);
  font-weight: 800;
  margin: 4px 0 0;
}

.modal-score {
  margin: 14px 0 22px;
}

.detail-ratings {
  display: grid;
  gap: 10px;
}

.detail-ratings div {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(118px, 1fr) minmax(116px, auto) minmax(70px, auto) 52px;
  padding: 10px 0;
}

.detail-ratings span {
  color: var(--muted);
  font-weight: 800;
}

.detail-ratings .rating-value {
  color: var(--accent-dark);
}

.language-list,
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.category-list {
  margin-top: -12px;
}

.language-list span,
.category-list span {
  background: var(--surface-strong);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
}

.category-list span {
  background: rgba(23, 32, 30, 0.08);
  color: var(--ink);
}

.modal-text h3 {
  margin: 18px 0 6px;
}

.modal-text p {
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 12px;
  justify-content: space-between;
  margin: 0 clamp(18px, 4vw, 56px);
  padding: 28px 0;
}

.footer-brand {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.footer-brand small {
  border: 1px solid var(--line);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  padding: 4px 7px;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  h1 {
    font-size: 3.5rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero,
  .about-hero,
  .catalog-layout,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .about-hero {
    align-items: start;
    gap: 28px;
  }

  .about-principles {
    grid-template-columns: 1fr;
    margin-bottom: 48px;
  }

  .about-principles div,
  .about-principles div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 22px 0;
  }

  .about-principles div:first-child {
    border-top: 0;
  }

  .about-section {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .top10-feature {
    grid-template-columns: 1fr;
  }

  .top10-book-note {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }

  .quote-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-heading .section-note {
    margin-left: 0;
  }

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

  .principle-grid,
  .huna-wheel,
  .principle-deck,
  .rule-list,
  .amazon-principle-grid {
    grid-template-columns: 1fr;
  }

  .huna-wheel article {
    min-height: auto;
  }

  .open-book {
    grid-template-columns: 1fr;
  }

  .book-spine {
    display: none;
  }

  .book-page {
    padding: 12px 0;
  }

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

  .rule-list span,
  .rule-list h3,
  .rule-list p {
    grid-column: 1;
  }

  .rule-list span {
    grid-row: auto;
  }

  .about-section::before,
  .about-section h2,
  .about-section p {
    grid-column: 1;
  }

  .about-section::before {
    grid-row: auto;
  }

  .section-block .section-heading {
    text-align: left;
  }

  .hero {
    min-height: auto;
  }

  .hero-panel {
    margin-top: 0;
  }

  .filters {
    position: static;
  }

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

@media (min-width: 980px) {
  .top-grid,
  .fiction-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.9rem;
  }

  .hero-copy p:not(.eyebrow),
  .catalog-hero p,
  .about-hero p {
    font-size: 1rem;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    margin-top: 6px;
    min-width: 100%;
  }

  .section-heading,
  .results-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }

  .book-card {
    min-height: 330px;
  }

  .top10-book-preview {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .top10-book-note h2,
  .quote-card blockquote {
    font-size: 1.45rem;
  }

  .detail-ratings div {
    align-items: start;
    grid-template-columns: 1fr;
  }
}
