@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Instrument+Sans:wdth,wght@75..100,400..700&family=Instrument+Serif:ital@0;1&family=Source+Serif+4:opsz,wght@8..60,400..700&display=swap");

:root {
  --paper: #f7f3ea;
  --paper-soft: #fbfaf6;
  --ink: #171d22;
  --muted: #697077;
  --line: #ded7ca;
  --forest: #1f4c40;
  --terracotta: #9b4f38;
  --ochre: #b08337;
  --blue: #2b4870;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(23, 29, 34, 0.14);
  --radius: 8px;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-interface: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-reading: "Source Serif 4", Georgia, serif;
  --font-metadata: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: var(--font-interface);
  line-height: 1.55;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.brand-word,
.eyebrow,
.hero h1,
.page-hero h1,
.essay-title,
.essay-row-copy h2,
.ranked-block h2,
.vote-card h3,
.essay-reader-title,
.debate-title,
.publish-title,
.footer-contact-copy h2,
.profile-side-card h2,
.hero-logo-panel strong,
.guided-tour-copy h2,
.guided-tour-hero h1,
.login-marketing h1,
.auth-hero-copy h1,
.login-card h2,
.literature-copy h1,
.literature-featured-author h2,
.strip-head h2,
.book-of-day h3,
.author-grid h3,
.book-grid h3 {
  font-family: var(--font-display) !important;
  font-weight: 400;
}

body,
button,
input,
textarea,
select,
nav,
.nav,
.button,
.icon-button,
.filter-button,
.top-search,
.top-avatar,
.menu-option,
.stat,
.essay-meta-grid,
.essay-meta-bar,
.essay-rank-chip,
.essay-tone-chip,
.essay-kicker,
.mini-tags,
.thread-filter-row,
.footer,
.footer-inner,
.footer-grid,
.guided-tour-step,
.guided-tour-lead,
.login-copy,
.auth-points,
.login-back,
.login-note,
.hero-content p,
.courtesy-inner p,
.page-hero p,
.literature-copy p,
.literature-page p,
.debate-simulation-layout p,
.essay-row-copy p,
.essay-reader-copy p,
.debate-body p,
.metadata,
.archive-code,
.folio {
  font-family: var(--font-interface) !important;
}

article p,
.essay-body,
.literature-fragment,
.essay-reader-copy p,
.debate-body p,
.guided-tour-stage p,
.login-marketing p,
.auth-points p,
.literature-page p,
.literature-request-board p,
.book-of-day p,
.author-grid p,
.book-grid p {
  font-family: var(--font-reading) !important;
}

.eyebrow,
.metadata,
.archive-code,
.folio,
.essay-meta-grid,
.essay-meta-bar,
.stat span,
.filter-button,
.essay-rank-chip,
.essay-tone-chip,
.thread-filter-row button,
.guided-step-index,
.hero-logo-panel span {
  font-family: var(--font-metadata) !important;
}

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

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

button,
input,
textarea,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(222, 215, 202, 0.78);
  background: rgba(251, 250, 246, 0);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.38rem;
  font-weight: 700;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(176, 131, 55, 0.32);
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fffdf8;
  box-shadow: 0 8px 22px rgba(176, 131, 55, 0.14);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  color: #353c42;
  font-size: 0.94rem;
}

.nav a {
  border-bottom: 1px solid transparent;
  padding-block: 5px;
}

.nav a:hover,
.nav a.is-active {
  border-color: currentColor;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-button {
  white-space: nowrap;
}

.icon-button,
.button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.icon-button {
  width: 42px;
  display: grid;
  place-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 700;
}

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

.button.terracotta {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: var(--white);
}

.button.subtle {
  border-color: rgba(176, 131, 55, 0.28);
  background: rgba(255, 255, 255, 0.82);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--ink);
}

