/* ==========================================================================
   Figurepedia - Anime Figure Manufacturer Encyclopedia
   Complete Stylesheet
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

html {
  scroll-padding-top: 80px;
  scroll-behavior: smooth;
}

:root {
  --bg-primary: #0f1117;
  --bg-secondary: #151720;
  --bg-card: #1a1c28;
  --bg-card-hover: #202332;
  --border-subtle: #262a3a;
  --border-accent: #383d54;
  --text-primary: #edeaf2;
  --text-secondary: #a5a0b3;
  --text-muted: #9590a8;
  --text-jp: #8a84a0;
  --pastel-pink: #f2a0b8;
  --pastel-pink-dim: rgba(242, 160, 184, 0.10);
  --pastel-blue: #8ec8e8;
  --pastel-blue-dim: rgba(142, 200, 232, 0.10);
  --pastel-lavender: #b8a4e0;
  --pastel-lavender-dim: rgba(184, 164, 224, 0.10);
  --pastel-mint: #8edcb8;
  --pastel-mint-dim: rgba(142, 220, 184, 0.10);
  --pastel-peach: #f0c090;
  --pastel-peach-dim: rgba(240, 192, 144, 0.10);
  --pastel-yellow: #e8d888;
  --pastel-yellow-dim: rgba(232, 216, 136, 0.10);
  --font-display: 'Outfit', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
  --font-body: 'Outfit', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --text-xs: 0.68rem;
  --text-sm: 0.78rem;
  --text-md: 0.88rem;
  color-scheme: dark;
}

/* ---------- Light Mode ---------- */
[data-theme="light"] {
  --bg-primary: #f5f3f8;
  --bg-secondary: #eceaf0;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f6fc;
  --border-subtle: #ddd8e6;
  --border-accent: #c8c0d8;
  --text-primary: #1a1625;
  --text-secondary: #4a4460;
  --text-muted: #605880;
  --text-jp: #605880;
  --pastel-pink: #b0506a;
  --pastel-pink-dim: rgba(196, 96, 122, 0.08);
  --pastel-blue: #4a8eb0;
  --pastel-blue-dim: rgba(74, 142, 176, 0.08);
  --pastel-lavender: #7a60b8;
  --pastel-lavender-dim: rgba(122, 96, 184, 0.08);
  --pastel-mint: #3a9a70;
  --pastel-mint-dim: rgba(58, 154, 112, 0.08);
  --pastel-peach: #c08040;
  --pastel-peach-dim: rgba(192, 128, 64, 0.08);
  --pastel-yellow: #a09030;
  --pastel-yellow-dim: rgba(160, 144, 48, 0.08);
  color-scheme: light;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--border-accent);
}

/* Light mode card shadows */
[data-theme="light"] .mfg-card,
[data-theme="light"] .article-card,
[data-theme="light"] .glossary-card,
[data-theme="light"] .intro-block .intro-inner,
[data-theme="light"] .makers-sidebar,
[data-theme="light"] .makers-profile-grid,
[data-theme="light"] .quick-facts,
[data-theme="light"] .article-toc {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .mfg-card:hover,
[data-theme="light"] .article-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
}

/* Light mode: components that switched from border to shadow need stronger shadow */
[data-theme="light"] .home-widget,
[data-theme="light"] .timeline-card,
[data-theme="light"] .tldr-box,
[data-theme="light"] .about-principle,
[data-theme="light"] .comparison-item,
[data-theme="light"] .product-line-card,
[data-theme="light"] .toast,
[data-theme="light"] .start-here__card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .global-search-modal {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .global-search-overlay {
  background: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .global-search-result:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* Light mode footer */
[data-theme="light"] .footer {
  background: var(--bg-secondary);
}

[data-theme="light"] body {
  background-image: none;
}

/* Light mode hero gradient */
[data-theme="light"] .hero::before {
  background: radial-gradient(
    ellipse at center,
    rgba(196, 96, 122, 0.06) 0%,
    rgba(122, 96, 184, 0.03) 40%,
    transparent 70%
  );
}

/* Light mode nav */
[data-theme="light"] .nav {
  background: rgba(245, 243, 248, 0.92);
  border-bottom-color: var(--border-subtle);
}

/* System preference fallback (no saved preference) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-primary: #f5f3f8;
    --bg-secondary: #eceaf0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f6fc;
    --border-subtle: #ddd8e6;
    --border-accent: #c8c0d8;
    --text-primary: #1a1625;
    --text-secondary: #4a4460;
    --text-muted: #605880;
    --text-jp: #605880;
    --pastel-pink: #b0506a;
    --pastel-pink-dim: rgba(196, 96, 122, 0.08);
    --pastel-blue: #4a8eb0;
    --pastel-blue-dim: rgba(74, 142, 176, 0.08);
    --pastel-lavender: #7a60b8;
    --pastel-lavender-dim: rgba(122, 96, 184, 0.08);
    --pastel-mint: #3a9a70;
    --pastel-mint-dim: rgba(58, 154, 112, 0.08);
    --pastel-peach: #c08040;
    --pastel-peach-dim: rgba(192, 128, 64, 0.08);
    --pastel-yellow: #a09030;
    --pastel-yellow-dim: rgba(160, 144, 48, 0.08);
    color-scheme: light;
  }
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

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

html {
  overflow-x: clip;
}

body {
  background: var(--bg-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23ffffff' stroke-opacity='0.02' stroke-width='0.5'/%3E%3Cpath d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23ffffff' stroke-opacity='0.02' stroke-width='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 56px 100px;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: clip;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

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

[data-action] {
  cursor: pointer;
}

[data-action]:focus-visible,
.nav__link:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.article-toc-item:focus-visible,
.makers-toc-item:focus-visible {
  outline: 2px solid var(--pastel-pink);
  outline-offset: 2px;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 0.75rem 1.25rem;
  clip: auto;
  z-index: 999;
  background: var(--bg-card);
  color: var(--pastel-pink);
  border: 1px solid var(--border-accent);
  border-radius: 8px;
  font-size: var(--text-md);
  font-weight: 600;
}

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 2rem 3rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  min-height: 40vh;
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.6;
}

/* ==========================================================================
   4. NAV
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  background: rgba(15, 17, 23, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav__logo {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  margin-right: 1.5rem;
  line-height: 1;
}

.nav__logo-en {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.nav__logo-accent {
  color: var(--pastel-pink);
}

.nav__logo-jp {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  color: var(--text-jp);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-top: 5px;
  text-align: center;
}

.nav__links {
  display: flex;
  gap: 0.4rem;
  list-style: none;
}

.nav__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--text-md);
  font-weight: 500;
  font-family: inherit;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.nav__link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav__link--active {
  color: var(--pastel-pink);
  background: var(--pastel-pink-dim);
}

.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  gap: 5px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.nav__burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav__burger span + span {
  margin-top: 5px;
}

/* ==========================================================================
   5. HOME VIEW
   ========================================================================== */

/* -- Hero -- */

.hero {
  padding: 5.5rem 2rem 2.5rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(
    ellipse at center,
    rgba(242, 160, 184, 0.06) 0%,
    rgba(184, 164, 224, 0.03) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

.hero__jp {
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  color: var(--text-jp);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  animation: fadeUpShort 0.4s ease-out both;
}

.hero__accent {
  color: var(--pastel-pink);
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* -- Buttons -- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--pastel-pink);
  color: var(--bg-primary);
  font-size: var(--text-md);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-md);
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-accent);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
}

/* -- Start Here: New Collector Pathway -- */

.start-here {
  max-width: 860px;
  margin: 0 auto 2.5rem;
  padding: 0 2rem;
}

.start-here__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 1.2rem;
}

.start-here__accent {
  color: var(--pastel-pink);
  font-weight: 600;
}

.start-here__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.start-here__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.start-here__card:hover {
  border-color: var(--pastel-pink);
  transform: translateY(-2px);
}

.start-here__icon {
  color: var(--pastel-pink);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.start-here__card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.start-here__card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* -- Nav Search Button -- */

.nav__search-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s, border-color 0.2s;
  margin-right: 0.5rem;
}

.nav__search-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* -- Global Search Modal -- */

.global-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: min(20vh, 140px);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.global-search-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  width: min(580px, 92vw);
  max-height: 60vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

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

.global-search-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: var(--font-body);
  outline: none;
  padding: 0.25rem 0;
}

.global-search-input::placeholder {
  color: var(--text-muted);
}

.global-search-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  border-radius: 4px;
}

.global-search-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.global-search-results {
  overflow-y: auto;
  padding: 0.5rem;
}

.global-search-result {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: background 0.15s;
}

.global-search-result:hover {
  background: rgba(255, 255, 255, 0.05);
}

.global-search-result__type {
  font-size: 1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
  margin-top: 0.15rem;
}

.global-search-result__text {
  flex: 1;
  min-width: 0;
}

.global-search-result__title {
  font-size: var(--text-md);
  color: var(--text-primary);
  font-weight: 500;
}

