/* Component-specific styles for Loreweaver redesign */

/* ---------------- HEADER ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}
.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-6);
  padding: 14px var(--s-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}
.brand:hover { color: var(--gold); }
.brand__crest { color: var(--gold); display: flex; }
.brand__word { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--f-display);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  font-weight: 500;
}
.brand__sub {
  font-family: var(--f-ui);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  color: var(--text-mute);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  gap: 4px;
  justify-content: center;
}
.site-nav__link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  font-family: var(--f-ui);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  border-radius: 2px;
  transition: color var(--dur-1) var(--ease);
  position: relative;
}
.site-nav__num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-bottom: 2px;
  letter-spacing: 0.05em;
}
.site-nav__link:hover { color: var(--gold); }
.site-nav__link:hover .site-nav__num { color: var(--gold-deep); }
.site-nav__link.is-active { color: var(--gold); }
.site-nav__link.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px; left: 50%;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  transform: translateX(-50%);
}

.site-header__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-soft);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.icon-btn:hover { color: var(--gold); background: var(--bg-elev); }
.btn--sm { padding: 8px 16px; font-size: 0.72rem; }

.search-bar {
  border-top: 1px solid var(--rule);
  padding: 18px 0;
  background: var(--bg-alt);
}
.search-bar .container { display: flex; gap: var(--s-4); align-items: center; }
.search-bar__input {
  flex: 1;
  background: transparent; border: 0; outline: 0;
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: var(--text);
  font-style: italic;
}

@media (max-width: 1080px) {
  .site-nav { display: none; }
  .site-header__inner { grid-template-columns: 1fr auto; }
}

/* ---------------- FOOTER ---------------- */
.site-footer {
  margin-top: var(--s-10);
  padding: 0 0 var(--s-7);
  color: var(--text-soft);
  border-top: 1px solid var(--rule);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-9);
  padding: var(--s-8) var(--s-6);
  align-items: start;
}
.site-footer__brand .brand__crest { color: var(--gold); }
.site-footer__motto {
  margin-top: var(--s-5);
  max-width: 320px;
  font-size: 1.125rem;
}
.site-footer__motto em { color: var(--gold); font-style: italic; }
.site-footer__social { display: flex; gap: 4px; margin-top: var(--s-5); }
.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
}
.link-list {
  list-style: none; padding: 0; margin: var(--s-3) 0 0;
}
.link-list li { margin: 0 0 8px; }
.link-list a {
  font-family: var(--f-serif);
  font-size: 1rem;
  color: var(--text-soft);
}
.link-list a:hover { color: var(--gold); }
.site-footer__sub { margin: var(--s-3) 0 var(--s-3); }
.site-footer__form { display: flex; gap: 8px; }
.site-footer__form .field { flex: 1; }
.site-footer__base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-4);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  font-family: var(--f-ui);
}
.site-footer__colophon em { font-family: var(--f-display); font-style: italic; color: var(--gold); }
@media (max-width: 980px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: var(--s-7); }
  .site-footer__cols { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- HERO (BRAND-FORWARD CREST) ---------------- */
.hero-crest {
  position: relative;
  padding: var(--s-9) 0 var(--s-9);
  overflow: hidden;
  isolation: isolate;
}
.hero-crest__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 35%, rgba(207, 176, 114, 0.10), transparent 70%),
    radial-gradient(80% 60% at 50% 100%, rgba(0,0,0,0.6), transparent 70%);
}
.hero-crest__bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(207,176,114,0.04) 0 1px, transparent 1px 80px);
  opacity: 0.6;
  mask-image: radial-gradient(60% 50% at 50% 50%, black, transparent 80%);
}
.hero-crest__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  text-align: center;
  gap: var(--s-6);
  position: relative;
}
.hero-crest__crest {
  display: inline-flex;
  color: var(--gold);
  filter: drop-shadow(0 0 60px rgba(207, 176, 114, 0.25));
  animation: crestFloat 14s ease-in-out infinite;
}
@keyframes crestFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
.hero-crest__eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-4);
  color: var(--gold);
}
.hero-crest__eyebrow::before, .hero-crest__eyebrow::after {
  content: ""; height: 1px; width: 60px;
  background: linear-gradient(to var(--d, right), transparent, var(--gold-deep));
}
.hero-crest__eyebrow::after { --d: left; }

