/* ==========================================================================
   The Ether Art Chart — product page
   Tenets-page aesthetic per scope §261: Cardo serif body, Cormorant SC
   small-caps for topic labels, monochromatic warm cream on near-black,
   gold accent. Tier colors are reserved for Compass tier accents only —
   the topic axis here uses ink intensity, not color.
   ========================================================================== */

:root {
  --eac-bg: #0a0a12;
  --eac-bg-soft: #0e0e18;
  --eac-ink: #d8d4c8;
  --eac-ink-bright: #f0ebdd;
  --eac-ink-dim: #8a8476;
  --eac-rule: #2a2738;
  --eac-gold: #c9a960;

  --eac-violet: #aa54ff;
  --eac-blue: #3388ff;
  --eac-green: #33cc55;
  --eac-orange: #ffbb33;
  --eac-red: #ff3333;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--eac-bg);
  color: var(--eac-ink);
}

body {
  font-family: 'Cardo', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

a { color: var(--eac-gold); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
a:hover { border-bottom-color: var(--eac-gold); }

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

.skip-nav {
  position: absolute; top: -40px; left: 0;
  background: var(--eac-ink-bright); color: var(--eac-bg);
  padding: 8px 16px; z-index: 100;
  text-decoration: none;
  font-family: 'Cormorant SC', serif;
  letter-spacing: 0.08em;
}
.skip-nav:focus { top: 0; }

/* The shared rc-header partial uses styles from /css/main.css. Keep those
   intact so the back link still functions and matches the global chrome. */

.eac-main {
  max-width: 880px;
  margin: 0 auto;
  padding: 3.5rem 1.6rem 5rem;
}

/* ─── Hero ─────────────────────────────────────────────────────────── */

.eac-hero { margin-bottom: 4rem; }

.eac-kicker {
  font-family: 'Cormorant SC', serif;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--eac-gold);
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.eac-title {
  font-family: 'Cardo', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  line-height: 1.05;
  margin: 0 0 1.4rem;
  color: var(--eac-ink-bright);
  letter-spacing: -0.005em;
}

.eac-framing {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--eac-ink);
  max-width: 38em;
  margin: 0;
  font-style: italic;
}

/* ─── Sections ─────────────────────────────────────────────────────── */

.eac-section {
  margin-top: 3.5rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--eac-rule);
}

.eac-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.eac-section-title {
  font-family: 'Cormorant SC', serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eac-ink-bright);
  margin: 0;
}

.eac-section-meta {
  font-family: 'Cormorant SC', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--eac-ink-dim);
  margin: 0;
  text-transform: uppercase;
}

/* ─── Today's list ─────────────────────────────────────────────────── */

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

.eac-loading {
  color: var(--eac-ink-dim);
  font-style: italic;
  padding: 1rem 0;
}

.eac-row {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--eac-rule);
}
.eac-row:last-child { border-bottom: none; }

.eac-pos {
  font-family: 'Cormorant SC', serif;
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--eac-ink-dim);
  text-align: right;
  padding-top: 0.18rem;
}

.eac-text { min-width: 0; }

.eac-deadpan {
  font-size: 1.36rem;
  line-height: 1.35;
  color: var(--eac-ink-bright);
  font-style: italic;
  margin: 0 0 0.3rem;
}
.eac-deadpan a {
  color: inherit;
  border-bottom: none;
}
.eac-deadpan a:hover { color: var(--eac-gold); }

.eac-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
  font-size: 0.95rem;
  color: var(--eac-ink-dim);
}
.eac-artist { font-style: italic; }
.eac-meta-sep {
  color: var(--eac-rule);
  margin: 0 0.1rem;
}

.eac-tier-tick {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.eac-tier-violet { background: var(--eac-violet); }
.eac-tier-blue { background: var(--eac-blue); }
.eac-tier-green { background: var(--eac-green); }
.eac-tier-orange { background: var(--eac-orange); }
.eac-tier-red { background: var(--eac-red); }

.eac-charge {
  font-family: 'Cormorant SC', serif;
  letter-spacing: 0.08em;
  color: var(--eac-ink-dim);
}

/* Topic chips — Cormorant SC small caps, gold-tinted, low chrome */
.eac-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}
.eac-chip {
  display: inline-block;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eac-gold);
  border: 1px solid var(--eac-rule);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}
.eac-chip--dominant {
  color: var(--eac-bg);
  background: var(--eac-gold);
  border-color: var(--eac-gold);
}

.eac-row--untagged .eac-deadpan { color: var(--eac-ink-dim); font-style: normal; }
.eac-untagged-pill {
  font-family: 'Cormorant SC', serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eac-ink-dim);
  border: 1px dashed var(--eac-rule);
  padding: 0.1rem 0.55rem;
  border-radius: 3px;
  margin-left: 0.4rem;
}

.eac-audit-note {
  font-family: 'Cormorant SC', serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eac-ink-dim);
}

/* ─── Annual Rollups ───────────────────────────────────────────────── */

.eac-year-control { display: flex; align-items: center; gap: 0.5rem; }

.eac-year-select {
  font-family: 'Cormorant SC', serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eac-ink-bright);
  background: var(--eac-bg);
  border: 1px solid var(--eac-rule);
  border-radius: 3px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--eac-ink-dim) 50%),
                    linear-gradient(135deg, var(--eac-ink-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.8rem;
  transition: border-color 0.2s;
}
.eac-year-select:hover,
.eac-year-select:focus {
  border-color: var(--eac-gold);
  outline: none;
}

.eac-rollup-meta {
  font-family: 'Cormorant SC', serif;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eac-ink-dim);
  margin: 0 0 1.4rem;
  min-height: 1.1em;
}