.hero {
  min-height: 78vh;
  display: grid;
  align-items: end;
  padding: clamp(76px, 9vw, 130px) clamp(20px, 5vw, 72px) clamp(48px, 7vw, 96px);
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 36%, rgba(251, 250, 246, 0) 67%),
    url("../menu/pagina.principal-scroll-1.png") center / cover no-repeat;
  color: var(--ink);
}

.hero-content {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--ochre);
  font-size: 0.83rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.essay-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 0.98;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(4rem, 10vw, 9rem);
}

.hero p {
  max-width: 660px;
  margin: 24px 0 0;
  color: #424950;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

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

.section {
  padding: clamp(46px, 8vw, 94px) clamp(20px, 5vw, 72px);
}

.section.tight {
  padding-top: clamp(28px, 5vw, 54px);
}

.courtesy-menu {
  position: relative;
  overflow: hidden;
  min-height: 78vh;
  display: grid;
  align-items: center;
  padding: clamp(48px, 8vw, 90px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 45%, rgba(251, 250, 246, 0)),
    url("../menu/pagina.principal-scroll-2.png") center / cover no-repeat;
}

.courtesy-inner {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(26px, 6vw, 72px);
  align-items: center;
}

.menu-logo-stage {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.animated-logo {
  width: min(290px, 70vw);
  filter: drop-shadow(0 24px 45px rgba(176, 131, 55, 0.18));
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  animation: logoRise 1100ms ease forwards, logoFloat 5200ms ease-in-out 1300ms infinite;
}

.animated-logo img {
  width: 100%;
  height: auto;
}

.menu-logo-stage p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

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

.menu-badge-stage {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.menu-badge-square {
  width: 112px;
  aspect-ratio: 1;
  border: 1px solid rgba(176, 131, 55, 0.32);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 40px rgba(23, 29, 34, 0.08);
  overflow: hidden;
}

.menu-badge-visual {
  width: 100%;
  height: 100%;
  color: #171714;
}

.menu-badge-visual svg {
  display: block;
  width: 100%;
  height: 100%;
}

.menu-badge-copy {
  display: grid;
  gap: 6px;
}

.menu-badge-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.48rem;
  line-height: 1;
}

.menu-badge-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.menu-option {
  min-height: 168px;
  display: grid;
  align-content: space-between;
  border: 1px solid rgba(222, 215, 202, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  padding: 22px;
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.menu-option:hover {
  transform: translateY(-2px);
  border-color: rgba(176, 131, 55, 0.72);
  background: rgba(255, 255, 255, 0.9);
}

.menu-option i {
  color: var(--ochre);
}

.menu-option h3 {
  margin: 14px 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem;
}

.menu-option p {
  margin: 0;
  color: var(--muted);
}

.publication-band,
.branch-band {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: grid;
  align-items: center;
  padding: clamp(48px, 8vw, 90px) clamp(20px, 5vw, 72px);
}

.publication-band {
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 50%, rgba(251, 250, 246, 0)),
    url("../menu/pagina-convocatoria.png") center / cover no-repeat;
}

.branch-band {
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 43%, rgba(251, 250, 246, 0)),
    url("../menu/pagina-ramas-principal.png") center / cover no-repeat;
}

.feedback-band {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: grid;
  align-items: center;
  padding: clamp(48px, 8vw, 90px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 50%, rgba(251, 250, 246, 0)),
    url("../menu/pagina.principal-scroll-2.png") center / cover no-repeat;
}

.band-content {
  max-width: 590px;
}

.band-content h2 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.98;
}

.band-content p {
  color: var(--muted);
  font-size: 1.08rem;
}

.feedback-band .band-content {
  max-width: 540px;
}

.page-hero.feedback-hero {
  min-height: 420px;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 47%, rgba(251, 250, 246, 0)),
    url("../menu/pagina.principal-scroll-2.png") center / cover no-repeat;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto 28px;
}

