:root {
  --bg: #0b0d10;
  --surface: #151a1d;
  --surface-strong: #1d2622;
  --text: #f6f8fb;
  --muted: #bdc8c2;
  --accent: #0f8f7a;
  --accent-hover: #0b745f;
  --focus: #facc15;
  --border: rgba(255, 255, 255, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #0b0d10 0%, #142018 48%, #17121d 100%);
}

a {
  color: #bceee2;
}

a:hover,
a:focus-visible {
  color: #ffffff;
}

.page {
  width: min(100% - 2rem, 70rem);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  min-height: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: center;
  gap: 2rem;
  padding: 2rem 0 1.25rem;
}

.welcome h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  line-height: 1;
  letter-spacing: 0;
}

.welcome p,
.intro p,
.info-card p,
.panel p {
  color: var(--muted);
  line-height: 1.6;
}

.welcome p {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.button-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button,
.login-link,
.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.45rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.22);
}

.button,
.login-link {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  background: var(--surface-strong);
  color: var(--text);
}

.button:hover,
.button:focus-visible,
.login-link:hover,
.login-link:focus-visible {
  background: var(--accent-hover);
  color: #fff;
  outline: 0.18rem solid var(--focus);
  outline-offset: 0.15rem;
}

.login-panel,
.toc,
.panel,
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 1.2rem 2.4rem rgba(0, 0, 0, 0.24);
}

.login-panel,
.panel,
.info-card,
.toc {
  padding: 1.25rem;
}

.login-panel h2,
.intro h1,
.intro h2,
.panel h2,
.panel h3,
.info-card h2,
.toc h2 {
  margin: 0;
  letter-spacing: 0;
}

.login-link {
  width: 100%;
}

.hint {
  display: block;
  margin-top: 1rem;
  color: #d5deeb;
  font-size: 0.95rem;
  line-height: 1.45;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
}

.teaser-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.teaser-list span {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.45rem;
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.info-card {
  display: flex;
  flex-direction: column;
  min-height: 13rem;
}

.info-card .button {
  margin-top: auto;
}

.intro {
  padding: 0.85rem 0 0;
}

.intro h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.toc {
  margin: 1.5rem 0;
}

.toc nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.4rem;
  background: var(--surface-strong);
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toc a:hover,
.toc a:focus-visible {
  background: var(--accent);
  outline: 0.16rem solid var(--focus);
  outline-offset: 0.12rem;
}

.panel {
  margin: 1rem 0;
  scroll-margin-top: 1rem;
}

.panel h2 {
  font-size: 1.45rem;
}

.panel h3 {
  margin-top: 1rem;
  font-size: 1.05rem;
}

.panel ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.4rem 1rem;
  margin: 0.9rem 0 0;
  padding-left: 1.2rem;
  color: #e9eef7;
  line-height: 1.5;
}

.warning {
  border-color: rgba(255, 107, 107, 0.7);
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.16), rgba(21, 26, 29, 0.98));
}

.warning h2 {
  color: #ffd3d3;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.phase {
  background: var(--surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.45rem;
  padding: 0.9rem;
}

.phase h3 {
  margin-top: 0;
}

.top-link {
  margin-top: 1rem;
  background: transparent;
  color: var(--text);
}

.top-link:hover,
.top-link:focus-visible {
  background: var(--surface-strong);
  outline: 0.16rem solid var(--focus);
  outline-offset: 0.12rem;
}

@media (max-width: 48rem) {
  .page {
    padding: 1.25rem 0 2rem;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 1.25rem 0 1rem;
  }

  .panel ul {
    grid-template-columns: 1fr;
  }
}