.global-search-result__sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.global-search-empty,
.global-search-hint {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* -- Article Share Bar -- */

.article-share-bar {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.article-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-family: inherit;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.article-share-btn:hover {
  color: var(--text-primary);
  border-color: var(--pastel-pink);
}

.article-share-btn svg {
  flex-shrink: 0;
}

/* -- Section Header -- */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-title .jp {
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  color: var(--text-jp);
  white-space: nowrap;
  flex-shrink: 0;
}

/* -- Homepage Widget Cluster -- */

/* -- Discover a Maker: compact ticker -- */

.home-discover {
  margin-bottom: 3rem;
}

.home-discover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.home-discover__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.home-discover__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.home-discover__ticker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.home-discover__item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.home-discover__item:hover {
  border-color: var(--pastel-pink);
}

.home-discover__item-name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.home-discover__item-jp {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  color: var(--text-jp);
  margin-bottom: 0.5rem;
}

.home-discover__item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.home-discover__item-quality {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--pastel-blue);
  background: var(--pastel-blue-dim);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.home-discover__item-year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.home-featured {
  margin-bottom: 3rem;
}

.home-widgets {
  margin-bottom: 2.5rem;
}

.home-widgets__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.home-widget {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease;
}

.home-widget:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.home-widget__header {
  margin-bottom: 0.85rem;
}

.home-widget__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.home-widget__title-accent {
  color: var(--pastel-pink);
}

.home-widget__title-month {
  color: var(--pastel-blue);
}

/* Did You Know widget */
.home-widget--fact {
}

.home-widget__fact-text {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.home-widget__fact-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.home-widget__link {
  background: none;
  border: none;
  color: var(--pastel-pink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.home-widget__link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Link color variants (visible when not in chase animation) */
.home-widget__link--blue { color: var(--pastel-blue); }
.home-widget__link--mint { color: var(--pastel-mint); }

.home-widget__mfr {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
}

/* On This Day widget */
.home-widget--today {
}

.home-widget__event {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.home-widget__event:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.home-widget__event-badge {
  background: var(--pastel-pink);
  color: var(--bg-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 10px;
  flex-shrink: 0;
}

.home-widget__event-year {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--pastel-blue);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 38px;
  text-align: center;
}

.home-widget__event-text {
  font-size: var(--text-md);
  color: var(--text-primary);
  line-height: 1.4;
  flex: 1;
}

.home-widget__event-link {
  background: none;
  border: none;
  color: var(--pastel-blue);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background 0.2s, opacity 0.2s;
}

.home-widget__event-link:hover {
  background: var(--pastel-blue-dim);
}

/* Spotlight widget */
.home-widget--spotlight {
}

.spotlight-glow {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pastel-peach);
  margin-left: 6px;
  vertical-align: middle;
  animation: spotlightPulse 3s ease-in-out infinite;
}

@keyframes spotlightPulse {
  0% { opacity: 0.35; box-shadow: none; }
  40% { opacity: 1; box-shadow: 0 0 10px var(--pastel-peach), 0 0 18px var(--pastel-peach); }
  100% { opacity: 0.35; box-shadow: none; }
}

.home-widget__spot-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.home-widget__spot-jp {
  font-family: var(--font-jp);
  font-size: var(--text-sm);
  color: var(--text-jp);
  margin-bottom: 0.6rem;
}

/* Marquee chase: unified loop across all widget links */
.home-widgets__grid .home-widget__link,
.home-widgets__grid .home-widget__event-link {
  animation: marqueeChase 10.5s ease-in-out infinite;
  opacity: 0.45;
}

/* Clockwise chase: Blue(arrows) → Purple(guide) → Peach(spotlight) → Pink(fact) */
[data-chase="0"] { animation-delay: 9s !important; }
[data-chase="1"] { animation-delay: 0s !important; }
[data-chase="2"] { animation-delay: 1.5s !important; }
[data-chase="3"] { animation-delay: 3s !important; }
[data-chase="4"] { animation-delay: 4.5s !important; }
[data-chase="5"] { animation-delay: 7.5s !important; }
[data-chase="6"] { animation-delay: 6s !important; }

@keyframes marqueeChase {
  0%, 100% { opacity: 0.45; text-shadow: none; }
  5% { opacity: 0.85; text-shadow: 0 0 4px var(--pastel-pink); }
  12% { opacity: 0.45; text-shadow: none; }
}

.home-widget__link:hover,
.home-widget__event-link:hover {
  animation: none !important;
  opacity: 1;
  color: var(--pastel-pink);
  text-shadow: none;
}

/* Credibility bar */
.home-cred {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 0;
  margin-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.home-cred__stat {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
}

.home-cred__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
}

.home-cred__link {
  background: none;
  border: none;
  color: var(--pastel-mint);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s;
}

.home-cred__link:hover {
  text-decoration-color: var(--pastel-mint);
}

/* Refresh/shuffle button */
.btn-shuffle {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 1.15rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  line-height: 1;
}

.btn-shuffle:hover {
  border-color: var(--pastel-pink);
  color: var(--pastel-pink);
  background: var(--pastel-pink-dim);
  transform: rotate(180deg);
}

/* Collector's Corner / Guide widget */
.home-widget--guide {
}

.home-widget__guide-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.home-widget__guide-desc {
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.home-widget__link--lavender { color: var(--pastel-lavender); }

/* Maker Ticker widget */
.home-widget--ticker {
  grid-column: 1 / -1;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  overflow: hidden;
}

.ticker-jp {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  color: var(--text-jp);
  font-weight: 400;
  margin-left: 0.4rem;
}

.ticker-viewport {
  height: calc(3 * 3.6rem);
  overflow: hidden;
  position: relative;
}

.ticker-viewport::before,
.ticker-viewport::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1rem;
  z-index: 2;
  pointer-events: none;
}

.ticker-viewport::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg-card), transparent);
}

.ticker-viewport::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg-card), transparent);
}

.ticker-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

.ticker-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 3.6rem;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.ticker-item:hover {
  background: var(--bg-card-hover);
}

.ticker-item__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-item__jp {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  color: var(--text-jp);
  font-weight: 400;
  margin-left: 0.35rem;
}

.ticker-item__rep {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Refresh hint on Discover section */
.home-refresh-hint {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.section-header__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* -- Manufacturer Grid -- */

.mfg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1rem;
}

.mfg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1.5rem;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.mfg-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.mfg-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.mfg-card__logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  flex-shrink: 0;
}

.mfg-tier {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

.mfg-tier--premium {
  color: var(--pastel-lavender);
  background: var(--pastel-lavender-dim);
}

.mfg-tier--mid {
  color: var(--pastel-blue);
  background: var(--pastel-blue-dim);
}

.mfg-tier--entry {
  color: var(--pastel-mint);
  background: var(--pastel-mint-dim);
}

.mfg-card__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.mfg-card__name-jp {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  color: var(--text-jp);
  margin-bottom: 0.5rem;
}

.mfg-card__meta {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.mfg-card__desc {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.mfg-card__tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.mfg-tag {
  font-size: var(--text-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
}

/* -- Comparison List -- */

.comparison-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.comparison-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.comparison-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(3px);
}

.comparison-vs {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  flex-shrink: 0;
}

.comparison-vs--battle {
  color: var(--pastel-peach);
  background: var(--pastel-peach-dim);
}

.comparison-vs--rank {
  color: var(--pastel-yellow);
  background: var(--pastel-yellow-dim);
}

.comparison-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-cat {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

.comparison-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
}

.comparison-item:hover .comparison-arrow {
  transform: translateX(4px);
  color: var(--pastel-peach);
}

/* -- Intro Block -- */

.intro-block {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.intro-inner {
  background: var(--bg-secondary);
  border-radius: 14px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.stat-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.stat-row > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 90px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--pastel-lavender);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.3;
}

/* ==========================================================================
   6. LIBRARY / ENCYCLOPEDIA VIEWS
   ========================================================================== */

.library-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 2rem 3rem;
}

/* -- Article Grid -- */

.article-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.article-grid > * {
  flex: 0 1 calc(33.333% - 8px);
  min-width: 320px;
}

.article-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
}

.article-card--featured {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
}

.article-card--featured:hover {
  border-color: var(--pastel-lavender);
}

.article-card--compact {
  padding: 1rem;
  gap: 0.75rem;
}

.article-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.article-card-subtitle {
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.article-card-meta {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.encyclopedia-section-header {
  font-family: var(--font-display);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 2rem 0 1rem;
}

.encyclopedia-philosophy {
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: 1.6;
  font-style: italic;
  margin: 0 0 1.5rem 0;
  padding: 0.75rem 1rem;
  background: var(--pastel-lavender-dim);
  border-radius: 6px;
  max-width: 720px;
}

.encyclopedia-search-wrap {
  margin-bottom: 1.5rem;
}

.encyclopedia-search {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.2s;
}

.encyclopedia-search::placeholder {
  color: var(--text-muted);
}

.encyclopedia-search:focus {
  border-color: var(--pastel-pink);
}

/* ==========================================================================
   7. ARTICLE VIEW
   ========================================================================== */

.article-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 2rem 3rem;
}

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: var(--text-md);
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.article-back:hover {
  color: var(--pastel-pink);
}

.article-header {
  margin-bottom: 2rem;
}

.article-header-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.article-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.article-timestamp {
  color: var(--text-muted, #888);
  font-size: var(--text-sm);
  margin-top: 0.4rem;
  letter-spacing: 0.02em;
}

/* -- Table of Contents -- */

.article-toc {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  max-width: 720px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.article-toc-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-toc-item {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-md);
  padding: 0.3rem 0;
  transition: color 0.2s;
}

.article-toc-item:hover {
  color: var(--pastel-pink);
}

/* -- Article Sections -- */

.article-section {
  margin-top: 2rem;
}

.article-section-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pastel-pink);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 2rem;
}
.article-section:first-of-type .article-section-heading {
  margin-top: 0;
}

.article-paragraph {
  color: var(--text-primary);
  line-height: 1.85;
  margin-bottom: 1rem;
  font-size: 1rem;
  max-width: 720px;
}

/* -- Citation Toggle (Nav) -- */

.nav__citations-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: auto;
  white-space: nowrap;
}

