@charset "UTF-8";
/* tokens.css */
/* Дизайн-токены. Неоморфизм: фон и элементы одного цвета, объём даёт пара теней. */
:root {
  color-scheme: light;
  --bg: #e6ebf1;
  --surface: #e6ebf1;
  --text: #1f2a3a;
  --muted: #4d5a6d;
  --accent: #3d5bd9;
  --accent-text: #ffffff;
  --success: #1d7a46;
  --warning: #8a5a00;
  --danger: #b3261e;
  --shadow-dark: rgba(150, 165, 190, 0.6);
  --shadow-light: rgba(255, 255, 255, 0.95);
  --code-bg: #dde3eb;
  --code-text: #9b2c5c;

  --raised: 6px 6px 14px var(--shadow-dark), -6px -6px 14px var(--shadow-light);
  --raised-sm: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
  --inset: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  --inset-sm: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --gap: clamp(16px, 3vw, 28px);
  --container: 1140px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #23262b;
  --surface: #23262b;
  --text: #e6e9ef;
  --muted: #a7b0bf;
  --accent: #8ea2ff;
  --accent-text: #10131a;
  --success: #5fd391;
  --warning: #f2c14e;
  --danger: #ff8a80;
  --shadow-dark: rgba(0, 0, 0, 0.55);
  --shadow-light: rgba(255, 255, 255, 0.06);
  --code-bg: #1b1d21;
  --code-text: #f8c471;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #23262b;
    --surface: #23262b;
    --text: #e6e9ef;
    --muted: #a7b0bf;
    --accent: #8ea2ff;
    --accent-text: #10131a;
    --success: #5fd391;
    --warning: #f2c14e;
    --danger: #ff8a80;
    --shadow-dark: rgba(0, 0, 0, 0.55);
    --shadow-light: rgba(255, 255, 255, 0.06);
    --code-bg: #1b1d21;
    --code-text: #f8c471;
  }
}

/* base.css */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  overflow-x: hidden;
}

main { flex: 1; outline: none; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

img, svg, canvas { max-width: 100%; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

code, pre, kbd { font-family: var(--mono); font-size: .92em; }
:not(pre) > code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: .1em .4em;
  border-radius: 6px;
  white-space: nowrap;
}
pre {
  background: var(--code-bg);
  border-radius: var(--radius);
  box-shadow: var(--inset-sm);
  padding: 18px 20px;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0 0 1.2em;
}
pre code { color: var(--text); }

.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-text);
}
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

/* layout.css */
.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }

.section { padding-block: clamp(28px, 6vw, 64px); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section__head h2 { margin: 0; }
.section__head p { margin: 0; }

.stack > * + * { margin-top: var(--gap); }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--bg); padding-block: 14px; }
.site-header::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--shadow-dark); opacity: .4; }
.site-header__inner { display: flex; align-items: center; gap: 16px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font-weight: 800; }
.logo__mark {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  box-shadow: var(--raised-sm); color: var(--accent); font-size: .9rem; letter-spacing: -.03em;
}
.logo__text { font-size: 1.1rem; white-space: nowrap; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 9px 16px; border-radius: 12px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: box-shadow .2s var(--ease), color .2s;
}
.site-nav a:hover { box-shadow: var(--raised-sm); }
.site-nav a[aria-current="page"] { box-shadow: var(--inset-sm); color: var(--accent); }

.icon-btn.nav-toggle { display: none; margin-left: auto; }

@media (max-width: 860px) {
  .icon-btn.nav-toggle { display: inline-grid; }
  .site-nav {
    position: absolute; inset: 100% 16px auto; margin: 0;
    background: var(--bg); border-radius: var(--radius); box-shadow: var(--raised);
    padding: 12px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 16px; }
}
@media (max-width: 400px) { .logo__text { display: none; } }

