/* =========================================================
   Java 面试通关 · 刷题站
   Offline-first · no external assets
   ========================================================= */

:root {
  --bg: #070b13;
  --bg-elevated: #0a111c;
  --panel: #0f1825;
  --panel-2: #131e2d;
  --panel-3: #172334;
  --line: rgba(151, 169, 192, 0.13);
  --line-strong: rgba(151, 169, 192, 0.24);
  --text: #edf4fb;
  --text-soft: #cbd7e5;
  --muted: #8797ab;
  --faint: #617187;
  --mint: #4ee2c2;
  --mint-bright: #8af5df;
  --sky: #64b8ff;
  --amber: #f5c268;
  --rose: #ff7d96;
  --violet: #b18cff;
  --green: #3ddc97;
  --red: #ff6b81;
  --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "Cascadia Code", "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sidebar-width: 278px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 15px;
  --radius-sm: 10px;
  --shadow-panel: 0 22px 60px rgba(0, 0, 0, 0.26);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

::selection {
  background: rgba(78, 226, 194, 0.28);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.question-card:focus,
.feedback-card:focus {
  outline: none;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background: rgba(139, 158, 180, 0.28);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 158, 180, 0.45);
  background-clip: padding-box;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.mono {
  font-family: var(--font-mono);
}

/* ---------- Ambient background ---------- */

.ambient {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.55;
}

.glow-one {
  top: -260px;
  right: 6%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(49, 153, 141, 0.17), transparent 67%);
}

.glow-two {
  bottom: -340px;
  left: 24%;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(56, 119, 192, 0.1), transparent 68%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(151, 169, 192, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151, 169, 192, 0.035) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

/* ---------- Layout ---------- */

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(15, 24, 37, 0.96), rgba(8, 14, 23, 0.99)),
    radial-gradient(circle at 0 0, rgba(78, 226, 194, 0.07), transparent 40%);
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 20px 21px 23px;
}

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

.brand-mark {
  position: relative;
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(124, 244, 222, 0.3);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(78, 226, 194, 0.21), rgba(42, 110, 118, 0.11)),
    #0d1a23;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 6px 20px rgba(44, 205, 178, 0.09);
  color: var(--mint-bright);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.brand-mark::before {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  content: "";
}

.brand-mark i {
  position: absolute;
  right: -13px;
  bottom: -18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(78, 226, 194, 0.16);
  border-radius: 50%;
}

.brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.brand-copy strong {
  overflow: hidden;
  color: #f3f8fd;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-copy small {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
  white-space: nowrap;
}

.sidebar .sidebar-close {
  display: none;
}

.sidebar-progress {
  margin: 0 18px 3px;
  padding: 15px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(78, 226, 194, 0.055), rgba(100, 184, 255, 0.02)),
    rgba(16, 26, 40, 0.6);
}

.side-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--text-soft);
  font-size: 11px;
}

.side-progress-label span:last-child {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.progress-track {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(151, 169, 192, 0.12);
}

.progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #7ec9ff);
  box-shadow: 0 0 14px rgba(78, 226, 194, 0.36);
  transition: width 0.7s var(--ease);
}

.sidebar-progress p {
  margin-top: 10px;
  color: var(--faint);
  font-size: 10.5px;
}

.sidebar-progress b {
  color: var(--muted);
  font-weight: 600;
}

.sidebar-progress .sep {
  margin: 0 3px;
  color: rgba(151, 169, 192, 0.3);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 13px 20px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.nav-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  margin-bottom: 7px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-label-modules {
  margin-top: 25px;
}

.nav-label span {
  margin-left: auto;
  color: #54657a;
  letter-spacing: 0;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.nav-item + .nav-item {
  margin-top: 2px;
}

.nav-item .icon {
  width: 17px;
  height: 17px;
  color: #718196;
  transition: color 0.18s ease;
}

.nav-item:hover {
  background: rgba(151, 169, 192, 0.06);
  color: var(--text-soft);
}

.nav-item:hover .icon {
  color: var(--mint);
}

.nav-item.is-active {
  border-color: rgba(78, 226, 194, 0.12);
  background: linear-gradient(90deg, rgba(78, 226, 194, 0.1), rgba(78, 226, 194, 0.025));
  color: var(--mint-bright);
}

.nav-item.is-active .icon {
  color: var(--mint);
}

.nav-item.is-active::before {
  position: absolute;
  top: 50%;
  left: -1px;
  width: 2px;
  height: 17px;
  border-radius: 3px;
  background: var(--mint);
  box-shadow: 0 0 9px rgba(78, 226, 194, 0.65);
  content: "";
  transform: translateY(-50%);
}

.nav-badge {
  min-width: 25px;
  margin-left: auto;
  padding: 1px 6px;
  border: 1px solid rgba(78, 226, 194, 0.15);
  border-radius: 5px;
  background: rgba(78, 226, 194, 0.07);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: center;
}

.nav-count {
  min-width: 22px;
  margin-left: auto;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-align: right;
}

.category-nav .nav-item {
  gap: 10px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 12px;
}

.category-nav .nav-item + .nav-item {
  margin-top: 1px;
}

.nav-cat-mark {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.category-nav .nav-count {
  font-size: 9px;
}

.sidebar-foot {
  padding: 14px 19px 19px;
  border-top: 1px solid var(--line);
}

.version-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 3px;
  margin-bottom: 8px;
  color: #526176;
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.09em;
}

.version-line b {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #6c7c91;
  font-size: 7px;
  font-weight: 500;
}

.reset-button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: #637387;
  font-size: 10px;
  text-align: left;
  transition: color 0.18s ease;
}

.reset-button .icon {
  width: 13px;
  height: 13px;
}

.reset-button:hover {
  color: var(--rose);
}

.main-wrap {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  height: 74px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 3.6vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 19, 0.76);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11.5px;
}

.breadcrumb::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(78, 226, 194, 0.6);
  box-shadow: 0 0 8px rgba(78, 226, 194, 0.4);
  content: "";
}

