:root {
  color-scheme: light;
  --ink: #172024;
  --muted: #657278;
  --line: #dbe2df;
  --paper: #f7f8f5;
  --paper-warm: #fff5e6;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.84);
  --brand: #1e7f72;
  --brand-dark: #11594f;
  --brand-deep: #0d3430;
  --accent: #d7533f;
  --gold: #e1a533;
  --sky: #4a83a8;
  --violet: #6d5aa8;
  --shadow: 0 24px 70px rgba(23, 32, 36, 0.13);
  --soft-shadow: 0 14px 36px rgba(23, 32, 36, 0.11);
  --hairline: rgba(23, 32, 36, 0.08);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(247, 248, 245, 0.98), rgba(255, 245, 230, 0.72)),
    var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(23, 32, 36, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 36, 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.12));
}

::selection {
  color: #fff;
  background: var(--brand-dark);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

body.is-loading {
  overflow: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(225, 165, 51, 0.38), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(74, 131, 168, 0.44), transparent 30%),
    radial-gradient(circle at 52% 84%, rgba(215, 83, 63, 0.32), transparent 34%),
    linear-gradient(135deg, #082723 0%, #0f4f49 38%, #182d4a 70%, #41253e 100%);
  overflow: hidden;
  transition: opacity 620ms ease, visibility 620ms ease, transform 620ms ease;
}

.site-loader.is-done {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  pointer-events: none;
}

.loader-mesh {
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 0 48%, transparent 72%);
  transform: rotate(-8deg);
  animation: loader-mesh-drift 12s linear infinite;
}

.loader-formulas span {
  position: absolute;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 950;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  animation: loader-float 7s ease-in-out infinite;
}

.loader-formulas span:nth-child(1) { left: 8%; top: 15%; font-size: 2.3rem; animation-delay: -1s; }
.loader-formulas span:nth-child(2) { right: 11%; top: 12%; font-size: 1.8rem; animation-delay: -3s; }
.loader-formulas span:nth-child(3) { left: 13%; bottom: 18%; font-size: 2.5rem; animation-delay: -4.5s; }
.loader-formulas span:nth-child(4) { right: 9%; bottom: 21%; font-size: 1.6rem; animation-delay: -2s; }
.loader-formulas span:nth-child(5) { left: 40%; top: 8%; font-size: 1.35rem; animation-delay: -6s; }
.loader-formulas span:nth-child(6) { right: 31%; bottom: 9%; font-size: 2rem; animation-delay: -5s; }
.loader-formulas span:nth-child(7) { left: 5%; top: 53%; font-size: 1.55rem; animation-delay: -2.7s; }
.loader-formulas span:nth-child(8) { right: 4%; top: 51%; font-size: 1.75rem; animation-delay: -7s; }

.loader-geometry span {
  position: absolute;
  display: block;
  opacity: 0.72;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.18));
  animation: loader-spin-float 10s ease-in-out infinite;
}

.geo-circle {
  left: 18%;
  top: 33%;
  width: 64px;
  aspect-ratio: 1;
  border: 4px solid rgba(225, 165, 51, 0.68);
  border-radius: 50%;
}

.geo-triangle {
  right: 21%;
  top: 35%;
  width: 0;
  height: 0;
  border-left: 36px solid transparent;
  border-right: 36px solid transparent;
  border-bottom: 64px solid rgba(255, 255, 255, 0.26);
  animation-delay: -3s;
}

.geo-square {
  left: 27%;
  bottom: 18%;
  width: 58px;
  aspect-ratio: 1;
  border: 4px solid rgba(130, 205, 191, 0.72);
  border-radius: 8px;
  animation-delay: -5s;
}

.geo-ring {
  right: 27%;
  bottom: 15%;
  width: 74px;
  aspect-ratio: 1;
  border: 3px dashed rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  animation-delay: -7s;
}

.loader-core {
  width: min(560px, 92vw);
  min-height: 390px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 42px 34px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 34px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
  animation: loader-core-in 720ms ease both;
}

.loader-core::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    conic-gradient(from 90deg, transparent, rgba(255, 255, 255, 0.24), transparent, rgba(225, 165, 51, 0.2), transparent);
  animation: loader-conic 5s linear infinite;
}

.loader-core::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(12, 57, 52, 0.72), rgba(22, 45, 74, 0.74));
}

.loader-core > * {
  position: relative;
  z-index: 1;
}

.loader-core img {
  width: 92px;
  height: 92px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.08),
    0 24px 44px rgba(0, 0, 0, 0.22);
  animation: loader-logo-pulse 2.4s ease-in-out infinite;
}

.loader-core .eyebrow {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.loader-core h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.3rem, 8vw, 4.8rem);
  line-height: 0.95;
  text-align: center;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.loader-core p:not(.eyebrow) {
  max-width: 390px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  text-align: center;
  font-weight: 750;
}

.loader-orbit {
  position: absolute;
  inset: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  animation: loader-orbit 8s linear infinite;
}

.loader-orbit span {
  position: absolute;
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 24px rgba(225, 165, 51, 0.82);
}

