:root,
[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-alt: #eceff3;
  --text: #17202a;
  --text-muted: #5f6b7a;
  --border: rgba(23, 32, 42, 0.12);
  --primary: #0f766e;
  --primary-strong: #0b5e58;
  --primary-soft: rgba(15, 118, 110, 0.12);
  --shadow: 0 20px 50px rgba(16, 24, 40, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --bg: #101418;
  --surface: #161c22;
  --surface-alt: #1f2730;
  --text: #eef2f6;
  --text-muted: #a8b3bf;
  --border: rgba(238, 242, 246, 0.12);
  --primary: #3db6ab;
  --primary-strong: #69cfc5;
  --primary-soft: rgba(61, 182, 171, 0.14);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, var(--primary-soft), transparent 28%), var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--text);
  color: var(--surface);
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 100;
}
.skip-link:focus { top: 16px; }

.topbar,
.page {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0 24px;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex: 1;
  justify-content: center;
  text-align: center;
}

.brand-copy {
  max-width: 720px;
}

.eyebrow,
.subtitle,
.notes li,
.oracle-card__meta p {
  color: var(--text-muted);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.theme-toggle {
  min-width: 48px;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  cursor: pointer;
}

.theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: inline; }

.page {
  max-width: 900px;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 20px;
  align-items: stretch;
  margin: 10px 0 24px;
}

.oracle-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.oracle-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.oracle-card,
.notes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.oracle-card {
  padding: 24px;
  margin: 0 0 28px;
}

.oracle-disclaimer {
  margin: 0 auto 28px;
  max-width: 620px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}

.oracle-disclaimer p {
  margin: 0;
}

.oracle-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.oracle-card__meta p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--primary-soft);
}

.response-wrap {
  min-height: 204px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--surface), var(--surface-alt));
  border: 1px solid var(--border);
}

.response {
  margin: 0;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  max-width: 100%;
}

.response.is-loading {
  opacity: 0.7;
}

.actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.primary-button {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.primary-button:hover { transform: translateY(-1px); background: var(--primary-strong); }
.primary-button:active { transform: translateY(0); }
.primary-button:disabled { opacity: 0.7; cursor: wait; }

.notes {
  margin: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.notes h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
}

.notes ol {
  margin: 0;
  padding-left: 22px;
}

.notes li + li {
  margin-top: 8px;
}

.site-footer {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  padding: 8px 0 28px;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: inherit;
  font-weight: 600;
  text-decoration-color: color-mix(in srgb, var(--text-muted) 55%, transparent);
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--primary);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: center;
  }

  .theme-toggle {
    align-self: center;
  }

  .response-wrap {
    min-height: 180px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .oracle-visual img {
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .brand {
    flex-direction: column;
    align-items: center;
  }

  .oracle-disclaimer br {
    display: none;
  }
}


.hidden {
  display: none !important;
}