.hero-crest__title {
  font-family: var(--f-display);
  font-size: var(--t-display);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.92;
}
.hero-crest__title em {
  font-style: italic;
  color: var(--gold);
  display: block;
}
.hero-crest__lede {
  max-width: 620px;
  margin: 0 auto;
  font-family: var(--f-serif);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-soft);
  font-style: italic;
}
.hero-crest__cta {
  display: flex;
  gap: var(--s-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--s-4);
}
.hero-crest__meta {
  display: flex;
  gap: var(--s-6);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
  max-width: 720px;
  margin-inline: auto;
  font-family: var(--f-ui);
  font-size: var(--t-meta);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.hero-crest__meta strong { color: var(--gold); font-weight: 600; }

/* ---------------- FEATURED POST ---------------- */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s-7);
  padding: var(--s-7);
  border: 1px solid var(--rule);
  background:
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  isolation: isolate;
}
.featured::before, .featured::after {
  content: "";
  position: absolute;
  width: 80px; height: 1px;
  background: var(--gold-deep);
  opacity: 0.4;
}
.featured::before { top: -1px; left: -1px; box-shadow: 0 0 0 0 transparent; }
.featured::after { bottom: -1px; right: -1px; }
.featured__img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-300);
}
.featured__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-4) var(--ease-out);
  filter: saturate(0.9) contrast(1.05);
}
.featured:hover .featured__img img { transform: scale(1.04); }
.featured__img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}
.featured__content { display: flex; flex-direction: column; gap: var(--s-4); }
.featured__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.featured__title a { color: var(--text); }
.featured__title a:hover { color: var(--gold); }
.featured__excerpt {
  color: var(--text-soft);
  line-height: 1.55;
}
.featured__meta {
  display: flex; gap: var(--s-3); align-items: center;
  font-family: var(--f-ui); font-size: var(--t-meta);
  color: var(--text-mute); letter-spacing: 0.12em; text-transform: uppercase;
}
.featured__meta-sep {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-deep);
}
@media (max-width: 880px) {
  .featured { grid-template-columns: 1fr; padding: var(--s-5); }
}

/* ---------------- ARTICLE GRID ---------------- */
.codex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-6) var(--s-7);
}
@media (max-width: 720px) { .codex-grid { grid-template-columns: 1fr; } }

.entry {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--rule);
}
.entry__img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-300);
}
.entry__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-4) var(--ease);
}
.entry:hover .entry__img img { transform: scale(1.03); }
.entry__num {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--f-display); font-style: italic;
  font-size: 1.1rem; color: var(--gold);
  background: rgba(13,11,8,0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--rule-strong);
}
.entry__head { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.entry__date {
  font-family: var(--f-ui); font-size: var(--t-meta);
  color: var(--text-mute); letter-spacing: 0.16em; text-transform: uppercase;
}
.entry__title {
  font-family: var(--f-display);
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.entry__title a { color: var(--text); }
.entry__title a:hover { color: var(--gold); }
.entry__excerpt {
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.55;
}
.entry__meta {
  display: flex; gap: var(--s-4); justify-content: space-between;
  font-family: var(--f-ui); font-size: var(--t-meta);
  color: var(--text-mute); letter-spacing: 0.1em;
}

/* ---------------- TAGS / SIGILS GRID ---------------- */
.threads {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
@media (max-width: 980px) { .threads { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .threads { grid-template-columns: 1fr; } }

.thread {
  position: relative;
  padding: var(--s-5);
  border: 1px solid var(--rule);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-height: 260px;
  overflow: hidden;
  transition: border-color var(--dur-2) var(--ease);
}
.thread:hover { border-color: var(--gold-deep); }
.thread__seal {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--ink-200);
  color: var(--gold);
  margin-bottom: var(--s-2);
}
.thread__seal::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--seal-color);
  box-shadow: 0 0 16px var(--seal-color);
}
.thread__title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  line-height: 1.1;
}
.thread__count {
  font-family: var(--f-ui);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.thread__list {
  list-style: none; padding: 0; margin: auto 0 0;
  font-family: var(--f-serif);
  font-size: 0.95rem;
  color: var(--text-soft);
}
.thread__list li { padding: 6px 0; border-top: 1px dashed var(--rule); }
.thread__list a:hover { color: var(--gold); }

/* ---------------- VIDEOS / GALLERY ---------------- */
.videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
@media (max-width: 880px) { .videos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .videos { grid-template-columns: 1fr; } }
.video {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--ink-300);
  border: 1px solid var(--rule);
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-4) var(--ease-out); filter: saturate(0.9); }
.video:hover img { transform: scale(1.05); }
.video__play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(13,11,8,0.4);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform var(--dur-2) var(--ease);
}
.video:hover .video__play { transform: translate(-50%, -50%) scale(1.1); }
.video__cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--s-4);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  font-family: var(--f-display);
  font-size: 1.125rem;
  color: var(--text);
}