.loader-orbit span:nth-child(1) { left: 50%; top: -6px; }
.loader-orbit span:nth-child(2) { right: 20px; bottom: 28px; background: #82cdbf; box-shadow: 0 0 24px rgba(130, 205, 191, 0.82); }
.loader-orbit span:nth-child(3) { left: 24px; bottom: 38px; background: #ff8c73; box-shadow: 0 0 24px rgba(255, 140, 115, 0.8); }

.loader-progress {
  width: min(340px, 76vw);
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.loader-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #82cdbf, #ff8c73);
  transform-origin: left;
  animation: loader-progress 1.65s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(30, 127, 114, 0.11), transparent 36%),
    linear-gradient(300deg, rgba(215, 83, 63, 0.1), transparent 38%),
    linear-gradient(90deg, rgba(30, 127, 114, 0.08), rgba(225, 165, 51, 0.09)),
    var(--paper);
}

.math-stream,
.app-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.math-stream span,
.app-backdrop span {
  position: absolute;
  color: rgba(23, 32, 36, 0.12);
  font-weight: 900;
  transform: rotate(-10deg);
  animation: drift 18s linear infinite;
}

.math-stream span:nth-child(1) { left: 8%; top: 12%; font-size: 2.4rem; animation-delay: -2s; }
.math-stream span:nth-child(2) { left: 72%; top: 9%; font-size: 2rem; animation-delay: -7s; }
.math-stream span:nth-child(3) { left: 62%; top: 72%; font-size: 2.6rem; animation-delay: -11s; }
.math-stream span:nth-child(4) { left: 15%; top: 78%; font-size: 2rem; animation-delay: -4s; }
.math-stream span:nth-child(5) { left: 46%; top: 16%; font-size: 1.8rem; animation-delay: -9s; }
.math-stream span:nth-child(6) { left: 32%; top: 88%; font-size: 2.2rem; animation-delay: -14s; }

.auth-panel {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  position: relative;
  z-index: 1;
  animation: rise-in 650ms ease both;
}

.auth-copy,
.auth-card,
.panel,
.metric-card {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
}

.auth-copy::before,
.auth-card::after,
.panel::before,
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--hairline);
}

.auth-copy {
  min-height: 560px;
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(238, 247, 244, 0.92)),
    linear-gradient(0deg, rgba(30, 127, 114, 0.04), rgba(225, 165, 51, 0.04)),
    var(--panel);
}

.auth-copy::after {
  position: absolute;
  inset: auto -60px -100px auto;
  width: 310px;
  height: 310px;
  background:
    linear-gradient(135deg, rgba(30, 127, 114, 0.14), rgba(225, 165, 51, 0.18));
  transform: rotate(18deg);
  clip-path: polygon(18% 0, 100% 18%, 82% 100%, 0 82%);
}

.orbit-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.formula-tile {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(30, 127, 114, 0.2);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(23, 32, 36, 0.1);
  backdrop-filter: blur(10px);
  font-weight: 900;
  animation: float-card 6s ease-in-out infinite;
}

.tile-a { top: 24px; right: 36px; }
.tile-b { right: 82px; bottom: 48px; animation-delay: -2s; color: var(--accent); }
.tile-c { left: 34px; bottom: 42px; animation-delay: -4s; color: var(--sky); }

.brand-mark {
  width: min(390px, 82%);
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 18px 28px rgba(23, 32, 36, 0.2)) saturate(1.08);
  animation: board-pulse 4.8s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 6vw, 5.2rem);
  line-height: 0.95;
  color: var(--brand-deep);
}

.lead {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.6;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}

.signal-grid span,
.status-pill {
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 999px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  font-size: 0.92rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.status-pill.success {
  border-color: rgba(30, 127, 114, 0.28);
  color: var(--brand-dark);
  background: #edf7f2;
}

.signal-grid span {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.signal-grid span:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 127, 114, 0.35);
  box-shadow: var(--soft-shadow);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.hero-stats div {
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 248, 245, 0.68));
  box-shadow: 0 10px 26px rgba(23, 32, 36, 0.06);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 1.45rem;
  color: var(--brand-dark);
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.86rem;
}

.auth-card {
  padding: 24px;
  align-self: center;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--accent), var(--sky));
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 22px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background: rgba(240, 244, 241, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.segment {
  border: 0;
  border-radius: 6px;
  padding: 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.segment.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 32, 36, 0.08);
}

.link-action {
  display: inline-flex;
  width: max-content;
  margin: -4px 0 14px;
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.link-action:hover {
  color: var(--brand-deep);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(23, 32, 36, 0.1);
  border-radius: 8px;
  padding: 14px 15px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 252, 250, 0.98));
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(30, 127, 114, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.form-status {
  min-height: 20px;
  margin: -4px 0 14px;
  color: var(--brand-deep);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.45;
}

.primary-action,
.secondary-action,
.ghost-action,
.icon-button {
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  width: 100%;
  padding: 14px 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), transparent 38%),
    linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 14px 28px rgba(30, 127, 114, 0.26);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-action:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(30, 127, 114, 0.28);
}

.primary-action.compact,
.secondary-action {
  width: auto;
  padding: 10px 14px;
}

.secondary-action {
  border: 1px solid rgba(23, 32, 36, 0.1);
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.82);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.secondary-action:hover,
.icon-button:hover,
.nav-item:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 127, 114, 0.28);
  box-shadow: var(--soft-shadow);
}

.secondary-action.full {
  width: 100%;
  margin-top: 16px;
}

.ghost-action {
  padding: 10px 12px;
  color: var(--muted);
  background: transparent;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(237, 242, 239, 0.96));
  font-size: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.form-error,
.feedback {
  min-height: 22px;
  color: var(--accent);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 32%),
    linear-gradient(0deg, rgba(30, 127, 114, 0.04), rgba(215, 83, 63, 0.03));
}

.app-backdrop {
  z-index: -1;
}

.app-backdrop span:nth-child(1) { left: 28%; top: 14%; font-size: 4rem; animation-delay: -3s; }
.app-backdrop span:nth-child(2) { left: 76%; top: 22%; font-size: 3rem; color: rgba(215, 83, 63, 0.12); animation-delay: -9s; }
.app-backdrop span:nth-child(3) { left: 62%; top: 72%; font-size: 4.5rem; color: rgba(30, 127, 114, 0.1); animation-delay: -12s; }
.app-backdrop span:nth-child(4) { left: 38%; top: 86%; font-size: 3.2rem; color: rgba(109, 90, 168, 0.1); animation-delay: -5s; }

.sidebar {
  min-height: 100svh;
  height: 100svh;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(23, 32, 36, 0.08);
  background:
    radial-gradient(circle at 18% 8%, rgba(225, 165, 51, 0.24), transparent 28%),
    radial-gradient(circle at 92% 34%, rgba(74, 131, 168, 0.22), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(237, 247, 242, 0.84));
  backdrop-filter: blur(20px);
  box-shadow: 14px 0 42px rgba(23, 32, 36, 0.05);
  position: sticky;
  top: 0;
  overflow: hidden;
  z-index: 10;
}

