/* Ant Evolution Wiki - Sunlit Ant Terrarium & Colony Field Atlas
   Direction: Warm Sand (#f7f1e8 / #fffaf2 / #2b2118 / #6b5b4b / #c2562f / #e0a03a)
   Fonts: Fraunces (700) + Inter (400, 600) */

:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --text: #2b2118;
  --muted: #6b5b4b;
  --primary: #c2562f;
  --accent: #e0a03a;
  --primary-dark: #9f4322;
  --line: #dfd2be;
  --tint: #efe5d5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-up: 0 8px 24px rgba(0, 0, 0, .08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-underline-offset: 4px;
}

a:hover {
  color: var(--primary-dark);
}

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

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea,
summary {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  z-index: 30;
}

.skip:focus {
  left: 16px;
}

/* Header */
.masthead {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-row {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text em {
  font-style: normal;
  color: var(--primary);
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.top-nav a:hover {
  color: var(--primary);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

/* Typography */
h1,
h2,
h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin: 0;
}

h1 {
  font-size: 48px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 22px;
}

p {
  max-width: 70ch;
  margin: 0 0 16px;
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius);
  background: var(--accent);
}

.fine {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* Buttons */
.btn,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}

.btn {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
}

.btn-outline {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-outline:hover {
  background: var(--tint);
  border-color: var(--primary);
  color: var(--text);
}

[data-gf-liked] {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

/* First-Screen Terrarium Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 24px;
  align-items: stretch;
  padding: 24px 0 16px;
}

.hero-panel {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.hero-panel h1 {
  margin-bottom: 8px;
}

.hero-lede {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.hero-lede strong {
  color: var(--text);
  font-weight: 600;
}

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

.telemetry-cell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.telemetry-cell span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.telemetry-cell strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-engage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.engage-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-card {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-up);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-viewport {
  position: relative;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--text);
  aspect-ratio: 16 / 9;
  flex: 1;
  min-height: 220px;
}

.stage-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 4px;
}

.stage-caption strong {
  color: var(--text);
  font-weight: 600;
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stage-tab {
  min-height: 44px;
  padding: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.stage-tab:hover {
  border-color: var(--primary);
}

.stage-tab[aria-selected="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--card);
}

/* Signature Motif: Pheromone Lifecycle Trail */
.pheromone-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pheromone-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
}

.pheromone-step:hover {
  background: var(--tint);
  color: var(--text);
}

.pheromone-num {
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pheromone-step strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.pheromone-step small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

/* Sections */
.section {
  margin-top: 32px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 4px 12px;
  border-radius: var(--radius);
  background: var(--tint);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Codes Cabin (2x2 Compact Grid) */
.codes-cabin {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.codes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.code-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.code-card code {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.code-card span {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

.codes-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* Colony Atlas Hub (3x3 Compact Grid) */
.atlas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.atlas-card {
  display: block;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
}

.atlas-card:hover {
  border-color: var(--primary);
  background: var(--tint);
  color: var(--text);
}

.atlas-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.atlas-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.atlas-card p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Two-Column Field Manual */
.manual-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  margin-top: 32px;
  align-items: start;
}

.manual-rail {
  position: sticky;
  top: 88px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.manual-rail nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}

.manual-rail nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.manual-rail nav a:hover {
  background: var(--tint);
  color: var(--text);
}

.manual-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 32px;
  box-shadow: var(--shadow);
}

.manual-block {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.manual-block:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.manual-block h2 {
  margin-bottom: 12px;
}

.manual-block h3 {
  font-size: 18px;
  margin: 16px 0 8px;
}

.inline-shot {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.inline-shot figcaption {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card);
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--tint);
  font-weight: 600;
  color: var(--text);
}

tr:last-child td,
tr:last-child th {
  border-bottom: 0;
}

.callout {
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  margin: 16px 0;
}

.callout p {
  font-size: 14px;
  margin: 0;
}

/* FAQ Accordion */
.faq-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 32px;
  box-shadow: var(--shadow);
}

.faq-list {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  cursor: pointer;
  padding: 12px 32px 12px 0;
  font-size: 16px;
  font-weight: 600;
  position: relative;
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
}

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

.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 8px;
  font-size: 22px;
  color: var(--primary);
}

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

.faq-list details p {
  padding: 0 16px 16px 0;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

/* Inner Article Layout */
.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  padding: 24px 0 32px;
  align-items: start;
}

.article-main {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 32px;
  box-shadow: var(--shadow);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.article-main h1 {
  font-size: 36px;
  margin-bottom: 16px;
}

.prose h2 {
  font-size: 22px;
  margin: 24px 0 12px;
}

.prose h3 {
  font-size: 18px;
  margin: 16px 0 8px;
}

.prose p,
.prose li {
  color: var(--text);
}

.prose ul,
.prose ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.prose li {
  margin-bottom: 8px;
  max-width: 70ch;
}

.prose code {
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.prose .code-card code {
  display: inline-block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 2px;
}

.prose table {
  margin: 16px 0;
  border: 1px solid var(--line);
}

.article-side {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.side-card h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-links a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.side-links a:hover {
  background: var(--tint);
  color: var(--text);
}

/* Discussion & Comments */
.discussion {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 32px;
  box-shadow: var(--shadow);
}

.comment-form {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.comment-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
}

.comment-form textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.reply-state {
  display: none;
}

[data-gf-replying] .reply-state {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.empty-note {
  display: none;
  padding: 16px 0 0;
  font-size: 14px;
  color: var(--muted);
}

[data-gf-empty] .empty-note {
  display: block;
}

.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.comment:last-child {
  border-bottom: 0;
}

.comment header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.comment time {
  font-size: 12px;
  color: var(--muted);
}

.comment p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.comment [data-gf-c-replies] {
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--line);
}

.owner-badge {
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

[data-gf-owner] {
  background: var(--bg);
  padding: 16px;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
}

/* Ads (Strictly outside first screen) */
.ad-slot {
  margin: 24px 0;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  overflow: hidden;
}

.ad-frame-banner {
  width: 320px;
  max-width: 100%;
  min-height: 50px;
  margin: 4px auto 0;
}

.ad-frame-rect {
  width: 300px;
  max-width: 100%;
  min-height: 250px;
  margin: 4px auto 0;
}

/* Footer */
.footer {
  margin-top: 48px;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 32px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 0.9fr;
  gap: 24px;
}

.footer-title {
  display: inline-block;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-head {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin: 0 0 8px;
}

.footer-links-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
}

.footer-links-one {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col nav a,
.footer-links-two a,
.footer-links-one a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.footer-links-two a:hover,
.footer-links-one a:hover {
  color: var(--primary);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage-viewport {
    min-height: 0;
    flex: 0 0 auto;
  }
  .pheromone-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .atlas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .manual-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .manual-rail {
    position: static;
  }
  .manual-rail nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .article-shell {
    grid-template-columns: 1fr;
  }
  .article-side {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }
  .header-row {
    flex-wrap: wrap;
    padding: 8px 16px;
  }
  .top-nav {
    width: 100%;
    order: 3;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding-top: 4px;
  }
  .top-nav a {
    min-height: 44px;
    font-size: 13px;
  }
  h1,
  .article-main h1 {
    font-size: 28px;
  }
  h2 {
    font-size: 22px;
  }
  .hero-panel,
  .codes-cabin,
  .manual-body,
  .faq-box,
  .article-main,
  .discussion {
    padding: 16px;
  }
  .hero-actions .btn,
  .hero-actions .btn-outline {
    width: 100%;
  }
  .stage-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pheromone-strip,
  .codes-grid,
  .atlas-grid,
  .form-grid,
  .manual-rail nav {
    grid-template-columns: 1fr;
  }
  .prose table {
    display: block;
    overflow-x: auto;
  }
  .prose th,
  .prose td {
    padding: 8px 10px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Live Roblox Telemetry */
.hero-live {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--muted);
}
.hero-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.hero-live[data-live-ready="1"] .hero-live-dot,
.live-board[data-live-ready="1"] .hero-live-dot,
.side-live-row .hero-live-dot {
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(194, 86, 47, 0.45);
  animation: ae-live-pulse 2.1s infinite;
}
@keyframes ae-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(194, 86, 47, 0.45); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero-live-main { flex: 1 1 200px; min-width: 0; line-height: 1.4; }
.hero-live-main strong { color: var(--primary-dark); font-weight: 700; }
.hero-live-spark { display: inline-flex; align-items: center; height: 18px; }
.hero-live-spark:empty { display: none; }
.hero-live-link {
  margin-left: auto;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-decoration: none;
}
.hero-live-link:hover { color: var(--primary-dark); text-decoration: underline; }
.side-live-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 0 0 12px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.side-live-row strong { color: var(--primary-dark); }
.side-live-row a { margin-left: auto; font-size: 12px; font-weight: 700; }
.live-board {
  margin: 0 0 28px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.live-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.live-board-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-dark);
  font-weight: 700;
}
.live-board-updated { font-size: 12px; color: var(--muted); }
.live-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.live-kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.live-kpi-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 0 0 4px; }
.live-kpi-val { font-family: 'Fraunces', Georgia, serif; font-size: 24px; font-weight: 700; color: var(--text); line-height: 1.2; margin: 0; font-variant-numeric: tabular-nums; }
.live-kpi-val.is-accent { color: var(--primary); }
.live-kpi-sub { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.live-chart-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.live-chart-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.live-chart-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text); margin: 0; }
.live-range-tabs { display: inline-flex; gap: 6px; }
.live-range-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}
.live-range-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}
.live-chart-svg { width: 100%; height: 150px; display: block; }
.live-chart-foot {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .live-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* SSR live-stats snapshot summary & rolling 7-day UTC daily peak table */
.live-snapshot-note {
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0.85rem 0 1.4rem;
  padding: 11px 14px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  border-left: 3px solid currentColor;
  border-radius: 8px;
}
.live-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0 1.5rem;
}
.live-daily-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.live-daily-table th,
.live-daily-table td {
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.live-daily-table thead th {
  background: color-mix(in srgb, currentColor 7%, transparent);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.live-daily-table tbody tr:nth-child(even) {
  background: color-mix(in srgb, currentColor 3%, transparent);
}

/* === WIKI_TOC_AND_HIDDEN_GUARD_START === */
[hidden] { display: none !important; }
.toc-card { margin: 1.15rem 0 1.5rem; padding: 0.9rem 1.1rem; border: 1px solid rgba(128, 128, 128, 0.25); border-radius: 10px; background: rgba(128, 128, 128, 0.06); }
.toc-card .toc-title { display: block; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; margin-bottom: 0.45rem; }
.toc-card .toc-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.28rem; font-size: 0.93rem; line-height: 1.45; }
.toc-card .toc-subitem { margin-left: 0.85rem; font-size: 0.88rem; opacity: 0.9; }
/* === WIKI_TOC_AND_HIDDEN_GUARD_END === */

/* === ADSTERRA_MANAGED_CSS_START === */
.ad-slot[hidden],
ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}
.ad-slot {
  margin: 28px auto;
  padding: 12px;
  max-width: 896px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  overflow: hidden;
}
.ad-label {
  margin: 0 0 8px;
  max-width: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ad-frame {
  max-width: 100%;
  margin-inline: auto;
}
.ad-frame--banner { width: 100%; max-width: 320px; min-height: 50px; }
.ad-frame--leaderboard { width: 100%; max-width: 728px; min-height: 90px; }
.ad-frame--banner-468 { width: 100%; max-width: 468px; min-height: 60px; }
.ad-frame--rect { width: 100%; max-width: 300px; min-height: 250px; }
.ad-frame--sidebar-600 { width: 160px; min-height: 600px; }
.ad-frame--sidebar-300 { width: 160px; min-height: 300px; }
.ad-frame--native { width: 100%; max-width: 640px; min-height: 120px; }
@media (min-width: 768px) {
  .ad-slot[data-ad-slot="banner"] .ad-frame--banner {
    max-width: 728px;
    min-height: 90px;
  }
}
.ad-frame iframe {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  border: 0;
}
.ad-sticky-top {
  position: sticky;
  top: var(--ad-sticky-top, 12px);
  z-index: 20;
  max-width: none;
  margin: 0 auto 16px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  overflow: visible;
  pointer-events: none;
}
.ad-sticky-top__inner {
  position: relative;
  max-width: 896px;
  margin: 0 auto;
  padding-inline: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}
.ad-sticky-top__inner .ad-frame--banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ad-sticky-top__close {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.ad-sidebar {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
@media (min-width: 1560px) {
  .ad-sidebar {
    display: block;
    position: fixed;
    top: var(--ad-sidebar-top, 88px);
    width: 160px;
    z-index: 10;
  }
  .ad-sidebar--left { left: max(12px, calc((100vw - 1200px) / 2 - 176px)); }
  .ad-sidebar--right { right: max(12px, calc((100vw - 1200px) / 2 - 176px)); }
}
@media (max-width: 480px) {
  .ad-sticky-top { padding-inline: 8px; }
  .ad-sticky-top__inner { padding-left: 0; padding-right: 34px; }
  .ad-sticky-top__close { right: 0; }
}
/* === ADSTERRA_MANAGED_CSS_END === */