.breadcrumb .crumb-divider {
  color: #435267;
}

.breadcrumb .crumb-current {
  overflow: hidden;
  max-width: 43vw;
  color: var(--text-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.today-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 24, 37, 0.55);
  color: var(--faint);
  font-size: 10.5px;
}

.today-stat strong {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.today-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 7px var(--mint);
}

.profile-mark {
  position: relative;
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.1), transparent 45%),
    linear-gradient(145deg, #172b35, #101a26);
  color: #b7ece1;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.profile-mark i {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--green);
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(15, 24, 37, 0.64);
  color: var(--muted);
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
}

.menu-button {
  display: none;
}

.main-content {
  width: 100%;
  max-width: 1280px;
  min-height: calc(100vh - 74px);
  padding: 38px clamp(24px, 3.6vw, 52px) 80px;
  margin: 0 auto;
  outline: none;
}

.page-enter {
  animation: page-in 0.46s var(--ease) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-screen {
  display: grid;
  min-height: 55vh;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.loading-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(78, 226, 194, 0.25);
  border-radius: 13px;
  background: rgba(78, 226, 194, 0.08);
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 21px;
  animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
  50% {
    box-shadow: 0 0 28px rgba(78, 226, 194, 0.16);
    opacity: 0.68;
  }
}

/* ---------- Generic buttons ---------- */

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 19px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    opacity 0.18s ease;
}

.button .icon {
  width: 16px;
  height: 16px;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button-primary {
  border-color: rgba(122, 255, 233, 0.34);
  background: linear-gradient(135deg, #73f1d8, #3ed9bb);
  box-shadow:
    0 8px 26px rgba(55, 211, 184, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  color: #032a23;
}

.button-primary:hover:not(:disabled) {
  box-shadow:
    0 11px 32px rgba(55, 211, 184, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  filter: brightness(1.035);
}

.button-primary:disabled {
  border-color: rgba(151, 169, 192, 0.08);
  background: rgba(151, 169, 192, 0.1);
  box-shadow: none;
  color: #66768a;
}

.button-ghost {
  border-color: var(--line-strong);
  background: rgba(15, 24, 37, 0.55);
  color: var(--text-soft);
}

.button-ghost:hover:not(:disabled) {
  border-color: rgba(151, 169, 192, 0.38);
  background: var(--panel-2);
  color: var(--text);
}

.button-danger {
  border-color: rgba(255, 107, 129, 0.28);
  background: rgba(255, 107, 129, 0.11);
  color: #ff9eae;
}

.button-danger:hover:not(:disabled) {
  background: rgba(255, 107, 129, 0.17);
}

.button-wide {
  width: 100%;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  transition: color 0.18s ease;
}

.text-button .icon {
  width: 15px;
  height: 15px;
}

.text-button:hover {
  color: var(--text);
}

/* ---------- Dashboard ---------- */

.dashboard {
  display: grid;
  gap: 34px;
}

.hero {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(26px, 4vw, 58px);
  align-items: center;
  padding: clamp(31px, 3.6vw, 47px);
  border: 1px solid rgba(151, 169, 192, 0.15);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 8%, rgba(78, 226, 194, 0.09), transparent 36%),
    radial-gradient(circle at 4% 105%, rgba(100, 184, 255, 0.06), transparent 43%),
    linear-gradient(132deg, rgba(20, 33, 50, 0.96), rgba(11, 18, 29, 0.98));
  box-shadow: var(--shadow-panel);
}

.hero::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0.28;
  background-image: radial-gradient(rgba(162, 183, 205, 0.38) 0.65px, transparent 0.65px);
  background-size: 17px 17px;
  mask-image: linear-gradient(110deg, transparent 40%, black 100%);
  content: "";
  pointer-events: none;
}

.hero::after {
  position: absolute;
  z-index: 0;
  top: -140px;
  right: -90px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(78, 226, 194, 0.1);
  border-radius: 50%;
  box-shadow:
    0 0 0 54px rgba(78, 226, 194, 0.016),
    0 0 0 110px rgba(78, 226, 194, 0.012);
  content: "";
  pointer-events: none;
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.17em;
}

.eyebrow i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px var(--mint);
  animation: dot-pulse 2.3s ease-in-out infinite;
}

@keyframes dot-pulse {
  50% {
    box-shadow: 0 0 3px var(--mint);
    opacity: 0.55;
  }
}

.hero h1 {
  margin-top: 17px;
  font-size: clamp(35px, 4.1vw, 54px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.hero h1 em {
  display: inline-block;
  background: linear-gradient(100deg, #73efd8 4%, #7fcaff 82%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-style: normal;
}

.hero-description {
  max-width: 540px;
  margin-top: 18px;
  color: #94a5b9;
  font-size: 14px;
  line-height: 1.85;
}

.hero-description strong {
  color: var(--text-soft);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.hero-actions .button-primary {
  min-height: 46px;
  padding-right: 22px;
  padding-left: 22px;
}

.hero-note {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 17px;
  margin-top: 22px;
  color: #75869a;
  font-size: 10px;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-note .icon {
  width: 12px;
  height: 12px;
  color: rgba(78, 226, 194, 0.75);
}

.hero-panel {
  width: 100%;
  max-width: 300px;
  justify-self: end;
  padding: 17px;
  border: 1px solid rgba(151, 169, 192, 0.16);
  border-radius: 19px;
  background:
    linear-gradient(160deg, rgba(23, 38, 56, 0.86), rgba(11, 19, 30, 0.94));
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(10px);
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
}

.panel-topline .status-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #80d7c4;
}

.panel-topline .status-live::before {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.mastery-orbit {
  position: relative;
  display: grid;
  width: 145px;
  height: 145px;
  place-items: center;
  margin: 18px auto 16px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--mint) calc(var(--mastery) * 1%), rgba(151, 169, 192, 0.1) 0);
  box-shadow: 0 0 42px rgba(78, 226, 194, 0.06);
}

.mastery-orbit::before {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(151, 169, 192, 0.08);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(78, 226, 194, 0.065), transparent 62%),
    #0e1825;
  content: "";
}

.mastery-orbit::after {
  position: absolute;
  inset: -6px;
  border: 1px dashed rgba(151, 169, 192, 0.11);
  border-radius: 50%;
  content: "";
}

.mastery-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 0;
}

.mastery-core strong {
  color: #eafff9;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.mastery-core strong small {
  color: var(--mint);
  font-size: 11px;
  letter-spacing: 0;
}

.mastery-core span {
  margin-top: 4px;
  color: var(--faint);
  font-size: 8.5px;
  letter-spacing: 0.11em;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.hero-metrics div {
  padding: 0 8px;
  text-align: center;
}

.hero-metrics div + div {
  border-left: 1px solid var(--line);
}

.hero-metrics strong {
  display: block;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}

.hero-metrics span {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8px;
  white-space: nowrap;
}

.hero-terminal {
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 7px;
  padding: 9px 10px;
  margin-top: 14px;
  border: 1px solid rgba(151, 169, 192, 0.09);
  border-radius: 8px;
  background: rgba(4, 9, 15, 0.52);
  color: #64798e;
  font-family: var(--font-mono);
  font-size: 7.5px;
  white-space: nowrap;
}

.hero-terminal .prompt {
  color: var(--mint);
}

.hero-terminal .caret {
  width: 4px;
  height: 9px;
  background: rgba(78, 226, 194, 0.7);
  animation: caret-blink 1.2s steps(2, start) infinite;
}

@keyframes caret-blink {
  50% {
    opacity: 0;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  position: relative;
  display: flex;
  min-height: 105px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(20, 32, 48, 0.58), rgba(13, 21, 32, 0.68));
  transition:
    border-color 0.2s ease,
    transform 0.2s var(--ease);
}

.stat-card:hover {
  border-color: rgba(151, 169, 192, 0.24);
  transform: translateY(-2px);
}

.stat-card::after {
  position: absolute;
  right: -24px;
  bottom: -38px;
  width: 88px;
  height: 88px;
  border: 1px solid color-mix(in srgb, var(--stat-accent, var(--mint)) 12%, transparent);
  border-radius: 50%;
  content: "";
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.stat-label i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--stat-accent, var(--mint));
  box-shadow: 0 0 6px color-mix(in srgb, var(--stat-accent, var(--mint)) 50%, transparent);
}

.stat-value {
  margin-top: 9px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 27px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat-value small {
  margin-left: 3px;
  color: var(--faint);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
}

.stat-note {
  margin-top: 8px;
  color: var(--faint);
  font-size: 9px;
}

.stat-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--stat-accent, var(--mint)) 16%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--stat-accent, var(--mint)) 7%, transparent);
  color: var(--stat-accent, var(--mint));
}

