:root {
  color-scheme: light;
  --bg: #f4efe6;
  --bg-paper: #fbf9f4;
  --ink: #1b1915;
  --muted: #6f675c;
  --line: #e0d5c4;
  --accent: #b07a3a;
  --accent-strong: #8a5a27;
  --accent-ink: #20323a;
  --text-color: var(--ink);
  --text-muted: var(--muted);
  --font-sans: "Work Sans", "Segoe UI", sans-serif;
  --shadow: 0 18px 48px rgba(24, 18, 10, 0.15);
  --radius: 18px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 520px at 12% -10%, rgba(255, 241, 218, 0.9), transparent 65%),
    radial-gradient(900px 420px at 90% 0%, rgba(235, 226, 214, 0.9), transparent 60%),
    linear-gradient(180deg, #f7f2e9 0%, #f2ede4 100%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
}

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

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

a:hover {
  color: var(--accent-strong);
}

p {
  margin: 0 0 1.2rem;
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", "Times New Roman", serif;
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4.1rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.8rem, 2.6vw, 2.7rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
}

small,
.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 1.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  z-index: 999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(14px);
  background: rgba(248, 244, 235, 0.9);
  border-bottom: 1px solid var(--line);
  z-index: 60;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(22, 18, 11, 0.14);
}

.logo-word {
  font-family: "Fraunces", serif;
  font-size: 1.48rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding-bottom: 0.2rem;
}

.nav-links a[href*="quiz/artwork-quiz.html"] {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 20px rgba(24, 18, 10, 0.2);
}

.nav-links a[href*="quiz/artwork-quiz.html"]::after {
  display: none;
}

.nav-links a[href*="quiz/artwork-quiz.html"]:hover,
.nav-links a[href*="quiz/artwork-quiz.html"]:focus {
  background: var(--accent-strong);
  color: #fff;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  min-width: 92px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-paper);
  color: var(--ink);
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(24, 18, 10, 0.12);
  position: relative;
  z-index: 80;
  touch-action: manipulation;
  font-weight: 600;
  font-size: 0.9rem;
}

.nav-toggle:hover,
.nav-toggle:focus {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

.nav-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.nav-toggle-label {
  line-height: 1;
}

.nav-submenu {
  position: relative;
}

.nav-submenu>summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  padding-bottom: 0.2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
}

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

.nav-submenu>summary::after {
  content: "▾";
  font-size: 0.72rem;
  transform: translateY(1px);
}

.nav-submenu[open]>summary::after {
  content: "▴";
}

.nav-submenu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 220px;
  display: grid;
  gap: 0.15rem;
  background: rgba(251, 249, 244, 0.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(24, 18, 10, 0.16);
  padding: 0.45rem;
  z-index: 85;
}

.nav-submenu:not([open]) .nav-submenu-panel {
  display: none;
}

.nav-submenu-panel a {
  display: block;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
}

