:root {
  --ink: #071b2b;
  --ink-2: #123249;
  --paper: #f7f4ed;
  --card: #fffdf8;
  --line: rgba(7, 27, 43, 0.12);
  --muted: #687781;
  --mint: #79d8b4;
  --mint-dark: #3a9e7b;
  --coral: #f08a74;
  --blue: #71bceb;
  --violet: #baa7f4;
  --cream: #fff4df;
  --shadow: 0 20px 60px rgba(7, 27, 43, 0.1);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100%; background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 12px 16px; color: white; background: var(--ink); border-radius: 12px; }
.skip-link:focus { top: 16px; }
.app-shell { min-height: 100vh; padding-bottom: calc(90px + var(--safe-bottom)); }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; height: calc(72px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) clamp(18px, 4vw, 54px) 0; background: color-mix(in srgb, var(--paper) 88%, transparent); border-bottom: 1px solid transparent; backdrop-filter: blur(18px); }
.topbar.scrolled { border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.brand-mark { position: relative; display: grid; place-content: center; width: 38px; height: 38px; overflow: hidden; border-radius: 12px; background: var(--ink); transform: rotate(-4deg); }
.brand-mark i { display: block; width: 18px; height: 2px; margin: 2px; border-radius: 9px; background: var(--mint); }
.brand-mark i:nth-child(2) { width: 13px; background: var(--cream); }
.brand strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 14px; background: rgba(7,27,43,.05); cursor: pointer; }
.icon-button svg { width: 20px; }
.icon-button.bordered { background: white; border: 1px solid var(--line); }
.language-toggle { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; }
.language-toggle span { padding: 8px 7px; border-radius: 9px; color: var(--muted); font-size: 10px; font-weight: 800; }
.language-toggle span.active { color: white; background: var(--ink); }
main { width: 100%; }
main:focus { outline: none; }
.page { display: none; width: min(1240px, 100%); margin: 0 auto; padding: 26px clamp(18px, 4vw, 54px) 70px; animation: page-in .35s ease both; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
.hero { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; min-height: 490px; overflow: hidden; padding: clamp(30px, 5vw, 74px); border-radius: 36px; color: white; background: var(--ink); box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; width: 500px; height: 500px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(121,216,180,.25), transparent 67%); }
.hero-copy { position: relative; z-index: 2; align-self: center; max-width: 640px; }
.eyebrow { display: block; margin-bottom: 13px; color: var(--mint-dark); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.hero .eyebrow { color: var(--mint); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 { max-width: 720px; margin-bottom: 20px; font-size: clamp(40px, 6.5vw, 76px); line-height: .97; letter-spacing: -.055em; }
.hero p { max-width: 580px; margin-bottom: 30px; color: rgba(255,255,255,.7); font-size: clamp(16px, 2vw, 20px); line-height: 1.55; }
.primary-button, .secondary-button, .soft-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px; border-radius: 15px; font-weight: 800; cursor: pointer; }
.primary-button { border: 0; color: var(--ink); background: var(--mint); box-shadow: 0 10px 28px rgba(121,216,180,.18); }
.primary-button svg, .secondary-button svg { width: 19px; }
.primary-button.full { width: 100%; }
.secondary-button { border: 1px solid var(--line); background: white; }
.soft-button { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: white; font-size: 13px; }
.soft-button svg { width: 18px; }
.hero-visual { position: relative; z-index: 1; display: grid; place-items: center; min-height: 360px; perspective: 900px; }
.ledger-card { width: min(360px, 84%); min-height: 330px; padding: 25px; border: 1px solid rgba(255,255,255,.25); border-radius: 28px; color: var(--ink); background: linear-gradient(135deg, #fff9eb, #f1e7d0); box-shadow: 0 35px 70px rgba(0,0,0,.35); transform: rotate(5deg); }
.ledger-top { display: flex; justify-content: space-between; margin-bottom: 58px; }
.ledger-top span { width: 48px; height: 10px; border-radius: 8px; background: var(--coral); }
.ledger-top span:last-child { width: 76px; background: rgba(7,27,43,.15); }
.ledger-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid rgba(7,27,43,.13); font-style: normal; }
.ledger-row b { color: var(--mint-dark); }
.ledger-row i { height: 6px; border-radius: 4px; background: rgba(7,27,43,.1); }
.ledger-row em { font-size: 26px; font-style: normal; font-weight: 900; }
.ledger-chart { display: flex; align-items: end; gap: 9px; height: 70px; margin-top: 20px; }
.ledger-chart span { flex: 1; height: 40%; border-radius: 6px 6px 2px 2px; background: var(--mint); }
.ledger-chart span:nth-child(2) { height: 82%; background: var(--coral); }.ledger-chart span:nth-child(3) { height: 64%; }.ledger-chart span:nth-child(4) { height: 95%; background: var(--blue); }
.floating-chip { position: absolute; display: grid; place-items: center; width: 68px; height: 68px; border: 1px solid rgba(255,255,255,.25); border-radius: 21px; color: white; background: rgba(255,255,255,.12); box-shadow: 0 12px 28px rgba(0,0,0,.18); backdrop-filter: blur(8px); font-size: 22px; font-weight: 900; }
.chip-one { left: 2%; top: 18%; transform: rotate(-12deg); }.chip-two { right: 0; top: 8%; transform: rotate(11deg); }.chip-three { right: 2%; bottom: 9%; transform: rotate(-7deg); }
.quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: min(690px, 90%); margin: -32px auto 70px; position: relative; z-index: 3; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.quick-stats div { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 20px 10px; border-right: 1px solid var(--line); }.quick-stats div:last-child { border: 0; }
.quick-stats strong { font-size: 28px; }.quick-stats span { color: var(--muted); font-size: 12px; }
.section-heading { display: flex; justify-content: space-between; margin: 0 0 22px; }
.section-heading h2, .page-intro h1 { margin-bottom: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.02; letter-spacing: -.04em; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.feature-card { position: relative; display: flex; min-height: 210px; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 23px; overflow: hidden; border: 0; border-radius: var(--radius-lg); text-align: left; cursor: pointer; transition: transform .25s ease, box-shadow .25s ease; }
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature-card.mint { background: #d9f2e7; }.feature-card.coral { background: #f8ded7; }.feature-card.blue { background: #dcedf8; }.feature-card.violet { background: #e8e1fa; }
.feature-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: rgba(255,255,255,.55); }
.feature-icon svg { width: 25px; }
.feature-card strong { display: block; margin-bottom: 5px; font-size: 20px; }.feature-card small { max-width: 150px; color: var(--muted); line-height: 1.35; }
.feature-card > i { position: absolute; top: 19px; right: 19px; color: rgba(7,27,43,.28); font-size: 12px; font-style: normal; font-weight: 900; }
.source-note { display: flex; gap: 13px; align-items: flex-start; margin-top: 50px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; color: var(--muted); background: rgba(255,255,255,.45); }
.source-note svg { flex: 0 0 auto; width: 22px; color: var(--mint-dark); }.source-note p { margin: 0; font-size: 12px; line-height: 1.55; }.source-note strong { display: block; color: var(--ink); }.source-note span { display: block; }
.page-intro { margin: 20px 0 32px; }.page-intro.compact { max-width: 830px; }.page-intro p { max-width: 720px; margin: 15px 0 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.audio-layout { display: grid; grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.15fr); gap: 20px; }
.audio-player { display: flex; min-height: 560px; flex-direction: column; align-items: center; justify-content: center; padding: 36px; border-radius: var(--radius-xl); color: white; text-align: center; background: var(--ink); }
.sound-orbit { position: relative; display: grid; place-items: center; width: 140px; height: 140px; margin-bottom: 26px; border-radius: 50%; background: rgba(121,216,180,.13); }
.sound-orbit::before, .sound-orbit::after { content: ""; position: absolute; border: 1px solid rgba(121,216,180,.22); border-radius: 50%; inset: 14px; }.sound-orbit::after { inset: 30px; }
.sound-orbit span { width: 26px; height: 55px; border-radius: 14px; background: var(--mint); animation: pulse 1.2s infinite alternate; }.sound-orbit i, .sound-orbit b { position: absolute; width: 8px; height: 30px; border-radius: 6px; background: var(--coral); transform: translateX(-30px); }.sound-orbit b { height: 44px; background: var(--blue); transform: translateX(30px); }
@keyframes pulse { to { height: 78px; } }
.audio-player:not(.playing) .sound-orbit span, .audio-player:not(.playing) .sound-orbit i, .audio-player:not(.playing) .sound-orbit b { animation-play-state: paused; }
.audio-kicker { color: var(--mint); font-size: 10px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.audio-player h2 { max-width: 470px; margin: 10px 0; font-size: clamp(25px, 4vw, 38px); }.audio-player p { max-width: 500px; min-height: 46px; color: rgba(255,255,255,.6); font-size: 13px; line-height: 1.5; }
.audio-progress { width: min(430px, 100%); height: 4px; margin: 20px 0 24px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.12); }.audio-progress span { display: block; width: 0; height: 100%; background: var(--mint); transition: width .3s; }
.player-controls { display: flex; align-items: center; gap: 15px; }.round-button, .play-button { display: grid; place-items: center; border: 0; border-radius: 50%; color: white; cursor: pointer; }.round-button { width: 48px; height: 48px; background: rgba(255,255,255,.1); }.round-button svg { width: 20px; }.play-button { width: 72px; height: 72px; color: var(--ink); background: var(--mint); }.play-button svg { width: 28px; }.pause-icon { display: none; }.playing .play-icon { display: none; }.playing .pause-icon { display: block; }
.audio-meta { display: flex; width: min(430px, 100%); justify-content: space-between; align-items: end; margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); text-align: left; }.audio-meta b, .audio-meta small { display: block; }.audio-meta small, .audio-meta label span { color: rgba(255,255,255,.5); font-size: 10px; }.audio-meta select { margin-top: 5px; border: 0; color: white; background: transparent; font-weight: 800; }
.audio-queue-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: white; }
.segment-control { display: inline-flex; gap: 2px; padding: 4px; overflow-x: auto; border-radius: 14px; background: rgba(7,27,43,.055); scrollbar-width: none; }.segment-control button { min-height: 40px; padding: 0 16px; white-space: nowrap; border: 0; border-radius: 11px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 800; cursor: pointer; }.segment-control button.active { color: white; background: var(--ink); box-shadow: 0 5px 15px rgba(7,27,43,.16); }
.search-field { display: flex; height: 52px; align-items: center; gap: 10px; padding: 0 15px; border: 1px solid var(--line); border-radius: 15px; background: white; }.search-field.small { height: 44px; margin: 15px 0; }.search-field svg { flex: 0 0 auto; width: 19px; color: var(--muted); }.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }.search-field input::placeholder { color: #96a0a6; }
.audio-queue { max-height: 430px; overflow-y: auto; padding-right: 4px; }.queue-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 13px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }.queue-item.active { border-radius: 14px; background: #eaf8f2; }.queue-code { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--paper); font-weight: 900; }.queue-item strong, .queue-item small { display: block; }.queue-item strong { font-size: 13px; }.queue-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }.queue-item > svg { width: 16px; color: var(--muted); }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; max-width: 580px; margin-bottom: 25px; padding: 5px; border-radius: 18px; background: rgba(7,27,43,.06); }.mode-switch button { padding: 12px 18px; border: 0; border-radius: 14px; color: var(--muted); background: transparent; text-align: left; cursor: pointer; }.mode-switch button span, .mode-switch button small { display: block; }.mode-switch button span { font-weight: 900; }.mode-switch button small { margin-top: 3px; font-size: 10px; }.mode-switch button.active { color: white; background: var(--ink); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 20px; }.toolbar-actions { display: flex; gap: 9px; }.catalog-select select { height: 44px; padding: 0 30px 0 13px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: white; font-size: 12px; font-weight: 800; }
.flashcard-stage { max-width: 760px; margin: 0 auto; }.card-counter { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 800; }.card-counter > div { flex: 1; height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }.card-counter i { display: block; width: 10%; height: 100%; background: var(--coral); transition: width .3s; }
.flashcard { width: 100%; min-height: 590px; padding: 0; border: 0; border-radius: var(--radius-xl); background: transparent; perspective: 1400px; cursor: pointer; }
.flashcard-inner { position: relative; display: block; width: 100%; min-height: 590px; transition: transform .65s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flashcard-face { position: absolute; display: flex; width: 100%; min-height: 590px; flex-direction: column; inset: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); backface-visibility: hidden; box-shadow: var(--shadow); }
.flashcard-front { align-items: center; justify-content: center; padding: 35px; background: var(--card); }.flashcard-front::before { content: ""; position: absolute; width: 360px; height: 360px; top: -220px; right: -150px; border-radius: 50%; background: var(--card-tone, var(--mint)); opacity: .25; }
.card-illustration { position: relative; display: grid; place-items: center; width: min(390px, 86%); height: 200px; margin-bottom: 25px; overflow: hidden; border-radius: 24px; background: linear-gradient(145deg, color-mix(in srgb, var(--card-tone, var(--mint)) 33%, white), color-mix(in srgb, var(--card-tone, var(--mint)) 68%, white)); }
.card-illustration::before { content: ""; width: 116px; height: 90px; border: 8px solid rgba(7,27,43,.78); border-radius: 14px; box-shadow: 35px 25px 0 -14px var(--cream), -45px 24px 0 -18px var(--coral); transform: rotate(-4deg); }.card-illustration::after { content: ""; position: absolute; width: 160px; height: 9px; border-radius: 10px; background: rgba(7,27,43,.18); transform: translateY(64px); }
.card-type { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .18em; }.flashcard-front > strong { margin: 7px 0 16px; font-size: clamp(92px, 20vw, 154px); line-height: .85; letter-spacing: -.07em; }
.tap-hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }.tap-hint svg { width: 19px; }
.flashcard-back { padding: 30px; text-align: left; background: var(--card); transform: rotateY(180deg); }.back-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }.back-sound { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; color: var(--ink); background: #e8f5f0; }.back-top svg { width: 19px; }
.flashcard-back > strong { display: block; max-width: 650px; margin: 12px 0 3px; font-size: clamp(26px, 5vw, 44px); line-height: 1.05; letter-spacing: -.035em; }.translation { color: var(--muted); font-size: 13px; }.back-scroll { max-height: 415px; margin-top: 23px; overflow-y: auto; padding-right: 7px; }.info-block { margin-bottom: 13px; padding: 16px; border-radius: 15px; background: rgba(7,27,43,.045); }.info-block h4 { margin: 0 0 7px; color: var(--mint-dark); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }.info-block p, .info-block li { margin-bottom: 0; color: #465862; font-size: 13px; line-height: 1.55; }.info-block ul { margin: 0; padding-left: 18px; }.info-pills { display: flex; flex-wrap: wrap; gap: 7px; }.info-pills span { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: white; font-size: 11px; font-weight: 800; }
.card-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }.card-nav button { min-height: 56px; }
.game-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.game-option { display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center; min-height: 150px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; text-align: left; cursor: pointer; transition: transform .2s; }.game-option:hover { transform: translateY(-3px); }.game-number { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: #dff4eb; font-size: 18px; font-weight: 900; }.game-option strong, .game-option small { display: block; }.game-option strong { margin-bottom: 6px; font-size: 19px; }.game-option small { color: var(--muted); }.game-option > svg { width: 23px; }
.quiz-card { max-width: 720px; margin: 0 auto; padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: white; box-shadow: var(--shadow); }.quiz-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 44px; }.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; }.text-button svg { width: 18px; }.quiz-header > span { padding: 8px 11px; border-radius: 10px; background: var(--paper); font-size: 12px; font-weight: 900; }.quiz-label { color: var(--coral); font-size: 10px; font-weight: 900; letter-spacing: .15em; }.quiz-card h2 { margin: 12px 0; font-size: clamp(29px, 6vw, 48px); line-height: 1.05; }.quiz-card > p { color: var(--muted); line-height: 1.5; }.answer-input { display: flex; align-items: center; gap: 10px; height: 58px; margin: 18px 0 12px; padding: 0 16px; border: 1px solid var(--line); border-radius: 15px; }.answer-input b { color: var(--muted); }.answer-input input { width: 100%; border: 0; outline: 0; }.posting-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 12px; }.posting-inputs label { padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; }.posting-inputs span { display: block; color: var(--muted); font-size: 10px; font-weight: 900; }.posting-inputs input { width: 100%; margin-top: 5px; border: 0; outline: 0; font-size: 24px; font-weight: 900; }.quiz-feedback { margin-top: 13px; padding: 15px; border-radius: 13px; font-size: 13px; line-height: 1.45; }.quiz-feedback.correct { color: #176146; background: #ddf5eb; }.quiz-feedback.wrong { color: #8c3e30; background: #fbe4df; }
.tree-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 15px; }.tree-toolbar label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }.tree-toolbar select { width: min(430px, 74vw); height: 48px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: white; font-weight: 800; }.zoom-controls { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }.zoom-controls button { width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; }.zoom-controls span { min-width: 54px; text-align: center; font-size: 11px; font-weight: 800; }
.tree-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: white; }.tree-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--line); }.tree-legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }.tree-legend i { width: 10px; height: 10px; border-radius: 3px; }.legend-class { background: var(--ink); }.legend-account { background: var(--mint); }.legend-sub { background: var(--coral); }.legend-analytic { background: var(--blue); }
.tree-canvas { min-height: 560px; overflow: auto; background-color: #fbfaf6; background-image: radial-gradient(rgba(7,27,43,.08) .8px, transparent .8px); background-size: 20px 20px; cursor: grab; }.tree-canvas:active { cursor: grabbing; }.tree-canvas svg { display: block; min-width: 100%; min-height: 560px; transform-origin: top left; transition: transform .2s; }.tree-edge { stroke: #bdc7cb; stroke-width: 1.5; fill: none; }.tree-node rect { stroke: rgba(7,27,43,.14); stroke-width: 1; filter: drop-shadow(0 7px 8px rgba(7,27,43,.06)); }.tree-node text { fill: var(--ink); font-family: inherit; pointer-events: none; }.tree-node.clickable { cursor: pointer; }.tree-node.clickable:hover rect { stroke: var(--mint-dark); stroke-width: 2; }.tree-tip { margin: 0; padding: 13px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; text-align: center; }
.industry-strip { display: flex; gap: 10px; margin: 0 -5px 18px; padding: 5px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }.industry-card { flex: 0 0 184px; min-height: 92px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: white; text-align: left; scroll-snap-align: start; cursor: pointer; }.industry-card.active { color: white; background: var(--ink); border-color: var(--ink); }.industry-card span, .industry-card strong { display: block; }.industry-card span { margin-bottom: 11px; color: var(--coral); font-size: 10px; font-weight: 900; }.industry-card strong { font-size: 13px; line-height: 1.3; }
.graph-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-xl); background: white; }.graph-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px; border-bottom: 1px solid var(--line); }.graph-kicker { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }.graph-toolbar h2 { margin: 5px 0; }.graph-toolbar p { max-width: 650px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }.graph-actions { display: flex; align-items: center; gap: 8px; }.graph-actions .search-field { width: 260px; margin: 0; }.graph-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; min-height: 44px; padding: 9px 23px; color: var(--muted); background: #fbfaf6; font-size: 10px; }.graph-meta > span { display: flex; align-items: center; gap: 6px; }.graph-meta i { width: 22px; height: 2px; background: var(--coral); }.graph-meta .disclaimer { margin-left: auto; }
.graph-canvas { position: relative; min-height: 620px; overflow: hidden; background-color: #f8f7f2; background-image: radial-gradient(rgba(7,27,43,.11) 1px, transparent 1px); background-size: 24px 24px; touch-action: none; cursor: grab; }.graph-canvas:active { cursor: grabbing; }.graph-canvas svg { width: 100%; height: 620px; transform-origin: 0 0; }.graph-edge { fill: none; stroke: #8fa0a8; stroke-width: 1.5; marker-end: url(#arrowhead); cursor: pointer; }.graph-edge:hover, .graph-edge.highlight { stroke: var(--coral); stroke-width: 3; }.graph-edge-label { fill: var(--muted); font-size: 8px; pointer-events: none; paint-order: stroke; stroke: #f8f7f2; stroke-width: 4px; stroke-linejoin: round; }.graph-node { cursor: pointer; }.graph-node circle { fill: white; stroke: var(--node-tone, var(--mint)); stroke-width: 4; filter: drop-shadow(0 7px 7px rgba(7,27,43,.11)); }.graph-node text { fill: var(--ink); text-anchor: middle; font-family: inherit; font-weight: 900; pointer-events: none; }.graph-node .node-name { fill: var(--muted); font-size: 7px; font-weight: 600; }.graph-node.dim, .graph-edge.dim, .graph-edge-label.dim { opacity: .12; }.graph-zoom { position: absolute; display: flex; flex-direction: column; right: 14px; bottom: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: white; }.graph-zoom button { width: 40px; height: 40px; border: 0; border-bottom: 1px solid var(--line); background: white; font-size: 20px; cursor: pointer; }.graph-zoom button:last-child { border: 0; }
.operation-drawer { position: fixed; z-index: 50; right: 18px; bottom: calc(94px + var(--safe-bottom)); width: min(430px, calc(100vw - 36px)); max-height: calc(100vh - 150px); overflow-y: auto; padding: 25px; border: 1px solid var(--line); border-radius: 24px; background: white; box-shadow: 0 25px 80px rgba(7,27,43,.24); animation: drawer-in .28s ease; }.operation-drawer[hidden] { display: none; } @keyframes drawer-in { from { opacity: 0; transform: translateY(14px); } }
.operation-drawer > button { float: right; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: var(--paper); }.operation-drawer > button svg { width: 19px; }.operation-drawer h3 { clear: both; margin: 10px 0 13px; font-size: 25px; }.posting-badge { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-radius: 14px; background: var(--ink); color: white; }.posting-badge span { color: rgba(255,255,255,.65); }.posting-badge b { color: var(--mint); font-size: 20px; }.posting-badge svg { width: 20px; color: var(--coral); }.operation-drawer > p { margin: 17px 0; color: var(--muted); line-height: 1.5; }.operation-drawer dl { margin: 0; }.operation-drawer dl div { padding: 13px 0; border-top: 1px solid var(--line); }.operation-drawer dt { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }.operation-drawer dd { margin: 5px 0 0; font-size: 12px; line-height: 1.45; }
.operation-case { margin: 0 0 17px; padding: 15px 16px; border: 1px solid #f1d9a9; border-radius: 15px; background: #fff7e8; }.operation-case > span { display: block; color: #99651e; font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }.operation-case p { margin: 7px 0 0; color: #41545e; font-size: 13px; line-height: 1.58; }
.bottom-nav { position: fixed; z-index: 40; display: grid; grid-template-columns: repeat(4, 1fr); left: 50%; bottom: 0; width: min(560px, 100%); min-height: calc(72px + var(--safe-bottom)); padding: 8px 10px var(--safe-bottom); border: 1px solid rgba(255,255,255,.1); border-bottom: 0; border-radius: 22px 22px 0 0; color: rgba(255,255,255,.55); background: rgba(7,27,43,.97); box-shadow: 0 -8px 35px rgba(7,27,43,.2); transform: translateX(-50%); backdrop-filter: blur(18px); }
.bottom-nav button { display: flex; min-height: 55px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 4px; border: 0; border-radius: 13px; color: inherit; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }.bottom-nav button.active { color: var(--mint); background: rgba(255,255,255,.06); }.bottom-nav svg { width: 21px; height: 21px; }
.search-dialog { width: min(680px, calc(100% - 24px)); max-height: min(680px, calc(100vh - 24px)); margin: 12px auto auto; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); }.search-dialog::backdrop { background: rgba(7,27,43,.55); backdrop-filter: blur(4px); }.search-dialog-inner { padding: 16px; }.search-dialog-top { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.search-dialog-top > button { display: grid; place-items: center; width: 48px; border: 0; border-radius: 14px; background: var(--paper); }.search-dialog-top > button svg { width: 20px; }.search-results { max-height: 550px; overflow-y: auto; }.search-result { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 14px 8px; border: 0; border-bottom: 1px solid var(--line); background: white; text-align: left; cursor: pointer; }.search-result b { display: grid; place-items: center; width: 50px; height: 43px; border-radius: 12px; background: #e6f5ef; }.search-result strong, .search-result small { display: block; }.search-result small { margin-top: 3px; color: var(--muted); }.search-result > svg { width: 17px; color: var(--muted); }.empty-state { padding: 50px 15px; color: var(--muted); text-align: center; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(90px + var(--safe-bottom)); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; color: white; background: var(--ink); box-shadow: var(--shadow); font-size: 12px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s; }.toast.visible { transform: translate(-50%, 0); opacity: 1; }

/* Улучшенная озвучка: выбор установленного украинского голоса. */
.audio-meta { display: grid; grid-template-columns: auto minmax(140px, 1fr) auto; gap: 18px; align-items: end; }
.audio-meta label { min-width: 0; }
.audio-meta select { width: 100%; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.voice-preview { display: inline-flex; align-items: center; gap: 8px; width: 100%; min-height: 43px; margin: 0 0 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: #eaf8f2; font-size: 12px; font-weight: 900; cursor: pointer; }
.voice-preview svg { width: 18px; }
.voice-note { margin: 0 0 13px; color: var(--muted); font-size: 10px; line-height: 1.45; }

/* Обратная сторона карточки прокручивается независимо от страницы. */
.flashcard, .flashcard-inner, .flashcard-face { height: min(650px, calc(100dvh - 150px)); min-height: 560px; }
.flashcard-back { overflow: hidden; }
.back-scroll { flex: 1 1 auto; min-height: 0; max-height: none; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; padding: 0 8px 24px 0; }
.back-scroll::after { content: ""; display: block; height: 18px; }
.info-block h4 { font-size: 11px; }
.info-block p, .info-block li { font-size: 14px; line-height: 1.62; }

/* Легенда сохраняет исходный лёгкий вид; отключённый уровень зачёркивается. */
.tree-legend { gap: 20px; }
.tree-legend span, .tree-legend button { display: inline-flex; min-height: 24px; align-items: center; gap: 7px; padding: 0; border: 0; border-radius: 0; color: var(--muted); background: transparent; font-size: 11px; font-weight: 600; }
.tree-legend span.fixed { background: transparent; }
.tree-legend button { cursor: pointer; transition: color .18s, opacity .18s; }
.tree-legend button:hover, .tree-legend button:focus-visible { color: var(--ink); outline: none; }
.tree-legend button.disabled { opacity: .48; }
.tree-legend button.disabled b { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.tree-legend button.disabled i { opacity: .45; }
.tree-canvas { min-height: 560px; height: min(70vh, 680px); touch-action: none; overscroll-behavior: contain; user-select: none; }
.tree-canvas.dragging { cursor: grabbing; }
.tree-canvas svg { width: auto; max-width: none; min-height: 620px; transform: none; transition: none; }
.tree-edge { stroke: #bdc7cb; stroke-width: 1.55; }
.tree-node rect { stroke: rgba(7,27,43,.16); stroke-width: 1; filter: drop-shadow(0 5px 6px rgba(7,27,43,.055)); }
.tree-node text { font-family: inherit; font-weight: 500; letter-spacing: 0; stroke: none; paint-order: normal; }
.tree-node-code { font-weight: 700 !important; }
.tree-node-label { font-weight: 500 !important; }
.tree-node-class text { fill: white; }
.tree-node.selected rect { stroke: var(--mint-dark); stroke-width: 2.2; }
.tree-node-sub.selected rect { stroke: var(--coral); }
.tree-node.clickable:focus-visible rect { stroke: var(--ink); stroke-width: 2.2; }

/* Текстовый фильтр и полноразмерная интерактивная карта проводок. */
.operation-filter { padding: 20px 23px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: white; }
.operation-filter-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.operation-filter-head h3 { margin: 4px 0 0; font-size: 19px; }
.segment-control.compact button { min-height: 34px; padding: 0 13px; }
.operation-filter-tools { display: flex; justify-content: flex-end; gap: 8px; margin: 11px 0 8px; }
.operation-filter-tools button { padding: 6px 9px; border: 0; color: var(--mint-dark); background: transparent; font-size: 10px; font-weight: 900; cursor: pointer; }
.operation-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 230px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 5px 4px 0; -webkit-overflow-scrolling: touch; }
.operation-choice { display: grid; grid-template-columns: 22px 1fr auto; gap: 9px; align-items: start; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaf6; cursor: pointer; }
.operation-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--mint-dark); }
.operation-choice strong, .operation-choice small { display: block; }
.operation-choice strong { font-size: 11px; font-weight: 650; line-height: 1.4; }
.operation-choice small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.operation-choice em { padding: 5px 7px; border-radius: 8px; color: white; background: var(--ink); font-size: 9px; font-style: normal; font-weight: 700; white-space: nowrap; }
.graph-drag-hint { color: var(--mint-dark); font-weight: 700; }
.graph-canvas { min-height: 650px; height: min(72vh, 700px); }
.graph-canvas svg { width: 1500px; max-width: none; min-width: 0; height: 900px; }
.graph-edge { stroke-width: 1.7; }
.graph-edge-hit { fill: none; stroke: transparent; stroke-width: 18; pointer-events: stroke; cursor: pointer; }
.graph-edge-label { fill: #60737d; font-size: 10px; font-weight: 600; paint-order: stroke; stroke: #f8f7f2; stroke-width: 5px; stroke-linejoin: round; }
.graph-edge-label.highlight { fill: var(--coral); font-weight: 700; }
.graph-node { touch-action: none; cursor: grab; }
.graph-node rect { fill: white; stroke: var(--node-tone, var(--mint)); stroke-width: 3; filter: drop-shadow(0 7px 8px rgba(7,27,43,.09)); }
.graph-node:hover rect, .graph-node:focus rect { stroke-width: 4; }
.graph-node:focus { outline: none; }
.graph-node.dragging { cursor: grabbing; }
.graph-node.dragging rect { stroke: var(--coral); stroke-width: 4; }
.graph-node text { fill: var(--ink); text-anchor: start; font-family: inherit; font-weight: 500; stroke: none; paint-order: normal; pointer-events: none; }
.graph-node .node-code { font-weight: 750; }
.graph-node .node-name { fill: #536771; font-size: 10.5px; font-weight: 500; }
.graph-node .node-drag-mark { fill: #9aabb2; font-size: 17px; text-anchor: middle; }
.graph-empty { fill: var(--muted); font-size: 18px; font-weight: 800; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }.hero-copy { padding-top: 15px; }.hero-visual { min-height: 320px; }.feature-grid { grid-template-columns: 1fr 1fr; }.feature-card { min-height: 175px; }
  .audio-layout { grid-template-columns: 1fr; }.audio-player { min-height: 500px; }.game-picker { grid-template-columns: 1fr; }
  .graph-toolbar { align-items: stretch; flex-direction: column; }.graph-actions .search-field { width: 100%; }.graph-meta .disclaimer { width: 100%; margin-left: 0; }.operation-checklist { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .app-shell { padding-bottom: calc(78px + var(--safe-bottom)); }.topbar { height: calc(64px + env(safe-area-inset-top, 0px)); padding-left: 15px; padding-right: 15px; }.brand small { display: none; }.brand-mark { width: 34px; height: 34px; }.icon-button { width: 38px; height: 38px; }.language-toggle span { padding: 7px 5px; }
  .page { padding: 18px 15px 52px; }.hero { min-height: 0; padding: 31px 23px 20px; border-radius: 26px; }.hero h1 { font-size: clamp(39px, 12vw, 58px); }.hero p { font-size: 15px; }.hero-visual { min-height: 270px; }.ledger-card { width: 79%; min-height: 250px; padding: 18px; }.ledger-top { margin-bottom: 25px; }.ledger-row { padding: 10px 0; }.ledger-chart { height: 49px; }.floating-chip { width: 51px; height: 51px; border-radius: 16px; font-size: 17px; }
  .quick-stats { width: 92%; margin-bottom: 48px; }.quick-stats div { flex-direction: column; align-items: center; gap: 1px; padding: 14px 4px; }.quick-stats strong { font-size: 22px; }.quick-stats span { font-size: 9px; }.feature-grid { gap: 10px; }.feature-card { min-height: 157px; padding: 17px; }.feature-card strong { font-size: 16px; }.feature-card small { font-size: 10px; }.feature-icon { width: 41px; height: 41px; }
  .page-intro { margin-top: 7px; }.page-intro h1 { font-size: 37px; }.page-intro p { font-size: 13px; }.audio-player { min-height: 480px; padding: 28px 18px; border-radius: 24px; }.audio-queue-panel { padding: 15px; border-radius: 24px; }.segment-control { width: 100%; }.segment-control button { flex: 1; padding: 0 10px; }
  .mode-switch { width: 100%; }.toolbar { align-items: stretch; flex-direction: column; }.toolbar .segment-control { order: 1; }.toolbar-actions { order: 2; justify-content: space-between; }.soft-button span { display: none; }.flashcard, .flashcard-inner, .flashcard-face { height: min(640px, calc(100dvh - 135px)); min-height: 540px; }.flashcard-front { padding: 23px; }.card-illustration { height: 165px; }.flashcard-back { padding: 22px; }.back-scroll { max-height: none; }.card-nav button { min-height: 52px; }.game-option { grid-template-columns: 52px 1fr auto; min-height: 126px; padding: 18px; }.game-number { width: 52px; height: 52px; }
  .tree-toolbar { align-items: stretch; flex-direction: column; }.tree-toolbar label select { width: 100%; }.zoom-controls { align-self: flex-end; }.tree-canvas { min-height: 590px; }.tree-canvas svg { min-height: 590px; }.tree-legend { gap: 15px; padding: 14px 16px; }.tree-legend span, .tree-legend button { min-height: 24px; padding: 0; font-size: 10px; }
  .industry-card { flex-basis: 155px; }.graph-panel { border-radius: 23px; }.graph-toolbar { padding: 18px; }.graph-actions { align-items: stretch; }.operation-filter { padding: 16px; }.operation-filter-head { align-items: stretch; flex-direction: column; }.operation-filter-tools { justify-content: flex-start; }.operation-checklist { max-height: 275px; }.graph-canvas { min-height: 590px; height: 620px; }.graph-canvas svg { min-height: 0; height: 900px; }.operation-drawer { right: 12px; bottom: calc(84px + var(--safe-bottom)); width: calc(100vw - 24px); }
  .audio-meta { grid-template-columns: 1fr 1fr; width: 100%; }.audio-meta > span { grid-column: 1 / -1; }.audio-meta select { max-width: none; }
  .bottom-nav { min-height: calc(66px + var(--safe-bottom)); border-radius: 18px 18px 0 0; }.bottom-nav button { min-height: 50px; }
}
@media (max-width: 620px) {
  .operation-drawer { top: calc(76px + env(safe-area-inset-top, 0px)); bottom: calc(84px + var(--safe-bottom)); max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