.stat-icon .icon {
  width: 15px;
  height: 15px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.section-heading h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin-top: 4px;
  color: var(--faint);
  font-size: 10.5px;
}

.section-meta {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
}

.mode-card {
  position: relative;
  display: flex;
  min-height: 154px;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--mode-accent, var(--mint)) 8%, transparent), transparent 43%),
    rgba(15, 24, 37, 0.68);
  color: var(--text);
  text-align: left;
  transition:
    transform 0.22s var(--ease),
    border-color 0.22s ease,
    background 0.22s ease;
}

.mode-card:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--mode-accent, var(--mint)) 35%, var(--line));
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--mode-accent, var(--mint)) 13%, transparent), transparent 48%),
    rgba(19, 30, 45, 0.86);
  transform: translateY(-3px);
}

.mode-card:disabled {
  opacity: 0.48;
}

.mode-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--mode-accent, var(--mint)) 20%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--mode-accent, var(--mint)) 9%, transparent);
  color: var(--mode-accent, var(--mint));
}

.mode-icon .icon {
  width: 17px;
  height: 17px;
}

.mode-card h3 {
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
}

.mode-card p {
  max-width: 205px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.mode-arrow {
  position: absolute;
  right: 16px;
  bottom: 16px;
  color: color-mix(in srgb, var(--mode-accent, var(--mint)) 68%, #6c7a8c);
  transition: transform 0.2s var(--ease);
}

.mode-arrow .icon {
  width: 15px;
  height: 15px;
}

.mode-card:hover .mode-arrow {
  transform: translate(2px, -2px);
}

.mode-tag {
  position: absolute;
  top: 20px;
  right: 15px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.category-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 143px;
  flex-direction: column;
  align-items: stretch;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 6%, transparent), transparent 42%),
    rgba(15, 24, 37, 0.57);
  text-align: left;
  transition:
    border-color 0.22s ease,
    transform 0.22s var(--ease),
    background 0.22s ease;
}

.category-card::before {
  position: absolute;
  top: 0;
  left: 18px;
  width: 28px;
  height: 1px;
  background: color-mix(in srgb, var(--accent) 50%, transparent);
  content: "";
  opacity: 0;
  transition: opacity 0.22s ease;
}

.category-card:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--accent) 10%, transparent), transparent 47%),
    rgba(19, 30, 45, 0.8);
  transform: translateY(-3px);
}

.category-card:hover::before {
  opacity: 1;
}