/* ---------------- ARTICLE PAGE ---------------- */
.article-hero {
  position: relative;
  padding: var(--s-8) 0 var(--s-7);
  text-align: center;
}
.article-hero__sigils {
  display: flex; justify-content: center; gap: var(--s-2);
  margin-bottom: var(--s-5);
}
.article-hero__title {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0 auto;
}
.article-hero__deck {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--gold);
  margin-top: var(--s-4);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
.article-hero__byline {
  display: flex; justify-content: center; gap: var(--s-4); align-items: center;
  margin-top: var(--s-6);
  font-family: var(--f-ui); font-size: var(--t-meta);
  color: var(--text-mute);
  letter-spacing: 0.18em; text-transform: uppercase;
}
.article-hero__byline-img {
  width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--gold-deep);
}
.article-hero__byline-img img { width: 100%; height: 100%; object-fit: cover; }

.article-hero__cover {
  position: relative;
  aspect-ratio: 21 / 9;
  margin: var(--s-7) 0 var(--s-7);
  overflow: hidden;
  background: var(--ink-300);
}
.article-hero__cover img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
  filter: saturate(0.85) contrast(1.05);
}
.article-hero__cover::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--bg) 100%);
}

.prose {
  font-family: var(--f-serif);
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--text);
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
}
.prose h2 {
  font-family: var(--f-display);
  font-size: 2rem;
  letter-spacing: -0.01em;
  margin: var(--s-7) 0 var(--s-3);
  font-weight: 500;
}
.prose h3 {
  font-family: var(--f-display);
  font-size: 1.5rem;
  margin: var(--s-6) 0 var(--s-3);
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.prose p { margin: 0 0 var(--s-4); }
.prose strong { color: var(--gold-strong); font-weight: 600; }
.prose em { font-style: italic; color: var(--text); }
.prose blockquote {
  margin: var(--s-7) 0;
  padding: var(--s-6) var(--s-6) var(--s-5);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold);
  background: var(--bg-alt);
  position: relative;
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--text);
}
.prose blockquote::before {
  content: "“";
  position: absolute;
  top: -22px; left: 20px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display);
  font-size: 3rem;
  font-style: italic;
  color: var(--ink-100);
  background: var(--gold);
  border-radius: 50%;
  line-height: 1;
  padding-top: 14px;
  box-shadow: 0 0 0 4px var(--bg), 0 8px 24px -8px rgba(0,0,0,0.6);
}
.prose blockquote cite {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--f-ui);
  font-size: 0.78rem;
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 var(--s-4); }
.prose li { margin: 0 0 6px; }
.prose ul li::marker { color: var(--gold-deep); }