.nav__citations-toggle:hover {
  border-color: var(--pastel-blue);
  color: var(--pastel-blue);
  background: var(--bg-card);
}

.nav__citations-toggle--on {
  border-color: var(--pastel-mint);
  color: var(--pastel-mint);
  background: rgba(152, 251, 152, 0.08);
}

.citations-toggle__icon {
  font-size: var(--text-md);
}

.citations-toggle__label {
  letter-spacing: 0.02em;
}

/* -- Theme Toggle -- */

.nav__theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 8px;
  flex-shrink: 0;
}

.nav__theme-toggle:hover {
  border-color: var(--pastel-yellow);
  color: var(--pastel-yellow);
  background: var(--bg-card);
}

.nav__theme-toggle:focus-visible {
  outline: 2px solid var(--pastel-pink);
  outline-offset: 2px;
}

/* -- Citation Badge (per article) -- */

.article-citation-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  width: fit-content;
}

.article-citation-badge:hover {
  border-color: var(--pastel-blue);
  color: var(--pastel-blue);
}

body.show-citations .article-citation-badge {
  border-color: var(--pastel-mint);
  color: var(--pastel-mint);
}

.citation-badge__icon {
  font-size: 1rem;
}

/* -- Sources (hidden by default, shown with toggle) -- */

.article-section--sources {
  border-top: 1px solid var(--border-subtle);
  margin-top: 16px;
  padding-top: 24px;
  display: none;
  animation: fadeInSources 0.3s ease;
}

body.show-citations .article-section--sources {
  display: block;
}

@keyframes fadeInSources {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.article-sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.article-source-link {
  color: var(--text-secondary);
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: var(--text-md);
  transition: background 0.2s, color 0.2s;
}

.article-source-link:hover {
  background: var(--bg-card-hover);
  color: var(--pastel-peach);
}

.article-source-domain {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-left: auto;
}

/* -- Article Layout with Sidebar -- */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
}

/* -- Quick Facts Sidebar -- */

.quick-facts {
  position: sticky;
  top: 84px;
  background: var(--bg-card);
  border-radius: 14px;
  padding: 1.5rem;
  height: fit-content;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.quick-facts__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.quick-facts__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.quick-facts__row:last-child {
  border-bottom: none;
}

.quick-facts__label {
  color: var(--text-muted);
  font-size: var(--text-md);
  flex-shrink: 0;
}

.quick-facts__value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: var(--text-md);
  text-align: right;
}

.quick-facts__value--highlight {
  color: var(--pastel-pink);
}

.quick-facts__link {
  color: var(--pastel-blue);
  text-decoration: none;
  font-size: var(--text-md);
  transition: color 0.2s;
}

.quick-facts__link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.quick-facts__row--meta {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-facts__value--meta {
  font-size: var(--text-sm);
  opacity: 0.5;
}

/* -- TL;DR Box -- */

.tldr-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 2px solid var(--pastel-pink);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.tldr-box__header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.tldr-box__label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--pastel-pink);
}

.tldr-box__summary {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.tldr-box__bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem 0;
}

.tldr-box__bullet {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.55;
  margin-bottom: 0.45rem;
}

.tldr-box__bullet:last-child {
  margin-bottom: 0;
}

.tldr-box__bullet::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pastel-pink);
  opacity: 0.7;
}

.tldr-box__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tldr-box__chip {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  white-space: nowrap;
}

.tldr-box__chip--quality {
  color: var(--pastel-pink);
  background: rgba(242, 160, 184, 0.1);
}

.tldr-box__chip--status {
  color: var(--pastel-green, #a8d8a8);
  background: rgba(168, 216, 168, 0.1);
}

/* ---------- Limited Sources Callout Box ---------- */

.limited-sources-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--pastel-peach-dim);
  border: 1px solid rgba(240, 192, 144, 0.18);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.limited-sources-box__icon {
  font-size: 1.25rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.limited-sources-box__text {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.55;
  margin: 0;
}

/* ==========================================================================
   8. GLOSSARY
   ========================================================================== */

.glossary-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 2rem 3rem;
}

.glossary-search-wrap,
.guides-search-wrap,
.industry-search-wrap {
  margin-bottom: 1.5rem;
}

.guides-search-count {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 0.75rem;
}

.glossary-search,
.guides-search,
.industry-search {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.2s;
}

.glossary-search::placeholder {
  color: var(--text-muted);
}

.glossary-search:focus,
.guides-search:focus,
.industry-search:focus {
  border-color: var(--pastel-pink);
}

.glossary-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.glossary-jump-link {
  color: var(--pastel-lavender);
  font-size: var(--text-sm);
  font-family: var(--font-display);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.glossary-jump-link:hover {
  background: var(--bg-hover);
}

.glossary-category {
  margin-bottom: 24px;
  scroll-margin-top: 1rem;
}

.glossary-category-title {
  font-family: var(--font-display);
  color: var(--pastel-lavender);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.glossary-term {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 8px;
}

.glossary-term-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.glossary-word {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 1rem;
}

.glossary-romaji {
  font-family: var(--font-jp);
  color: var(--text-jp);
  font-size: var(--text-sm);
}

.glossary-def {
  color: var(--text-primary);
  font-size: var(--text-md);
  line-height: 1.7;
  max-width: 720px;
}

/* ==========================================================================
   9. MAKERS GUIDE VIEW
   ========================================================================== */

.makers-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 2rem 3rem;
}

/* -- Makers Sidebar+Detail Layout -- */

.makers-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
}

.makers-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 10px;
  padding: 12px;
  overflow-y: auto;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.makers-sidebar .makers-search-wrap {
  margin-bottom: 8px;
  flex-shrink: 0;
}

.makers-sidebar .search-wrapper {
  position: relative;
}

.makers-sidebar .makers-search {
  width: 100%;
  font-size: var(--text-md);
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  outline: none;
  box-sizing: border-box;
}

.makers-sidebar .makers-search:focus {
  border-color: var(--pastel-lavender);
}

.makers-search-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: 0 4px 6px;
  flex-shrink: 0;
}

.makers-sidebar-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.makers-sidebar-list::-webkit-scrollbar {
  width: 4px;
}

.makers-sidebar-list::-webkit-scrollbar-track {
  background: transparent;
}

.makers-sidebar-list::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.makers-sidebar-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.makers-sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.3;
}

.makers-sidebar-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.makers-sidebar-item--active {
  background: rgba(242, 160, 184, 0.12);
  color: var(--text-primary);
  font-weight: 600;
}

.makers-sidebar-item--defunct .makers-sidebar-name {
  text-decoration: line-through;
  opacity: 0.7;
}

.makers-sidebar-item--absorbed .makers-sidebar-name {
  opacity: 0.7;
}

.makers-sidebar-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.makers-sidebar-badge {
  font-size: var(--text-xs);
  flex-shrink: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.makers-sidebar-empty {
  font-size: var(--text-md);
  color: var(--text-muted);
  padding: 12px 4px;
  text-align: center;
}

/* -- Makers Detail Panel -- */

.makers-detail {
  min-height: 400px;
  overflow-y: auto;
}

.makers-detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.makers-detail-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 72ch;
}

.makers-detail-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--text-muted);
  font-size: var(--text-md);
}

/* -- Makers Profile Card (consolidated metadata) -- */

.makers-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.makers-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px 24px;
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.makers-profile-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 0;
}

.makers-profile-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.makers-profile-value {
  font-size: var(--text-md);
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.45;
}

.makers-profile-value--highlight {
  color: var(--pastel-lavender);
  cursor: help;
  border-bottom: 1px dotted var(--pastel-lavender);
  width: fit-content;
}

.makers-profile-value--muted {
  color: var(--text-muted);
}

.makers-qf-link {
  color: var(--pastel-blue);
  text-decoration: none;
  font-size: var(--text-md);
}

.makers-qf-link:hover {
  text-decoration: underline;
}

/* Profile card inner sections */
.makers-profile-section {
  padding-top: 14px;
  margin-top: 6px;
}

.makers-profile-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.makers-profile-section-label {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-jp);
  font-family: var(--font-display);
  margin-bottom: 6px;
  font-weight: 600;
}

.makers-profile-section-text {
  font-size: var(--text-md);
  color: var(--text-primary);
  line-height: 1.7;
  margin: 0;
  max-width: 720px;
}

.makers-profile-note {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 6px;
}

.makers-profile-note:last-child {
  margin-bottom: 0;
}

.makers-profile-note-key {
  color: var(--text-muted);
  font-weight: 500;
}

/* -- Detail Panel Headings -- */

.makers-detail-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

/* -- Fun Facts Card -- */

.makers-fun-facts-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-top: 2rem;
}

.makers-fun-facts-card .makers-detail-heading {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

/* -- Article TOC in makers detail -- */

.makers-article-toc {
  margin-top: 2rem;
}

/* Scroll target for maker article sections */
[id^="maker-sec-"] {
  scroll-margin-top: 80px;
}

.makers-view-header {
  margin-bottom: 2rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.makers-view-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.makers-view-subtitle {
  color: var(--text-jp);
  font-size: var(--text-md);
  font-family: var(--font-jp);
}

/* -- Quality Category Legend -- */
.quality-legend {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}
.quality-legend__toggle {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--pastel-lavender);
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
  font-weight: 600;
}
.quality-legend__toggle::-webkit-details-marker {
  display: none;
}
.quality-legend__toggle::before {
  content: "\25B6";
  display: inline-block;
  margin-right: 0.5rem;
  font-size: var(--text-sm);
  transition: transform 0.2s;
}
.quality-legend[open] .quality-legend__toggle::before {
  transform: rotate(90deg);
}
.quality-legend__body {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-top: 0.75rem;
}
.quality-legend__intro {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 720px;
}
.quality-legend__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.quality-legend__group-title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--pastel-pink);
  margin-bottom: 0.6rem;
}
.quality-legend__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.5rem;
}
.quality-legend__name {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}
.quality-legend__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}