.category-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.category-count {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.category-count b {
  color: color-mix(in srgb, var(--accent) 80%, #cdd9e6);
  font-weight: 500;
}

.category-name {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.category-desc {
  overflow: hidden;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

.category-progress {
  flex: 1;
  height: 2px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(151, 169, 192, 0.1);
}

.category-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  opacity: 0.75;
  transition: width 0.5s var(--ease);
}

.category-arrow {
  color: #536277;
  transition:
    color 0.2s ease,
    transform 0.2s var(--ease);
}

.category-arrow .icon {
  width: 13px;
  height: 13px;
}

.category-card:hover .category-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.dashboard-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.55fr);
  gap: 12px;
}

.recent-panel,
.tip-panel {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 24, 37, 0.56);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.panel-heading h2 {
  font-size: 13px;
  font-weight: 600;
}

.panel-heading span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.session-list {
  display: grid;
}

.session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.session-row:first-child {
  border-top: 0;
  padding-top: 2px;
}

.session-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.session-name i {
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  opacity: 0.6;
}

.session-name span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.session-score {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 9px;
}

.session-score b {
  color: var(--mint);
  font-weight: 500;
}

.session-time {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.empty-inline {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 2px 5px;
  color: var(--faint);
  font-size: 10.5px;
}

.empty-inline .icon {
  width: 18px;
  height: 18px;
  color: #4d5d70;
}

.tip-panel {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(245, 194, 104, 0.075), transparent 48%),
    rgba(15, 24, 37, 0.56);
}

.tip-panel::after {
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(245, 194, 104, 0.08);
  border-radius: 50%;
  content: "";
}

.tip-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.tip-eyebrow .icon {
  width: 12px;
  height: 12px;
}

.tip-panel h2 {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}

.tip-panel p {
  margin-top: 6px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.75;
}

.tip-panel .text-button {
  margin-top: 12px;
  color: var(--muted);
  font-size: 9.5px;
}

.tip-panel .text-button:hover {
  color: var(--amber);
}

/* ---------- Quiz ---------- */

.quiz-view {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 21px;
}

.quiz-mode {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.quiz-mode-label {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.quiz-mode-category {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  white-space: nowrap;
}

.quiz-timer {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.quiz-timer .icon {
  width: 13px;
  height: 13px;
}

.quiz-progress {
  margin-bottom: 14px;
}

.quiz-progress-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.quiz-progress-label {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.quiz-progress-count {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

.quiz-progress-count b {
  color: var(--mint);
  font-size: 13px;
  font-weight: 500;
}

.quiz-progress-count span {
  color: #536276;
}

.quiz-progress .progress-track {
  position: relative;
  height: 4px;
  overflow: visible;
  background: rgba(151, 169, 192, 0.1);
}

.quiz-progress .progress-fill {
  position: relative;
  min-width: 2px;
}

.quiz-progress .progress-fill::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 6px;
  height: 6px;
  border: 1px solid #b5fff0;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(78, 226, 194, 0.8);
  content: "";
  transform: translate(50%, -50%);
}

.question-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.1vw, 33px);
  border: 1px solid rgba(151, 169, 192, 0.16);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, rgba(78, 226, 194, 0.028), transparent 35%),
    linear-gradient(145deg, rgba(18, 30, 45, 0.88), rgba(12, 20, 31, 0.92));
  box-shadow: var(--shadow-soft);
}

.question-card::before {
  position: absolute;
  top: 0;
  left: 33px;
  width: 38px;
  height: 1px;
  background: linear-gradient(90deg, rgba(78, 226, 194, 0.7), transparent);
  content: "";
}

.question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.question-index {
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--faint);
  font-size: 8px;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-easy {
  border-color: rgba(61, 220, 151, 0.16);
  background: rgba(61, 220, 151, 0.055);
  color: #72d9ae;
}

.badge-medium {
  border-color: rgba(245, 194, 104, 0.16);
  background: rgba(245, 194, 104, 0.055);
  color: #dfb976;
}

.badge-hard {
  border-color: rgba(255, 125, 150, 0.16);
  background: rgba(255, 125, 150, 0.055);
  color: #ec9aab;
}

.question-tag {
  color: #63758b;
  font-family: var(--font-mono);
  font-size: 8px;
}

.question-tag::before {
  color: #415166;
  content: "#";
}

.favorite-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #617287;
  font-size: 9px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.favorite-button .icon {
  width: 14px;
  height: 14px;
  transition: fill 0.18s ease;
}

.favorite-button:hover {
  border-color: var(--line);
  background: rgba(151, 169, 192, 0.05);
  color: var(--text-soft);
}

.favorite-button.is-active {
  color: var(--rose);
}

.favorite-button.is-active .icon {
  fill: rgba(255, 125, 150, 0.2);
}

.question-stem {
  max-width: 800px;
  margin: 19px 0 24px;
  color: #eff6fd;
  font-size: clamp(19px, 1.85vw, 24px);
  font-weight: 550;
  line-height: 1.55;
  letter-spacing: -0.013em;
}

.options {
  display: grid;
  gap: 9px;
}

.option {
  position: relative;
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid rgba(151, 169, 192, 0.13);
  border-radius: 12px;
  background: rgba(151, 169, 192, 0.025);
  color: var(--text-soft);
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s var(--ease),
    opacity 0.18s ease;
}

.option:hover:not(:disabled) {
  border-color: rgba(78, 226, 194, 0.3);
  background: rgba(78, 226, 194, 0.04);
  transform: translateX(2px);
}

.option:focus-visible {
  outline-offset: 2px;
}

.option-letter {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(151, 169, 192, 0.19);
  border-radius: 7px;
  background: rgba(151, 169, 192, 0.04);
  color: #8da0b5;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.option-text {
  padding-top: 3px;
  font-size: 14px;
  line-height: 1.65;
}

.option-state {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  margin-top: 2px;
  margin-left: auto;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.option-state .icon {
  width: 14px;
  height: 14px;
}

.option.is-selected {
  border-color: rgba(78, 226, 194, 0.55);
  background:
    linear-gradient(90deg, rgba(78, 226, 194, 0.075), rgba(78, 226, 194, 0.018));
  box-shadow: inset 0 0 0 1px rgba(78, 226, 194, 0.06);
  color: var(--text);
}

.option.is-selected .option-letter {
  border-color: var(--mint);
  background: var(--mint);
  color: #082820;
}

.option.is-selected .option-state {
  opacity: 1;
  color: var(--mint);
}

.option:disabled {
  cursor: default;
}

.option.is-correct {
  border-color: rgba(61, 220, 151, 0.45);
  background: rgba(61, 220, 151, 0.07);
  color: #e6fff4;
  opacity: 1;
}

.option.is-correct .option-letter {
  border-color: rgba(61, 220, 151, 0.55);
  background: rgba(61, 220, 151, 0.9);
  color: #062a1c;
}

.option.is-correct .option-state {
  opacity: 1;
  color: var(--green);
}

.option.is-wrong {
  border-color: rgba(255, 107, 129, 0.4);
  background: rgba(255, 107, 129, 0.065);
  color: #ffe9ed;
  opacity: 1;
}

.option.is-wrong .option-letter {
  border-color: rgba(255, 107, 129, 0.5);
  background: rgba(255, 107, 129, 0.82);
  color: #2a0710;
}

.option.is-wrong .option-state {
  opacity: 1;
  color: var(--red);
}

.option.is-muted {
  opacity: 0.45;
}

.option.is-muted .option-letter {
  opacity: 0.7;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 20px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.question-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #607186;
  font-size: 9.5px;
}

.question-hint .kbd-group {
  display: flex;
  gap: 3px;
}

.kbd {
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 1px solid rgba(151, 169, 192, 0.16);
  border-radius: 4px;
  background: rgba(151, 169, 192, 0.04);
  color: #718297;
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 1;
}

.question-footer .button {
  min-width: 128px;
}

.shortcut-only {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Feedback */

.feedback-slot {
  margin-top: 14px;
}

.feedback-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(18, 30, 45, 0.9), rgba(11, 19, 30, 0.94));
  box-shadow: var(--shadow-soft);
  animation: feedback-in 0.4s var(--ease) both;
}

@keyframes feedback-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feedback-card.is-correct {
  border-color: rgba(61, 220, 151, 0.24);
}

.feedback-card.is-wrong {
  border-color: rgba(255, 107, 129, 0.22);
}

.feedback-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(61, 220, 151, 0.055), transparent 70%);
}