.eac-rollup-status {
  font-size: 0.92rem;
  color: var(--eac-ink-dim);
  border-left: 2px solid var(--eac-gold);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 0 0 1.4rem;
  font-style: italic;
}

/* Topic Field claims its own full-width row at the top of the rollup
   section. Constellation reads as the centerpiece; ranked + top-20 sit
   below in a 2-col grid. */
.eac-topic-field {
  margin-bottom: 3rem;
}

.eac-rollup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3rem;
}

.eac-rollup-col-deadpan,
.eac-rollup-col-topics { min-width: 0; }

.eac-subsection-title {
  font-family: 'Cormorant SC', serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--eac-ink);
  margin: 0 0 1rem;
}
.eac-subsection-title-second { margin-top: 1.6rem; }

/* Topic ranked list (companion to the constellation) */

.eac-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.eac-topic-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--eac-rule);
}
.eac-topic-row:last-child { border-bottom: none; }
.eac-topic-name {
  font-family: 'Cormorant SC', serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eac-ink);
}
.eac-topic-row--dominant .eac-topic-name { color: var(--eac-gold); }
.eac-topic-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.92rem;
  color: var(--eac-ink-dim);
}
.eac-topic-pct {
  font-family: 'Cormorant SC', serif;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--eac-ink-dim);
  min-width: 4ch;
  text-align: right;
}

/* Constellation SVG */

.eac-constellation-wrap {
  position: relative;
  background: var(--eac-bg-soft);
  border: 1px solid var(--eac-rule);
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.eac-constellation {
  display: block;
  width: 100%;
  height: auto;
}

.eac-constellation .star-halo {
  fill: url(#star-glow);
  pointer-events: none;
}
.eac-constellation .star-halo--gold {
  fill: url(#star-glow-gold);
}
.eac-constellation .star-core {
  fill: var(--eac-ink-bright);
}
.eac-constellation .star-core--gold {
  fill: var(--eac-gold);
}
.eac-constellation .star-label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--eac-ink);
  pointer-events: none;
  text-anchor: middle;
  user-select: none;
}
.eac-constellation .star-label--gold { fill: var(--eac-gold); }
.eac-constellation .star-hit {
  fill: transparent;
  cursor: pointer;
}
/* Hover: just scale the star under the cursor with a soft ease.
   transform-box:fill-box anchors the scale to the circle's own center
   (otherwise it'd scale toward the SVG origin). */
.eac-constellation .star-halo,
.eac-constellation .star-core {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.22s cubic-bezier(0.33, 1, 0.68, 1);
}
.eac-constellation .star-halo.is-hot { transform: scale(1.45); }
.eac-constellation .star-core.is-hot { transform: scale(1.6); }

.eac-constellation-tooltip {
  position: absolute;
  z-index: 10;
  /* Lifted off the panel: slightly warmer charcoal + faint gold-tinted
     border + layered drop shadow so the card visibly hovers over the
     constellation instead of sinking into the same near-black. */
  background: rgba(28, 24, 36, 0.97);
  border: 1px solid rgba(201, 169, 96, 0.22);
  padding: 0.55rem 0.8rem 0.6rem;
  border-radius: 4px;
  pointer-events: none;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.7),
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(201, 169, 96, 0.05);
  /* Offset further from the cursor so the card breathes. */
  transform: translate(22px, -50%);
  max-width: 320px;
  min-width: 180px;
  color: var(--eac-ink);
  /* Inter for legibility — Cardo + Cormorant are decorative; the
     tooltip is dense data and reads better in the sans. */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
}
.eac-constellation-tooltip[hidden] { display: none; }

.eac-constellation-tooltip .ttp-stat {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eac-gold);
  margin: 0 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--eac-rule);
}
.eac-constellation-tooltip .ttp-sep {
  color: var(--eac-ink-dim);
  margin: 0 0.4em;
}

.eac-constellation-tooltip .ttp-songs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.eac-constellation-tooltip .ttp-songs li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.5rem;
  row-gap: 0.05rem;
  align-items: baseline;
  padding: 0.18rem 0;
}
.eac-constellation-tooltip .ttp-songs li + li {
  border-top: 1px solid rgba(42, 39, 56, 0.6);
  padding-top: 0.3rem;
  margin-top: 0.05rem;
}
.eac-constellation-tooltip .ttp-pos {
  font-family: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--eac-ink-dim);
  grid-row: span 2;
  align-self: start;
  padding-top: 0.1rem;
  min-width: 1.4em;
  text-align: right;
}
.eac-constellation-tooltip .ttp-deadpan {
  color: var(--eac-ink-bright);
  font-style: italic;
  grid-column: 2;
}
.eac-constellation-tooltip .ttp-artist {
  font-size: 0.78rem;
  color: var(--eac-ink-dim);
  grid-column: 2;
}
.eac-constellation-tooltip .ttp-more {
  font-family: inherit;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eac-ink-dim);
  margin-top: 0.4rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(42, 39, 56, 0.6);
  text-align: right;
}

.eac-constellation-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.4rem;
  color: var(--eac-ink-dim);
  font-style: italic;
  font-size: 0.96rem;
}
/* Override .eac-constellation-empty's display:flex so the [hidden] attribute
   actually hides it. Without this the empty-state text overlays the
   live constellation whenever the data is present. */
.eac-constellation-empty[hidden] { display: none; }

@media (max-width: 820px) {
  .eac-rollup-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* ─── Mobile ───────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .eac-main { padding: 2rem 1rem 3rem; }
  .eac-row {
    grid-template-columns: 2.4rem 1fr;
    gap: 0.9rem;
    padding: 1rem 0;
  }
  .eac-pos { font-size: 1.1rem; }
  .eac-deadpan { font-size: 1.15rem; }
  .eac-framing { font-size: 1.05rem; }
}