/* -- Makers TOC -- */

.makers-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  background: var(--bg-secondary);
  padding: 12px;
  border-radius: 10px;
}

.makers-toc-item {
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}

.makers-toc-item:hover {
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.makers-toc-item--defunct {
  color: var(--text-muted);
  text-decoration: line-through;
  opacity: 0.65;
}

.makers-toc-count {
  font-family: var(--font-mono);
  color: var(--text-jp);
}

.makers-toc-divider {
  color: var(--text-jp);
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  padding: 0 4px;
}

[id^="sec-"] {
  scroll-margin-top: 80px;
}

/* -- Maker Card Accordion -- */

.maker-card--accordion {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.25s;
  scroll-margin-top: 80px;
}

.maker-card--expanded {
  border-color: var(--pastel-lavender-dim);
}

.maker-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s;
}

.maker-card-header:hover {
  background: var(--bg-card-hover);
}

.maker-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.maker-chevron {
  color: var(--text-muted);
  font-size: var(--text-md);
  transition: transform 0.25s;
  flex-shrink: 0;
}

.maker-card--expanded .maker-chevron {
  transform: rotate(90deg);
}

.maker-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.maker-snippet {
  color: var(--text-muted);
  font-size: var(--text-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.maker-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.maker-status {
  font-size: var(--text-xs);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  font-weight: 600;
}

.maker-status--active {
  color: var(--pastel-mint);
  background: var(--pastel-mint-dim);
}

.maker-status--defunct {
  color: var(--pastel-peach);
  background: var(--pastel-peach-dim);
}

.maker-status--absorbed {
  color: var(--pastel-yellow);
  background: var(--pastel-yellow-dim);
}

.maker-quality-tag {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* -- Makers Search -- */

.makers-search-wrap {
  margin-bottom: 1rem;
}

.makers-search {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  outline: none;
  transition: border-color 0.2s;
}

.makers-search::placeholder {
  color: var(--text-muted);
}

.makers-search:focus {
  border-color: var(--pastel-pink);
}

.makers-search-count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

/* -- Maker Card Body -- */

.maker-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.maker-summary {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  max-width: 720px;
}

.maker-debut {
  background: var(--pastel-blue-dim);
  border-bottom: 2px solid var(--pastel-blue);
  font-size: var(--text-md);
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  border-radius: 8px 8px 0 0;
  margin-bottom: 1.25rem;
}

.maker-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 1rem;
}

.maker-section-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--text-jp);
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}

.maker-details-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 24px;
}

.maker-detail-key {
  color: var(--text-muted);
  font-size: var(--text-md);
  white-space: nowrap;
  padding-top: 1px;
}

.maker-detail-val {
  color: var(--text-primary);
  font-size: var(--text-md);
  line-height: 1.5;
}

.maker-collector-notes {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.65;
  max-width: 720px;
}

.maker-label {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 0.25rem;
}

/* -- Product Lines inside expanded maker card -- */
.maker-product-lines {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.maker-pl-item {
  background: var(--bg-secondary);
  border-left: 3px solid;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
}

.maker-pl-badge {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  margin-bottom: 0.1rem;
}

.maker-pl-name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.maker-pl-brief {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.maker-lines-text {
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  max-width: 720px;
}

.maker-fun-facts {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--text-primary);
  font-size: var(--text-md);
  line-height: 1.7;
  max-width: 720px;
}

.maker-fun-facts li {
  margin-bottom: 0.5rem;
}

.maker-article-link {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.maker-read-more {
  color: var(--pastel-pink);
  font-size: var(--text-md);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.maker-read-more:hover {
  color: var(--text-primary);
}

/* Inline article sections inside maker accordion */
.maker-article-sections {
  margin-top: 0.5rem;
}

.maker-article-sec {
  margin-bottom: 1.25rem;
}

.maker-article-sec-heading {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

.maker-article-para {
  font-size: var(--text-md);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
  max-width: 72ch;
  word-wrap: break-word;
}

.maker-article-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--pastel-pink);
  font-size: var(--text-sm);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background 0.2s, color 0.2s;
}

.maker-article-toggle:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.maker-article-sources-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
}

.articles-note {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-top: 2rem;
  text-align: center;
}

.articles-note a {
  color: var(--pastel-pink);
  text-decoration: none;
  cursor: pointer;
}

.articles-note a:hover {
  color: var(--text-primary);
}

.maker-note-row {
  display: flex;
  gap: 0.75rem;
  font-size: var(--text-md);
  margin-bottom: 0.65rem;
  line-height: 1.55;
}

.maker-note-row strong {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 80px;
  flex-shrink: 0;
}

.maker-debut-label {
  color: var(--text-muted);
  font-weight: 400;
}

.maker-no-profile {
  color: var(--text-muted);
  font-size: var(--text-md);
  font-style: italic;
}

/* ==========================================================================
   10. INDUSTRY MAP VIEW
   ========================================================================== */

.map-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 2rem 3rem;
}

.map-header {
  margin-bottom: 2rem;
}

.map-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.map-subtitle {
  color: var(--text-jp);
  font-size: var(--text-md);
  font-family: var(--font-jp);
}

/* -- Legend -- */