.feedback-card.is-wrong .feedback-head {
  background:
    linear-gradient(90deg, rgba(255, 107, 129, 0.055), transparent 70%);
}

.feedback-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(61, 220, 151, 0.23);
  border-radius: 50%;
  background: rgba(61, 220, 151, 0.09);
  color: var(--green);
}

.feedback-card.is-wrong .feedback-icon {
  border-color: rgba(255, 107, 129, 0.23);
  background: rgba(255, 107, 129, 0.09);
  color: var(--red);
}

.feedback-icon .icon {
  width: 19px;
  height: 19px;
}

.feedback-head h2 {
  margin-top: 1px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.feedback-head p {
  margin-top: 2px;
  color: var(--faint);
  font-size: 10.5px;
}

.feedback-status-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  margin-left: auto;
  border: 1px solid rgba(61, 220, 151, 0.18);
  border-radius: 4px;
  color: #7bd9b4;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.feedback-card.is-wrong .feedback-status-label {
  border-color: rgba(255, 107, 129, 0.18);
  color: #ee9baa;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 18px 23px;
}

.answer-box {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(151, 169, 192, 0.025);
}

.answer-box.is-correct {
  border-color: rgba(61, 220, 151, 0.16);
  background: rgba(61, 220, 151, 0.035);
}

.answer-box.is-wrong {
  border-color: rgba(255, 107, 129, 0.14);
  background: rgba(255, 107, 129, 0.03);
}

.answer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-size: 8.5px;
}

.answer-label .icon {
  width: 11px;
  height: 11px;
}

.answer-box.is-correct .answer-label {
  color: #75ceb0;
}

.answer-box.is-wrong .answer-label {
  color: #d993a0;
}

.answer-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
}

.answer-letter {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 5px;
  background: rgba(151, 169, 192, 0.08);
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 8.5px;
  line-height: 1;
}

.answer-box.is-correct .answer-letter {
  background: rgba(61, 220, 151, 0.14);
  color: #9cebce;
}

.answer-box.is-wrong .answer-letter {
  background: rgba(255, 107, 129, 0.12);
  color: #ffb1be;
}

.answer-text {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.answer-empty {
  margin-top: 6px;
  color: var(--faint);
  font-size: 11px;
}

.explanation {
  padding: 2px 23px 19px;
}

.explanation-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.explanation-title::before {
  width: 13px;
  height: 1px;
  background: var(--mint);
  content: "";
}

.explanation-tag {
  padding: 2px 6px;
  border: 1px solid rgba(151, 169, 192, 0.12);
  border-radius: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 400;
}

.explanation p {
  margin-top: 7px;
  color: #9aabbf;
  font-size: 12.5px;
  line-height: 1.9;
}

.feedback-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 23px;
  border-top: 1px solid var(--line);
  background: rgba(151, 169, 192, 0.018);
}

.feedback-footer p {
  color: #607186;
  font-size: 10px;
}

.feedback-footer .button {
  min-height: 38px;
  padding: 8px 17px;
  font-size: 11.5px;
}

/* ---------- Results ---------- */

.result-view {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 21px;
}

.result-summary-card {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid rgba(151, 169, 192, 0.16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% -10%, rgba(78, 226, 194, 0.11), transparent 45%),
    radial-gradient(circle at 0 110%, rgba(100, 184, 255, 0.05), transparent 35%),
    linear-gradient(145deg, rgba(19, 32, 48, 0.94), rgba(10, 17, 27, 0.97));
  box-shadow: var(--shadow-panel);
  text-align: center;
}

.result-summary-card::before {
  position: absolute;
  top: -85px;
  left: 50%;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(78, 226, 194, 0.06);
  border-radius: 50%;
  box-shadow:
    0 0 0 58px rgba(78, 226, 194, 0.012),
    0 0 0 116px rgba(78, 226, 194, 0.008);
  content: "";
  transform: translateX(-50%);
  pointer-events: none;
}

.result-summary-content {
  position: relative;
  z-index: 1;
}

.result-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mint);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.result-kicker .icon {
  width: 12px;
  height: 12px;
}

.result-orb {
  position: relative;
  display: grid;
  width: 152px;
  height: 152px;
  place-items: center;
  margin: 22px auto 19px;
  border-radius: 50%;
  background: conic-gradient(from 205deg, var(--mint) calc(var(--score) * 1%), rgba(151, 169, 192, 0.095) 0);
  box-shadow: 0 0 55px rgba(78, 226, 194, 0.08);
}

