:root {
  color-scheme: dark;
  --bg: #1e232e;
  --bg-soft: #161b25;
  --panel: #252b37;
  --panel-2: #161b25;
  --panel-3: #2d3442;
  --line: #343a48;
  --line-strong: #3e4656;
  --text: #e6ebf1;
  --muted: #a0a8b5;
  --faint: #6b7280;
  --accent: #2f80ed;
  --accent-2: #2374d9;
  --hot: #e53935;
  --green: #43b26e;
  --yellow: #f5b022;
  --shadow: 0 2px 8px rgba(0,0,0,.25);
  --header-h: 76px;
  --footer-h: 58px;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #eef1f5;
  --bg-soft: #e5e9ef;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --panel-3: #e9edf2;
  --line: #cbd1da;
  --line-strong: #aeb6c2;
  --text: #1e232e;
  --muted: #5f6875;
  --faint: #828b98;
  --accent: #2f80ed;
  --accent-2: #2374d9;
  --hot: #e53935;
  --green: #2f9d5c;
  --yellow: #c98705;
  --shadow: 0 2px 8px rgba(44,66,90,.18);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: Inter, "Segoe UI", Arial, sans-serif; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.portal-app {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--header-h) minmax(0, 1fr) var(--footer-h);
  overflow: hidden;
  background:
    radial-gradient(circle at 78% -20%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 38%),
    radial-gradient(circle at 8% 85%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34%),
    var(--bg);
  transition: width .25s ease, height .25s ease, border-radius .25s ease;
}

.portal-app.is-mobile-preview {
  width: min(430px, calc(100% - 24px));
  height: min(860px, calc(100dvh - 24px));
  margin: 12px auto;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.portal-header {
  position: relative;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(480px, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 1.5vw, 26px);
  padding: 10px clamp(14px, 2vw, 34px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-soft) 91%, transparent);
  backdrop-filter: blur(18px);
}

.portal-brand { display: flex; align-items: center; gap: 10px; min-width: 185px; color: inherit; text-decoration: none; }
.portal-brand-mark { display: grid; place-items: center; width: 50px; height: 46px; overflow: hidden; border-radius: 10px; background: #0d1726; box-shadow: 0 10px 30px color-mix(in srgb, var(--accent-2) 28%, transparent); }
.portal-brand-mark img { width: 44px; height: 38px; object-fit: contain; filter: brightness(0) invert(1); }
.portal-brand strong, .portal-brand small { display: block; }
.portal-brand strong { font-size: 14px; letter-spacing: .02em; }
.portal-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.portal-nav { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.portal-nav::-webkit-scrollbar { display: none; }
.portal-nav-link { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; cursor: pointer; white-space: nowrap; }
.portal-nav-link span { color: var(--faint); font-size: 13px; }
.portal-nav-link:hover { color: var(--text); background: var(--panel-2); }
.portal-nav-link.is-active { color: white; background: var(--accent); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 24%, transparent); }
.portal-nav-link.is-active span { color: white; }

.portal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.portal-search { width: clamp(120px, 13vw, 220px); height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--muted); }
.portal-search:focus-within { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.portal-search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 12px; }
.portal-search input::placeholder { color: var(--faint); }
.action-button { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--muted); font-weight: 900; cursor: pointer; }
.action-button:hover { color: var(--text); border-color: var(--line-strong); background: var(--panel-2); }
.action-ai { border: 0; background: var(--hot); color: white; font-size: 11px; }
.action-bell b { position: absolute; top: -5px; right: -5px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid var(--bg-soft); border-radius: 9px; background: var(--hot); color: white; font-size: 9px; }
.action-bell b:empty { display: none; }