.sidebar::before,
.sidebar::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.sidebar::before {
  inset: 12px 10px auto;
  height: 196px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(30, 127, 114, 0.18), transparent 48%),
    linear-gradient(315deg, rgba(215, 83, 63, 0.12), transparent 46%);
  mask-image: linear-gradient(180deg, #000, transparent);
  opacity: 0.72;
}

.sidebar::after {
  right: -42px;
  bottom: 96px;
  width: 136px;
  aspect-ratio: 1;
  border: 1px solid rgba(30, 127, 114, 0.14);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 18px rgba(225, 165, 51, 0.08),
    0 0 36px rgba(74, 131, 168, 0.16);
  animation: spin-slow 18s linear infinite;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.56));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(23, 32, 36, 0.06);
  position: relative;
  z-index: 1;
}

.sidebar-brand img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #fff;
  box-shadow:
    0 10px 20px rgba(23, 32, 36, 0.12),
    0 0 0 5px rgba(237, 247, 242, 0.86);
  animation: board-pulse 3.2s ease-in-out infinite;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand span {
  color: var(--muted);
  font-size: 0.88rem;
}

.nav-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 248, 245, 0.46));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 38px rgba(23, 32, 36, 0.07);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.nav-list::before {
  content: "";
  position: absolute;
  left: 9px;
  top: calc(12px + (var(--nav-index, 0) * 51px));
  width: 4px;
  height: 43px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold), var(--brand), var(--sky));
  box-shadow:
    0 0 18px rgba(30, 127, 114, 0.42),
    0 0 34px rgba(225, 165, 51, 0.26);
  transition: top 260ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

.nav-list::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 8px;
  height: 3px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--brand), var(--gold), var(--accent));
  transform-origin: left;
  transform: scaleX(var(--nav-progress, 0.17));
  opacity: 0.6;
  transition: transform 260ms ease;
}

.nav-item {
  border: 0;
  border-radius: 8px;
  min-height: 43px;
  padding: 11px 14px 11px 48px;
  color: rgba(44, 65, 67, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.2));
  text-align: left;
  font-weight: 900;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.nav-item::before {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border-radius: 8px;
  color: var(--brand-dark);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 247, 242, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(23, 32, 36, 0.08);
  opacity: 0.92;
  text-align: center;
  font-size: 0.9rem;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.nav-item[data-view="dashboard"]::before { content: "⌂"; }
.nav-item[data-view="topics"]::before { content: "☷"; }
.nav-item[data-view="practice"]::before { content: "∴"; }
.nav-item[data-view="tickets"]::before { content: "№"; }
.nav-item[data-view="tutor"]::before { content: "ƒ"; }
.nav-item[data-view="account"]::before { content: "☉"; }

.nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(100deg, rgba(30, 127, 114, 0.16), rgba(225, 165, 51, 0.14), rgba(74, 131, 168, 0.12));
  opacity: 0;
  transform: translateX(-14px) scaleX(0.94);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: -1;
}

.nav-item:hover {
  color: var(--brand-deep);
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(30, 127, 114, 0.12),
    0 14px 26px rgba(23, 32, 36, 0.07);
}

.nav-item:hover::before {
  transform: translateY(-50%) rotate(-4deg) scale(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 20px rgba(30, 127, 114, 0.16);
}

.nav-item.active {
  color: var(--brand-deep);
  background:
    linear-gradient(100deg, rgba(237, 247, 242, 0.96), rgba(255, 241, 210, 0.86)),
    #fff;
  box-shadow:
    inset 0 0 0 1px rgba(30, 127, 114, 0.16),
    0 14px 28px rgba(30, 127, 114, 0.14);
}

.nav-item.active::before {
  color: #fff;
  background:
    linear-gradient(135deg, var(--brand), var(--sky));
  box-shadow:
    0 10px 20px rgba(30, 127, 114, 0.24),
    0 0 0 4px rgba(30, 127, 114, 0.08);
}

.nav-item.active::after {
  opacity: 1;
  transform: translateX(0) scaleX(1);
}

#logout-button {
  margin-top: 0;
  text-align: left;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(215, 83, 63, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 227, 221, 0.38));
  box-shadow: 0 12px 24px rgba(23, 32, 36, 0.05);
}

.ege-mascot {
  min-height: 154px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 18%, rgba(225, 165, 51, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(237, 247, 242, 0.58));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 34px rgba(23, 32, 36, 0.08);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.ege-mascot::before {
  content: "";
  position: absolute;
  inset: auto -18px -36px auto;
  width: 106px;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(74, 131, 168, 0.24), transparent 62%);
  animation: mascot-glow 4.6s ease-in-out infinite;
}

.mascot-orbit span {
  position: absolute;
  min-width: 30px;
  padding: 5px 7px;
  border: 1px solid rgba(30, 127, 114, 0.12);
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
  box-shadow: 0 8px 18px rgba(23, 32, 36, 0.06);
  animation: mascot-token 3.8s ease-in-out infinite;
}

.mascot-orbit span:nth-child(1) {
  left: 14px;
  top: 14px;
}

.mascot-orbit span:nth-child(2) {
  right: 16px;
  top: 22px;
  animation-delay: -1.2s;
}

.mascot-orbit span:nth-child(3) {
  right: 38px;
  bottom: 52px;
  animation-delay: -2.1s;
}

.mascot-person {
  width: 92px;
  height: 104px;
  margin: 8px auto 0;
  position: relative;
  animation: mascot-bob 3.4s ease-in-out infinite;
}

.mascot-head {
  position: absolute;
  left: 28px;
  top: 24px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 34%, #fff3db 0 10px, transparent 11px),
    linear-gradient(145deg, #f7c98f, #df9b5f);
  box-shadow:
    inset 0 -4px 0 rgba(158, 82, 45, 0.1),
    0 8px 18px rgba(23, 32, 36, 0.12);
}

.mascot-head::before,
.mascot-head::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-deep);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.46);
  animation: mascot-blink 5s ease-in-out infinite;
}

.mascot-head::before {
  left: 10px;
}

.mascot-head::after {
  right: 10px;
}

