:root {
  color-scheme: dark;
  --bg: #070b12;
  --bg-elevated: #0d1420;
  --surface: rgba(18, 28, 43, 0.86);
  --surface-strong: #121c2b;
  --line: rgba(170, 196, 221, 0.2);
  --line-strong: rgba(170, 196, 221, 0.38);
  --text: #f4f7fa;
  --muted: #acb9c8;
  --accent: #73e5ff;
  --accent-strong: #27c5eb;
  --gold: #f0c86e;
  --danger: #ff8e96;
  --success: #85e0ae;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --shell: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(42, 150, 185, 0.15), transparent 34rem),
    radial-gradient(circle at 90% 26%, rgba(240, 200, 110, 0.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: #c6f5ff;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  background: #fff;
  color: #000;
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(calc(100% - 2rem), var(--shell));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 18, 0.82);
  backdrop-filter: blur(18px) saturate(130%);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 76px;
  gap: 1.25rem;
}

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

.brand:hover {
  color: var(--text);
}

.brand-symbol {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid rgba(115, 229, 255, 0.55);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(115, 229, 255, 0.2), rgba(115, 229, 255, 0.02));
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0.04em;
}

.brand small {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: 0.2rem;
}

.primary-nav a {
  min-height: 44px;
  padding: 0.58rem 0.85rem;
  border-radius: 0.65rem;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 650;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: rgba(115, 229, 255, 0.09);
  color: var(--text);
}

.primary-nav .experience-link {
  color: var(--gold);
}

.language-selector {
  min-width: max-content;
}

.language-selector .lang-current {
  display: none;
}

.language-selector .lang-list {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.language-selector a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 0.65rem;
  border-radius: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: none;
}

.language-selector a:hover,
.language-selector .active a {
  background: rgba(115, 229, 255, 0.09);
  color: var(--text);
}