/* Pull quote — grimoire excerpt style */
.pullquote {
  position: relative;
  margin: var(--s-7) 0;
  padding: var(--s-5) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-align: center;
}
.pullquote__mark {
  position: absolute;
  top: -22px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold);
  color: var(--ink-100);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--bg), 0 8px 24px -8px rgba(0,0,0,0.5);
}
.pullquote__mark svg { width: 18px; height: 18px; }
.pullquote__text {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--gold-strong);
  max-width: 24ch;
  margin: 0 auto;
}
.pullquote__attribution {
  margin-top: var(--s-4);
  font-family: var(--f-ui);
  font-size: var(--t-meta);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}

/* ---------------- QUIZ ---------------- */
.quiz-hero {
  position: relative;
  padding: var(--s-9) 0;
  text-align: center;
  overflow: hidden;
}
.quiz-hero__bg {
  position: absolute; inset: 0; z-index: -1;
  opacity: 0.18;
  background-size: cover; background-position: center;
  filter: blur(2px) saturate(1.1);
  mask-image: radial-gradient(60% 50% at 50% 40%, black, transparent 80%);
}
.quiz-hero__title {
  font-family: var(--f-display);
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--text);
}
.quiz-hero__title em { color: var(--gold); display: block; font-style: italic; }
.quiz-hero__lede {
  margin: var(--s-5) auto;
  max-width: 540px;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.quiz-stats {
  display: flex;
  gap: var(--s-7);
  justify-content: center;
  flex-wrap: wrap;
  margin: var(--s-6) 0;
}
.quiz-stats__item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.quiz-stats__num {
  font-family: var(--f-display);
  font-size: 2.25rem;
  color: var(--gold);
  font-style: italic;
  line-height: 1;
}
.quiz-stats__label {
  font-family: var(--f-ui);
  font-size: var(--t-meta);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.quiz-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--s-7);
  border: 1px solid var(--rule);
  background: var(--bg-alt);
  position: relative;
}
.quiz-progress {
  display: flex; gap: var(--s-4); align-items: center;
  margin-bottom: var(--s-6);
}
.quiz-progress__label {
  font-family: var(--f-ui);
  font-size: var(--t-meta);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-mute);
}
.quiz-progress__bar {
  flex: 1; height: 1px; background: var(--rule);
  position: relative;
}
.quiz-progress__bar::after {
  content: ""; position: absolute; left: 0; top: -1px;
  height: 3px; background: var(--gold);
  width: var(--p, 0%);
  transition: width var(--dur-3) var(--ease-out);
}
.quiz-section {
  font-family: var(--f-ui);
  font-size: var(--t-meta);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-deep);
  text-align: center;
  margin-bottom: var(--s-4);
}
.quiz-question {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  text-align: center;
  margin-bottom: var(--s-6);
  letter-spacing: -0.01em;
}
.quiz-choices { display: flex; flex-direction: column; gap: var(--s-3); }
.quiz-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4);
  align-items: center;
  padding: var(--s-4);
  border: 1px solid var(--rule);
  background: var(--bg);
  text-align: left;
  font-family: var(--f-serif);
  font-size: 1.0625rem;
  color: var(--text);
  transition: all var(--dur-2) var(--ease);
  cursor: pointer;
}
.quiz-choice:hover {
  border-color: var(--gold-deep);
  background: var(--bg-elev);
}
.quiz-choice.is-selected {
  border-color: var(--gold);
  background: linear-gradient(90deg, rgba(207,176,114,0.06), transparent);
}
.quiz-choice__letter {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  font-family: var(--f-display);
  font-style: italic;
  color: var(--gold);
  font-size: 1.125rem;
  flex: 0 0 auto;
}
.quiz-choice.is-selected .quiz-choice__letter {
  background: var(--gold);
  color: var(--ink-100);
  border-color: var(--gold);
}
.quiz-nav {
  display: flex; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}

/* ---------------- DECKBUILDER ---------------- */
.deckbuilder {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: var(--s-6);
  min-height: 80vh;
}
@media (max-width: 980px) { .deckbuilder { grid-template-columns: 1fr; } }

