:root {
  color-scheme: light;
  --bg: #edf3ff;
  --bg-2: #f8fbff;
  --surface: rgba(255,255,255,.92);
  --surface-strong: #ffffff;
  --ink: #1f2850;
  --muted: #67708e;
  --line: #dfe6fa;
  --shadow: 0 20px 50px rgba(43, 65, 127, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(127, 176, 255, 0.25), transparent 28%),
    radial-gradient(circle at 88% 15%, rgba(172, 146, 255, 0.22), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

a { color: inherit; text-decoration: none; }

.site-shell {
  width: min(1180px, calc(100vw - 28px));
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(255,255,255,.75);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(54, 73, 131, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #6d7cf0, #46c6ff 100%);
  box-shadow: 0 10px 22px rgba(71, 104, 220, 0.28);
  position: relative;
}
.brand-spark {
  position: absolute;
  right: 6px;
  top: 6px;
  font-size: 11px;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-copy strong {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.1;
}
.brand-copy small {
  color: var(--muted);
  font-size: .86rem;
  margin-top: 3px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.class-pill,
.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  color: var(--ink);
}
.pill-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2dcf7b;
  box-shadow: 0 0 0 4px rgba(45, 207, 123, 0.14);
}
.header-badge {
  color: #5e6adb;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.35fr);
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}

.hero-card,
.subjects-panel {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 10px;
  align-items: center;
  min-height: 0;
}

.hero-copy h1 {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1;
  margin: 10px 0 12px;
  letter-spacing: -0.04em;
}
.hero-copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 35ch;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6471dd;
  background: rgba(103, 125, 235, 0.12);
  padding: 8px 12px;
  border-radius: 999px;
}
.hero-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 155px;
  padding: 13px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f5ff 100%);
  border: 1px solid #d8e2ff;
  box-shadow: 0 10px 24px rgba(100, 116, 196, 0.14);
  font-weight: 800;
  color: #5868db;
}
.hero-progress {
  min-width: 132px;
  padding: 11px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6f7df0, #7b57e6);
  color: #fff;
  box-shadow: 0 14px 25px rgba(91, 83, 210, 0.28);
}
.hero-progress strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.1;
}
.hero-progress span {
  display: block;
  font-size: .76rem;
  opacity: .95;
  margin-top: 3px;
}
.hero-features {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.hero-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.7);
  border: 1px solid #e7ecfb;
  border-radius: 14px;
  color: #4e5676;
  font-weight: 600;
  font-size: .95rem;
}

.hero-visual {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
}
.visual-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(92, 119, 214, 0.28);
}
.orbit-a { width: 280px; height: 280px; }
.orbit-b { width: 220px; height: 220px; border-style: solid; border-color: rgba(137, 116, 233, 0.16); }
.planet {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(56, 75, 149, 0.18);
}
.planet-main {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, #7a88f0, #4dc6ff);
  font-size: 3rem;
}
.planet-small {
  position: absolute;
  font-size: 1rem;
  letter-spacing: .02em;
}
.planet-a {
  width: 66px; height: 66px; background: linear-gradient(135deg, #ff9bbf, #ffb86b); top: 28px; left: 34px;
}
.planet-b {
  width: 74px; height: 74px; background: linear-gradient(135deg, #ffcb5b, #ff9960); top: 42px; right: 30px;
}
.planet-c {
  width: 70px; height: 70px; background: linear-gradient(135deg, #38c98c, #76e5af); bottom: 30px; left: 38px;
}
.planet-d {
  width: 62px; height: 62px; background: linear-gradient(135deg, #8c74f7, #5f88ff); bottom: 52px; right: 48px;
}

.subjects-panel {
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.section-kicker {
  display: inline-block;
  font-size: .8rem;
  font-weight: 800;
  color: #6471dd;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.panel-header h2 {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.1;
}
.panel-tip {
  font-size: .9rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(99, 116, 198, 0.08);
  border: 1px solid #e3e9fb;
  padding: 10px 12px;
  border-radius: 14px;
}

.subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  flex: 1;
}
.subject-card,
.subject-info-card {
  min-height: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(219, 227, 246, 0.95);
  background: var(--card-bg);
  padding: 16px;
  box-shadow: 0 10px 24px rgba(58, 73, 126, 0.06);
}
.subject-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.subject-card.is-available {
  cursor: pointer;
}
.subject-card.is-available:hover {
  transform: translateY(-3px);
  border-color: var(--card-accent);
  box-shadow: 0 16px 28px rgba(68, 85, 148, 0.12);
}
.card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.subject-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--icon-bg);
  color: var(--card-accent);
  flex-shrink: 0;
}
.subject-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-content h3 {
  margin: 0 0 6px;
  font-size: 1.18rem;
  line-height: 1.15;
}
.card-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: .92rem;
}
.card-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.78);
  background: rgba(255,255,255,.9);
  color: #7c839d;
  text-align: center;
}
.is-available .card-status {
  color: var(--card-accent);
  border-color: color-mix(in srgb, var(--card-accent) 30%, white);
}