.site-main {
  padding-block: clamp(3rem, 8vw, 7rem);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 7vw, 5.5rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 1.5);
  background:
    linear-gradient(125deg, rgba(18, 28, 43, 0.98), rgba(7, 11, 18, 0.72)),
    radial-gradient(circle at 85% 20%, rgba(115, 229, 255, 0.2), transparent 22rem);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -8rem;
  bottom: -12rem;
  width: 30rem;
  height: 30rem;
  border: 1px solid rgba(115, 229, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 4rem rgba(115, 229, 255, 0.025), 0 0 0 8rem rgba(115, 229, 255, 0.018);
  content: "";
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.6rem, 12vw, 8.5rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.hero-intro {
  max-width: 730px;
  margin: 2rem 0 0;
  color: #d6dee7;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 0.5rem;
  padding: 0.72rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: var(--accent);
  color: #061019;
}

.button-primary:hover {
  background: #b8f4ff;
  color: #061019;
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.feature-section {
  margin-top: clamp(4rem, 9vw, 7rem);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2rem;
}

.section-heading h2,
.webgpu-callout h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

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

.feature-card {
  min-height: 250px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card-index {
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.8rem;
}

.feature-card h3 {
  margin: 3.5rem 0 0.75rem;
  font-size: 1.25rem;
}

.feature-card p,
.webgpu-callout p {
  color: var(--muted);
}

.webgpu-callout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  margin-top: clamp(4rem, 9vw, 7rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid rgba(240, 200, 110, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(240, 200, 110, 0.08), rgba(18, 28, 43, 0.7));
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(4, 7, 12, 0.55);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem;
}

.footer-inner p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.footer-inner form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-page {
  max-width: 940px;
  margin-inline: auto;
  padding: clamp(1.25rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-page h1 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.legal-page h2 {
  margin-top: 2.25rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.legal-lead {
  max-width: 72ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.legal-details {
  display: grid;
  gap: 0.7rem;
}

.legal-details div {
  display: grid;
  grid-template-columns: minmax(11rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.legal-details dt {
  color: var(--muted);
  font-weight: 750;
}

.legal-details dd {
  margin: 0;
}

.source-notice {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.source-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.source-card {
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.025);
}

.source-card h2 {
  margin: 0;
}

.source-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.source-status {
  padding: 0.35rem 0.65rem;
  border: 1px solid color-mix(in srgb, #75d9a6 50%, var(--line));
  border-radius: 999px;
  color: #9be7bd;
  font-size: 0.78rem;
  font-weight: 800;
}

.source-status.is-pending {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  color: var(--gold);
}

.legal-table-wrap {
  overflow-x: auto;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
}

.legal-table th,
.legal-table td {
  padding: 0.8rem;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  background: rgba(255, 255, 255, 0.04);
}

.legal-update,
.form-privacy {
  color: var(--muted);
  font-size: 0.92rem;
}

.consent-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
}

.consent-field input {
  width: auto;
  min-height: 0;
  margin-top: 0.25rem;
}

.consent-field label {
  margin: 0;
}

.simple-form-page,
.articles-seo-fallback,
.wrapper,
.error-page {
  max-width: 860px;
  margin-inline: auto;
  padding: clamp(1.25rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.simple-form-page h1,
.articles-seo-fallback h1,
.wrapper h1,
.error-page h1 {
  margin-top: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.articles-seo-fallback ul {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.articles-seo-fallback li {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
}

.articles-seo-fallback li > a {
  font-size: 1.15rem;
  font-weight: 800;
}

.articles-show article {
  font-size: 1.06rem;
}

.articles-show img {
  max-width: 100%;
  height: auto;
}

.form-narrow {
  max-width: 560px;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.65rem;
  background: #09111d;
  color: var(--text);
}

textarea {
  min-height: 11rem;
  resize: vertical;
}

.btn,
button[type="submit"] {
  min-height: 46px;
  padding: 0.68rem 1rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  background: var(--accent);
  color: #061019;
  font-weight: 800;
  cursor: pointer;
}

.notice {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
}

.notice-error {
  border-color: rgba(255, 142, 150, 0.5);
  color: var(--danger);
}

.notice-ok {
  border-color: rgba(133, 224, 174, 0.5);
  color: var(--success);
}

.u-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.webgpu-shell {
  overflow: hidden;
  background: #000;
}

.webgpu-shell .ui-canvas,
.webgpu-shell #threejs-container {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
}

.webgpu-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.experience-fallback {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 5.5rem 1rem 6rem;
  background: radial-gradient(circle at 50% 30%, rgba(29, 68, 92, 0.92), rgba(3, 7, 12, 0.97));
  transition: opacity 180ms ease, visibility 180ms ease;
}

.experience-fallback-card {
  width: min(42rem, 100%);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(3, 7, 12, 0.88);
  color: #fff;
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.42);
}

.experience-fallback-card h1 {
  margin-top: 0.35rem;
}

.experience-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.experience-ready .experience-fallback {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.experience-exit {
  position: fixed;
  z-index: 1000;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(3, 7, 12, 0.82);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.experience-help {
  position: fixed;
  z-index: 999;
  right: 1rem;
  bottom: 1rem;
  max-width: 32rem;
  margin: 0;
  padding: 0.5rem 0.7rem;
  border-radius: 0.5rem;
  background: rgba(3, 7, 12, 0.72);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
  pointer-events: none;
}

.experience-legal {
  position: fixed;
  z-index: 999;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(3, 7, 12, 0.72);
  font-size: 0.78rem;
}

.experience-legal a {
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 820px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    padding-block: 0.7rem;
  }

  .primary-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.35rem;
  }

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

  .feature-card {
    min-height: auto;
  }

  .feature-card h3 {
    margin-top: 1.5rem;
  }

  .webgpu-callout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .site-shell {
    width: min(calc(100% - 1rem), var(--shell));
  }

  .site-main {
    padding-block: 2rem;
  }

  .hero {
    padding: 1.5rem;
    border-radius: var(--radius);
  }

  .hero h1 {
    font-size: clamp(3.25rem, 22vw, 5.2rem);
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .footer-inner {
    display: grid;
  }

  .legal-details div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .experience-help {
    display: none;
  }

  .experience-legal {
    right: 0.5rem;
    bottom: 0.5rem;
    left: 0.5rem;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .hero,
  .feature-card,
  .webgpu-callout,
  .simple-form-page,
  .articles-seo-fallback {
    border: 1px solid CanvasText;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-actions,
  .webgpu-callout {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-main {
    width: 100%;
    padding: 0;
  }
}