.nav-submenu-panel a:hover,
.nav-submenu-panel a:focus {
  background: rgba(176, 122, 58, 0.12);
  color: var(--accent-strong);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(12, 10, 8, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 50;
}

.hero {
  padding: 5rem 0 3rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
}

.hero.hero-compact {
  padding: 2.4rem 0 1.2rem;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.hero.hero-compact .home-logo {
  width: clamp(180px, 32vw, 320px);
  margin-bottom: 0.55rem;
}

.hero.hero-compact .hero-title {
  font-size: clamp(2.05rem, 3.5vw, 3.15rem);
  max-width: 19ch;
  margin-bottom: 0.45rem;
}

.hero.hero-compact .meta {
  max-width: 60ch;
  margin-bottom: 0;
}

.hero-quicklinks {
  margin-top: 1rem;
}

.hero-quicklinks .action-button {
  min-width: 170px;
}

.home-logo {
  width: clamp(220px, 40vw, 420px);
  height: auto;
  margin: 0 0 0.9rem;
}

.hero-title {
  font-size: clamp(2.8rem, 4.2vw, 4.5rem);
}

.hero-card {
  background: var(--bg-paper);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(176, 122, 58, 0.2);
}

.hero-card p {
  font-size: 1.05rem;
}

.tagline {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--accent-strong);
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.section {
  padding: 2rem 0 3rem;
}

.section-discovery {
  padding-top: 1.2rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.section-title span {
  color: var(--muted);
  font-size: 0.95rem;
}

.home-artworks-intro {
  margin: 0 0 1rem;
  max-width: 72ch;
  color: var(--muted);
}

.home-artworks-toolbar {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  justify-content: space-between;
}

.home-artworks-toolbar .meta {
  margin: 0;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.blog-latest-list {
  display: grid;
  gap: 0.8rem;
}

.blog-latest-item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(28, 25, 19, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-latest-item:hover,
.blog-latest-item:focus {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(28, 25, 19, 0.14);
}

.blog-latest-item img {
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.blog-latest-content {
  padding: 0.9rem 1.05rem;
}

.blog-latest-meta {
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.blog-latest-meta span {
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.blog-latest-item h3 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
}

.blog-latest-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.blog-latest-item-all {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-right: 1.05rem;
}

.blog-latest-item-all strong {
  font-size: 0.9rem;
  white-space: nowrap;
}

.art-card {
  background: var(--bg-paper);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(28, 25, 19, 0.08);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.art-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(28, 25, 19, 0.16);
}

.art-card img {
  height: 200px;
  object-fit: cover;
}

.art-card-body {
  padding: 1.4rem 1.4rem 1.6rem;
  display: grid;
  gap: 0.6rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.lens-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lens-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

.action-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.action-card {
  padding: 1.6rem;
  border-radius: 16px;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(28, 25, 19, 0.08);
  display: grid;
  gap: 0.7rem;
}

.action-card-quiz {
  border-color: rgba(176, 122, 58, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.92) 0%, rgba(251, 245, 236, 0.96) 100%);
  box-shadow: 0 12px 30px rgba(28, 25, 19, 0.14);
}

.action-card-quiz .meta {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 600;
}

.action-card-quiz .action-button {
  min-width: 190px;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
}

.action-button:hover,
.action-button:focus {
  background: #111;
  color: #fff;
}

.action-button.is-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.action-button.is-secondary:hover,
.action-button.is-secondary:focus {
  border-color: var(--ink);
  color: var(--ink);
}

.random-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
}

.random-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.random-card-body {
  padding: 0.75rem 0.85rem 0.9rem;
}

.random-card-body h4 {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}

.random-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.quiz-panel {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: 0 12px 30px rgba(28, 25, 19, 0.1);
}

.quiz-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  align-items: center;
}

.quiz-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quiz-figure {
  margin: 1rem 0 0.8rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.quiz-figure img {
  width: 100%;
  height: auto;
  max-height: min(60vh, 560px);
  object-fit: contain;
  background: rgba(255, 255, 255, 0.65);
}

.quiz-question {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  margin: 1rem 0 0.8rem;
}

.quiz-options {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quiz-option {
  text-align: left;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.quiz-option:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.quiz-option:disabled {
  cursor: default;
  transform: none;
}

.quiz-option.is-correct {
  border-color: #1b7f43;
  background: rgba(27, 127, 67, 0.09);
}

.quiz-option.is-wrong {
  border-color: #a82d2d;
  background: rgba(168, 45, 45, 0.09);
}

.quiz-feedback {
  min-height: 1.5em;
  margin: 0.85rem 0 0;
  font-weight: 600;
}

.quiz-feedback.is-correct {
  color: #1b7f43;
}

.quiz-feedback.is-wrong {
  color: #a82d2d;
}

.quiz-actions {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.quiz-analysis-button {
  border-color: var(--accent-strong);
  background: linear-gradient(135deg, #b07a3a 0%, #8a5a27 100%);
  box-shadow: 0 12px 22px rgba(138, 90, 39, 0.32);
}

.quiz-analysis-button:hover,
.quiz-analysis-button:focus {
  background: linear-gradient(135deg, #99642f 0%, #7c5024 100%);
  color: #fff;
  border-color: #7c5024;
}

.share-box {
  margin: 0.95rem 0 1.15rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-paper);
  box-shadow: 0 10px 24px rgba(28, 25, 19, 0.08);
}

.share-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.share-head h2 {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin: 0;
}

.share-head .meta {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.72rem;
  font-weight: 600;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.share-btn:hover,
.share-btn:focus {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.share-status {
  margin: 0.55rem 0 0;
  min-height: 1.3em;
}


.art-card-image {
  display: block;
}

.art-card-image img {
  width: 100%;
}

.category-card {
  display: block;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(28, 25, 19, 0.12);
}

.category-card.is-soon {
  opacity: 0.75;
}

.home-categories .lens-grid {
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.home-categories .lens-card {
  padding: 1.1rem 1rem;
}

.home-categories .lens-card h3 {
  font-size: clamp(1.1rem, 1.45vw, 1.3rem);
}

.categories-soon {
  margin-top: 0.9rem;
}

main .section p a,
main .section li a,
main .section figcaption a,
main .section .inline-artwork-caption a,
main .section .figcaption a,
main .summary-box a,
main .pull-quote a,
main .faq-answer a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  font-weight: 600;
}

main .section p a:hover,
main .section li a:hover,
main .section figcaption a:hover,
main .section .inline-artwork-caption a:hover,
main .section .figcaption a:hover,
main .summary-box a:hover,
main .pull-quote a:hover,
main .faq-answer a:hover {
  color: #6f4620;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-paper);
  padding: 1rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 25px rgba(28, 25, 19, 0.08);
  margin-bottom: 1.8rem;
}

.filter-stack {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.filter-stack .filter-bar {
  margin-bottom: 0;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  color: var(--accent-strong);
}

.filter-chip.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.filter-input {
  border: none;
  background: transparent;
  flex: 1;
  font-size: 1rem;
  outline: none;
  color: var(--ink);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  z-index: 12;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-ink));
  transition: width 0.2s ease;
}

.artwork-hero {
  margin: 1.2rem 0 0;
}

.artwork-hero figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(28, 25, 19, 0.12);
}

.artwork-hero img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.hook-emphasis {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1em;
  color: var(--text-color);
}

.inline-artwork-block {
  margin: 2rem 0;
}

.inline-artwork-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.comparison-figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.inline-artwork-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.figcaption {
  padding: 0.8rem 1rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.figcaption a[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.72;
}

.article-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  margin-top: 1.6rem;
}

.summary-box {
  background: var(--bg-paper);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(28, 25, 19, 0.08);
}

.summary-box h3 {
  margin-bottom: 0.6rem;
}

.facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.facts li {
  display: grid;
  gap: 0.2rem;
}

.facts span {
  font-weight: 600;
}

.pull-quote {
  font-family: "Fraunces", serif;
  font-size: 1.35rem;
  padding: 1.3rem 1.6rem;
  border-left: 4px solid var(--accent);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  margin: 2rem 0;
}

.related-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.related-card {
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
}

main article .related-card {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.14em;
  font-weight: 600;
}

main article .related-card:hover {
  color: #6f4620;
}

.chip-inline {
  padding: 0.5rem 1rem;
}

.chip-inline-strong {
  font-weight: 600;
}

.table-row-divider {
  border-bottom: 1px solid var(--line);
}

.cell-pad {
  padding: 0.6rem 1rem;
}

.section-spacer-lg {
  margin-top: 3rem;
}

.table-scroll {
  overflow-x: auto;
}

.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table-head-divider {
  border-bottom: 2px solid var(--line);
  text-align: left;
}

.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  color: var(--muted);
}

.footer a {
  color: var(--accent-strong);
}

.footer-legal {
  margin-top: 0.8rem;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@media (max-width: 900px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 680px) {
  body::before {
    background: linear-gradient(180deg, #f7f2e9 0%, #f2ede4 100%);
  }

  body::after {
    display: none;
  }

  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(248, 244, 235, 0.98);
  }

  .nav-bar {
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .logo-word {
    font-size: 1.28rem;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    min-width: 96px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 320px);
    height: 100dvh;
    margin-left: 0;
    padding: 5.2rem 1.25rem 1.5rem;
    gap: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background: rgba(251, 249, 244, 0.97);
    border-left: 1px solid var(--line);
    box-shadow: -14px 0 36px rgba(24, 18, 10, 0.2);
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform 0.25s ease;
    z-index: 70;
    pointer-events: none;
    visibility: hidden;
  }

  .nav-links a {
    font-size: 1rem;
    padding-bottom: 0;
  }

  .nav-links a[href*="quiz/artwork-quiz.html"] {
    padding: 0.45rem 0.9rem;
  }

  .nav-submenu {
    width: 100%;
  }

  .nav-submenu>summary {
    width: 100%;
    padding: 0.2rem 0;
  }

  .nav-submenu-panel {
    position: static;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.3rem 0 0.2rem 0.75rem;
  }

  .nav-submenu-panel a {
    padding: 0.25rem 0;
    color: var(--muted);
  }

  .nav-links a::after {
    display: none;
  }

  body.nav-open .nav-links {
    transform: translateX(0);
    pointer-events: auto;
    visibility: visible;
  }

  body.nav-open .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  .hero {
    padding: 3.5rem 0 2rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 16px;
  }

  .action-button {
    width: 100%;
  }

  .random-card img {
    height: 132px;
  }

  .random-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-artworks-toolbar {
    align-items: stretch;
  }

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

  .share-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .blog-latest-item {
    grid-template-columns: 95px minmax(0, 1fr);
  }

  .blog-latest-item img {
    min-height: 100px;
  }

  .blog-latest-item-all {
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .blog-latest-item-all strong {
    padding: 0 1.05rem 1rem;
  }

  .art-card img {
    height: 180px;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

}

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

  .reveal {
    transition: none;
  }

  .reading-progress span {
    transition: none;
  }

  .art-card {
    transition: none;
  }
}

/* ── Table of Contents ──────────────────────────────── */
.toc {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 1.2rem 0 0;
  box-shadow: 0 10px 24px rgba(28, 25, 19, 0.07);
}

.toc-title {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.4rem;
  display: grid;
  gap: 0.35rem;
}

.toc li {
  font-size: 0.95rem;
  line-height: 1.5;
}

.toc a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.toc a:hover {
  color: var(--accent-strong);
}

/* ── Search Trigger ─────────────────────────────────── */
.search-trigger-container {
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 0 1rem;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: text;
  width: 100%;
  max-width: 300px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.search-trigger:hover {
  border-color: var(--accent-strong);
  color: var(--ink);
}

.search-key-hint {
  margin-left: auto;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
  opacity: 0.6;
}

@media (max-width: 680px) {
  .search-trigger-container {
    flex: 0 0 auto;
    justify-content: flex-end;
    margin: 0 0.2rem 0 0.25rem;
  }

  .search-trigger {
    width: 40px;
    height: 40px;
    max-width: 40px;
    padding: 0;
    gap: 0;
    justify-content: center;
    cursor: pointer;
  }

  .search-trigger .search-icon {
    width: 18px;
    height: 18px;
  }

  .search-trigger-text,
  .search-key-hint {
    display: none;
  }
}

/* ── FAQ Section ────────────────────────────────────── */
.faq-section {
  margin: 2rem 0;
}

.faq-section h2 {
  margin-bottom: 1rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.6rem;
  background: var(--bg-paper);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.3rem;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--accent-strong);
}

.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.3rem;
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
  padding: 0 1.3rem 1.2rem;
}

.faq-answer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

/* ── Publication Date ───────────────────────────────── */
time {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ── Dark Mode ──────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161410;
    --bg-paper: #1c1914;
    --ink: #e6e1d6;
    --muted: #a39a8e;
    --line: #3a3228;
    --accent: #d49c5d;
    --accent-strong: #eecba0;
    --accent-ink: #c2e0f0;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  }

  body::before {
    background:
      radial-gradient(1200px 520px at 12% -10%, rgba(30, 25, 20, 0.9), transparent 65%),
      radial-gradient(900px 420px at 90% 0%, rgba(25, 20, 15, 0.9), transparent 60%),
      linear-gradient(180deg, #161410 0%, #12100d 100%);
  }

  body::after {
    opacity: 0.07;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 0);
  }

  img {
    filter: brightness(0.92) contrast(0.98);
  }

  .site-header {
    background: rgba(22, 20, 16, 0.9);
  }

  .nav-links a[href*="quiz/artwork-quiz.html"] {
    background: var(--ink);
    color: var(--bg);
  }

  .nav-links a[href*="quiz/artwork-quiz.html"]:hover,
  .nav-links a[href*="quiz/artwork-quiz.html"]:focus {
    background: var(--accent-strong);
    color: var(--bg);
  }

  .nav-toggle {
    background: var(--bg-paper);
    color: var(--ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-submenu-panel {
    background: rgba(28, 25, 20, 0.98);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
  }

  .nav-submenu-panel a:hover,
  .nav-submenu-panel a:focus {
    background: rgba(212, 156, 93, 0.15);
  }

  .hero-card,
  .action-card,
  .art-card,
  .blog-latest-item,
  .summary-box,
  .faq-item,
  .quiz-panel,
  .share-box,
  .artwork-hero figure,
  .toc {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  }

  .action-card-quiz {
    background: linear-gradient(180deg, rgba(34, 30, 25, 0.95) 0%, rgba(28, 25, 20, 0.98) 100%);
    border-color: rgba(212, 156, 93, 0.25);
  }

  .action-button {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
  }

  .action-button:hover,
  .action-button:focus {
    background: #fff;
    color: #000;
  }

  .action-button.is-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
  }

  .action-button.is-secondary:hover,
  .action-button.is-secondary:focus {
    color: var(--accent-strong);
    border-color: var(--accent-strong);
  }

  .random-card {
    background: rgba(30, 27, 22, 0.6);
  }

  .tag,
  .filter-chip,
  .blog-latest-meta span {
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
  }

  .filter-chip:hover,
  .filter-chip.is-active {
    background: var(--ink);
    color: var(--bg);
  }

  .filter-chip.is-active {
    border-color: var(--ink);
  }

  .related-card,
  .lens-card {
    background: rgba(35, 30, 25, 0.65);
  }

  .lens-card:hover {
    background: rgba(45, 40, 35, 0.75);
  }

  .quiz-option {
    background: rgba(255, 255, 255, 0.04);
  }

  .quiz-figure img {
    background: rgba(255, 255, 255, 0.05);
  }

  .share-btn {
    background: transparent;
  }

  .pull-quote {
    background: rgba(255, 255, 255, 0.05);
  }

  @media (max-width: 680px) {
    .nav-links {
      background: rgba(28, 25, 20, 0.98);
      box-shadow: -14px 0 36px rgba(0, 0, 0, 0.4);
    }
  }
}

/* ── Search Overlay ─────────────────────────────────── */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 20, 16, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5vh;
}

.search-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.search-modal {
  background: var(--bg-paper);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1);
  margin: 1rem;
}

.search-overlay.is-active .search-modal {
  transform: translateY(0);
}

.search-header {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-input {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  outline: none;
  padding: 0.5rem;
}

.search-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.search-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
}

.search-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  scroll-behavior: smooth;
}

.search-result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease;
}

.search-result-card:hover,
.search-result-card:focus {
  background: rgba(0, 0, 0, 0.04);
}

.search-result-image {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: var(--line);
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-meta {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--line);
  font-weight: 600;
}

.search-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

/* Dark Mode Search Overrides */
@media (prefers-color-scheme: dark) {
  .search-overlay {
    background: rgba(0, 0, 0, 0.8);
  }

  .search-close:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .search-result-card:hover,
  .search-result-card:focus {
    background: rgba(255, 255, 255, 0.08);
  }

  .search-badge {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* ── Print Styles ───────────────────────────────────── */
@media print {
  :root {
    --bg: #fff;
    --ink: #000;
    --muted: #444;
    --line: #ccc;
  }

  body {
    background: #fff;
    color: #000;
  }

  body::before,
  body::after {
    display: none;
  }

  .site-header,
  .nav-toggle,
  .nav-overlay,
  .skip-link,
  .reading-progress,
  .filter-stack,
  .action-grid,
  .footer,
  .share-box,
  .related-card,
  .home-categories,
  .reveal {
    display: none !important;
  }

  /* Force display for content that might be hidden by reveal class */
  main .reveal.is-visible,
  main .reveal {
    opacity: 1 !important;
    transform: none !important;
    display: block !important;
  }

  /* Hide interactive elements specifically */
  .random-actions,
  .quiz-actions,
  .faq-question::after {
    display: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
  }

  h1 {
    font-size: 24pt;
    margin-bottom: 0.5rem;
  }

  h2 {
    font-size: 18pt;
    margin-top: 2rem;
    break-after: avoid;
  }

  p {
    font-size: 11pt;
    line-height: 1.5;
    orphans: 3;
    widows: 3;
  }

  a {
    text-decoration: underline;
    color: #000;
  }

  /* Optional: Show URL after links */
  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85rem;
    color: #555;
  }

  /* Don't show URL for internal anchors or buttons turned into links */
  main a[href^="/"]::after,
  main a[href^="#"]::after,
  .action-button::after {
    content: "";
  }

  .artwork-hero figure {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  img {
    max-width: 100% !important;
    height: auto !important;
  }

  .article-grid {
    display: block;
  }

  aside {
    border-top: 2px solid #000;
    margin-top: 2rem;
    padding-top: 1rem;
  }

  .summary-box {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  .faq-answer {
    max-height: none !important;
    padding-bottom: 1rem;
    display: block !important;
  }

  .faq-item {
    break-inside: avoid;
    border: none;
    border-bottom: 1px solid #ccc;
  }

  .faq-question {
    padding-left: 0;
    pointer-events: none;
  }
}