.result-orb::before {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(151, 169, 192, 0.09);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(78, 226, 194, 0.07), transparent 60%),
    #0c1521;
  content: "";
}

.result-orb::after {
  position: absolute;
  inset: -7px;
  border: 1px dashed rgba(151, 169, 192, 0.1);
  border-radius: 50%;
  content: "";
}

.result-score {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.result-score strong {
  color: #eafff9;
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.06em;
}

.result-score strong span {
  color: var(--mint);
  font-size: 13px;
}

.result-score small {
  margin-top: 5px;
  color: var(--faint);
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.result-title {
  color: var(--text);
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.result-subtitle {
  max-width: 510px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 15px;
  margin-top: 13px;
  color: var(--faint);
  font-size: 9px;
}

.result-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.result-meta .icon {
  width: 12px;
  height: 12px;
}

.result-stats {
  display: grid;
  max-width: 510px;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  margin: 24px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.result-stat {
  padding: 12px 8px;
  background: #0e1825;
}

.result-stat strong {
  display: block;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}

.result-stat strong.is-green {
  color: var(--green);
}

.result-stat strong.is-red {
  color: var(--red);
}

.result-stat span {
  color: var(--faint);
  font-size: 8.5px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

.result-actions .button {
  min-width: 120px;
}

.review-panel {
  margin-top: 14px;
  padding: clamp(17px, 2.5vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 24, 37, 0.58);
}

.review-panel .section-heading {
  align-items: center;
  margin-bottom: 12px;
}

.review-panel .section-heading h2 {
  font-size: 14px;
}

.review-panel .section-heading p {
  margin-top: 2px;
  font-size: 9.5px;
}

.review-list {
  display: grid;
  gap: 7px;
}

.review-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 20, 31, 0.5);
}

.review-item[open] {
  border-color: rgba(151, 169, 192, 0.2);
  background: rgba(14, 23, 35, 0.86);
}

.review-summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  cursor: pointer;
  list-style: none;
}

.review-summary::-webkit-details-marker {
  display: none;
}

.review-number {
  flex: 0 0 auto;
  padding-top: 1px;
  color: #58697e;
  font-family: var(--font-mono);
  font-size: 8px;
}

.review-main {
  min-width: 0;
  flex: 1;
}

.review-stem {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 450;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 11px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 8.5px;
}

.review-meta b {
  color: #8fa1b4;
  font-weight: 500;
}

.review-verdict {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid rgba(61, 220, 151, 0.14);
  border-radius: 4px;
  color: #72c7a9;
  font-size: 7.5px;
  line-height: 1.5;
}

.review-verdict.is-wrong {
  border-color: rgba(255, 107, 129, 0.15);
  color: #df8c9b;
}

.review-chevron {
  flex: 0 0 auto;
  margin-top: 3px;
  color: #536276;
  transition: transform 0.2s ease;
}

.review-chevron .icon {
  width: 13px;
  height: 13px;
}

.review-item[open] .review-chevron {
  transform: rotate(180deg);
}

.review-body {
  padding: 0 13px 13px 31px;
  border-top: 1px solid rgba(151, 169, 192, 0.075);
}

.review-answer-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  padding-top: 9px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.7;
}

.review-answer-line b {
  color: #9fe9d2;
  font-weight: 500;
}

.review-answer-line.is-wrong b {
  color: #f59aa8;
}

.review-explanation {
  padding-top: 6px;
  color: #8497ab;
  font-size: 10px;
  line-height: 1.8;
}

.review-explanation strong {
  color: var(--muted);
  font-weight: 500;
}

.result-perfect {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(61, 220, 151, 0.13);
  border-radius: 10px;
  background: rgba(61, 220, 151, 0.035);
  color: #9ed9c3;
  font-size: 10.5px;
}

.result-perfect .icon {
  width: 17px;
  height: 17px;
  color: var(--green);
}

/* ---------- Collections ---------- */

.collection-view {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.collection-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.collection-hero {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 20px;
  padding: clamp(24px, 3.4vw, 34px);
  border: 1px solid color-mix(in srgb, var(--collection-accent) 18%, var(--line));
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 96% 0, color-mix(in srgb, var(--collection-accent) 9%, transparent), transparent 42%),
    radial-gradient(circle at 0 110%, rgba(100, 184, 255, 0.035), transparent 42%),
    linear-gradient(145deg, rgba(20, 33, 49, 0.92), rgba(10, 18, 29, 0.96));
  box-shadow: var(--shadow-panel);
}

.collection-hero::before {
  position: absolute;
  top: -110px;
  right: -70px;
  width: 300px;
  height: 300px;
  border: 1px solid color-mix(in srgb, var(--collection-accent) 10%, transparent);
  border-radius: 50%;
  box-shadow:
    0 0 0 45px color-mix(in srgb, var(--collection-accent) 2%, transparent),
    0 0 0 92px color-mix(in srgb, var(--collection-accent) 1.5%, transparent);
  content: "";
  pointer-events: none;
}

.collection-icon {
  position: relative;
  display: grid;
  width: 61px;
  height: 61px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--collection-accent) 24%, transparent);
  border-radius: 17px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--collection-accent) 14%, transparent), color-mix(in srgb, var(--collection-accent) 4%, transparent));
  color: var(--collection-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.collection-icon .icon {
  width: 27px;
  height: 27px;
}

.collection-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
}

.collection-copy .eyebrow {
  color: var(--collection-accent);
  font-size: 8px;
}

.collection-copy .eyebrow i {
  background: var(--collection-accent);
  box-shadow: 0 0 9px var(--collection-accent);
}