.map-legend {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.map-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-dot--active {
  background: var(--pastel-mint);
}

.map-dot--defunct {
  background: var(--pastel-peach);
}

/* -- Map Groups -- */

.map-group {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.map-group-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* -- Tree Layout -- */

.map-tree {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.map-node {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.map-node--parent {
  padding: 0.85rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
}

.map-node--holding {
  background: var(--bg-secondary);
  cursor: default;
}

.map-node--child {
  padding: 0.5rem 0.85rem;
  font-size: var(--text-md);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.map-node--defunct {
  opacity: 0.5;
  text-decoration: line-through;
}

.map-node[data-action]:hover {
  color: var(--text-primary);
}

.map-connector {
  border-left: 2px solid var(--border-accent);
  margin-left: 1.5rem;
  padding-left: 1rem;
}

.map-rail {
  border-left: 2px solid var(--border-accent);
  margin-left: 1.5rem;
  padding-left: 0;
}

.map-child-line {
  border-top: 2px solid var(--border-accent);
  width: 1rem;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.map-children {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: 2.5rem;
  padding-top: 0.5rem;
}

.map-child-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.map-node-name {
  color: var(--text-primary);
  font-size: var(--text-md);
}

.map-node-role {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* -- Indie Grid -- */

.map-indie-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.map-indie-node {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: var(--text-md);
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.map-indie-node:hover {
  color: var(--text-primary);
}

.map-indie-node--defunct {
  text-decoration: line-through;
  opacity: 0.5;
}

/* ==========================================================================
   11. INDUSTRY STATS
   ========================================================================== */

.industry-stats {
  margin-top: 3rem;
}

.industry-stats__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  margin-bottom: 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

/* Industry Overview Article */
.industry-article {
  margin-top: 3rem;
}

.industry-article__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
  margin-bottom: 0.5rem;
}

.industry-article__date {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-style: italic;
}

.industry-article__section {
  margin-bottom: 2.5rem;
}

.industry-article__heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.industry-article__text {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  max-width: 72ch;
}

.industry-article__list {
  font-size: var(--text-md);
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0.75rem 0 1.25rem 1.5rem;
  max-width: 72ch;
}

.industry-article__list li {
  margin-bottom: 0.4rem;
}

.industry-article__table-note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.industry-article .stat-table {
  margin: 1rem 0 0.25rem;
  max-width: 680px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}

.stat-card--wide {
  grid-column: 1 / -1;
}

.stat-card__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.stat-card__subtitle {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 0.5rem;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--pastel-lavender);
  margin-bottom: 0.75rem;
}

/* -- Stat Bars -- */

.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.stat-bar-row:last-child {
  margin-bottom: 0;
}

.stat-bar-label {
  color: var(--text-muted);
  font-size: var(--text-sm);
  min-width: 80px;
  flex-shrink: 0;
}

.stat-bar-track {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
  background: var(--pastel-blue);
}

.stat-bar-fill--pink {
  background: var(--pastel-pink);
}

.stat-bar-fill--blue {
  background: var(--pastel-blue);
}

.stat-bar-fill--lavender {
  background: var(--pastel-lavender);
}

.stat-bar-fill--mint {
  background: var(--pastel-mint);
}

.stat-bar-fill--peach {
  background: var(--pastel-peach);
}

.stat-bar-fill--yellow {
  background: var(--pastel-yellow);
}

.stat-trend--dominant { background: var(--pastel-pink); }
.stat-trend--growing { background: var(--pastel-mint); }
.stat-trend--stable { background: var(--pastel-blue); }
.stat-trend--declining { background: var(--pastel-peach); }

.stat-bar-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* -- Stat Table -- */

.stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-md);
}

.stat-table th {
  text-align: left;
  padding: 0.5rem 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  border-bottom: 1px solid var(--border-accent);
  font-size: var(--text-sm);
}

.stat-table td {
  padding: 0.45rem 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.stat-table tbody tr:last-child td {
  border-bottom: none;
}

.stat-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* -- Stat List -- */

.stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stat-list-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-md);
}

.stat-list-item:last-child {
  border-bottom: none;
}

.stat-list-item--driver {
  display: list-item;
  list-style: disc inside;
  color: var(--text-secondary);
}

.stat-list-label {
  color: var(--text-muted);
  font-size: var(--text-md);
}

.stat-list-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: var(--text-md);
  text-align: right;
}

/* -- Stat Pulse List -- */

.stat-pulse-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stat-pulse-item {
  padding: 0.35rem 0;
  padding-left: 1rem;
  position: relative;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.5;
  border-bottom: 1px solid var(--border-subtle);
}

.stat-pulse-item:last-child {
  border-bottom: none;
}

.stat-pulse-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 5px;
  height: 5px;
  background: var(--pastel-mint);
  border-radius: 50%;
}

/* -- Stat Card Meta -- */

.stat-card__note {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-style: italic;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-card__source {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 0.75rem;
}

.stat-card__trend {
  color: var(--text-secondary);
  font-size: var(--text-md);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-card__date {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 0.75rem;
}

/* -- Industry Sources -- */

.industry-sources {
  margin-top: 1rem;
  padding-bottom: 2rem;
}

.industry-sources__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.industry-sources__note {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.industry-sources__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1.5rem;
}

.industry-sources__item {
  font-size: var(--text-sm);
  line-height: 1.4;
  padding: 0.3rem 0;
}

.industry-sources__link {
  color: var(--pastel-blue);
  text-decoration: none;
}

.industry-sources__link:hover {
  text-decoration: underline;
}

.industry-sources__scope {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .industry-sources__list {
    grid-template-columns: 1fr;
  }
}

/* -- Tier Badges -- */

.tier-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* Card badge tiers */
.tier-badge--premium { background: var(--pastel-pink-dim); color: var(--pastel-pink); }
.tier-badge--mid { background: var(--pastel-blue-dim); color: var(--pastel-blue); }
.tier-badge--budget { background: var(--pastel-peach-dim); color: var(--pastel-peach); }
.tier-badge--entry { background: var(--pastel-mint-dim); color: var(--pastel-mint); }
/* Industry stats tiers (makerPresence data) */
.tier-badge--dominant { background: var(--pastel-pink-dim); color: var(--pastel-pink); }
.tier-badge--major { background: var(--pastel-blue-dim); color: var(--pastel-blue); }
.tier-badge--rising { background: var(--pastel-mint-dim); color: var(--pastel-mint); }
.tier-badge--niche { background: var(--pastel-peach-dim); color: var(--pastel-peach); }

/* -- Section Divider -- */

.section-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 3rem 0;
}

/* ==========================================================================
   12. TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 280px;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(12px) translateX(12px);
  transition: opacity 0.3s, transform 0.3s;
}

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

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast-msg {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.4;
}

.toast--success {
  border-left: 3px solid var(--pastel-mint);
}

.toast--error {
  border-left: 3px solid var(--pastel-pink);
}

.toast--info {
  border-left: 3px solid var(--pastel-blue);
}

.toast--warning {
  border-left: 3px solid var(--pastel-peach);
}

/* ==========================================================================
   13. PRODUCT LINE DISCOVERY
   ========================================================================== */

/* Search result cards (Encyclopedia view) */
.product-line-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.product-line-card:hover,
.product-line-card:focus-visible {
  background: var(--bg-card-hover);
  outline: none;
}

.product-line-card__badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  margin-bottom: 0.3rem;
}

.product-line-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.product-line-card__brief {
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.product-line-card__maker {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Makers view - Product Lines chip section */
.product-lines-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.product-lines-intro {
  color: var(--text-muted);
  font-size: var(--text-md);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* -- Product Lines: Color Legend -- */
.pl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.pl-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.pl-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* -- Product Lines: Manufacturer Group Cards -- */
.pl-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1rem;
}

.pl-maker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
}

.pl-maker-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  list-style: none;
}

.pl-maker-card__header::-webkit-details-marker {
  display: none;
}

.pl-maker-card__header::after {
  content: '+';
  font-size: 1.1rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.pl-maker-card[open] > .pl-maker-card__header::after {
  content: '\2212';
}

.pl-maker-card__header:hover {
  background: var(--bg-card-hover);
}

.pl-maker-card__name {
  flex: 1;
}

.pl-maker-card__count {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 0.5rem;
}

/* -- Product Line Items Inside Cards -- */
.pl-maker-card__lines {
  padding: 0 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pl-line-item {
  display: block;
  text-align: left;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
}

.pl-line-item:hover,
.pl-line-item:focus-visible {
  border-left: 3px solid var(--accent);
  transform: translateX(2px);
  outline: none;
}

.pl-line-item__badge {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  margin-bottom: 0.15rem;
}

.pl-line-item__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.pl-line-item__brief {
  display: block;
  color: var(--text-muted);
  font-size: var(--text-md);
  line-height: 1.45;
}

@media (max-width: 600px) {
  .pl-groups {
    grid-template-columns: 1fr;
  }
  .pl-legend {
    gap: 0.6rem;
  }
  .pl-line-item__brief {
    font-size: var(--text-sm);
  }
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 2rem;
  margin-top: 4rem;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.footer__logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.footer__logo-en {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.footer__logo-accent {
  color: var(--pastel-pink);
  opacity: 0.7;
}

.footer__logo-jp {
  font-family: var(--font-jp);
  font-size: var(--text-xs);
  color: var(--text-jp);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__link {
  background: none;
  border: none;
  color: var(--pastel-pink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.footer__link:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__sep {
  color: var(--text-muted);
  opacity: 0.5;
  font-size: var(--text-sm);
}

.footer__bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1rem;
}

.footer__text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

.footer__text--small {
  font-size: var(--text-sm);
  margin-top: 0.35rem;
  opacity: 0.7;
}

.footer__about-link {
  background: none;
  border: none;
  color: var(--pastel-pink);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__about-link:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   14. ANIMATIONS
   ========================================================================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUpShort {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mfg-card {
}

/* ==========================================================================
   15. SCROLL-TO-TOP
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--pastel-pink);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 50;
}

.scroll-top-btn--visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-top-btn:hover {
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   16. SEARCH HIGHLIGHT
   ========================================================================== */

mark.search-highlight,
.search-highlight {
  background: var(--pastel-yellow-dim);
  color: var(--pastel-yellow);
  padding: 0.05em 0.25em;
  border-radius: 3px;
}

/* ==========================================================================
   16b. SEARCH WRAPPER & CLEAR BUTTON
   ========================================================================== */

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper input {
  flex: 1;
  padding-right: 2.2rem;
}

.search-clear {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: var(--text-md);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.search-clear:hover {
  background: var(--border-accent);
  color: var(--text-primary);
}

/* ==========================================================================
   16c. ARTICLE NAV (PREV / NEXT)
   ========================================================================== */

.article-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.article-nav__btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.25s ease, transform 0.2s ease;
  text-align: left;
}

.article-nav__btn--next {
  text-align: right;
}

.article-nav__btn:hover {
  background: rgba(242, 160, 184, 0.04);
  border-color: var(--border-accent);
}

.article-nav__dir {
  font-size: var(--text-sm);
  font-family: var(--font-mono);
  color: var(--pastel-pink);
}

.article-nav__title {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   16d. RELATED ARTICLES
   ========================================================================== */

.related-articles {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.related-articles__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.related-articles__card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  color: var(--text-primary);
}

.related-articles__card:hover {
  background: var(--bg-card-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-articles__name {
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-primary);
}

.related-articles__desc {
  font-size: var(--text-md);
  color: var(--text-secondary);
}

/* ==========================================================================
   17. CITATION DOTS & SOURCE FILTERS
   ========================================================================== */

/* Citation dot colors by scope */
.citation-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
}

.citation-dot--corporate { background: var(--pastel-pink); }
.citation-dot--product   { background: var(--pastel-peach); }
.citation-dot--community { background: var(--pastel-blue); }
.citation-dot--history   { background: var(--pastel-lavender); }
.citation-dot--news      { background: var(--pastel-mint); }
.citation-dot--market    { background: var(--pastel-yellow); }
.citation-dot--retail    { background: var(--pastel-peach); }
.citation-dot--verification { background: var(--text-muted); }
.citation-dot--etymology   { background: var(--pastel-lavender); }

/* Mini dots in the badge */
.citation-dot--mini {
  width: 5px;
  height: 5px;
  opacity: 0.5;
  transition: opacity 0.4s ease, box-shadow 0.4s ease;
}

/* When citations are on, dots glow */
body.show-citations .citation-dot--mini {
  opacity: 1;
}

body.show-citations .citation-dot--corporate.citation-dot--mini { box-shadow: 0 0 6px var(--pastel-pink); }
body.show-citations .citation-dot--community.citation-dot--mini { box-shadow: 0 0 6px var(--pastel-blue); }
body.show-citations .citation-dot--news.citation-dot--mini      { box-shadow: 0 0 6px var(--pastel-mint); }
body.show-citations .citation-dot--history.citation-dot--mini   { box-shadow: 0 0 6px var(--pastel-lavender); }
body.show-citations .citation-dot--product.citation-dot--mini   { box-shadow: 0 0 6px var(--pastel-peach); }
body.show-citations .citation-dot--market.citation-dot--mini    { box-shadow: 0 0 6px var(--pastel-yellow); }

/* ===== Inline Citation Orbs ===== */
.citation-orbs {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 8px;
  vertical-align: middle;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body.show-citations .citation-orbs {
  opacity: 1;
  pointer-events: auto;
}

.citation-orb {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, opacity 0.4s ease;
  transition-delay: calc(var(--orb-i, 0) * 40ms);
  opacity: 0;
}

body.show-citations .citation-orb {
  opacity: 1;
}

.citation-orb:hover {
  transform: scale(1.5);
}

.citation-orb--active {
  transform: scale(1.5);
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

.citation-orb--compact {
  width: 6px;
  height: 6px;
}

/* Inline paragraph orbs - sit at end of paragraph text */
.citation-para-orbs {
  display: inline;
  margin-left: 4px;
  white-space: nowrap;
}

.citation-orb--inline {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

/* Orb scope colors + glow */
.citation-orb--corporate { background: var(--pastel-pink); }
.citation-orb--product   { background: var(--pastel-peach); }
.citation-orb--community { background: var(--pastel-blue); }
.citation-orb--history   { background: var(--pastel-lavender); }
.citation-orb--news      { background: var(--pastel-mint); }
.citation-orb--market    { background: var(--pastel-yellow); }
.citation-orb--retail    { background: var(--pastel-peach); }
.citation-orb--verification { background: var(--text-muted); }
.citation-orb--etymology { background: var(--pastel-lavender); }

body.show-citations .citation-orb--corporate { box-shadow: 0 0 6px var(--pastel-pink); }
body.show-citations .citation-orb--product   { box-shadow: 0 0 6px var(--pastel-peach); }
body.show-citations .citation-orb--community { box-shadow: 0 0 6px var(--pastel-blue); }
body.show-citations .citation-orb--history   { box-shadow: 0 0 6px var(--pastel-lavender); }
body.show-citations .citation-orb--news      { box-shadow: 0 0 6px var(--pastel-mint); }
body.show-citations .citation-orb--market    { box-shadow: 0 0 6px var(--pastel-yellow); }
body.show-citations .citation-orb--retail    { box-shadow: 0 0 6px var(--pastel-peach); }
body.show-citations .citation-orb--verification { box-shadow: 0 0 6px var(--text-muted); }
body.show-citations .citation-orb--etymology { box-shadow: 0 0 6px var(--pastel-lavender); }

body.show-citations .citation-orb:hover {
  box-shadow: 0 0 12px currentColor;
}

/* Orb tooltip */
.citation-orb[data-tooltip] {
  position: relative;
}

.citation-orb[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 400;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 100;
}

.citation-orb[data-tooltip]:hover::after {
  opacity: 1;
}

/* Section badge */
.citation-section-badge {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.4s ease;
  vertical-align: middle;
}

body.show-citations .citation-section-badge {
  opacity: 1;
}

/* Section highlight when orb clicked (fallback for articles without paragraph maps) */
.article-section--highlighted .article-paragraph,
.article-section--highlighted .maker-article-para {
  background: rgba(242, 160, 184, 0.06);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: -6px;
  margin-right: -6px;
  transition: background 0.3s ease;
}

/* Paragraph-level highlight when orb clicked (granular) */
.article-paragraph--highlighted {
  background: rgba(242, 160, 184, 0.12);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: -6px;
  margin-right: -6px;
  box-shadow: inset 0 -2px 0 rgba(242, 160, 184, 0.4);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Citation popover */
.citation-popover {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 14px;
  z-index: 200;
  width: 260px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: fadeUpShort 0.15s ease-out;
}

.citation-popover__scope {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 6px;
  vertical-align: middle;
}

.citation-popover__label {
  font-size: var(--text-md);
  color: var(--text-primary);
  margin-top: 6px;
  line-height: 1.4;
}

.citation-popover__link {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--pastel-pink);
  text-decoration: none;
  margin-top: 4px;
}

.citation-popover__link:hover {
  color: var(--text-primary);
}

.citation-popover .citation-dot {
  vertical-align: middle;
}

.citation-badge__dots {
  display: flex;
  gap: 2px;
  align-items: center;
  margin-left: 8px;
  flex-wrap: wrap;
  max-width: 120px;
}

/* Source item dot alignment */
.article-source-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-source-item .citation-dot {
  margin-top: 1px;
}

/* Source filter buttons */
.sources-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.sources-filter__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.sources-filter__btn:hover {
  border-color: var(--pastel-blue);
  color: var(--text-secondary);
}

.sources-filter__btn--active {
  border-color: var(--pastel-pink);
  color: var(--pastel-pink);
  background: var(--pastel-pink-dim);
}

.sources-filter__count {
  opacity: 0.6;
  font-size: var(--text-sm);
}

/* ==========================================================================
   18. LUMI GLOW FORM (CSS-only placeholder)
   ========================================================================== */

/* Lumi glow - the animated pink orb */
@keyframes lumiPulse {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(242, 160, 184, 0.3), 0 0 16px 4px rgba(242, 160, 184, 0.1); }
  50%      { box-shadow: 0 0 12px 4px rgba(242, 160, 184, 0.5), 0 0 24px 8px rgba(242, 160, 184, 0.15); }
}

@keyframes lumiPulseActive {
  0%, 100% { box-shadow: 0 0 10px 3px rgba(242, 160, 184, 0.5), 0 0 20px 6px rgba(242, 160, 184, 0.2); }
  50%      { box-shadow: 0 0 16px 6px rgba(242, 160, 184, 0.7), 0 0 32px 10px rgba(242, 160, 184, 0.25); }
}

/* Glow in nav toggle */
.citations-toggle__lumi-glow {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pastel-pink);
  animation: lumiPulse 4s ease-in-out infinite;
  flex-shrink: 0;
}

.nav__citations-toggle--on .citations-toggle__lumi-glow {
  animation: lumiPulseActive 2s ease-in-out infinite;
}

/* Glow in article citation badge */
.citation-badge__lumi-glow {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pastel-pink);
  animation: lumiPulse 4s ease-in-out infinite;
  flex-shrink: 0;
}

body.show-citations .citation-badge__lumi-glow {
  animation: lumiPulseActive 2s ease-in-out infinite;
}

/* ==========================================================================
   19. ABOUT PAGE
   ========================================================================== */

.about-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 80px 24px 64px;
}

.about-hero {
  text-align: center;
  padding: 0 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.about-hero__lumi-glow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--pastel-pink);
  animation: lumiPulse 4s ease-in-out infinite;
}

.about-hero__title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.about-hero__subtitle {
  font-family: var(--font-jp);
  color: var(--text-jp);
  font-size: var(--text-md);
}

.about-section {
  margin-bottom: 48px;
}

.about-section--last {
  margin-bottom: 0;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
}

.about-section__heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pastel-pink);
  margin-bottom: 16px;
}

.about-section__text {
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 12px;
  max-width: 720px;
}

.about-section__text strong {
  color: var(--text-primary);
}

.about-section__text--small {
  font-size: var(--text-md);
  color: var(--text-muted);
}

.about-section__text--credits {
  font-style: italic;
}

.about-email-link {
  color: var(--pastel-pink);
  text-decoration: underline;
}

/* Principle callout */
.about-principle {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--pastel-pink-dim);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.about-principle__text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  font-style: italic;
}

/* Lumi showcase placeholder */
.about-lumi-showcase {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}

.about-lumi__glow-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--pastel-pink);
  animation: lumiPulse 4s ease-in-out infinite;
  cursor: default;
}

/* Methodology steps */
.about-methodology {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.about-method-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
}

.about-method-step__number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pastel-pink-dim);
  color: var(--pastel-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  flex-shrink: 0;
}

.about-method-step__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: var(--text-md);
}

.about-method-step__content p {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Citation types legend */
.about-citation-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.about-citation-type {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.about-citation-type .citation-dot {
  width: 10px;
  height: 10px;
}

.about-citation-type__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-citation-type__info strong {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.about-citation-type__desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.about-citation-count {
  margin-top: 16px;
  text-align: center;
}

/* ==========================================================================
   16f. SOURCES & REFERENCES PAGE
   ========================================================================== */

.sources-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 80px 24px 64px;
}

/* Legend */
.sources-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 12px 0;
}

.sources-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sources-legend__item .citation-dot {
  width: 10px;
  height: 10px;
}

.sources-legend__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Stats */
.sources-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.sources-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 12px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.sources-stat__number {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sources-stat__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

/* Controls: search + filter */
.sources-controls {
  margin-bottom: 32px;
}

.sources-search {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--text-md);
  font-family: var(--font-body);
  outline: none;
  margin-bottom: 12px;
}

.sources-search:focus {
  border-color: var(--pastel-pink);
  box-shadow: 0 0 0 2px var(--pastel-pink-dim);
}

.sources-search::placeholder {
  color: var(--text-muted);
}

.sources-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sources-filter__btn {
  padding: 5px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sources-filter__btn:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.sources-filter__btn--active {
  background: var(--pastel-pink-dim);
  color: var(--pastel-pink);
  border-color: var(--pastel-pink);
}

/* Source groups (accordion) */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sources-group {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-card);
}

.sources-group__header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.sources-group__header:hover {
  background: var(--bg-elevated);
}

.sources-group__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  margin: 0;
}

.sources-group__count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  white-space: nowrap;
}

