/* Measured Years — datapoems-aligned chrome */
:root {
  --void: #050505;
  --deep: #0a0a0a;
  --surface: #1a1a1a;
  --text: #e0e0e0;
  --secondary: #888;
  --muted: #666;
  --ghost: #3a3a3a;
  --wire: #00ffff;
  --life: #00ffaa;
  --heat-lo: #1a1030;
  --heat-hi: #ff00aa;
  --amber: #d97706;
  --glass: rgba(10, 10, 10, 0.85);
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-data: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --font-display: "Cormorant Garamond", Georgia, serif;
}

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

html,
body {
  height: 100%;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-ui);
  overflow: hidden;
}

body.poem {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--wire);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

#viz {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
}

#viz svg,
#viz canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.chrome {
  position: fixed;
  z-index: 20;
  pointer-events: none;
}

.chrome * {
  pointer-events: auto;
}

.chrome-top {
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.92), transparent);
}

.chrome-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1.25rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.95), transparent);
  font-size: 0.75rem;
  color: var(--secondary);
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.15;
}

.metaphor {
  font-size: 0.8rem;
  color: var(--secondary);
  margin-top: 0.25rem;
  max-width: 36rem;
}

.nav a {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-left: 0.75rem;
}
.nav a:hover {
  color: var(--text);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 0.65rem 0.85rem;
}

.stat {
  font-family: var(--font-data);
  font-feature-settings: "tnum";
  font-weight: 300;
  font-size: 1.1rem;
  color: #fff;
}
.stat-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tooltip {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s;
  font-size: 0.75rem;
  max-width: 16rem;
}
.tooltip.show {
  opacity: 1;
}

#sr-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.loading,
.error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  font-size: 0.9rem;
  padding: 2rem;
  text-align: center;
}
.error {
  color: #ff8888;
}

/* Suite index */
body.index {
  overflow: auto;
  padding: 2rem 1.25rem 4rem;
}
.index-wrap {
  max-width: 52rem;
  margin: 0 auto;
}
.index h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.index .lede {
  color: var(--secondary);
  max-width: 36rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}
.poem-grid {
  display: grid;
  gap: 0.75rem;
}
.poem-card {
  display: block;
  padding: 1rem 1.15rem;
  border: 1px solid var(--ghost);
  border-radius: 8px;
  background: var(--deep);
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.poem-card:hover {
  border-color: rgba(0, 255, 255, 0.35);
  background: #0c1014;
  text-decoration: none;
}
.poem-card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.poem-card p {
  font-size: 0.8rem;
  color: var(--secondary);
  line-height: 1.4;
}
.poem-card .span {
  font-family: var(--font-data);
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.45rem;
}
.disclaimer {
  margin-top: 2.5rem;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 36rem;
}

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