.mascot-cap {
  position: absolute;
  left: 22px;
  top: 13px;
  width: 50px;
  height: 20px;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  transform: rotate(-6deg);
  z-index: 2;
  box-shadow: 0 8px 16px rgba(30, 127, 114, 0.18);
}

.mascot-cap::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 5px;
  width: 68px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--brand), var(--gold));
}

.mascot-cap::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 12px;
  width: 2px;
  height: 22px;
  background: var(--gold);
  transform: rotate(8deg);
  transform-origin: top;
  animation: tassel-swing 2.4s ease-in-out infinite;
}

.mascot-body {
  position: absolute;
  left: 22px;
  top: 62px;
  width: 50px;
  height: 42px;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, var(--brand), var(--sky));
  box-shadow: 0 12px 22px rgba(30, 127, 114, 0.18);
}

.mascot-body::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8px;
  width: 16px;
  height: 21px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  transform: translateX(-50%);
}

.mascot-arm {
  position: absolute;
  top: 68px;
  width: 12px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f3bc82, #df9b5f);
  transform-origin: top;
}

.mascot-arm.left {
  left: 17px;
  transform: rotate(22deg);
}

.mascot-arm.right {
  right: 14px;
  transform: rotate(-35deg);
  animation: mascot-wave 2.6s ease-in-out infinite;
}

.mascot-paper {
  position: absolute;
  right: 2px;
  bottom: 13px;
  width: 34px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--accent);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 10px 18px rgba(23, 32, 36, 0.12);
  transform: rotate(8deg);
  animation: mascot-paper 3.2s ease-in-out infinite;
}

.mascot-paper::before {
  content: "ЕГЭ";
  position: absolute;
  left: 6px;
  top: 6px;
  color: var(--brand);
  font-size: 0.52rem;
}

.mascot-copy {
  position: relative;
  z-index: 1;
  margin-top: -3px;
  text-align: center;
}

.mascot-copy strong,
.mascot-copy span {
  display: block;
}

.mascot-copy strong {
  color: var(--brand-deep);
  font-size: 0.92rem;
}

.mascot-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.workspace {
  padding: 30px;
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  padding: 2px 0 4px;
}

.locked-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topbar h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--brand-deep);
  line-height: 1.05;
}

.view {
  display: none;
}

.active-view {
  display: block;
  animation: fade-slide 280ms ease both;
}

.focus-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid rgba(30, 127, 114, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 230, 0.74)),
    linear-gradient(90deg, rgba(30, 127, 114, 0.08), rgba(74, 131, 168, 0.06)),
    #fff;
  box-shadow: 0 18px 44px rgba(23, 32, 36, 0.08);
  position: relative;
  overflow: hidden;
}

.focus-strip::after {
  content: "∑";
  position: absolute;
  right: 20px;
  bottom: -28px;
  color: rgba(30, 127, 114, 0.08);
  font-size: 8rem;
  font-weight: 900;
}

.focus-strip h3,
.focus-strip p {
  margin-bottom: 0;
}

.focus-strip #focus-copy {
  margin-top: 6px;
  color: var(--muted);
}

.progress-ring {
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(var(--brand) calc(var(--progress) * 1%), rgba(219, 226, 223, 0.72) 0),
    #fff;
  box-shadow: inset 0 0 0 10px #fff, 0 14px 30px rgba(30, 127, 114, 0.2);
}

.progress-ring span {
  width: 66px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--brand-dark);
  background: #fff;
  font-weight: 950;
}

.streak-card {
  min-width: 118px;
  padding: 14px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(135deg, var(--accent), #b83e32);
  box-shadow: 0 16px 32px rgba(215, 83, 63, 0.22);
}

.streak-card span,
.streak-card strong {
  display: block;
}

.streak-card span {
  opacity: 0.78;
  font-size: 0.82rem;
  text-transform: uppercase;
  font-weight: 900;
}

.streak-card strong {
  margin-top: 6px;
  font-size: 1.2rem;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.metric-card {
  padding: 18px;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(251, 252, 250, 0.86));
}

.metric-card:nth-child(2)::after { background: linear-gradient(90deg, var(--sky), var(--brand)); }
.metric-card:nth-child(3)::after { background: linear-gradient(90deg, var(--gold), var(--accent)); }
.metric-card:nth-child(4)::after { background: linear-gradient(90deg, var(--violet), var(--sky)); }

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 16px 0;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.metric-card:hover,
.panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--soft-shadow);
}

.metric-card span {
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 2.1rem;
  color: var(--brand-deep);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 16px;
}

.dashboard-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 16px;
  margin-top: 16px;
}

.weekly-summary {
  grid-column: span 2;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.summary-grid div {
  padding: 15px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 242, 0.72));
}

.summary-grid span,
.summary-grid strong {
  display: block;
}

.summary-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-grid strong {
  margin-top: 7px;
  color: var(--brand-deep);
}

.ai-advice {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 245, 230, 0.72)),
    #fff;
}

.ai-advice p {
  margin: 18px 0 0;
  color: var(--ink);
  line-height: 1.62;
}

.weak-topic-list,
.schedule-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.weak-topic-item,
.schedule-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.weak-topic-item strong,
.weak-topic-item span,
.schedule-item strong,
.schedule-item span {
  display: block;
}

.weak-topic-item span,
.schedule-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.weak-topic-item b {
  min-width: 54px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #edf7f2;
  text-align: center;
}

.activity-bars {
  height: 188px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 248, 245, 0.78));
}

.activity-day {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  align-items: end;
}

.activity-day span {
  width: 100%;
  height: var(--height);
  min-height: 18px;
  border-radius: 8px 8px 3px 3px;
  background:
    linear-gradient(180deg, var(--gold), var(--brand));
  box-shadow: 0 10px 22px rgba(30, 127, 114, 0.18);
  animation: bar-rise 420ms ease both;
}

.activity-day small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.schedule-item {
  grid-template-columns: 82px minmax(0, 1fr);
}

.schedule-item time {
  padding: 8px 9px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--brand), var(--sky));
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.panel {
  padding: 22px;
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 252, 250, 0.86));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.panel-heading,
.modal-heading,
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.panel h3,
.modal-heading h2 {
  margin-bottom: 0;
  color: var(--brand-deep);
}

