@import url('/fonts/local-fonts.css');

:root {
  --bg: #f6efe1;
  --paper: rgba(255, 251, 246, 0.9);
  --paper-strong: rgba(255, 255, 255, 0.95);
  --paper-soft: rgba(255, 247, 238, 0.78);
  --line: rgba(18, 49, 65, 0.11);
  --text: #112733;
  --muted: #5b6f78;
  --deep: #0e2634;
  --teal: #0b8c87;
  --teal-strong: #0d9c96;
  --teal-soft: rgba(11, 140, 135, 0.1);
  --orange: #eb7c4d;
  --orange-strong: #ff965b;
  --orange-soft: rgba(235, 124, 77, 0.14);
  --gold: #f0b366;
  --shadow-lg: 0 28px 80px rgba(19, 49, 65, 0.14);
  --shadow-md: 0 18px 48px rgba(19, 49, 65, 0.09);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Source Sans 3', 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 210, 160, 0.8), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(87, 195, 187, 0.24), transparent 24%),
    linear-gradient(180deg, #fffaf2 0%, #f7efdf 40%, #f0e4d1 100%);
  position: relative;
}

.noise-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(17, 39, 51, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 39, 51, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 80%);
  pointer-events: none;
}

.bg-aurora {
  position: fixed;
  z-index: -1;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.34;
  pointer-events: none;
}

.aurora-a {
  top: -80px;
  left: -70px;
  background: #ffd08f;
}

.aurora-b {
  top: 90px;
  right: -90px;
  background: rgba(35, 170, 159, 0.56);
}

.aurora-c {
  bottom: -100px;
  right: 18%;
  background: rgba(242, 158, 96, 0.44);
}

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

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

.site-shell {
  width: min(1220px, calc(100% - 34px));
  margin: 0 auto;
}

.top-shell {
  padding: 26px 0 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup {
  max-width: 500px;
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.brand-kicker,
.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-size: 0.76rem;
  font-family: 'Orbitron', 'Inter', sans-serif;
}

.brand-name,
h1,
h2,
h3 {
  font-family: 'Orbitron', 'Inter', sans-serif;
}

.brand-name {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  color: var(--deep);
  line-height: 1;
}

.brand-copy {
  margin: 8px 0 0;
  font-size: 1.02rem;
  line-height: 1.56;
  color: var(--muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nav-link,
.button,
.taxonomy-chip,
.reason-pill,
.category-pill,
.soft-pill {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-link {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
  color: var(--deep);
  font-weight: 800;
}

.nav-link:hover,
.button:hover,
.taxonomy-chip:hover,
.reason-pill:hover {
  transform: translateY(-1px);
}

.nav-link.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-strong) 100%);
  box-shadow: 0 10px 24px rgba(11, 140, 135, 0.24);
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.hero-stage,
.preview-section,
.micro-grid,
.method-grid,
.taxonomy-shell,
.article-grid,
.detail-section,
.post-shell,
.section-shell {
  margin-top: 22px;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.92fr);
  gap: 20px;
}

.hero-panel,
.hero-board,
.section-shell,
.micro-card,
.protocol-card,
.mini-card,
.article-card,
.method-card,
.featured-story,
.story-panel,
.detail-hero,
.detail-section,
.post-shell,
.empty-state,
.taxonomy-panel,
.stat-tile,
.metric-box,
.signal-row,
.summary-band,
.pagination-bar {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
}

.hero-panel,
.detail-hero {
  border-radius: var(--radius-xl);
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.9fr);
  gap: 24px;
}

.hero-board,
.featured-story,
.post-shell,
.detail-section,
.taxonomy-panel,
.section-shell,
.summary-band,
.pagination-bar {
  border-radius: var(--radius-lg);
}

.hero-board,
.featured-story,
.post-shell,
.taxonomy-panel,
.section-shell,
.summary-band,
.pagination-bar {
  padding: 22px;
}

.hero-copy h1,
.section-head h1,
.detail-main h1,
.post-hero h1 {
  margin: 0;
  line-height: 0.98;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  color: var(--deep);
}