.collection-copy h1 {
  margin-top: 7px;
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.collection-copy p {
  max-width: 570px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.collection-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 16px;
  margin-top: 10px;
  color: var(--faint);
  font-size: 9px;
}

.collection-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.collection-meta span + span {
  padding-left: 16px;
  border-left: 1px solid var(--line-strong);
}

.collection-meta b {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.collection-hero > .button {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin-left: auto;
}

.collection-list-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 25px 2px 11px;
}

.collection-list-head h2 {
  font-size: 14px;
  font-weight: 600;
}

.collection-list-head p {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9.5px;
}

.collection-list {
  display: grid;
  gap: 7px;
}

.collection-row {
  display: grid;
  width: 100%;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--accent) 3%, transparent), transparent 34%),
    rgba(15, 24, 37, 0.54);
  color: var(--text);
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s var(--ease);
}

.collection-row:hover {
  border-color: color-mix(in srgb, var(--accent) 27%, var(--line));
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--accent) 6%, transparent), transparent 42%),
    rgba(18, 29, 43, 0.82);
  transform: translateX(2px);
}

.collection-index {
  color: #58697e;
  font-family: var(--font-mono);
  font-size: 8.5px;
}

.collection-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.collection-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}

.mini-category {
  display: inline-grid;
  min-width: 20px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--accent);
  font-size: 7px;
  font-weight: 600;
}

.collection-stem {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11.5px;
  font-weight: 450;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.collection-side {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #536276;
}

.last-state {
  color: var(--faint);
  font-size: 8.5px;
  white-space: nowrap;
}

.collection-side .icon {
  width: 14px;
  height: 14px;
  transition:
    color 0.2s ease,
    transform 0.2s var(--ease);
}

.collection-row:hover .collection-side .icon {
  color: var(--accent);
  transform: translate(1px, -1px);
}

/* ---------- Empty collection ---------- */

.empty-view {
  display: grid;
  min-height: 62vh;
  place-items: center;
}

.empty-card {
  width: 100%;
  max-width: 510px;
  padding: 40px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 0, rgba(78, 226, 194, 0.07), transparent 48%),
    rgba(15, 24, 37, 0.65);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.empty-orb {
  display: grid;
  width: 67px;
  height: 67px;
  place-items: center;
  margin: 0 auto 18px;
  border: 1px solid rgba(78, 226, 194, 0.17);
  border-radius: 50%;
  background: rgba(78, 226, 194, 0.055);
  color: var(--mint);
}

.empty-orb .icon {
  width: 27px;
  height: 27px;
}

.empty-card h1 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.empty-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

/* ---------- Modal / toast ---------- */

.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 11, 0.72);
  backdrop-filter: blur(7px);
  animation: fade-in 0.2s ease both;
}

.modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 410px;
  padding: 27px;
  border: 1px solid var(--line-strong);
  border-radius: 19px;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 107, 129, 0.04), transparent 40%),
    linear-gradient(145deg, #15202f, #0f1722);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
  animation: modal-in 0.24s var(--ease) both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.985);
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-color: transparent;
  background: transparent;
}

.modal-icon {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(255, 125, 150, 0.18);
  border-radius: 50%;
  background: rgba(255, 125, 150, 0.07);
  color: var(--rose);
}

.modal-icon .icon {
  width: 18px;
  height: 18px;
}

.modal h2 {
  margin-top: 15px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 23px;
}

.modal-actions .button {
  min-width: 88px;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 11.5px;
}

.toast-region {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(330px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(19, 30, 44, 0.97);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.6;
  animation: toast-in 0.28s var(--ease) both;
}

.toast.is-leaving {
  animation: toast-out 0.22s ease both;
}

.toast .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: var(--mint);
}

.toast.is-warning .icon {
  color: var(--amber);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(5px);
  }
}