.study-plan {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.study-plan li,
.daily-task,
.practice-card {
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  padding: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 248, 245, 0.72));
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.study-plan li:hover,
.daily-task:hover,
.practice-card:hover,
.topic-chip:hover,
.survey-option:hover {
  transform: translateX(3px);
  border-color: rgba(30, 127, 114, 0.32);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 32, 36, 0.07);
}

.study-plan strong,
.daily-task strong,
.practice-card strong {
  display: block;
  margin-bottom: 6px;
}

.topic-map,
.survey-topics {
  display: grid;
  gap: 16px;
}

.topic-group {
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  padding: 17px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 252, 250, 0.9)),
    #fff;
  box-shadow: 0 12px 28px rgba(23, 32, 36, 0.045);
}

.topic-group h4 {
  margin: 0 0 13px;
  color: var(--brand-deep);
  font-size: 1.05rem;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.topic-chip,
.survey-option {
  appearance: none;
  font: inherit;
  text-align: left;
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 48px;
  padding: 11px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-weight: 650;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  cursor: pointer;
  overflow: hidden;
}

.topic-chip.known {
  border-color: rgba(30, 127, 114, 0.38);
  background:
    linear-gradient(135deg, rgba(237, 247, 242, 1), rgba(255, 255, 255, 0.92));
  box-shadow: inset 0 0 0 1px rgba(30, 127, 114, 0.06);
}

.topic-chip strong,
.topic-chip small {
  display: block;
}

.topic-chip small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.topic-chip.todo {
  border-color: rgba(215, 83, 63, 0.18);
}

.topic-chip b {
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--topic-fill, 0%);
  height: 4px;
  background: linear-gradient(90deg, #20c997, #4dabf7, #ffd43b);
  transition: width 320ms ease;
}

.topic-chip.active-topic {
  border-color: rgba(42, 96, 255, 0.42);
  box-shadow: 0 18px 42px rgba(42, 96, 255, 0.15);
  transform: translateY(-2px);
}

.topic-task-panel {
  margin-top: 22px;
}

.topic-task-board {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(18, 31, 53, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 10%, rgba(90, 207, 255, 0.22), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(255, 198, 92, 0.2), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 247, 255, 0.9));
  box-shadow: 0 22px 54px rgba(29, 51, 84, 0.12);
  overflow: hidden;
}

.topic-task-board::before {
  content: "∫  √  π  sin  log  x²";
  position: absolute;
  top: 12px;
  right: 18px;
  color: rgba(42, 96, 255, 0.11);
  font-size: 46px;
  font-weight: 900;
  white-space: nowrap;
  animation: formula-drift 9s ease-in-out infinite alternate;
}

.topic-task-board > * {
  position: relative;
  z-index: 1;
}

.topic-task-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.topic-task-hero h4 {
  margin: 4px 0 8px;
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.08;
}

.topic-task-hero span {
  color: var(--muted);
  font-weight: 800;
}

.topic-task-orbit {
  position: relative;
  flex: 0 0 118px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 1px solid rgba(42, 96, 255, 0.16);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 28px rgba(100, 168, 255, 0.2);
  animation: orbit-breathe 3.8s ease-in-out infinite;
}

.topic-task-orbit span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #16345f;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(42, 96, 255, 0.14);
  font-weight: 900;
}

.topic-task-orbit span:nth-child(1) {
  left: 38px;
  top: -12px;
}

.topic-task-orbit span:nth-child(2) {
  right: -10px;
  bottom: 20px;
}

.topic-task-orbit span:nth-child(3) {
  left: -10px;
  bottom: 16px;
}

.topic-task-progress {
  height: 12px;
  margin: 18px 0 20px;
  border-radius: 999px;
  background: rgba(18, 31, 53, 0.08);
  overflow: hidden;
}

.topic-task-progress span {
  display: block;
  width: var(--topic-task-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #20c997, #4dabf7, #ffd43b);
  box-shadow: 0 0 24px rgba(77, 171, 247, 0.45);
  transition: width 420ms ease;
}

.topic-task-list {
  display: grid;
  gap: 14px;
}

.topic-task-card {
  padding: 16px;
  border: 1px solid rgba(18, 31, 53, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 28px rgba(29, 51, 84, 0.08);
}

.topic-task-card.is-solved {
  border-color: rgba(32, 201, 151, 0.35);
  background: rgba(235, 255, 247, 0.9);
}

.topic-task-top,
.topic-task-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topic-task-top strong {
  display: block;
  color: var(--ink);
}

.topic-task-top span,
.topic-task-card p,
.topic-task-card details span {
  color: var(--muted);
}

.topic-task-state {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(42, 96, 255, 0.1);
  color: #2149bc !important;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.topic-task-card p {
  margin: 12px 0;
  line-height: 1.6;
}

.topic-task-card details {
  padding: 12px 0;
  border-top: 1px solid rgba(18, 31, 53, 0.08);
}

.topic-task-card summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 900;
}

.topic-task-card details div {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.topic-task-actions a {
  color: var(--brand);
  font-weight: 900;
  text-decoration: none;
}

.topic-task-empty {
  padding: 22px;
  border: 1px dashed rgba(42, 96, 255, 0.28);
  border-radius: 8px;
  background: rgba(244, 249, 255, 0.78);
}

.topic-task-empty span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #2a60ff, #20c997);
  font-weight: 900;
}

.practice-panel,
.tutor-panel {
  max-width: 900px;
}

.practice-card {
  margin: 18px 0;
}

.tickets-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid rgba(30, 127, 114, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(237, 247, 242, 0.78)),
    radial-gradient(circle at 88% 16%, rgba(225, 165, 51, 0.22), transparent 32%),
    #fff;
  box-shadow: 0 18px 44px rgba(23, 32, 36, 0.08);
  position: relative;
  overflow: hidden;
}

.tickets-hero::after {
  content: "30";
  position: absolute;
  right: 280px;
  bottom: -46px;
  color: rgba(30, 127, 114, 0.07);
  font-size: 9rem;
  font-weight: 950;
  line-height: 1;
}