.portal-main { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.portal-main::-webkit-scrollbar { width: 8px; }
.portal-main::-webkit-scrollbar-thumb { border-radius: 8px; background: var(--line-strong); }
.portal-main.is-simulator { overflow: hidden; }
.screen { width: min(1420px, calc(100% - 36px)); min-height: 100%; margin: 0 auto; padding: clamp(24px, 3vw, 46px) 0 54px; animation: screen-in .22s ease both; }
.screen.screen-simulator { width: 100%; height: 100%; padding: 12px; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.page-heading small, .eyebrow { display: block; margin-bottom: 6px; color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.page-heading h1 { margin: 0; font-size: clamp(32px, 4.2vw, 62px); line-height: .95; letter-spacing: -.045em; }
.page-heading p { max-width: 720px; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.heading-actions, .segmented { display: flex; gap: 6px; }
.segmented { padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.segmented button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.segmented button.is-active { background: var(--accent); color: #071018; }

.hero-panel { position: relative; overflow: hidden; padding: clamp(24px, 4vw, 56px); border: 1px solid var(--line); border-radius: 26px; background: linear-gradient(125deg, color-mix(in srgb, var(--panel-2) 96%, transparent), color-mix(in srgb, var(--accent-2) 19%, var(--panel))); box-shadow: var(--shadow); }
.hero-panel::after { content: "БАС"; position: absolute; right: -14px; bottom: -42px; color: color-mix(in srgb, var(--text) 5%, transparent); font-size: clamp(120px, 20vw, 300px); font-weight: 950; line-height: 1; pointer-events: none; }
.course-hero { min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; background-image: linear-gradient(90deg, rgba(8,11,18,.97) 0%, rgba(8,11,18,.82) 46%, rgba(8,11,18,.18) 100%), url('../images/course-lis-composition.png'); background-size: cover; background-position: center; }
.course-hero::after { content: "БАС"; color: rgba(242,246,252,.055); }
.course-hero h2, .course-hero p { max-width: 720px; }
.hero-panel h2 { position: relative; z-index: 1; max-width: 880px; margin: 0; font-size: clamp(34px, 5vw, 76px); line-height: .96; letter-spacing: -.05em; }
.hero-panel p { position: relative; z-index: 1; max-width: 760px; margin: 18px 0 0; color: var(--muted); line-height: 1.6; }
.hero-chips { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.hero-chips span, .chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--panel) 80%, transparent); color: var(--muted); font-size: 10px; font-weight: 800; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 14px 0 28px; }
.stat-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { margin-top: 8px; font-size: 24px; }

.content-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: start; gap: 18px; }
.filter-panel { position: sticky; top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.filter-panel h3 { margin: 0 0 12px; font-size: 13px; }
.filter-button { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-size: 12px; cursor: pointer; }
.filter-button:hover, .filter-button.is-active { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.filter-button span { color: var(--faint); }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.content-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 18px 38px rgba(0,0,0,.16); }
.card-cover { position: relative; min-height: 150px; padding: 16px; display: flex; align-items: flex-end; background: linear-gradient(135deg, color-mix(in srgb, var(--accent-2) 78%, #0c1020), color-mix(in srgb, var(--accent) 44%, #071019)); background-size: cover; background-position: center; }
.card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 28%, rgba(3,7,13,.72)); }
.card-cover .card-type { position: relative; z-index: 1; }
.card-type { display: inline-flex; min-height: 25px; align-items: center; padding: 0 9px; border-radius: 999px; background: rgba(8,12,20,.72); color: white; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; backdrop-filter: blur(8px); }
.card-type.is-hot { background: var(--hot); }
.card-body { padding: 16px; }
.card-body h3 { min-height: 42px; margin: 0; font-size: 16px; line-height: 1.3; }
.card-body p { min-height: 54px; margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; color: var(--faint); font-size: 10px; }
.card-action { min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--text); font-size: 10px; font-weight: 900; cursor: pointer; }
.card-action:hover { border-color: var(--accent); color: var(--accent); }

.feed-layout { display: grid; grid-template-columns: 230px minmax(0, 760px) minmax(240px, 1fr); align-items: start; gap: 18px; }
.feed-list { display: grid; gap: 14px; }
.feed-post { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.post-author { display: flex; align-items: center; gap: 11px; }
.post-avatar { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); }
.post-avatar img { width: 36px; height: 36px; display: block; object-fit: contain; }
.post-author strong, .post-author span { display: block; }
.post-author span { margin-top: 3px; color: var(--faint); font-size: 10px; }
.feed-post h2 { margin: 16px 0 8px; font-size: 21px; }
.feed-post p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.post-media { min-height: 210px; margin-top: 15px; border-radius: 15px; background: radial-gradient(circle at 70% 30%, rgba(50,199,244,.4), transparent 28%), linear-gradient(135deg, #141d2b, #263257 55%, #0c1019); }
.post-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 13px; color: var(--faint); font-size: 11px; }
.feed-aside { position: sticky; top: 18px; display: grid; gap: 14px; }
.aside-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.aside-card h3 { margin: 0 0 13px; font-size: 14px; }
.aside-link { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); text-align: left; font-size: 12px; cursor: pointer; }
.aside-link:last-child { border-bottom: 0; }
.aside-link:hover { color: var(--accent); }

.course-list { display: grid; gap: 9px; margin-top: 18px; }
.course-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 68px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.course-number { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--panel-3); color: var(--accent); font-size: 12px; font-weight: 950; }
.course-title strong, .course-title span { display: block; }
.course-title strong { font-size: 13px; }
.course-title span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.status-pill { padding: 5px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 9px; font-weight: 900; }
.status-pill.done { background: color-mix(in srgb, var(--green) 13%, transparent); color: var(--green); }

.simulator-card .card-cover { min-height: 250px; align-items: flex-end; justify-content: flex-start; }
.simulator-cover { background-color: #111827; background-position: center; }
.simulator-cover::after { background: linear-gradient(180deg, rgba(3,7,13,.04) 34%, rgba(3,7,13,.88) 100%); }
.simulator-status { position: relative; z-index: 2; }
.simulator-card .card-action:disabled { border-color: var(--line); color: var(--faint); cursor: not-allowed; opacity: .78; }
.sim-device { position: relative; z-index: 1; width: 72%; aspect-ratio: 1.8; border: 10px solid #1d2430; border-radius: 18px; background: linear-gradient(135deg, #3e4a59, #161d27); box-shadow: 0 22px 40px rgba(0,0,0,.36); }
.sim-device::before { content: "ToolkitRC"; position: absolute; top: 9px; left: 13px; color: #e7edf4; font-size: 10px; font-weight: 900; }
.sim-device::after { content: "M6DAC"; position: absolute; inset: 30% 18%; display: grid; place-items: center; border: 2px solid #263b49; border-radius: 8px; background: linear-gradient(135deg, #0a526b, #02151e); color: #67e5ff; font-size: clamp(16px, 2vw, 27px); font-weight: 950; letter-spacing: .06em; }
.sim-device.m8::after { content: "M8D"; color: #ffc247; background: linear-gradient(135deg, #583800, #160e00); }

.forum-list { display: grid; gap: 10px; }
.forum-topic { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.forum-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--panel-3); color: var(--accent); }
.forum-copy h3 { margin: 0; font-size: 14px; }
.forum-copy p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.forum-stats { display: flex; gap: 16px; color: var(--faint); font-size: 10px; }
.forum-stats b { display: block; color: var(--text); font-size: 13px; }

.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.lesson-panel, .lesson-aside { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.lesson-panel { padding: 18px; }
.lesson-aside { padding: 18px; }
.video-shell { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 15px; background: #02040a; }
.video-shell video { width: 100%; height: 100%; display: block; object-fit: contain; }
.video-shell video::-webkit-media-controls-overflow-button { display: none !important; }
.video-menu-button { position: absolute; z-index: 8; top: 12px; right: 12px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.2); border-radius: 10px; background: rgba(6,11,20,.88); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; backdrop-filter: blur(10px); }
.video-menu-button:hover, .video-menu-button[aria-expanded="true"] { border-color: var(--accent); background: #0e2441; }
.video-settings-menu { position: absolute; z-index: 7; top: 56px; right: 12px; overflow-y: auto; width: min(270px, calc(100% - 24px)); max-height: calc(100% - 68px); padding: 10px; border: 1px solid rgba(154,170,192,.3); border-radius: 13px; background: rgba(8,16,28,.96); box-shadow: 0 18px 48px rgba(0,0,0,.5); color: #f2f6fc; backdrop-filter: blur(18px); }
.video-settings-menu[hidden] { display: none; }
.video-settings-menu label { display: grid; grid-template-columns: minmax(0,1fr) 120px; align-items: center; gap: 12px; min-height: 42px; padding: 4px 6px; border-bottom: 1px solid rgba(154,170,192,.14); color: #c6d3e3; font-size: 12px; }
.video-settings-menu label:last-child { border-bottom: 0; }
.video-settings-menu select { width: 100%; min-height: 32px; border: 1px solid #26364d; border-radius: 8px; background: #151f30; color: #f2f6fc; padding: 0 8px; }
.video-settings-menu select:disabled { opacity: .6; }
.video-empty { height: 100%; display: grid; place-items: center; color: var(--muted); background: radial-gradient(circle, #1f3555, #080b12 65%); }
.lesson-tabs { display: flex; gap: 6px; margin: 14px 0; overflow-x: auto; }
.lesson-tabs button { flex: 0 0 auto; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.lesson-tabs button.is-active { border-color: var(--accent); color: var(--accent); }
.lesson-copy { min-height: 130px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); color: var(--muted); font-size: 13px; line-height: 1.7; }
.lesson-copy h3 { margin: 0 0 8px; color: var(--text); }
.lesson-copy .lesson-test { display: grid; gap: 14px; }
.lesson-copy .test-question { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.lesson-copy .test-question[hidden] { display: none; }
.lesson-copy .test-question h4 { margin: 0 0 10px; color: var(--text); font-size: 14px; }
.lesson-copy .test-question ol { display: grid; gap: 6px; margin: 0; padding-left: 24px; }
.lesson-copy .test-question li { padding: 7px 9px; border-radius: 8px; background: var(--panel-3); }
.lesson-copy .test-answer { display: none; }
.lesson-copy .lesson-test.is-interactive { gap: 16px; }
.lesson-copy .test-progress { position: relative; overflow: hidden; display: flex; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--muted); font-size: 12px; }
.lesson-copy .test-progress::after { position: absolute; left: 0; bottom: 0; width: var(--test-progress, 0%); height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); content: ""; transition: width .2s ease; }
.lesson-copy .test-progress strong { color: var(--text); }
.lesson-copy .test-options { display: grid; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.lesson-copy .test-option { display: grid; grid-template-columns: 20px 22px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; background: var(--panel-3); color: var(--muted); cursor: pointer; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.lesson-copy .test-option:hover { border-color: color-mix(in srgb, var(--accent) 48%, var(--line)); color: var(--text); }
.lesson-copy .test-option.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, var(--panel-3)); color: var(--text); }
.lesson-copy .test-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.lesson-copy .test-option-marker { color: var(--accent); font-weight: 900; }
.lesson-copy .test-option-copy { min-width: 0; }
.lesson-copy .test-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.lesson-copy .test-actions button[hidden] { display: none; }
.lesson-copy .test-result { padding: 16px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--accent) 9%, var(--panel)); }
.lesson-copy .test-result[hidden] { display: none; }
.lesson-copy .test-result h4 { margin: 5px 0 13px; color: var(--text); font-size: 18px; }
.lesson-copy .test-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.lesson-copy .test-result-grid div { display: grid; gap: 2px; padding: 12px; border-radius: 10px; background: var(--panel-3); }
.lesson-copy .test-result-grid strong { color: var(--text); font-size: 22px; }
.lesson-copy .test-result-grid span { color: var(--muted); font-size: 10px; line-height: 1.35; }
@media (max-width: 560px) { .lesson-copy .test-result-grid { grid-template-columns: 1fr; } }
.lesson-aside h3 { margin: 0 0 9px; }
.lesson-aside p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.lesson-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.lesson-navigation .primary-button:last-child { grid-column: 1 / -1; }

.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 15px; border-radius: 10px; text-decoration: none; font-size: 11px; font-weight: 900; cursor: pointer; }
.primary-button { border: 0; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: white; }
.secondary-button { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); }

.article-page { max-width: 980px; }
.article-cover { min-height: 340px; margin: 20px 0; border-radius: 22px; background: linear-gradient(135deg, #272e58, #0c708a); background-size: cover; background-position: center; }
.article-body { padding: clamp(20px, 4vw, 48px); border: 1px solid var(--line); border-radius: 22px; background: var(--panel); color: var(--muted); font-size: 15px; line-height: 1.75; }
.article-body h2, .article-body h3 { color: var(--text); }

.simulator-toolbar { height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px 14px 0 0; background: var(--panel); }
.simulator-toolbar div { min-width: 0; }
.simulator-toolbar strong, .simulator-toolbar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.simulator-toolbar span { color: var(--muted); font-size: 10px; }
.simulator-frame { width: 100%; height: calc(100% - 48px); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; background: #eef3f8; }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.service-card h2 { margin: 0 0 10px; font-size: 18px; }
.service-card p, .service-card li { color: var(--muted); font-size: 12px; line-height: 1.6; }
.service-card ul { margin: 0; padding-left: 18px; }

.portal-footer { z-index: 30; min-width: 0; display: grid; grid-template-columns: minmax(240px, 1fr) auto auto minmax(140px, 1fr); align-items: center; gap: clamp(10px, 1.4vw, 20px); padding: 0 clamp(14px, 2vw, 34px); border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); }
.footer-brand { min-width: 0; display: flex; align-items: center; font-size: 10px; }
.footer-brand b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-footer nav { display: flex; gap: 6px; }
.portal-footer button { border: 0; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.portal-footer button:hover { color: var(--accent); }
.footer-status { justify-self: end; display: flex; align-items: center; gap: 7px; font-size: 10px; }
.footer-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }

.rustore-badge {
  width: 132px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #000;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rustore-badge:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}

.rustore-badge:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 32%, transparent);
  outline-offset: 2px;
}

.rustore-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #050607;
}

.popover-layer { position: fixed; z-index: 100; inset: var(--header-h) 0 var(--footer-h); background: rgba(0,0,0,.28); }
.portal-popover { position: absolute; top: 10px; right: 18px; width: min(380px, calc(100% - 28px)); max-height: min(620px, calc(100% - 20px)); overflow-y: auto; padding: 18px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--panel-2); box-shadow: var(--shadow); }
.popover-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.popover-heading small { color: var(--accent); font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.popover-heading h2 { margin: 3px 0 0; font-size: 22px; }
.popover-heading button, .dialog-heading button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--muted); cursor: pointer; }
.notification-list { display: grid; gap: 8px; margin: 16px 0; }
.notification-item { display: grid; grid-template-columns: 10px minmax(0,1fr); gap: 9px; padding: 11px; border-radius: 11px; background: var(--panel); }
.notification-item i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--hot); }
.notification-item strong, .notification-item span { display: block; }
.notification-item strong { font-size: 12px; }
.notification-item span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.text-button { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--accent); font-size: 11px; font-weight: 850; cursor: pointer; }
.ai-quick-actions { display: grid; gap: 8px; margin-top: 14px; }
.ai-quick-actions button { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-align: left; font-size: 11px; cursor: pointer; }
.profile-summary { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.profile-avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: white; font-weight: 950; }
.profile-summary strong, .profile-summary span { display: block; }
.profile-summary span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.profile-progress { margin-bottom: 18px; }
.profile-progress span { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.profile-progress i { display: block; height: 7px; margin-top: 8px; overflow: hidden; border-radius: 5px; background: var(--panel); }
.profile-progress i b { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }

.course-dialog { width: min(760px, calc(100% - 24px)); max-height: min(760px, calc(100% - 24px)); padding: 18px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--panel-2); color: var(--text); box-shadow: var(--shadow); }
.course-dialog::backdrop { background: rgba(0,0,0,.64); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 14px; }
.dialog-heading small { color: var(--accent); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.dialog-heading h2 { margin: 4px 0 0; }
.dialog-course-list { display: grid; gap: 7px; max-height: 570px; overflow-y: auto; }
.dialog-course-list button { width: 100%; display: grid; grid-template-columns: 30px minmax(0,1fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-align: left; font-size: 11px; cursor: pointer; }

.loading-view { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.loading-view span { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { padding: 46px; border: 1px dashed var(--line-strong); border-radius: 18px; color: var(--muted); text-align: center; }
.portal-toast { position: fixed; z-index: 200; left: 50%; bottom: calc(var(--footer-h) + 16px); max-width: min(500px, calc(100% - 28px)); padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-2); color: var(--text); box-shadow: var(--shadow); font-size: 11px; opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .2s ease; }
.portal-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1280px) {
  :root { --header-h: 118px; }
  .portal-header { grid-template-columns: auto 1fr; grid-template-rows: 52px 46px; padding-block: 8px; }
  .portal-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .portal-actions { grid-column: 2; grid-row: 1; }
  .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .feed-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .feed-aside { grid-column: 1 / -1; position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .portal-search { width: 42px; }
  .portal-search input { position: fixed; z-index: 120; top: calc(var(--header-h) + 10px); left: 12px; right: 12px; width: calc(100% - 24px); height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel-2); box-shadow: var(--shadow); opacity: 0; pointer-events: none; }
  .portal-search:focus-within input { opacity: 1; pointer-events: auto; }
  .feed-layout, .lesson-layout { grid-template-columns: 1fr; }
  .feed-aside { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .content-layout { grid-template-columns: 1fr; }
  .filter-panel { position: static; display: flex; gap: 5px; overflow-x: auto; }
  .filter-panel h3 { display: none; }
  .filter-button { flex: 0 0 auto; width: auto; }
  .lesson-aside { order: -1; }
  .service-grid { grid-template-columns: 1fr; }
  .portal-footer { grid-template-columns: auto 1fr auto; }
  .footer-status { display: none; }
  .portal-footer nav { justify-self: center; }
}

@media (max-width: 620px), (max-height: 620px) and (max-width: 900px) {
  :root { --header-h: 112px; --footer-h: 84px; }
  .portal-app.is-mobile-preview { width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .portal-header { grid-template-columns: minmax(0,1fr) auto; gap: 6px; padding: 6px 8px; }
  .portal-brand { min-width: 0; }
  .portal-brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .portal-brand strong { font-size: 12px; }
  .portal-brand small { display: none; }
  .portal-actions { gap: 4px; }
  .action-button, .portal-search { width: 34px; height: 34px; border-radius: 9px; }
  .action-viewport { display: none; }
  .portal-nav { width: 100%; }
  .portal-nav-link { min-height: 38px; padding: 0 9px; font-size: 10px; }
  .screen { width: calc(100% - 20px); padding: 20px 0 36px; }
  .screen.screen-simulator { width: 100%; padding: 6px; }
  .page-heading { display: block; }
  .page-heading h1 { font-size: 38px; }
  .heading-actions { margin-top: 14px; }
  .hero-panel { padding: 22px; border-radius: 18px; }
  .hero-panel h2 { font-size: 36px; }
  .course-hero { min-height: 390px; background-image: linear-gradient(180deg, rgba(8,11,18,.16), rgba(8,11,18,.96) 72%), url('../images/course-lis-composition.png'); background-position: 58% center; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .card-grid, .card-grid.two, .feed-aside { grid-template-columns: 1fr; }
  .card-cover { min-height: 140px; }
  .course-row { grid-template-columns: 36px minmax(0,1fr) auto; }
  .course-row .status-pill { display: none; }
  .course-row .card-action { grid-column: 3; }
  .forum-topic { grid-template-columns: 40px minmax(0,1fr); }
  .forum-stats { grid-column: 2; }
  .portal-footer { grid-template-columns: 1fr auto; grid-template-rows: 44px 32px; gap: 0 8px; padding: 4px 10px; }
  .footer-brand { grid-column: 1; grid-row: 1; }
  .footer-status { display: none; }
  .portal-footer nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .rustore-badge { grid-column: 2; grid-row: 1; width: 116px; height: 38px; border-radius: 9px; }
  .portal-footer button { padding: 0 4px; font-size: 9px; }
  .simulator-toolbar { height: 44px; }
  .simulator-frame { height: calc(100% - 44px); }
}

/* v2.1 — технологичная графитовая тема и каталог программ обучения */
.segmented button.is-active { color: #fff; }
.primary-button { background: var(--hot); }
.primary-button:hover { background: color-mix(in srgb, var(--hot) 86%, #000); }
.secondary-button { border-color: color-mix(in srgb, var(--accent) 62%, var(--line)); color: var(--accent); }
.secondary-button:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); }

.portal-brand-mark,
.portal-nav-link,
.portal-search,
.action-button,
.segmented,
.segmented button,
.content-card,
.feed-post,
.aside-card,
.filter-panel,
.stat-card,
.course-row,
.lesson-main,
.lesson-aside,
.article-card,
.forum-topic,
.service-card,
.portal-popover,
.course-dialog,
.card-action,
.primary-button,
.secondary-button,
.simulator-toolbar,
.simulator-frame,
.rustore-badge { border-radius: 6px; }

.hero-panel { border-top: 2px solid var(--hot); border-radius: 8px; }
.content-card,
.feed-post,
.article-card,
.service-card,
.course-row { transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.content-card:hover,
.feed-post:hover,
.article-card:hover,
.service-card:hover,
.course-row:hover { border-color: var(--line-strong); background: var(--panel-3); transform: translateY(-2px); }

.education-catalog { display: grid; gap: 18px; }
.course-catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.course-catalog-card {
  min-height: 270px;
  display: grid;
  grid-template-columns: minmax(190px, 38%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}
.course-catalog-card:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--panel-3); }
.course-catalog-card.is-unavailable { opacity: .76; }
.course-catalog-card.is-unavailable:hover { transform: none; }
.course-catalog-cover { position: relative; min-height: 270px; overflow: hidden; background-color: var(--bg-soft); background-position: center; background-size: cover; }
.course-catalog-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(9,13,20,.82)); }
.course-cover-lis { background-image: linear-gradient(115deg, rgba(22,27,37,.18), rgba(22,27,37,.45)), url('../images/course-cover.png'); }
.course-cover-elka { background-image: linear-gradient(135deg, rgba(47,128,237,.26), rgba(22,27,37,.88)), url('../images/course-cover.png'); background-position: 68% center; }
.course-cover-pzrk { background-image: radial-gradient(circle at 70% 26%, rgba(229,57,53,.38), transparent 22%), linear-gradient(135deg, #2d3442, #161b25 72%); }
.course-cover-pzrk-alt { background-image: radial-gradient(circle at 24% 72%, rgba(245,176,34,.28), transparent 24%), linear-gradient(145deg, #252b37, #161b25 76%); }
.course-catalog-number { position: absolute; z-index: 2; left: 16px; bottom: 12px; color: rgba(230,235,241,.92); font-size: clamp(54px, 7vw, 92px); font-weight: 950; line-height: .8; letter-spacing: -.08em; }
.course-access-status { position: absolute; z-index: 3; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 9px; border: 1px solid color-mix(in srgb, var(--green) 60%, transparent); border-radius: 5px; background: color-mix(in srgb, var(--green) 18%, var(--bg-soft)); color: #a8efc1; font-size: 9px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.course-access-status.is-locked { border-color: var(--line-strong); background: color-mix(in srgb, var(--faint) 16%, var(--bg-soft)); color: var(--muted); }
.course-catalog-body { min-width: 0; display: flex; flex-direction: column; padding: 24px; }
.course-catalog-body h2 { margin: 0; font-size: clamp(21px, 2vw, 30px); line-height: 1.15; }
.course-catalog-body p { margin: 12px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.course-catalog-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; margin-bottom: 16px; }
.course-catalog-meta span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-2); color: var(--muted); font-size: 9px; font-weight: 800; }
.course-catalog-action { width: 100%; }
.course-catalog-action:disabled { cursor: not-allowed; border-color: var(--line); background: var(--panel-2); color: var(--faint); }

@media (max-width: 980px) {
  .course-catalog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .course-catalog-card { grid-template-columns: 1fr; }
  .course-catalog-cover { min-height: 180px; }
  .course-catalog-body { padding: 18px; }
}

/* v2.2 — профессиональный симулятор полного цикла БВС */
.flight-simulator-page {
  --sim-bg: #0b0f12;
  --sim-panel: #101820;
  --sim-panel-2: #16212b;
  --sim-line: #2a3945;
  --sim-green: #8ed52f;
  --sim-green-bright: #b3f064;
  --sim-text: #e6ebf1;
  --sim-muted: #9aabb8;
  max-width: 1600px;
  color: var(--sim-text);
}

.flight-sim-hero,
.flight-sim-section,
.flight-sim-mission,
.flight-sim-final {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sim-line);
  border-radius: 8px;
  background: var(--sim-bg);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28);
}

.flight-sim-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr);
  min-height: 760px;
  isolation: isolate;
}

.flight-sim-hero::before,
.flight-sim-final::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(142, 213, 47, .04) 1px, transparent 1px),
    linear-gradient(rgba(142, 213, 47, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
}

.flight-sim-hero-copy {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(34px, 4.5vw, 68px);
  text-align: left;
  background: linear-gradient(115deg, #0b0f12 0%, #0b0f12 72%, #101820 100%);
}

.flight-sim-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--sim-green-bright);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.flight-sim-kicker i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sim-green);
  box-shadow: 0 0 16px rgba(142, 213, 47, .9);
}

.flight-sim-hero h1 {
  max-width: 650px;
  margin: 22px 0 20px;
  color: var(--sim-text);
  font-size: clamp(34px, 3.25vw, 54px);
  line-height: 1.01;
  letter-spacing: -.045em;
}

.flight-sim-hero-copy > p {
  max-width: 650px;
  margin: 0 0 28px;
  color: var(--sim-muted);
  font-size: 14px;
  line-height: 1.7;
}

.flight-sim-download {
  min-height: 52px;
  width: fit-content;
  padding: 0 22px;
  border: 1px solid rgba(142, 213, 47, .78);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(142, 213, 47, .19), rgba(142, 213, 47, .08));
  color: var(--sim-green-bright);
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .06em;
  box-shadow: inset 0 0 20px rgba(142, 213, 47, .04), 0 0 24px rgba(142, 213, 47, .08);
  opacity: 1;
  cursor: not-allowed;
}

.flight-sim-hero-copy > small {
  margin-top: 12px;
  color: #748894;
  font-size: 10px;
}

.flight-sim-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.flight-sim-platforms span {
  padding: 7px 10px;
  border: 1px solid #23323d;
  border-radius: 4px;
  color: #81939f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.flight-sim-visual {
  position: relative;
  min-width: 0;
  min-height: 760px;
  background: #080c0f;
}

.flight-sim-visual::before,
.flight-sim-visual::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.flight-sim-visual::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 10, .48), rgba(5, 8, 10, .08) 30%, rgba(5, 8, 10, .2)),
    linear-gradient(180deg, rgba(5, 8, 10, .08) 52%, rgba(5, 8, 10, .68) 100%);
}

.flight-sim-visual::after {
  inset: 22px;
  border: 1px solid rgba(142, 213, 47, .18);
  border-radius: 4px;
  box-shadow: inset 18px 0 32px rgba(0, 0, 0, .25);
}

.flight-sim-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 0;
  filter: saturate(.88) contrast(1.04) brightness(.62);
}