.db-aside {
  padding: var(--s-6);
  border: 1px solid var(--rule);
  background: var(--bg-alt);
  position: sticky;
  top: 100px;
  align-self: start;
}
.db-aside h2 {
  font-family: var(--f-display);
  font-size: 1.75rem;
  margin-bottom: var(--s-3);
  letter-spacing: -0.01em;
}
.db-aside p { color: var(--text-soft); margin-bottom: var(--s-5); font-size: 1rem; }
.db-form { display: flex; flex-direction: column; gap: var(--s-4); }
.db-label {
  font-family: var(--f-ui); font-size: var(--t-meta);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-2);
}
.db-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--f-serif);
  font-size: 1rem;
  line-height: 1.5;
  font-style: italic;
}
.db-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }

.db-canvas {
  padding: var(--s-7);
  border: 1px solid var(--rule);
  background: var(--bg-alt);
  min-height: 80vh;
  position: relative;
  overflow: hidden;
}
.db-canvas__bg {
  position: absolute; inset: 0; z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'><g fill='none' stroke='%23cfb072' stroke-width='0.5'><circle cx='100' cy='100' r='60'/><circle cx='100' cy='100' r='40'/><path d='M100 40 L100 160 M40 100 L160 100 M58 58 L142 142 M142 58 L58 142'/></g></svg>");
  background-size: 240px;
  background-position: center;
}
.db-canvas__inner { position: relative; z-index: 1; }

.db-deck {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: var(--s-6);
  margin-bottom: var(--s-6);
}
.db-commander {
  position: relative;
  aspect-ratio: 5/7;
  background: var(--ink-300);
  border: 1px solid var(--gold-deep);
  overflow: hidden;
}
.db-commander img { width: 100%; height: 100%; object-fit: cover; }
.db-commander__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--s-4);
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85) 100%);
}

.db-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.db-tile {
  padding: var(--s-4);
  border: 1px solid var(--rule);
  background: var(--bg);
}
.db-tile h4 {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0 0 var(--s-2);
  display: flex; align-items: baseline; gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
.db-tile__num {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--gold);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.db-tile ul { list-style: none; padding: 0; margin: 0; }
.db-tile li {
  font-family: var(--f-serif);
  font-size: 0.95rem;
  padding: 4px 0;
  color: var(--text-soft);
  display: flex; align-items: baseline; gap: 8px;
}
.db-tile li::before {
  content: "";
  flex: 0 0 auto;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold-deep);
  transform: translateY(-2px);
}
.db-tabs { display: flex; gap: 0; margin-bottom: var(--s-5); border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.db-tab {
  padding: 10px 16px;
  font-family: var(--f-ui);
  font-size: var(--t-meta);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
}
.db-tab.is-active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ---------------- ABOUT ---------------- */
.about-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: center;
  padding: var(--s-9) 0;
}
@media (max-width: 880px) { .about-hero { grid-template-columns: 1fr; } }
.about-hero__portrait {
  aspect-ratio: 4/5;
  background: var(--ink-300);
  border: 1px solid var(--rule);
  overflow: hidden;
  position: relative;
}
.about-hero__portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9);
}
.about-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-bottom: var(--s-6);
}
.about-hero h1 em {
  color: var(--gold);
  font-style: italic;
  display: block;
  margin-top: 0.15em;
  padding-bottom: 0.1em;
}
.about-hero p { color: var(--text-soft); font-size: 1.125rem; line-height: 1.6; }

/* ---------------- CONTACT ---------------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  padding: var(--s-9) 0;
  align-items: start;
}
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }
.contact h1 {
  font-family: var(--f-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
  line-height: 1;
}
.contact h1 em { color: var(--gold); font-style: italic; display: block; }
.contact form { display: flex; flex-direction: column; gap: var(--s-4); }
.contact .field { padding: 14px 16px; }
.contact textarea.field { min-height: 160px; resize: vertical; font-family: var(--f-serif); }

/* Compact for smaller screens */
@media (max-width: 720px) {
  .hero-crest { padding: var(--s-7) 0; }
  .codex-grid { gap: var(--s-7); }
}