.section-header h2,
.page-hero h1,
.panel-title {
  font-family: "Playfair Display", Georgia, serif;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.section-header p {
  max-width: 530px;
  margin: 0;
  color: var(--muted);
}

.grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

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

.grid.two {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: start;
}

.feature-card,
.essay-card,
.thread-card,
.branch-card,
.profile-panel,
.form-panel,
.schema-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.feature-card {
  min-height: 220px;
  padding: 26px;
}

.feature-card .card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  background: #ecf1ee;
  color: var(--forest);
}

.feature-card:nth-child(2) .card-icon {
  background: #f2ece4;
  color: var(--terracotta);
}

.feature-card:nth-child(3) .card-icon {
  background: #eef0f6;
  color: var(--blue);
}

.feature-card h3,
.essay-card h3,
.thread-card h3,
.branch-card h3 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.46rem;
  line-height: 1.15;
}

.feature-card p,
.essay-card p,
.thread-card p,
.branch-card p,
.profile-panel p,
.form-hint {
  color: var(--muted);
}

.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
}

.lead-essay {
  min-height: 520px;
  display: grid;
  align-content: end;
  padding: clamp(24px, 4vw, 42px);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(23, 29, 34, 0.1), rgba(23, 29, 34, 0.8)),
    url("hero-network.png") center / cover no-repeat;
  color: var(--white);
  box-shadow: var(--shadow);
}

.lead-essay h2 {
  max-width: 720px;
  margin: 10px 0 14px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.25rem, 5vw, 5rem);
  line-height: 0.98;
}

.lead-essay p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.84);
}

.meta-row,
.tag-row,
.stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.pill {
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
}

.tag {
  background: #eef2ef;
  color: var(--forest);
}

.tag.terracotta {
  background: #f5e8e1;
  color: var(--terracotta);
}

.tag.blue {
  background: #e9edf4;
  color: var(--blue);
}

.tag.ochre {
  background: #f4eddf;
  color: #7d581a;
}

.side-stack {
  display: grid;
  gap: 14px;
}

.essay-card,
.thread-card,
.branch-card,
.profile-panel,
.form-panel,
.schema-panel {
  padding: 22px;
}

.essay-card.featured {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: center;
}

.page-hero {
  padding: clamp(60px, 8vw, 104px) clamp(20px, 5vw, 72px) clamp(32px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.page-hero.publication-hero {
  min-height: 540px;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 47%, rgba(251, 250, 246, 0)),
    url("../menu/pagina-convocatoria.png") center / cover no-repeat;
}

.page-hero.branches-hero {
  min-height: 540px;
  display: grid;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(251, 250, 246, 0), rgba(251, 250, 246, 0) 46%, rgba(251, 250, 246, 0)),
    url("../menu/pagina-ramas-principal.png") center / cover no-repeat;
}

.page-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(290px, 0.55fr);
  gap: clamp(28px, 6vw, 74px);
  align-items: end;
}

.page-hero h1 {
  font-size: clamp(3.2rem, 7vw, 7.6rem);
}

.page-hero p {
  color: var(--muted);
  font-size: 1.08rem;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stat {
  padding: 18px;
  background: var(--white);
}

.stat strong {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 0.86rem;
}

.feedback-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(300px, 0.38fr);
  gap: 18px;
}

.feedback-panel,
.feedback-aside {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px;
}

.feedback-panel .field-grid {
  gap: 14px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.toggle-row strong {
  display: block;
}

.toggle-row span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.feedback-identity {
  display: grid;
  gap: 10px;
}

.feedback-identity.is-disabled {
  opacity: 0.55;
}

.feedback-identity.is-disabled input {
  pointer-events: none;
}

.feedback-status-line {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.94rem;
}

.feedback-status-line[data-kind="success"] {
  color: var(--forest);
}

.feedback-status-line[data-kind="error"] {
  color: var(--terracotta);
}

.feedback-entry-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.feedback-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 16px;
}