.flight-sim-hud {
  position: absolute;
  z-index: 3;
  right: 34px;
  bottom: 34px;
  left: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.flight-sim-hud span {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(142, 213, 47, .3);
  border-radius: 4px;
  background: rgba(8, 13, 16, .82);
  color: #c4d0d7;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .05em;
  text-align: center;
  backdrop-filter: blur(8px);
}

.flight-sim-section {
  margin-top: 18px;
  padding: clamp(34px, 4vw, 58px);
  background: linear-gradient(145deg, #101820, #0b1116 72%);
}

.flight-sim-heading {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
}

.flight-sim-heading > span,
.flight-sim-final > span {
  color: var(--sim-green);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .14em;
}

.flight-sim-heading h2,
.flight-sim-mission h2,
.flight-sim-final h2 {
  margin: 12px 0;
  color: var(--sim-text);
  font-size: clamp(27px, 3vw, 43px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.flight-sim-heading p,
.flight-sim-mission p,
.flight-sim-final p {
  margin: 0;
  color: var(--sim-muted);
  font-size: 13px;
  line-height: 1.65;
}

.flight-sim-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.flight-sim-card {
  position: relative;
  min-height: 240px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid #2a3945;
  border-radius: 6px;
  background: linear-gradient(145deg, #16212b, #101820);
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease;
}

.flight-sim-card:hover {
  transform: translateY(-3px);
  border-color: rgba(142, 213, 47, .54);
  background: #192630;
}

.flight-sim-card-number {
  position: absolute;
  top: 14px;
  right: 16px;
  color: rgba(142, 213, 47, .19);
  font-size: 42px;
  font-weight: 950;
  line-height: 1;
}

.flight-sim-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 32px;
  border: 1px solid rgba(142, 213, 47, .48);
  border-radius: 5px;
  color: var(--sim-green-bright);
  font-size: 23px;
  box-shadow: inset 0 0 20px rgba(142, 213, 47, .07);
}

.flight-sim-card h3 {
  margin: 0 0 10px;
  color: var(--sim-text);
  font-size: 17px;
  line-height: 1.2;
}

.flight-sim-card p {
  margin: 0;
  color: var(--sim-muted);
  font-size: 11px;
  line-height: 1.6;
}

.flight-sim-mission {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px 28px;
  align-items: center;
  padding: clamp(34px, 5vw, 64px);
  background: radial-gradient(circle at 12% 50%, rgba(142, 213, 47, .14), transparent 28%), #0b0f12;
}

.flight-sim-mission-number {
  grid-row: 1;
  color: var(--sim-green);
  font-size: clamp(116px, 14vw, 190px);
  font-weight: 950;
  line-height: .75;
  text-shadow: 0 0 32px rgba(142, 213, 47, .24);
}

.flight-sim-flow {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  margin-top: 32px;
}

.flight-sim-flow span {
  position: relative;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid #263844;
  border-radius: 5px;
  background: #101820;
  color: #c8d3da;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.3;
}

.flight-sim-flow span:not(:last-child)::after {
  content: "›";
  position: absolute;
  z-index: 2;
  top: 50%;
  right: -7px;
  transform: translate(50%, -50%);
  color: var(--sim-green);
  font-size: 18px;
}

.flight-sim-flow b {
  color: var(--sim-green);
  font-size: 9px;
  letter-spacing: .1em;
}

.flight-sim-final {
  min-height: 360px;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(38px, 6vw, 82px);
  text-align: center;
  background: radial-gradient(circle at 50% 100%, rgba(142, 213, 47, .15), transparent 42%), linear-gradient(160deg, #101820, #080c0f 70%);
}

.flight-sim-final h2 { max-width: 980px; }
.flight-sim-final p { max-width: 720px; margin-bottom: 24px; }

@media (max-width: 1180px) {
  .flight-sim-hero { grid-template-columns: minmax(0, .9fr) minmax(460px, 1.1fr); min-height: 680px; }
  .flight-sim-hero-copy { padding: 42px; }
  .flight-sim-visual { min-height: 680px; }
  .flight-sim-scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flight-sim-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flight-sim-flow span:nth-child(4)::after { display: none; }
}

@media (max-width: 820px) {
  .flight-sim-hero { grid-template-columns: 1fr; min-height: 0; }
  .flight-sim-hero-copy { background: linear-gradient(180deg, #0b0f12, #101820); }
  .flight-sim-visual { min-height: 0; height: clamp(330px, 68vw, 520px); }
  .flight-sim-visual::before { background: linear-gradient(180deg, transparent 48%, rgba(5, 8, 10, .6)); }
  .flight-sim-mission { grid-template-columns: 110px minmax(0, 1fr); }
  .flight-sim-hud { right: 24px; bottom: 24px; left: 24px; }
}

@media (max-width: 620px) {
  .flight-simulator-page { gap: 0; }
  .flight-sim-hero-copy { min-height: 0; padding: 30px 22px; }
  .flight-sim-hero h1 { font-size: 34px; }
  .flight-sim-hero-copy > p { font-size: 12px; }
  .flight-sim-download { width: 100%; min-height: 50px; padding: 0 12px; font-size: 9px; }
  .flight-sim-visual { height: clamp(280px, 78vw, 390px); }
  .flight-sim-hud { grid-template-columns: 1fr; right: 18px; bottom: 18px; left: 18px; }
  .flight-sim-hud span { min-height: 34px; }
  .flight-sim-section { padding: 30px 18px; }
  .flight-sim-scenarios { grid-template-columns: 1fr; }
  .flight-sim-card { min-height: 210px; }
  .flight-sim-mission { grid-template-columns: 1fr; padding: 34px 20px; }
  .flight-sim-mission-number { font-size: 116px; }
  .flight-sim-flow { grid-template-columns: 1fr; }
  .flight-sim-flow span:not(:last-child)::after { top: auto; right: 50%; bottom: -8px; transform: translate(50%, 50%) rotate(90deg); }
  .flight-sim-flow span:nth-child(4)::after { display: block; }
  .flight-sim-final { min-height: 330px; padding: 36px 20px; }
}