.sidebar-backdrop {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 260px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(255px, 0.66fr);
    gap: 28px;
  }

  .hero-panel {
    max-width: 275px;
  }

  .mode-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mode-card {
    min-height: 133px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .sidebar {
    width: 282px;
    transform: translateX(-102%);
    transition: transform 0.3s var(--ease);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar .sidebar-close {
    display: inline-grid;
    width: 30px;
    height: 30px;
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    background: rgba(2, 6, 11, 0.64);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .sidebar-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .main-wrap {
    margin-left: 0;
  }

  .menu-button {
    display: inline-grid;
  }

  .topbar {
    padding: 0 24px;
  }

  .main-content {
    padding: 30px 24px 70px;
  }

  .hero {
    grid-template-columns: minmax(0, 1.3fr) minmax(230px, 0.7fr);
  }

  .hero h1 {
    font-size: clamp(34px, 4.8vw, 45px);
  }

  .hero-panel {
    max-width: 255px;
  }

  .mastery-orbit {
    width: 125px;
    height: 125px;
  }

  .mastery-core strong {
    font-size: 25px;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 16px;
  }

  .topbar-right {
    gap: 9px;
  }

  .today-stat {
    padding: 6px 9px;
    font-size: 9.5px;
  }

  .profile-mark {
    width: 32px;
    height: 32px;
  }

  .main-content {
    min-height: calc(100vh - 64px);
    padding: 22px 16px 55px;
  }

  .dashboard {
    gap: 28px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 27px 22px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: clamp(31px, 9vw, 41px);
    letter-spacing: -0.04em;
  }

  .hero-description {
    font-size: 13px;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .hero-actions .button {
    flex: 1;
    min-width: 0;
    padding-right: 12px;
    padding-left: 12px;
    font-size: 11.5px;
  }

  .hero-note {
    gap: 6px 12px;
    margin-top: 17px;
    font-size: 9px;
  }

  .hero-panel {
    display: grid;
    max-width: none;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px 16px;
    align-items: center;
    padding: 15px;
  }

  .panel-topline {
    grid-column: 1 / -1;
  }

  .mastery-orbit {
    grid-row: 2 / 4;
    width: 104px;
    height: 104px;
    margin: 4px 0;
  }

  .mastery-core strong {
    font-size: 22px;
  }

  .hero-metrics {
    align-self: end;
    padding-top: 0;
    border-top: 0;
  }

  .hero-metrics div {
    padding: 0 5px;
  }

  .hero-metrics div:first-child {
    padding-left: 0;
  }

  .hero-metrics strong {
    font-size: 13px;
  }

  .hero-metrics span {
    font-size: 7px;
  }

  .hero-terminal {
    grid-column: 2;
    margin-top: 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }

  .stat-card {
    min-height: 92px;
    padding: 15px;
  }

  .stat-value {
    font-size: 24px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .section-heading h2 {
    font-size: 17px;
  }

  .section-meta {
    font-size: 8px;
  }

  .mode-grid {
    gap: 8px;
  }

  .mode-card {
    min-height: 140px;
    padding: 15px;
  }

  .mode-card h3 {
    margin-top: 11px;
    font-size: 12.5px;
  }

  .mode-card p {
    font-size: 10px;
  }

  .mode-arrow {
    right: 13px;
    bottom: 13px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .category-card {
    min-height: 0;
    padding: 14px;
  }

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

  .category-count {
    text-align: right;
  }

  .category-name {
    margin-top: 10px;
  }

  .category-bottom {
    padding-top: 9px;
  }

  .dashboard-bottom {
    grid-template-columns: 1fr;
  }

  .recent-panel,
  .tip-panel {
    padding: 17px;
  }

  .session-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
  }

  .session-time {
    display: none;
  }

  .quiz-top {
    flex-wrap: wrap;
    margin-bottom: 18px;
  }

  .quiz-mode {
    order: 2;
    width: 100%;
    padding-left: 1px;
  }

  .quiz-timer {
    order: 1;
    margin-left: auto;
  }

  .quiz-progress {
    margin-bottom: 11px;
  }

  .question-card {
    padding: 20px 17px;
    border-radius: 17px;
  }

  .question-head {
    align-items: flex-start;
  }

  .question-meta {
    gap: 7px;
  }

  .question-tag {
    display: none;
  }

  .question-stem {
    margin: 16px 0 20px;
    font-size: clamp(18px, 4.7vw, 22px);
    line-height: 1.55;
  }

  .option {
    gap: 10px;
    padding: 12px;
  }

  .option-letter {
    width: 25px;
    height: 25px;
    border-radius: 6px;
    font-size: 9px;
  }

  .option-text {
    padding-top: 2px;
    font-size: 13px;
    line-height: 1.65;
  }

  .option-state {
    width: 16px;
    height: 16px;
    margin-top: 3px;
  }

  .question-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
    padding-top: 16px;
    margin-top: 17px;
  }

  .question-hint {
    justify-content: space-between;
    font-size: 9px;
  }

  .question-footer .button {
    width: 100%;
  }

  .feedback-head {
    padding: 17px;
  }

  .feedback-status-label {
    display: none;
  }

  .answer-grid {
    grid-template-columns: 1fr;
    padding: 15px 17px;
  }

  .explanation {
    padding: 0 17px 16px;
  }

  .explanation p {
    font-size: 12px;
  }

  .feedback-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    padding: 12px 17px;
  }

  .feedback-footer .button {
    width: 100%;
  }

  .feedback-footer p {
    text-align: center;
  }

  .result-top {
    margin-bottom: 16px;
  }

  .result-summary-card {
    padding: 26px 17px;
    border-radius: 22px;
  }

  .result-orb {
    width: 136px;
    height: 136px;
    margin: 19px auto 17px;
  }

  .result-score strong {
    font-size: 30px;
  }

  .result-title {
    font-size: 24px;
  }

  .result-subtitle {
    font-size: 10.5px;
  }

  .result-stats {
    margin-top: 20px;
  }

  .result-actions {
    gap: 7px;
    margin-top: 19px;
  }

  .result-actions .button {
    flex: 1;
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 10.5px;
  }

  .result-actions .button .icon {
    display: none;
  }

  .review-panel {
    padding: 15px;
    border-radius: 17px;
  }

  .review-summary {
    padding: 10px;
  }

  .review-stem {
    font-size: 10px;
  }

  .review-verdict {
    display: none;
  }

  .review-body {
    padding-left: 26px;
  }

  .toast-region {
    right: 16px;
    bottom: 16px;
  }

  .empty-card {
    padding: 32px 20px;
  }

  .collection-top {
    margin-bottom: 15px;
  }

  .collection-hero {
    flex-wrap: wrap;
    gap: 14px;
    padding: 21px 18px;
    border-radius: 20px;
  }

  .collection-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .collection-icon .icon {
    width: 21px;
    height: 21px;
  }

  .collection-copy {
    flex: 1 1 calc(100% - 65px);
  }

  .collection-copy h1 {
    margin-top: 4px;
    font-size: 23px;
  }

  .collection-copy p {
    font-size: 10px;
    line-height: 1.7;
  }

  .collection-copy .eyebrow {
    display: none;
  }

  .collection-meta {
    margin-top: 7px;
  }

  .collection-hero > .button {
    width: 100%;
    margin-top: 3px;
  }

  .collection-list-head {
    margin-top: 20px;
  }

  .collection-row {
    grid-template-columns: 21px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px;
  }

  .collection-stem {
    font-size: 10.5px;
    -webkit-line-clamp: 2;
  }

  .last-state {
    display: none;
  }

  .collection-side {
    gap: 5px;
  }

  .collection-row-meta {
    font-size: 7.5px;
  }

  .shortcut-only,
  .kbd-group {
    display: none !important;
  }
}

@media (max-width: 440px) {
  .hero h1 {
    font-size: 30px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .mode-grid {
    grid-template-columns: 1fr;
  }

  .mode-card {
    min-height: 125px;
  }

  .hero-panel {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 9px 12px;
  }

  .mastery-orbit {
    width: 88px;
    height: 88px;
  }

  .mastery-core strong {
    font-size: 19px;
  }

  .mastery-core span {
    font-size: 7px;
  }

  .hero-terminal {
    font-size: 6.5px;
  }

  .today-stat > span:not(.today-dot):first-of-type {
    display: none;
  }

  .result-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .result-stat strong {
    font-size: 16px;
  }

  .result-stat span {
    font-size: 7.5px;
  }

  .answer-grid {
    gap: 6px;
  }
}

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