:root {
  color-scheme: light;
  --ink: #10204e;
  --ink-soft: #34446f;
  --muted: #6b779b;
  --accent: #6558ef;
  --accent-rgb: 101, 88, 239;
  --accent-2: #50bde7;
  --accent-glow: #b8a6ff;
  --brand-accent: #6558ef;
  --brand-accent-2: #50bde7;
  --brand-accent-glow: #b8a6ff;
  --glass: rgba(248, 252, 255, 0.64);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-line: rgba(255, 255, 255, 0.86);
  --hairline: rgba(53, 75, 127, 0.11);
  --control-height: 42px;
  --radius-control: 13px;
  --radius-card: 22px;
  --radius-feature: 30px;
  --shadow-control: 0 8px 22px rgba(33, 64, 125, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  --shadow-card: 0 20px 55px rgba(46, 79, 143, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  --font-head: "Rubik", "Segoe UI", system-ui, sans-serif;
  --font-body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  font-family: var(--font-body);
  font-synthesis: none;
}


:root.brand-palette-motion {
  transition:
    --brand-accent var(--brand-palette-duration, 820ms) cubic-bezier(0.22, 0.61, 0.36, 1),
    --brand-accent-2 var(--brand-palette-duration, 820ms) cubic-bezier(0.22, 0.61, 0.36, 1),
    --brand-accent-glow var(--brand-palette-duration, 820ms) cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #d7edff;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 4%, rgba(255, 255, 255, 0.94), transparent 29rem),
    radial-gradient(circle at 88% 18%, rgba(var(--accent-rgb), 0.13), transparent 32rem),
    linear-gradient(145deg, #eef8ff 0%, #cde9ff 50%, #e8f5ff 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  z-index: -3;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.23) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), transparent 58%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  scroll-margin-top: 72px;
  text-wrap: balance;
}

button,
kbd,
.eyebrow,
.topic-card__number {
  font-family: var(--font-head);
}

#mainContent {
  scroll-margin-top: 20px;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, #112958 28%);
  outline-offset: 3px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  width: min(1740px, calc(100% - 64px));
  margin: 0 auto;
  padding: 16px 0 42px;
}

.app-shell--wide {
  width: min(1740px, calc(100% - 64px));
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 50%;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  background: #112052;
  box-shadow: 0 12px 32px rgba(20, 36, 82, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 720;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -140%);
  transition: opacity 140ms ease, transform 140ms ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

/* Шапка (.topbar, .brand, .language-switch, .icon-button, .action-button), .glass-control/.glass-panel,
   окно «Как пользоваться» и .toast — в shared/header.css */


.eyebrow {
  display: flex;
  margin: 0 0 10px;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.17em;
  line-height: 1.3;
}

.eyebrow > span:first-child {
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.eyebrow--small {
  margin-bottom: 8px;
  font-size: 10px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 2vw, 34px);
  font-weight: 780;
  letter-spacing: -0.045em;
}

.section-heading > p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.page-scene-backdrop {
  position: fixed;
  z-index: -2;
  inset: -40px;
  background-image: var(--page-scene);
  background-position: center;
  background-size: cover;
  filter: blur(34px) saturate(0.72);
  opacity: 0.16;
  transform: scale(1.06);
  pointer-events: none;
}

.page-scene-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(222, 241, 255, 0.68);
}

/* Optional, independently positioned alpha artwork for inner subject pages. */
.kz-history-atmosphere {
  display: none;
}

:is(.page--subject, .page--scientists)[data-subject="kazakhstan-history"] {
  position: relative;
  isolation: isolate;
}

:is(.page--subject, .page--scientists)[data-subject="kazakhstan-history"] .app-shell {
  position: relative;
  z-index: 1;
}

:is(.page--subject, .page--scientists)[data-subject="kazakhstan-history"] .kz-history-atmosphere:not([hidden]) {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.kz-history-atmosphere__item {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
}


@media (max-width: 980px) {
  .app-shell,
  .app-shell--wide {
    width: min(100% - 28px, 900px);
  }
}

@media (max-width: 620px) {
  .app-shell,
  .app-shell--wide {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