.feedback-entry-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.feedback-entry h3 {
  margin: 12px 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
}

.feedback-entry p,
.feedback-empty p {
  margin: 0;
  color: var(--muted);
}

.feedback-status {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ochre);
}

.feedback-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.feedback-empty strong {
  display: block;
  margin-bottom: 6px;
}

.filters {
  max-width: 1180px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  padding: 9px 14px;
  color: var(--muted);
  cursor: pointer;
}

.filter-button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.thread-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.thread-metrics {
  display: grid;
  grid-template-columns: repeat(2, 68px);
  gap: 8px;
}

.metric {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.metric strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
}

.branch-map {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.branch-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.branch-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.branch-list strong {
  color: var(--ink);
}

.profile-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.35fr) minmax(0, 0.65fr);
  gap: 18px;
  align-items: start;
}

.avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--ink);
  color: var(--white);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.4rem;
}

.avatar.logo-avatar {
  width: 108px;
  height: 108px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(176, 131, 55, 0.32);
  background: #fffdf8;
  box-shadow: 0 18px 44px rgba(176, 131, 55, 0.16);
}

.avatar.logo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline {
  display: grid;
  gap: 12px;
}

.comment-tree {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.comment {
  border-left: 2px solid var(--line);
  padding: 12px 0 12px 18px;
}

.comment.reply {
  margin-left: 24px;
  border-color: var(--forest);
}

.essay-reading {
  max-width: 780px;
  margin: 0 auto;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.78;
}

.essay-reading p {
  margin: 0 0 1.25em;
}

.essay-title {
  font-size: clamp(3rem, 7vw, 6.8rem);
  margin-bottom: 22px;
}

.floating-tools {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 10px;
  width: 48px;
}

.form-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(290px, 0.32fr);
  gap: 18px;
  align-items: start;
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

.field label {
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 12px 14px;
  color: var(--ink);
}

.field textarea {
  min-height: 280px;
  resize: vertical;
}

.schema-panel pre {
  overflow: auto;
  border-radius: var(--radius);
  background: #12181c;
  color: #eef6f1;
  padding: 16px;
  font-size: 0.88rem;
}

.footer {
  padding: 34px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(11, 15, 18, 0.58);
}

.tour-overlay.is-visible {
  display: block;
}

.tour-popover {
  position: fixed;
  z-index: 90;
  width: min(360px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 20px;
}

.tour-popover h2 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.6rem;
}

.tour-popover p {
  margin: 0 0 16px;
  color: var(--muted);
}

.tour-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tour-highlight {
  position: relative;
  z-index: 85;
  outline: 3px solid #f0c36b;
  outline-offset: 6px;
  border-radius: var(--radius);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: none;
  max-width: 360px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.toast.is-visible {
  display: block;
}

@keyframes logoRise {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.015);
  }
}

@media (max-width: 960px) {
  .topbar {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .grid.three,
  .grid.two,
  .editorial-layout,
  .courtesy-inner,
  .feedback-grid,
  .page-hero-inner,
  .essay-card.featured,
  .branch-map,
  .profile-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .floating-tools {
    position: static;
    display: flex;
    width: auto;
  }

  .menu-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 74vh;
  }

  .hero h1,
  .page-hero h1,
  .essay-title {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

  .section-header,
  .footer-inner {
    display: grid;
  }

  .stat-strip {
    grid-template-columns: 1fr;
  }

  .thread-card {
    grid-template-columns: 1fr;
  }

  .thread-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.v2-literature-announcement {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(181, 122, 23, 0.45);
  background: #171713;
  color: #fffdf8;
  opacity: 0;
}

.v2-literature-announcement.is-visible { opacity: 1; }
.v2-literature-announcement p { margin: 4px 0 0; color: #d8d0c2; }
.v2-literature-kicker {
  font-family: var(--font-metadata, monospace);
  color: #d7a64a;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .v2-literature-announcement { opacity: 1; }
}