.tickets-hero h3,
.tickets-hero p {
  margin-bottom: 0;
}

.tickets-hero h3 {
  color: var(--brand-deep);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.tickets-hero p {
  max-width: 720px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.58;
}

.ticket-refresh-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 138px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(135deg, var(--brand), var(--sky));
  box-shadow: 0 16px 34px rgba(30, 127, 114, 0.22);
}

.ticket-refresh-card span,
.ticket-refresh-card small {
  opacity: 0.78;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-refresh-card span {
  font-size: 0.76rem;
}

.ticket-refresh-card strong {
  font-size: 1.2rem;
  line-height: 1.1;
}

.ticket-refresh-card small {
  font-size: 0.82rem;
  text-transform: none;
}

.ticket-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.tickets-panel {
  position: relative;
  overflow: hidden;
}

.tickets-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(30, 127, 114, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(225, 165, 51, 0.08), transparent 34%);
  opacity: 0.72;
}

.tickets-panel > * {
  position: relative;
}

.monthly-ticket-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.monthly-ticket-card {
  display: grid;
  gap: 13px;
  min-height: 286px;
  padding: 16px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 252, 250, 0.82));
  box-shadow: 0 12px 28px rgba(23, 32, 36, 0.055);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.monthly-ticket-card:hover {
  transform: translateY(-4px);
  border-color: rgba(30, 127, 114, 0.28);
  box-shadow: 0 22px 44px rgba(23, 32, 36, 0.1);
}

.monthly-ticket-card.is-solved {
  border-color: rgba(30, 127, 114, 0.34);
  background:
    linear-gradient(135deg, rgba(237, 247, 242, 0.94), rgba(255, 255, 255, 0.92));
}

.ticket-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ticket-card-top strong,
.ticket-number {
  display: block;
}

.ticket-number {
  color: var(--brand-deep);
  font-size: 1.18rem;
  font-weight: 950;
}

.ticket-card-top strong {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.ticket-status {
  flex: 0 0 auto;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #edf7f2;
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ticket-status.medium {
  color: #7b4b00;
  background: #fff1d2;
}

.ticket-status.hard {
  color: #8c2d21;
  background: #ffe3dd;
}

.is-solved .ticket-status {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--sky));
}

.ticket-score-line {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(219, 226, 223, 0.72);
}

.ticket-score-line span {
  display: block;
  width: var(--ticket-score);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--brand));
  animation: ticket-fill 460ms ease both;
}

.ticket-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.ticket-topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: flex-start;
}

.ticket-topic-tags span {
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(30, 127, 114, 0.14);
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(237, 247, 242, 0.78);
  font-size: 0.78rem;
  font-weight: 850;
}

.ticket-solve-button {
  align-self: end;
  margin-top: auto;
}

.chat-log {
  height: min(48vh, 420px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 4px 2px 16px;
}

.message {
  max-width: 78%;
  padding: 13px 15px;
  border-radius: 8px;
  line-height: 1.45;
  animation: pop-in 220ms ease both;
  box-shadow: 0 8px 22px rgba(23, 32, 36, 0.06);
}

.message.ai {
  align-self: flex-start;
  background:
    linear-gradient(180deg, #eef5f2, #ffffff);
}

.message.user {
  align-self: flex-end;
  color: #fff;
  background:
    linear-gradient(135deg, var(--sky), var(--violet));
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
}

.account-profile {
  grid-row: span 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 242, 0.82)),
    #fff;
}

.account-avatar {
  width: 86px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 38%),
    linear-gradient(135deg, var(--brand), var(--sky) 55%, var(--accent));
  box-shadow: 0 18px 36px rgba(30, 127, 114, 0.24);
  font-size: 2.4rem;
  font-weight: 950;
  position: relative;
  overflow: hidden;
}

.account-avatar::after {
  content: "∑";
  position: absolute;
  right: -8px;
  bottom: -20px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 4.5rem;
}

.account-profile h3,
.subscription-card h3,
.receipts-panel h3 {
  margin-bottom: 0;
}

.account-data {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.account-data div {
  padding: 13px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 252, 250, 0.72));
}

.account-data dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-data dd {
  margin: 5px 0 0;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.subscription-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 245, 230, 0.72)),
    #fff;
}

.subscription-card::after {
  content: "₽";
  position: absolute;
  right: 24px;
  bottom: -36px;
  color: rgba(30, 127, 114, 0.08);
  font-size: 8rem;
  font-weight: 950;
}

.subscription-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.subscription-grid div {
  padding: 15px;
  border: 1px solid rgba(30, 127, 114, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 247, 242, 0.88), rgba(255, 255, 255, 0.94));
  box-shadow: 0 10px 24px rgba(23, 32, 36, 0.045);
}

.subscription-grid span,
.subscription-grid strong {
  display: block;
}

.subscription-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.subscription-grid strong {
  margin-top: 6px;
}

.receipts-panel {
  min-height: 260px;
}

.receipt-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.receipt-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 252, 250, 0.82));
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.receipt-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--gold));
}

.receipt-card:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 127, 114, 0.26);
  box-shadow: var(--soft-shadow);
}

.receipt-card strong,
.receipt-card span,
.receipt-card b,
.receipt-card small {
  display: block;
}

.receipt-card span,
.receipt-card small {
  color: var(--muted);
}

.receipt-card b {
  color: var(--brand-dark);
  font-size: 1.08rem;
  text-align: right;
}

.receipt-card small {
  margin-top: 4px;
  text-align: right;
  font-weight: 850;
}

.survey-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 100px rgba(23, 32, 36, 0.32);
  animation: modal-in 240ms ease both;
}

.exam-dialog {
  width: min(1060px, calc(100vw - 28px));
  overflow: hidden;
}

.exam-form {
  position: relative;
  isolation: isolate;
}

.exam-form::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(30, 127, 114, 0.13), transparent 42%),
    linear-gradient(315deg, rgba(215, 83, 63, 0.1), transparent 38%),
    #fff;
}