/* Хлебные крошки */
.breadcrumbs { margin-top: 18px; font-size: .9rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { color: var(--text); }

/* Подвал */
.site-footer { margin-top: 48px; padding-block: 36px 24px; }
.site-footer__inner {
  display: grid; gap: 24px; grid-template-columns: 1.4fr 1fr;
  padding: 28px; border-radius: var(--radius-lg); box-shadow: var(--inset);
}
.site-footer__name { font-weight: 800; margin-bottom: .4em; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.site-footer__links a { color: var(--text); text-decoration: none; }
.site-footer__links a:hover { color: var(--accent); }
.site-footer__copy { margin-top: 18px; font-size: .85rem; }
@media (max-width: 700px) { .site-footer__inner { grid-template-columns: 1fr; padding: 22px; } }

/* Шапка страницы раздела */
.page-head { padding-block: clamp(24px, 5vw, 48px) 8px; }
.page-head p { max-width: 70ch; color: var(--muted); font-size: 1.08rem; }

/* components.css */
/* Панель: выпуклый блок */
.panel { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--raised); padding: clamp(18px, 3.5vw, 32px); }
.panel--inset { box-shadow: var(--inset); }
.panel > :last-child { margin-bottom: 0; }

/* Карточки */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.cards > li { display: flex; }
.card {
  flex: 1; display: flex; gap: 18px; align-items: flex-start;
  padding: 24px; border-radius: var(--radius-lg); box-shadow: var(--raised);
  color: var(--text); text-decoration: none;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
a.card:hover { transform: translateY(-2px); box-shadow: 9px 9px 20px var(--shadow-dark), -9px -9px 20px var(--shadow-light); }
a.card:active { transform: none; box-shadow: var(--inset); }
.card--muted { opacity: .8; }
.card__icon {
  flex: none; display: grid; place-items: center; width: 52px; height: 52px;
  border-radius: 16px; box-shadow: var(--inset-sm); color: var(--accent); font-size: 24px;
}
.card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card__title { font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.card__text { color: var(--muted); font-size: .95rem; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 6px 0 0; }
.tag { font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; box-shadow: var(--inset-sm); color: var(--muted); }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-text); vertical-align: middle; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 22px; border: 0; border-radius: 14px;
  background: var(--surface); color: var(--text); box-shadow: var(--raised-sm);
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  transition: box-shadow .2s var(--ease), color .2s, transform .2s;
}
.btn:hover { color: var(--accent); }
.btn:active { box-shadow: var(--inset-sm); transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: var(--raised-sm); color: var(--muted); }
.btn--primary:disabled { color: var(--accent-text); opacity: .45; }
.btn--primary { background: var(--accent); color: var(--accent-text); }
.btn--primary:hover { color: var(--accent-text); filter: brightness(1.08); }
.btn--danger:hover { color: var(--danger); }
.btn svg { font-size: 1.15em; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  border: 0; border-radius: 14px; background: var(--surface); color: var(--text);
  box-shadow: var(--raised-sm); cursor: pointer; font-size: 20px;
}
.icon-btn:hover { color: var(--accent); }
.icon-btn:active { box-shadow: var(--inset-sm); }
.icon-btn--sm { width: 36px; height: 36px; border-radius: 10px; font-size: 16px; }

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

/* Поля формы */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field__label { font-weight: 600; font-size: .95rem; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 0; border-radius: 12px;
  background: var(--surface); color: var(--text); box-shadow: var(--inset-sm); font: inherit;
}
.textarea { min-height: 220px; resize: vertical; font-family: var(--mono); font-size: .92rem; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.fields { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* Зона загрузки файлов */
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 200px; padding: 28px; text-align: center;
  border-radius: var(--radius-lg); box-shadow: var(--inset); cursor: pointer;
  transition: box-shadow .2s, color .2s;
}
.dropzone.is-over { box-shadow: var(--inset), 0 0 0 3px var(--accent); color: var(--accent); }
.dropzone__icon { font-size: 44px; color: var(--accent); }
.dropzone__title { font-weight: 700; font-size: 1.1rem; margin: 0; }
.dropzone__hint { color: var(--muted); font-size: .9rem; margin: 0; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Список файлов */
.file-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.file-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 14px; box-shadow: var(--raised-sm); }
.file-item__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file-item__meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.file-item__actions { display: flex; gap: 8px; }

/* Прогресс */
.progress { height: 14px; border-radius: 999px; box-shadow: var(--inset-sm); overflow: hidden; }
.progress__bar { height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .2s; }
.progress-label { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); margin-bottom: 8px; }

/* Уведомления */
.toast-region { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100% - 32px)); }
.toast { padding: 14px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--raised); border-left: 4px solid var(--accent); animation: toast-in .25s var(--ease); }
.toast--error { border-left-color: var(--danger); }
.toast--success { border-left-color: var(--success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Выноски */
.callout { padding: 18px 22px; border-radius: var(--radius); box-shadow: var(--inset-sm); border-left: 4px solid var(--accent); margin: 0 0 1.2em; }
.callout--warning { border-left-color: var(--warning); }
.callout > :last-child { margin-bottom: 0; }

/* Главный экран */
.hero { padding-block: clamp(36px, 8vw, 96px) clamp(24px, 5vw, 48px); display: grid; gap: var(--gap); grid-template-columns: 1.3fr 1fr; align-items: center; }
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 52ch; }
.hero__eyebrow { display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero__art { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 22px; border-radius: 32px; box-shadow: var(--inset); }
.hero__tile { aspect-ratio: 1; display: grid; place-items: center; border-radius: 22px; box-shadow: var(--raised); font: 800 clamp(1rem, 2.4vw, 1.5rem)/1 var(--mono); color: var(--accent); }
.hero__tile:nth-child(even) { box-shadow: var(--inset-sm); color: var(--muted); }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } .hero__art { max-width: 420px; } }
@media (max-width: 600px) { .hero__art { display: none; } }

/* Статьи уроков */
.prose { max-width: 76ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose li + li { margin-top: .3em; }

/* Вкладки */
.tabs__list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tabs__tab { border: 0; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--raised-sm); cursor: pointer; }
.tabs__tab[aria-selected="true"] { box-shadow: var(--inset-sm); color: var(--accent); }

/* Таблицы */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--inset-sm); margin-bottom: 1.2em; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid color-mix(in srgb, var(--shadow-dark) 50%, transparent); }
th { font-weight: 700; }