.subject-info-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(135deg, #eff4ff 0%, #f8f2ff 100%);
}
.subject-info-card strong {
  font-size: 1rem;
  margin-bottom: 8px;
}
.subject-info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: .92rem;
}

.subject-english { --card-bg: linear-gradient(135deg, #edf6ff, #f8fbff); --card-accent: #2d74d8; --icon-bg: #d7e8ff; }
.subject-math    { --card-bg: linear-gradient(135deg, #fff6e9, #fffaf3); --card-accent: #df8a26; --icon-bg: #ffe6c3; }
.subject-german  { --card-bg: linear-gradient(135deg, #fff0f5, #fff7fa); --card-accent: #d65d8a; --icon-bg: #ffd9e8; }
.subject-science { --card-bg: linear-gradient(135deg, #eefbf4, #f8fdfa); --card-accent: #259866; --icon-bg: #d3f2e0; }
.subject-wuk     { --card-bg: linear-gradient(135deg, #f1efff, #f8f6ff); --card-accent: #6f61d9; --icon-bg: #e3defd; }
.subject-modern-skills { --card-bg: linear-gradient(135deg, #eaf5ff, #f4f3ff); --card-accent: #4775c8; --icon-bg: #dce8ff; }
.subject-card.is-prepared { cursor: pointer; }
.subject-card.is-prepared:hover { transform: translateY(-2px); border-color: var(--card-accent); }
.subject-card.is-prepared .card-status { color: #6471ae; background: #f9faff; border-color: #e0e6f9; }


@media (max-width: 1040px) {
  .site-shell { width: min(100vw - 18px, 1100px); padding-top: 12px; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .hero-card { grid-template-columns: 1.1fr .9fr; }
}

@media (max-width: 820px) {
  .site-shell { width: min(100vw - 12px, 920px); gap: 12px; }
  .site-header { padding: 12px 14px; border-radius: 20px; }
  .brand-icon { width: 46px; height: 46px; font-size: 24px; }
  .hero-card,
  .subjects-panel { border-radius: 24px; }
  .hero-card { padding: 18px; gap: 12px; }
  .hero-visual { min-height: 220px; }
  .orbit-a { width: 220px; height: 220px; }
  .orbit-b { width: 170px; height: 170px; }
  .planet-main { width: 118px; height: 118px; font-size: 2.4rem; }
  .planet-a { width: 58px; height: 58px; top: 18px; left: 22px; }
  .planet-b { width: 62px; height: 62px; top: 34px; right: 18px; }
  .planet-c { width: 58px; height: 58px; bottom: 18px; left: 24px; }
  .planet-d { width: 54px; height: 54px; bottom: 38px; right: 26px; }
  .subjects-panel { padding: 18px; }
  .subjects-grid { gap: 12px; }
  .subject-card, .subject-info-card { padding: 14px; }
}

@media (max-width: 700px) {
  .site-shell { width: min(100vw - 10px, 760px); }
  .site-header, .header-right { align-items: flex-start; }
  .site-header { flex-direction: column; }
  .header-right { width: 100%; justify-content: flex-start; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-copy p { max-width: 60ch; }
  .hero-visual { min-height: 180px; }
  .subjects-grid { grid-template-columns: 1fr; }
  .panel-header { flex-direction: column; align-items: flex-start; }
}

@media (max-height: 1050px) and (min-width: 701px) {
  .site-shell { padding-bottom: 14px; }
  .hero-card { padding: 18px; }
  .hero-copy h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 8px 0 10px; }
  .hero-copy p, .hero-features li, .card-content p, .subject-info-card p { font-size: .88rem; }
  .hero-actions { margin-top: 16px; }
  .hero-features { gap: 8px; margin-top: 14px; }
  .hero-features li { padding: 8px 10px; }
  .hero-visual { min-height: 240px; }
  .panel-header { margin-bottom: 12px; }
  .subject-card, .subject-info-card { padding: 14px; }
  .card-content h3 { font-size: 1.08rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