.hero-text,
.section-text,
.card-text,
.post-excerpt,
.micro-card p,
.detail-list,
.story-panel p,
.post-content p,
.post-content li,
.summary-band,
.brand-copy,
.stat-tile span,
.metric-box p {
  color: var(--muted);
  line-height: 1.64;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-strong) 100%);
  box-shadow: 0 12px 28px rgba(235, 124, 77, 0.24);
}

.button.secondary {
  color: var(--deep);
  border-color: rgba(14, 38, 52, 0.14);
  background: rgba(255, 255, 255, 0.78);
}

.hero-rail {
  display: grid;
  gap: 14px;
}

.stat-tile,
.metric-box,
.signal-row,
.method-card {
  border-radius: var(--radius-md);
  padding: 18px;
}

.stat-tile p,
.metric-box span {
  margin: 0;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-tile strong,
.metric-box strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  color: var(--deep);
}

.section-head,
.inline-head,
.compact-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-head h2,
.detail-column h2,
.hero-board h2,
.micro-card h2,
.story-panel h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.8vw, 2rem);
  color: var(--deep);
}

.compact-head {
  margin-bottom: 12px;
}

.text-link,
.back-link {
  color: var(--teal);
  font-weight: 800;
}

.mini-grid,
.protocol-grid,
.article-grid,
.micro-grid,
.method-grid {
  display: grid;
  gap: 18px;
}

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

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

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

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

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

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

.micro-card,
.protocol-card,
.article-card,
.mini-card {
  border-radius: 24px;
  overflow: hidden;
}

.micro-card,
.protocol-card,
.article-card {
  padding: 18px;
}

.micro-card h2 {
  margin: 0 0 10px;
}

.micro-card p {
  margin: 0 0 14px;
}

.card-top,
.identity,
.detail-topline,
.signal-head,
.mini-card-top,
.story-meta,
.tag-row,
.reason-row,
.metric-row,
.footer-links,
.taxonomy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.card-top,
.mini-card-top {
  align-items: flex-start;
  justify-content: space-between;
}

.identity {
  min-width: 0;
  align-items: center;
}

.identity-copy {
  min-width: 0;
}

.logo-shell {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.identity h3,
.article-card h3,
.mini-card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.identity p,
.mini-card p {
  margin: 0;
  color: var(--muted);
}

.logo,
.logo-fallback {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 1px solid rgba(14, 38, 52, 0.08);
  background: linear-gradient(135deg, rgba(11, 140, 135, 0.1), rgba(235, 124, 77, 0.1));
  object-fit: cover;
}

.logo-fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--deep);
}