.sources-group__chevron {
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.sources-group__chevron--open {
  transform: rotate(180deg);
}

.sources-group__body {
  padding: 0 16px 12px;
}

.sources-group__body--collapsed {
  display: none;
}

/* Individual source entries */
.sources-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border-subtle);
}

.sources-entry:first-child {
  border-top: none;
}

.sources-entry .citation-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex-shrink: 0;
}

.sources-entry__info {
  flex: 1;
  min-width: 0;
}

.sources-entry__link {
  font-size: var(--text-md);
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  word-break: break-word;
}

.sources-entry__link:hover {
  color: var(--pastel-pink);
  text-decoration: underline;
}

.sources-entry__used {
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.sources-entry__scope {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Divider between manufacturer and general sources */
.sources-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0 12px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-family: var(--font-display);
  font-weight: 600;
}

.sources-divider::before,
.sources-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ==========================================================================
   16e. REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   17. RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {

  .page-title {
    font-size: 1.5rem;
  }

  .makers-view-title {
    font-size: 1.5rem;
  }

  .map-title {
    font-size: 1.5rem;
  }

  .article-section-heading {
    font-size: 1.1rem;
  }

  .about-section__heading {
    font-size: 1.1rem;
  }

  .makers-detail-heading {
    font-size: 1.1rem;
  }

  .industry-stats__title {
    font-size: 1.15rem;
  }

  .glossary-category-title {
    font-size: 1rem;
  }

  .related-articles__title {
    font-size: 1rem;
  }

  .industry-sources__title {
    font-size: 1rem;
  }

  /* Nav */
  .nav {
    padding: 0 1rem;
  }

  .nav__burger {
    display: flex;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 0.5rem 1rem;
  }

  .nav--open .nav__links {
    display: flex;
  }

  .nav--open .nav__burger span:nth-child(1) {
    transform: rotate(45deg) translate(3.5px, 3.5px);
  }

  .nav--open .nav__burger span:nth-child(2) {
    opacity: 0;
  }

  .nav--open .nav__burger span:nth-child(3) {
    transform: rotate(-45deg) translate(3.5px, -3.5px);
  }

  .nav__link {
    padding: 0.75rem 0.5rem;
    min-height: 44px;
    font-size: var(--text-md);
  }

  .nav__logo-jp {
    display: none;
  }

  .citations-toggle__label {
    display: none;
  }

  .nav__citations-toggle--on .citations-toggle__label {
    display: inline;
  }

  /* Hero */
  .hero {
    padding: 2.5rem 1.25rem 1.5rem;
  }

  .hero__title {
    font-size: 2rem;
  }

  .hero__desc {
    font-size: var(--text-md);
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn-primary,
  .hero__actions .btn-secondary {
    justify-content: center;
  }

  /* Start Here mobile */
  .start-here__grid {
    grid-template-columns: 1fr;
  }

  .start-here {
    padding: 0 1.25rem;
  }

  /* Nav search: ensure 44px touch target on mobile */
  .nav__search-btn {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Nav citations: hide on mobile to declutter nav bar */
  .nav__citations-toggle {
    display: none;
  }

  /* Content sections */
  .content {
    padding: 72px 1rem 2rem;
  }

  .library-content {
    padding: 72px 1rem 2rem;
  }

  .glossary-content {
    padding: 72px 1rem 2rem;
  }

  .makers-content {
    padding: 72px 1rem 2rem;
  }

  .map-content {
    padding: 72px 1rem 2rem;
  }

  .article-content {
    padding: 72px 1rem 2rem;
  }

  /* Widget cluster mobile */
  .home-widgets__grid {
    grid-template-columns: 1fr;
  }

  .home-discover__ticker {
    grid-template-columns: 1fr 1fr;
  }

  .home-widget__pulse-stats {
    gap: 1rem;
  }

  .section-header__actions {
    flex-wrap: wrap;
  }

  /* Grids */
  .mfg-grid {
    grid-template-columns: 1fr;
  }

  .article-grid > * {
    flex: 0 1 100%;
  }

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

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

  .stat-card {
    overflow-x: auto;
  }

  /* Intro */
  .intro-inner {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .intro-block {
    padding: 0 1rem;
  }

  /* Article layout */
  .article-layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem 2rem;
    gap: 1.5rem;
  }

  .quick-facts {
    position: static;
  }

  /* Maker sidebar layout - mobile */
  .makers-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .makers-sidebar {
    position: static;
    max-height: none;
    border-radius: 10px;
    margin-bottom: 1.5rem;
  }

  .makers-sidebar-list {
    max-height: 200px;
    overflow-y: auto;
  }

  .makers-profile-grid {
    grid-template-columns: 1fr 1fr;
  }

  .makers-profile-card {
    padding: 1rem;
  }

  /* Legacy maker styles (kept for compatibility) */
  .maker-two-col {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .maker-snippet {
    display: none;
  }

  .maker-quality-tag {
    display: none;
  }

  .maker-card-header {
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    padding: 0.85rem 1rem;
  }

  .maker-header-left {
    flex-shrink: 0;
    gap: 0.5rem;
  }

  .maker-meta {
    flex-shrink: 1;
    min-width: 0;
  }

  .maker-status {
    font-size: var(--text-xs);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Map */
  .map-children {
    flex-wrap: wrap;
    margin-left: 1.5rem;
  }

  /* Comparison */
  .comparison-cat {
    display: none;
  }

  /* Section header */
  .section-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Stat row */
  .stat-row {
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  /* Library tabs */
  .library-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .library-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Makers TOC */
  .makers-toc {
    max-height: 200px;
    overflow-y: auto;
  }

  /* Footer */
  .footer__top {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .footer__bottom {
    text-align: center;
  }

  /* Toast */
  .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }

  /* Touch targets - ensure 44px minimum for mobile tappability */
  .article-toc-item {
    padding: 0.5rem 0;
  }

  .makers-toc-item {
    padding: 6px 12px;
    font-size: var(--text-sm);
  }

  .home-widget__link,
  .home-widget__link--blue,
  .home-widget__link--mint,
  .home-widget__link--lavender {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .home-widget__event-link {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .btn-shuffle {
    width: 44px;
    height: 44px;
  }

  .footer__link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Article nav */
  .article-nav {
    flex-direction: column;
  }

  /* Related articles */
  .related-articles__grid {
    grid-template-columns: 1fr;
  }

  /* About page responsive */
  .about-citation-types {
    grid-template-columns: 1fr;
  }

  .about-hero__title {
    font-size: 1.6rem;
  }

  .sources-content {
    padding: 80px 16px 48px;
  }

  .sources-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .sources-stat__number {
    font-size: 1.3rem;
  }

  .sources-filter {
    gap: 4px;
  }

  .sources-filter__btn {
    font-size: var(--text-sm);
    padding: 3px 8px;
    min-height: 44px;
  }

  .nav__theme-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .search-clear {
    min-width: 44px;
    min-height: 44px;
  }

  .glossary-jump-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
  }

  .sources-entry__scope {
    display: none;
  }
}

/* ==========================================================================
   TIMELINE VIEW
   ========================================================================== */

.timeline-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 1.5rem 4rem;
}

/* Header */
.timeline-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-subtitle {
  font-size: var(--text-md);
  color: var(--text-jp);
  font-family: var(--font-jp);
}

/* Intro text */
.timeline-intro {
  max-width: 620px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.timeline-intro-lead {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.timeline-intro-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* Event density mini-chart */
.timeline-density {
  margin-bottom: 0.75rem;
  padding: 0 1.5rem;
}

.timeline-density-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 36px;
}

.timeline-density-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.timeline-density-bar {
  width: 100%;
  min-height: 3px;
  background: var(--pastel-blue);
  opacity: 0.4;
  border-radius: 2px 2px 0 0;
  transition: opacity 0.2s ease;
}

.timeline-density-col {
  cursor: pointer;
}

.timeline-density-col:hover .timeline-density-bar {
  opacity: 0.8;
}

.timeline-density-count {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  opacity: 0;
  margin-top: 1px;
  transition: opacity 0.2s ease;
}

.timeline-density-col:hover .timeline-density-count {
  opacity: 1;
}

.timeline-density-col:hover .timeline-density-label {
  display: none;
}

.timeline-density-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* Controls - sticky bar */
.timeline-controls {
  position: sticky;
  top: 60px;
  z-index: 50;
  background: var(--bg-primary);
  padding: 0.5rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.timeline-era-jumps {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.timeline-controls-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.timeline-search-wrap {
  position: relative;
  flex-shrink: 0;
}

.timeline-search-wrap--full {
  margin-bottom: 0.6rem;
}

.timeline-search {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-md);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  min-height: 44px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s ease;
}

.timeline-search:focus {
  border-color: var(--pastel-blue);
  box-shadow: 0 0 0 2px var(--pastel-blue-dim, rgba(142, 200, 232, 0.15));
}

.timeline-search::placeholder {
  color: var(--text-muted);
}

.timeline-search-count {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--text-xs);
  color: var(--text-muted);
  pointer-events: none;
}

.timeline-search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.timeline-search-clear--hidden {
  display: none;
}

.timeline-search-clear:hover {
  color: var(--pastel-pink);
}

.timeline-era-jump {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-height: 44px;
  justify-content: center;
}

.era-jump-name {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
}

.era-jump-years {
  font-size: var(--text-xs);
  opacity: 0.6;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.timeline-era-jump:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--era-color);
}

.timeline-era-jump--active {
  background: var(--bg-card-hover);
  border-color: var(--era-color);
  color: var(--era-color);
  box-shadow: 0 0 8px rgba(142, 200, 232, 0.15);
}

.timeline-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.timeline-filter {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: capitalize;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.timeline-filter:hover {
  border-color: var(--filter-color);
  color: var(--filter-color);
}

.timeline-filter--active {
  background: var(--filter-color);
  border-color: var(--filter-color);
  color: var(--bg-primary);
  font-weight: 500;
}

/* Timeline body - spine */
.timeline-body {
  position: relative;
  padding: 1.5rem 0 3rem;
}

.timeline-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-accent);
  transform: translateX(-50%);
}

/* Era sections */
.timeline-era {
  position: relative;
  margin-bottom: 2.5rem;
  scroll-margin-top: 140px;
}

.timeline-era-header {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  margin-bottom: 2.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 540px;
  position: relative;
  z-index: 2;
  background: var(--bg-primary);
}

.timeline-era-header::before {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--era-color);
  margin: 0 auto 1rem;
  border-radius: 2px;
  opacity: 0.6;
}

.timeline-era-label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--era-color);
}

.timeline-era-label-jp {
  display: block;
  font-family: var(--font-jp);
  font-size: var(--text-md);
  color: var(--text-jp);
  margin-top: 0.3rem;
}

.timeline-era-range {
  display: block;
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
}

.timeline-era-desc {
  font-size: var(--text-md);
  color: var(--text-secondary);
  margin-top: 0.6rem;
  font-style: italic;
}

/* Filter count badges */
.timeline-filter-count {
  font-size: var(--text-xs);
  opacity: 0.7;
  margin-left: 0.15rem;
}

.timeline-filter--active .timeline-filter-count {
  opacity: 0.9;
}

/* Era event count */
.timeline-era-count {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 400;
  opacity: 0.7;
}

/* Era collapse/expand toggle */
.timeline-era-header {
  cursor: pointer;
}
.timeline-era-toggle {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 0.5rem;
  opacity: 0.5;
  transition: transform 0.2s ease;
}
.timeline-era--collapsed .timeline-era-toggle {
  transform: rotate(-90deg);
}
.timeline-era--collapsed .timeline-event,
.timeline-era--collapsed .timeline-decade-marker,
.timeline-era--collapsed .timeline-spine {
  display: none;
}

/* Decade markers on the spine */
.timeline-decade-marker {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  z-index: 2;
}

.timeline-decade-marker span {
  background: var(--bg-primary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  letter-spacing: 0.02em;
}

/* Event cards */
.timeline-event {
  position: relative;
  display: flex;
  align-items: flex-start;
  margin-bottom: 2.75rem;
  opacity: 1;
  transform: translateY(0);
}

/* Scroll-triggered subtle entrance - cards always visible, no blank gaps */
.timeline-event .timeline-card {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.4s ease;
}

.timeline-event--seen .timeline-card {
  animation: timeline-card-enter 0.4s ease both;
  animation-delay: calc(var(--stagger, 0) * 0.04s);
}

@keyframes timeline-card-enter {
  from {
    transform: translateY(8px);
    opacity: 0.7;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.timeline-event--hidden {
  display: none !important;
}

/* Left card: card on left, dot in middle */
.timeline-event--left {
  flex-direction: row;
  padding-right: calc(50% + 24px);
  justify-content: flex-end;
}

/* Right card: dot in middle, card on right */
.timeline-event--right {
  flex-direction: row-reverse;
  padding-left: calc(50% + 24px);
  justify-content: flex-end;
}

/* Horizontal connector line from card to spine dot */
.timeline-connector {
  position: absolute;
  top: 18px;
  height: 2px;
  background: var(--border-accent);
  z-index: 1;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.timeline-event--left .timeline-connector {
  right: calc(50% - 7px);
  left: auto;
  width: 24px;
}

.timeline-event--right .timeline-connector {
  left: calc(50% + 7px);
  right: auto;
  width: 24px;
}

.timeline-event:hover .timeline-connector {
  opacity: 1;
}

/* The dot on the spine */
.timeline-dot {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dot-color);
  transform: translateX(-50%);
  border: 2px solid var(--bg-primary);
  z-index: 3;
  box-shadow: 0 0 0 2px var(--border-subtle);
  flex-shrink: 0;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.timeline-event:hover .timeline-dot {
  box-shadow: 0 0 0 2px var(--border-subtle), 0 0 12px var(--dot-color);
  transform: translateX(-50%) scale(1.2);
}

/* Card styling */
.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--cat-color, var(--border-subtle));
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
  max-width: 400px;
  width: 100%;
  transition: border-color 0.15s ease;
}

.timeline-card:hover {
  border-color: var(--border-accent);
}

.timeline-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.timeline-card-date {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: 500;
  color: var(--text-primary);
}

.timeline-card-tag {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  color: var(--bg-primary);
}

/* Lineage tags for Roots era */
.timeline-lineage-tag {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.1rem 0.45rem;
  border-radius: 8px;
  border: 1px solid;
}

.timeline-lineage-tag--parallel {
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.timeline-lineage-tag--direct {
  color: var(--pastel-mint);
  border-color: var(--pastel-mint);
}

/* Parallel tradition cards: slightly muted */
.timeline-event--parallel .timeline-card {
  opacity: 0.7;
}

.timeline-event--parallel:hover .timeline-card {
  opacity: 1;
}

/* Direct ancestor card: highlighted border */
.timeline-event--direct .timeline-card {
  border-left-color: var(--pastel-mint);
  border-left-width: 3px;
  box-shadow: 0 0 12px rgba(var(--pastel-mint-rgb, 144, 238, 144), 0.08);
}

.timeline-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.timeline-card-summary {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* Expandable detail */
.timeline-card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.timeline-card-detail--open {
  max-height: 2000px;
}

.timeline-card-detail p {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: 1.65;
  padding-top: 0.25rem;
  padding-bottom: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.timeline-card-toggle {
  background: none;
  border: none;
  color: var(--pastel-blue);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-right: 0.75rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease;
}

.timeline-card-toggle:hover {
  color: var(--pastel-pink);
}

.timeline-card-link {
  display: inline-block;
  font-size: var(--text-sm);
  color: var(--pastel-mint);
  cursor: pointer;
  margin-top: 0.25rem;
  transition: color 0.2s ease;
  text-decoration: none;
}

.timeline-card-link:hover {
  color: var(--pastel-pink);
}

/* Linked event button */
.timeline-card-linked {
  display: block;
  background: none;
  border: none;
  color: var(--pastel-lavender);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0.2rem 0;
  margin-top: 0.15rem;
  opacity: 0.7;
  transition: opacity 0.2s ease, color 0.2s ease;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.timeline-card-linked:hover {
  opacity: 1;
  color: var(--pastel-pink);
}

/* Search-hidden events */
.timeline-event--search-hidden {
  display: none !important;
}

/* Highlight pulse when jumping to a linked event */
.timeline-event--highlight .timeline-card {
  border-color: var(--pastel-lavender);
  box-shadow: 0 0 20px rgba(184, 164, 224, 0.3);
}

.timeline-event--highlight .timeline-dot {
  box-shadow: 0 0 0 2px var(--border-subtle), 0 0 16px var(--dot-color);
  transform: translateX(-50%) scale(1.3);
}

/* Dimmed empty eras */
.timeline-era--empty .timeline-era-header {
  opacity: 0.35;
}

.timeline-era--empty .timeline-era-count {
  color: var(--pastel-pink);
  opacity: 1;
}

/* Empty state message */
.timeline-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
}

.timeline-empty-state p {
  font-size: var(--text-md);
  margin-bottom: 1rem;
}

.timeline-empty-reset {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--pastel-blue);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-empty-reset:hover {
  border-color: var(--pastel-blue);
  background: var(--bg-card-hover);
}

/* ── TIMELINE RESPONSIVE ── */

@media (max-width: 768px) {
  .timeline-content {
    padding: 100px 1rem 3rem;
  }

  .timeline-density {
    padding: 0 0.25rem;
  }

  .timeline-density-label {
    font-size: var(--text-xs);
  }

  .timeline-title {
    font-size: 1.5rem;
  }

  .timeline-controls {
    top: 52px;
  }

  .timeline-spine {
    left: 16px;
  }

  .timeline-event--left,
  .timeline-event--right {
    flex-direction: row;
    padding-left: 44px;
    padding-right: 0;
    justify-content: flex-start;
  }

  .timeline-event--right {
    flex-direction: row;
  }

  .timeline-dot {
    left: 16px;
  }

  .timeline-connector {
    display: none;
  }

  .timeline-card {
    max-width: none;
  }

  .timeline-era-header {
    text-align: left;
    padding-left: 44px;
    max-width: none;
  }

  .timeline-era-header::before {
    margin: 0 0 0.75rem;
  }

  .timeline-era-label {
    font-size: 1.1rem;
  }

  .timeline-decade-marker {
    justify-content: flex-start;
    padding-left: 4px;
  }

  .timeline-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .timeline-search {
    width: 100%;
  }

  .timeline-search:focus {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .timeline-era-jump {
    font-size: var(--text-sm);
    padding: 0.4rem 0.6rem;
    min-height: 44px;
  }

  .timeline-filter {
    font-size: var(--text-sm);
    padding: 0.35rem 0.6rem;
    min-height: 36px;
  }

  .timeline-event {
    margin-bottom: 2.25rem;
  }

  .timeline-card {
    padding: 1rem 1.15rem;
  }

  .timeline-card-title {
    font-size: var(--text-md);
  }

  .timeline-card-summary {
    font-size: var(--text-sm);
  }
}

/* ==========================================================================
   PRINT STYLESHEET
   ========================================================================== */

@media print {
  .nav,
  .footer,
  .skip-link,
  .nav__citations-toggle,
  .nav__theme-toggle,
  .nav__burger,
  .search-clear,
  .makers-search,
  .encyclopedia-search,
  .glossary-search,
  .guides-search,
  .industry-search,
  .timeline-search,
  .btn-primary,
  .btn-secondary,
  .hero__actions,
  .toast-container,
  .quality-legend,
  .article-back,
  .citation-orb,
  .citation-popover {
    display: none !important;
  }

  body {
    background: white;
    color: #1a1625;
    font-size: 11pt;
    line-height: 1.5;
  }

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

  .about-section,
  .article-section,
  .makers-profile-grid,
  .quick-facts {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    color: #1a1625;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #605880;
  }

  .mfg-card,
  .article-card,
  .glossary-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  h1, h2, h3 {
    color: #1a1625;
    page-break-after: avoid;
  }
}