.exam-visual {
  height: 178px;
  margin: -22px -22px 18px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, #153a35, #215b52 48%, #4a83a8);
}

.exam-visual::before {
  content: "ЕГЭ";
  position: absolute;
  left: 34px;
  bottom: -18px;
  color: rgba(255, 255, 255, 0.1);
  font-size: 8rem;
  font-weight: 950;
}

.exam-orbit {
  position: absolute;
  inset: 20px auto auto 38px;
  width: 132px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  animation: spin-slow 12s linear infinite;
}

.exam-orbit::after {
  content: "";
  position: absolute;
  inset: 35px;
  border: 1px dashed rgba(255, 255, 255, 0.32);
  border-radius: 50%;
}

.exam-orbit span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 46px;
  height: 30px;
  border-radius: 8px;
  color: #17332f;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  animation: counter-spin 12s linear infinite;
}

.exam-orbit span:nth-child(1) { left: 43px; top: -15px; }
.exam-orbit span:nth-child(2) { right: -24px; top: 51px; }
.exam-orbit span:nth-child(3) { left: 43px; bottom: -15px; }
.exam-orbit span:nth-child(4) { left: -24px; top: 51px; }

.exam-prism {
  position: absolute;
  right: clamp(24px, 8vw, 86px);
  top: 32px;
  width: min(430px, 48%);
  height: 116px;
  transform-style: preserve-3d;
  animation: prism-float 5.8s ease-in-out infinite;
}

.exam-prism span {
  position: absolute;
  min-width: 116px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  font-size: 1.25rem;
  font-weight: 950;
  text-align: center;
}

.exam-prism span:nth-child(1) { left: 0; top: 42px; }
.exam-prism span:nth-child(2) { left: 132px; top: 0; }
.exam-prism span:nth-child(3) { right: 0; bottom: 6px; }

.survey-dialog::backdrop {
  background:
    linear-gradient(135deg, rgba(13, 52, 48, 0.38), rgba(23, 32, 36, 0.42));
  backdrop-filter: blur(4px);
}

.survey-form {
  padding: 22px;
}

.exam-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.exam-choice {
  min-height: 180px;
  padding: 18px;
  border: 1px solid rgba(23, 32, 36, 0.08);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(238, 247, 244, 0.82)),
    #fff;
  box-shadow: 0 12px 28px rgba(23, 32, 36, 0.055);
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.exam-choice::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 5px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--accent));
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 220ms ease;
}

.exam-choice:hover {
  transform: translateY(-4px);
  border-color: rgba(30, 127, 114, 0.38);
  box-shadow: var(--soft-shadow);
}

.exam-choice:hover::after {
  transform: scaleX(1);
}

.exam-choice strong,
.exam-choice span,
.exam-choice b,
.exam-choice em {
  display: block;
}

.exam-choice em {
  width: 44px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--brand), var(--brand-dark));
  font-style: normal;
  font-weight: 950;
}

.exam-choice strong {
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-size: 1.45rem;
}

.exam-choice b {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 950;
  text-transform: uppercase;
}

.exam-choice span {
  color: var(--muted);
  line-height: 1.48;
}

.secondary-action.locked,
.secondary-action:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.modal-copy {
  color: var(--muted);
}

.survey-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.35fr);
  gap: 16px;
  align-items: center;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(30, 127, 114, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(237, 247, 242, 0.95), rgba(255, 245, 230, 0.88)),
    linear-gradient(90deg, rgba(74, 131, 168, 0.08), transparent),
    #fff;
  box-shadow: 0 12px 30px rgba(23, 32, 36, 0.06);
  position: relative;
  overflow: hidden;
}

.survey-visual::after {
  content: "✓";
  position: absolute;
  right: 24px;
  bottom: -36px;
  color: rgba(30, 127, 114, 0.09);
  font-size: 7.5rem;
  font-weight: 950;
}

.survey-visual strong,
.survey-visual p {
  position: relative;
  z-index: 1;
}

.survey-visual strong {
  display: block;
  color: var(--brand-dark);
  font-size: 1.2rem;
}

.survey-visual p {
  margin: 5px 0 0;
  color: var(--muted);
}

.survey-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.survey-glow span {
  position: absolute;
  color: rgba(23, 32, 36, 0.12);
  font-weight: 950;
  animation: drift 9s ease-in-out infinite;
}

.survey-glow span:nth-child(1) { left: 48%; top: 10px; font-size: 2rem; }
.survey-glow span:nth-child(2) { left: 64%; top: 42px; animation-delay: -3s; }
.survey-glow span:nth-child(3) { left: 78%; top: 18px; font-size: 1.6rem; animation-delay: -6s; }

.survey-progress {
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px rgba(30, 127, 114, 0.16);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.survey-progress span {
  display: block;
  width: var(--survey-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--accent));
  transition: width 240ms ease;
  position: relative;
}

.survey-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: shine-pass 1.6s ease-in-out infinite;
}

.survey-option {
  min-height: auto;
  cursor: pointer;
}

.survey-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  box-shadow: none;
}

.modal-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

.study-companion {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: min(360px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(30, 127, 114, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(237, 247, 242, 0.92)),
    #fff;
  box-shadow: 0 24px 70px rgba(23, 32, 36, 0.18);
  backdrop-filter: blur(18px);
  z-index: 4;
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease;
}

.study-companion.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.companion-core {
  width: 72px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 180deg, var(--brand), var(--gold), var(--accent), var(--brand));
  position: relative;
  animation: spin-slow 9s linear infinite;
}

.companion-core::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.companion-core span {
  position: relative;
  z-index: 1;
  color: var(--brand-dark);
  font-size: 1.7rem;
  font-weight: 950;
  animation: counter-spin 9s linear infinite;
}

.companion-core i,
.companion-core b {
  position: absolute;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.36);
  transform: rotate(45deg);
}

.companion-core i { top: 2px; left: 31px; }
.companion-core b { right: 5px; bottom: 13px; }

.companion-copy small,
.companion-copy strong,
.companion-copy p {
  display: block;
}