.score-badge,
.mini-score {
  min-width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.score-badge {
  color: #fff;
  background: linear-gradient(135deg, var(--deep) 0%, #29495d 100%);
}

.score-badge.muted {
  color: var(--deep);
  background: rgba(14, 38, 52, 0.09);
}

.mini-score {
  color: var(--deep);
  background: rgba(240, 179, 102, 0.22);
}

.card-text {
  margin: 16px 0 14px;
  min-height: 74px;
}

.metric-row {
  justify-content: space-between;
  font-size: 0.94rem;
  border-top: 1px solid rgba(14, 38, 52, 0.08);
  padding-top: 10px;
}

.metric-row + .metric-row {
  margin-top: 10px;
}

.reason-row,
.tag-row {
  margin-top: 14px;
}

.reason-pill,
.category-pill,
.soft-pill,
.taxonomy-chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 0.87rem;
  font-weight: 700;
}

.reason-pill {
  background: var(--teal-soft);
  color: var(--teal);
}

.category-pill {
  background: var(--orange-soft);
  color: #87411f;
}

.soft-pill {
  background: rgba(240, 179, 102, 0.18);
  color: #7a4e15;
}

.taxonomy-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.taxonomy-chip {
  background: rgba(255, 255, 255, 0.72);
  color: var(--deep);
  border: 1px solid rgba(14, 38, 52, 0.1);
}

.taxonomy-chip:hover {
  border-color: rgba(11, 140, 135, 0.28);
  box-shadow: 0 8px 22px rgba(11, 140, 135, 0.12);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filter-bar label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.filter-bar select,
.filter-bar input {
  min-height: 48px;
  min-width: 180px;
  border-radius: 14px;
  border: 1px solid rgba(14, 38, 52, 0.12);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.88);
  font: inherit;
  color: var(--deep);
}

.search-wrap input {
  min-width: 230px;
}

.summary-band {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px 18px;
  align-items: center;
}

.inline-link-row,
.link-chip-row,
.hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.detail-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

.detail-list {
  margin: 0;
  padding-left: 18px;
}

.detail-list li + li {
  margin-top: 10px;
}

.support-note {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 720px;
}

.story-panel {
  padding: 22px;
  background: linear-gradient(140deg, rgba(14, 38, 52, 0.98) 0%, rgba(24, 70, 87, 0.95) 100%);
  color: #fff;
}

.story-cover,
.post-cover,
.article-image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.story-cover {
  aspect-ratio: 16 / 8;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.story-panel h2,
.story-panel p,
.story-panel .story-meta {
  color: inherit;
}

.story-kicker {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.story-meta {
  font-size: 0.92rem;
  color: var(--muted);
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.article-image {
  aspect-ratio: 16 / 9;
}

.article-surface {
  height: 116px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 209, 145, 0.9), transparent 30%),
    linear-gradient(135deg, rgba(11, 140, 135, 0.92) 0%, rgba(14, 38, 52, 0.98) 100%);
}

.article-card-content {
  padding: 18px;
}

.article-card p {
  margin-top: 0;
  margin-bottom: 14px;
}

.hub-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.hub-card,
.stack-shell {
  padding: 24px;
}

.hub-card h2,
.stack-shell h2 {
  margin-bottom: 12px;
}

.hub-card p {
  margin-top: 0;
}

.hub-meta {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 14px;
}

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

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  color: var(--deep);
  padding-right: 28px;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  color: var(--teal);
  font-size: 1.15rem;
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '-';
}

.faq-answer {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.faq-answer p {
  margin: 0;
}

.hub-stat-grid {
  margin-top: 18px;
}

.post-shell {
  padding: 26px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 16px;
}

.post-hero {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(14, 38, 52, 0.1);
}

.post-cover {
  aspect-ratio: 16 / 7;
  border-radius: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
}

.post-excerpt {
  font-size: 1.1rem;
  max-width: 760px;
}

.prose-block {
  margin-top: 24px;
  max-width: 760px;
}

.prose-block h2,
.prose-block h3 {
  margin: 30px 0 12px;
  color: var(--deep);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
}

.prose-block p,
.prose-block ul,
.prose-block ol {
  margin: 0 0 16px;
}

.prose-block ul,
.prose-block ol {
  padding-left: 22px;
}

.pagination-bar {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.empty-state {
  padding: 34px;
}

.site-footer {
  padding: 28px 0 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links a {
  color: var(--teal);
  font-weight: 800;
}

@media (max-width: 1120px) {
  .hero-stage,
  .hero-panel,
  .detail-hero,
  .detail-section,
  .micro-grid,
  .method-grid,
  .protocol-grid,
  .article-grid,
  .compact-grid,
  .taxonomy-shell,
  .hub-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-shell,
  .section-head,
  .site-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 20px, 1220px);
  }

  .hero-stage,
  .hero-panel,
  .detail-hero,
  .detail-section,
  .micro-grid,
  .method-grid,
  .protocol-grid,
  .article-grid,
  .compact-grid,
  .mini-grid,
  .taxonomy-shell,
  .hub-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .detail-hero,
  .detail-section,
  .post-shell,
  .section-shell,
  .summary-band,
  .featured-story {
    padding: 20px;
  }

  .filter-bar,
  .filter-bar label,
  .filter-bar select,
  .filter-bar input,
  .filter-bar .button {
    width: 100%;
  }

  .search-wrap input {
    min-width: 0;
  }

  .summary-band,
  .pagination-bar,
  .site-footer,
  .inline-link-row,
  .link-chip-row,
  .hub-meta {
    justify-content: flex-start;
  }

  .hero-copy h1,
  .section-head h1,
  .detail-main h1,
  .post-hero h1 {
    font-size: clamp(1.85rem, 8vw, 3rem);
  }
}
