@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;600;700;800&display=swap');

:root {
  color-scheme: light;
  --bg1: #f1f5ff;
  --bg2: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f9ff;
  --surface-soft: rgba(21, 40, 74, 0.06);
  --text: #10203b;
  --text-muted: rgba(16, 32, 59, 0.7);
  --accent: #1d5bf0;
  --accent-dark: #174ad1;
  --accent-soft: rgba(29, 91, 240, 0.12);
  --divider: rgba(17, 36, 71, 0.14);
  --shadow-soft: 0 18px 42px rgba(15, 27, 60, 0.14);
  --shadow-strong: 0 28px 58px rgba(15, 27, 60, 0.18);
  --radius-lg: 26px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg1: #071225;
    --bg2: #111d36;
    --surface: rgba(16, 27, 52, 0.94);
    --surface-alt: rgba(32, 46, 86, 0.9);
    --surface-soft: rgba(142, 176, 240, 0.32);
    --text: #f4f7ff;
    --text-muted: rgba(244, 247, 255, 0.78);
    --accent: #ff8a3d;
    --accent-dark: #ff7520;
    --accent-soft: rgba(255, 138, 61, 0.2);
    --divider: rgba(188, 210, 255, 0.32);
    --shadow-soft: 0 28px 56px rgba(4, 12, 28, 0.55);
    --shadow-strong: 0 34px 72px rgba(0, 6, 18, 0.62);
    --radius-lg: 30px;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg1: #f1f5ff;
  --bg2: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f9ff;
  --surface-soft: rgba(21, 40, 74, 0.06);
  --text: #10203b;
  --text-muted: rgba(16, 32, 59, 0.7);
  --accent: #1d5bf0;
  --accent-dark: #174ad1;
  --accent-soft: rgba(29, 91, 240, 0.12);
  --divider: rgba(17, 36, 71, 0.14);
  --shadow-soft: 0 18px 42px rgba(15, 27, 60, 0.14);
  --shadow-strong: 0 28px 58px rgba(15, 27, 60, 0.18);
  --radius-lg: 26px;
}

html.dark,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg1: #071225;
  --bg2: #111d36;
  --surface: rgba(16, 27, 52, 0.94);
  --surface-alt: rgba(32, 46, 86, 0.9);
  --surface-soft: rgba(142, 176, 240, 0.32);
  --text: #f4f7ff;
  --text-muted: rgba(244, 247, 255, 0.78);
  --accent: #ff8a3d;
  --accent-dark: #ff7520;
  --accent-soft: rgba(255, 138, 61, 0.2);
  --divider: rgba(188, 210, 255, 0.32);
  --shadow-soft: 0 28px 56px rgba(4, 12, 28, 0.55);
  --shadow-strong: 0 34px 72px rgba(0, 6, 18, 0.62);
  --radius-lg: 30px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Barlow", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 6vw, 64px);
  background: linear-gradient(150deg, var(--bg1), var(--bg2));
  color: var(--text);
}

main {
  width: min(900px, 96vw);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(28px, 6vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 3vw, 2rem);
}

main:hover {
  box-shadow: var(--shadow-strong);
}

header {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h2 {
  margin: clamp(1.6rem, 4vw, 2.4rem) 0 0.75rem;
  font-size: clamp(1.4rem, 3.6vw, 1.9rem);
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: var(--text-muted);
}

strong {
  color: var(--text);
}

ul {
  margin: 0 0 1.2rem 1.2rem;
  padding: 0;
  line-height: 1.65;
  color: var(--text-muted);
}

li + li {
  margin-top: 0.55rem;
}

a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover,
a:focus-visible {
  color: var(--accent-dark);
}

html.dark a,
:root[data-theme="dark"] a {
  color: #ffd0a6;
}

html.dark a:hover,
html.dark a:focus-visible,
:root[data-theme="dark"] a:hover,
:root[data-theme="dark"] a:focus-visible {
  color: #ffe1c6;
}

section {
  padding: clamp(0.95rem, 2.4vw, 1.45rem);
  border-radius: 22px;
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px var(--surface-soft);
}

section + section {
  margin-top: clamp(1.2rem, 3vw, 1.8rem);
}

html.dark main,
:root[data-theme="dark"] main {
  background: linear-gradient(165deg, rgba(18, 32, 60, 0.96), rgba(14, 24, 48, 0.94));
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(150, 184, 255, 0.22);
}

html.dark section,
:root[data-theme="dark"] section {
  background: linear-gradient(160deg, rgba(40, 58, 112, 0.9), rgba(28, 44, 88, 0.88));
  box-shadow: 0 18px 42px rgba(2, 12, 32, 0.48), inset 0 0 0 1px rgba(158, 192, 255, 0.34);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.back-link svg {
  width: 20px;
  height: 20px;
}

footer {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  body {
    padding: clamp(18px, 6vw, 32px);
  }

  main {
    padding: clamp(22px, 8vw, 36px);
  }

  section {
    padding: clamp(1rem, 5vw, 1.4rem);
  }

  footer {
    display: none;
  }
}