.companion-copy small {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.companion-copy strong {
  margin-top: 3px;
  color: var(--ink);
  line-height: 1.25;
}

.companion-copy p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.companion-meter {
  height: 8px;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(219, 226, 223, 0.78);
  overflow: hidden;
}

.companion-meter span {
  display: block;
  width: var(--companion-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--accent));
  transition: width 260ms ease;
}

@media (max-width: 880px) {
  .auth-panel,
  .app-shell,
  .dashboard-grid,
  .dashboard-insights,
  .metric-row,
  .tickets-hero,
  .ticket-summary-grid {
    grid-template-columns: 1fr;
  }

  .monthly-ticket-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-summary {
    grid-column: auto;
  }

  .focus-strip {
    grid-template-columns: 1fr;
  }

  .auth-copy {
    min-height: auto;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .sidebar::after {
    display: none;
  }

  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-list::before {
    display: none;
  }

  .nav-list::after {
    left: 12px;
    right: 12px;
  }

  .nav-item {
    text-align: center;
    padding: 44px 10px 11px;
  }

  .nav-item::before {
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
  }

  .nav-item:hover,
  .nav-item:hover::before {
    transform: none;
  }

  #logout-button {
    margin-top: 0;
  }

  .ege-mascot {
    min-height: 112px;
    margin-top: 0;
  }

  .mascot-person {
    width: 82px;
    height: 86px;
    margin-top: 0;
    scale: 0.86;
    transform-origin: center top;
  }

  .mascot-copy {
    margin-top: -16px;
  }
}

@media (max-width: 620px) {
  .auth-shell,
  .workspace,
  .sidebar {
    padding: 14px;
  }

  .signal-grid,
  .hero-stats,
  .exam-choice-grid,
  .topic-list,
  .nav-list,
  .monthly-ticket-list {
    grid-template-columns: 1fr;
  }

  .nav-list {
    padding: 10px;
  }

  .nav-item {
    min-height: 52px;
    padding: 13px 12px 13px 50px;
    text-align: left;
  }

  .nav-item::before {
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
  }

  .nav-item:hover::before {
    transform: translateY(-50%);
  }

  .ege-mascot {
    min-height: 96px;
    padding: 12px;
  }

  .mascot-person {
    margin-left: 6px;
    margin-right: auto;
  }

  .mascot-copy {
    position: absolute;
    left: 116px;
    right: 12px;
    top: 28px;
    margin-top: 0;
    text-align: left;
  }

  .tickets-hero {
    padding: 18px;
  }

  .tickets-hero::after {
    right: -18px;
    bottom: -34px;
    font-size: 6.4rem;
  }

  .topbar,
  .panel-heading,
  .modal-heading,
  .modal-actions,
  .chat-form {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }

  .account-layout,
  .account-profile,
  .subscription-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .activity-bars {
    gap: 6px;
    padding: 10px;
  }

  .receipt-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .receipt-card b,
  .receipt-card small {
    text-align: left;
  }

  .study-companion {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }

  .site-loader {
    padding: 16px;
  }

  .loader-core {
    min-height: 342px;
    padding: 34px 22px;
  }

  .loader-core img {
    width: 76px;
    height: 76px;
  }

  .loader-orbit {
    inset: 26px;
  }

  .loader-formulas span:nth-child(3),
  .loader-formulas span:nth-child(4),
  .loader-formulas span:nth-child(7),
  .loader-formulas span:nth-child(8) {
    display: none;
  }

  .geo-circle,
  .geo-triangle,
  .geo-square,
  .geo-ring {
    scale: 0.72;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-loader *,
  .site-loader *::before,
  .site-loader *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loader-mesh-drift {
  from {
    transform: rotate(-8deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(-8deg) translate3d(42px, 42px, 0);
  }
}

@keyframes loader-float {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateY(-22px) rotate(5deg) scale(1.08);
    opacity: 0.9;
  }
}

@keyframes loader-spin-float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(22deg);
  }
}

@keyframes loader-core-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loader-conic {
  to {
    transform: rotate(1turn);
  }
}

@keyframes loader-logo-pulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.04);
  }
}

@keyframes loader-orbit {
  to {
    transform: rotate(1turn);
  }
}

@keyframes loader-progress {
  0% {
    transform: scaleX(0);
  }
  58% {
    transform: scaleX(0.78);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0% {
    transform: translateY(0) rotate(-10deg);
  }
  50% {
    transform: translateY(-18px) rotate(-6deg);
  }
  100% {
    transform: translateY(0) rotate(-10deg);
  }
}

@keyframes float-card {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes board-pulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bar-rise {
  from {
    transform: scaleY(0.2);
    transform-origin: bottom;
    opacity: 0.35;
  }
  to {
    transform: scaleY(1);
    transform-origin: bottom;
    opacity: 1;
  }
}

@keyframes ticket-fill {
  from {
    width: 0;
  }
}

@keyframes mascot-glow {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.66;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes mascot-token {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

@keyframes mascot-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes mascot-blink {
  0%,
  92%,
  100% {
    transform: scaleY(1);
  }
  95% {
    transform: scaleY(0.18);
  }
}

@keyframes tassel-swing {
  0%,
  100% {
    transform: rotate(8deg);
  }
  50% {
    transform: rotate(-14deg);
  }
}

@keyframes mascot-wave {
  0%,
  100% {
    transform: rotate(-35deg);
  }
  50% {
    transform: rotate(-56deg);
  }
}

@keyframes mascot-paper {
  0%,
  100% {
    transform: rotate(8deg) translateY(0);
  }
  50% {
    transform: rotate(2deg) translateY(-4px);
  }
}

@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes counter-spin {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes prism-float {
  0%, 100% {
    transform: translateY(0) rotateX(0deg);
  }
  50% {
    transform: translateY(-9px) rotateX(8deg);
  }
}

@keyframes shine-pass {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(110%);
  }
}

@keyframes formula-drift {
  from {
    transform: translate3d(0, 0, 0) rotate(-1deg);
  }
  to {
    transform: translate3d(-34px, 12px, 0) rotate(2deg);
  }
}

@keyframes orbit-breathe {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.05) rotate(4deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
