*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-stack);
  color: var(--ink-900);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 212, 228, 0.72), transparent 24rem),
    radial-gradient(circle at 88% 18%, rgba(199, 244, 242, 0.72), transparent 22rem),
    var(--stone-50);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  font-weight: 700;
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

p {
  max-width: var(--max-width);
}

a {
  color: var(--athens);
  text-decoration: underline;
}

a:hover {
  color: var(--athens-light);
}

img, svg {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--athens);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.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;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
  animation: fadeIn var(--transition-fast);
  position: relative;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.screen-title {
  margin-bottom: var(--space-6);
  text-align: center;
  padding: 0 var(--space-10, 40px);
  letter-spacing: -0.045em;
  color: var(--ink-900);
}

@media (max-width: 480px) {
  .screen-title {
    padding: 0 var(--space-4);
  }
}

.screen-subtitle {
  font-size: var(--font-size-sm);
  color: var(--ink-500);
  font-weight: 400;
  margin-top: var(--space-1);
}

.term {
  border-bottom: 1px dotted var(--athens);
  cursor: pointer;
  position: relative;
}

.term-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-900);
  color: var(--stone-50);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  white-space: nowrap;
  max-width: 280px;
  white-space: normal;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}

.term-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink-900);
}

.badge {
  display: inline-block;
  font-size: var(--font-size-sm);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  font-weight: 600;
  vertical-align: middle;
}

.badge--fact {
  background: var(--stone-200);
  color: var(--ink-700);
}

.badge--debate {
  background: var(--gold-bg);
  color: var(--gold);
}

.badge--hypothetical {
  background: var(--olive-bg);
  color: var(--olive);
}

.privacy-notice {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--ink-500);
  padding: var(--space-4);
  border-top: 1px dashed var(--stone-300);
  margin-top: auto;
}

.utility-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.9);
  font-size: var(--font-size-sm);
}

.utility-bar a {
  color: var(--ink-500);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.utility-bar a:hover {
  color: var(--athens);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .screen {
    padding: var(--space-5) var(--space-3);
  }

  .screen-title {
    margin-bottom: var(--space-4);
    padding: 0 var(--space-2);
  }

  .comparison-columns,
  .speaker-columns {
    grid-template-columns: 1fr !important;
  }

  .term-tooltip {
    position: fixed;
    right: var(--space-3);
    bottom: var(--space-3);
    left: var(--space-3);
    transform: none;
    width: auto;
    max-width: none;
  }

  .term-tooltip::after {
    display: none;
  }
}
