:root {
  --azure-blue: #0078d4;
  --azure-light: #00bcf2;
  --azure-bright: #4dc4ff;
  --azure-dark: #004578;
  --bg-deep: #0c1829;
  --bg-card: rgba(28, 48, 78, 0.92);
  --bg-card-hover: rgba(36, 58, 92, 0.96);
  --bg-card-elevated: rgba(38, 62, 98, 0.95);
  --border: rgba(255, 255, 255, 0.14);
  --border-bright: rgba(255, 255, 255, 0.22);
  --text: #f0f6ff;
  --text-bright: #ffffff;
  --text-muted: #c5d8f0;
  --text-dim: #9bb4d4;
  --success: #6ee7a0;
  --accent-purple: #b794f6;
  --accent-cyan: #22d3ee;
  --accent-green: #4ade80;
  --accent-orange: #ffb347;
  --accent-pink: #f472b6;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-deep);
  line-height: 1.6;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(0, 120, 212, 0.38), transparent),
    radial-gradient(ellipse 55% 35% at 92% 8%, rgba(183, 148, 246, 0.22), transparent),
    radial-gradient(ellipse 50% 30% at 75% 85%, rgba(0, 188, 242, 0.2), transparent),
    radial-gradient(ellipse 40% 25% at 10% 75%, rgba(255, 179, 71, 0.12), transparent),
    radial-gradient(ellipse 45% 30% at 50% 100%, rgba(0, 69, 120, 0.4), transparent),
    var(--bg-deep);
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 22, 40, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--azure-blue), var(--azure-light));
  color: white;
}

.brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azure-light);
}

.brand h1 {
  margin: 0;
  font-size: clamp(1.15rem, 2.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.user-account-bar {
  font-size: 0.8rem;
}

.account-menu-trigger {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.8rem;
  list-style: none;
  user-select: none;
}

.account-menu-trigger::-webkit-details-marker {
  display: none;
}

.account-menu-body {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 200;
  min-width: 220px;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.account-menu {
  position: relative;
}

.account-menu-desc {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.account-menu-link {
  display: block;
  padding: 0.4rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.82rem;
}

.account-menu-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.account-menu-hint {
  margin: 0.65rem 0 0;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.account-menu-hint a {
  color: var(--azure-light);
}

.account-signed-in {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-user {
  font-size: 0.78rem;
  color: var(--azure-bright);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Site banner — thin gradient accent stripe */
.site-banner {
  height: 6px;
  min-height: 6px;
  background: linear-gradient(
    90deg,
    rgba(0, 120, 212, 0.75) 0%,
    rgba(0, 188, 242, 0.65) 35%,
    rgba(183, 148, 246, 0.55) 70%,
    rgba(255, 179, 71, 0.45) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 120, 212, 0.15);
}

.site-banner-inner {
  display: none;
}

.site-banner-icon {
  font-size: 1.25rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

.site-banner-text {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-bright);
  letter-spacing: 0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.site-banner-text strong {
  font-weight: 700;
  color: #fff;
}

.site-banner-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.88em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
}

.site-banner-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text-bright);
  white-space: nowrap;
}

@media (max-width: 520px) {
  .site-banner-badge {
    display: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--azure-blue), var(--azure-light));
  color: white;
  box-shadow: 0 4px 16px rgba(0, 120, 212, 0.35);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.import-label {
  cursor: pointer;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

main {
  padding: 2rem 0 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  padding: 2rem;
}

.exam-badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.35), rgba(183, 148, 246, 0.25));
  color: var(--text-bright);
  border: 1px solid rgba(0, 188, 242, 0.4);
}

.hero-heading {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-exam-meta {
  margin: 0 0 1.25rem;
}

.exam-version {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.about-section {
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}

.about-body {
  max-width: 72ch;
}

.about-body p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.about-body strong {
  color: var(--text-bright);
  font-weight: 600;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field-inline input {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  min-width: 160px;
}

.field-inline input:focus {
  outline: 2px solid rgba(0, 120, 212, 0.5);
  outline-offset: 1px;
}

/* Progress ring */
.hero-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.progress-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg,
.progress-ring-fill {
  fill: none;
  stroke-width: 10;
}

.progress-ring-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.progress-ring-fill {
  stroke: url(#ringGradient);
  stroke: var(--azure-bright);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
  filter: drop-shadow(0 0 6px rgba(77, 196, 255, 0.5));
}

.progress-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.progress-percent {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--azure-bright);
}

.progress-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  width: 100%;
  margin: 0;
}

.stat-grid div {
  text-align: center;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.stat-grid dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.stat-grid dd {
  margin: 0.15rem 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--azure-bright);
}

/* Section titles */
.section-head {
  margin-bottom: 1rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--azure-bright);
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
}

.section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Domain overview panel */
.domain-overview {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* Domain bars */
.domain-bars {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.domain-bar-item {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--domain-color, var(--azure-blue)) 14%, var(--bg-card-elevated));
  border: 1px solid color-mix(in srgb, var(--domain-color, var(--azure-blue)) 35%, transparent);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s, box-shadow 0.15s;
  overflow: hidden;
}

.domain-bar-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--domain-color, var(--azure-blue));
  box-shadow: 0 0 14px color-mix(in srgb, var(--domain-color, var(--azure-blue)) 70%, transparent);
}

.domain-bar-item:hover {
  border-color: color-mix(in srgb, var(--domain-color, var(--azure-light)) 55%, transparent);
  transform: translateX(4px);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--domain-color, var(--azure-blue)) 25%, transparent);
}

.domain-bar-focused {
  border-color: color-mix(in srgb, var(--domain-color, var(--azure-light)) 65%, transparent) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--domain-color, var(--azure-light)) 35%, transparent),
    0 4px 24px color-mix(in srgb, var(--domain-color, var(--azure-blue)) 30%, transparent) !important;
}

.domain-bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.domain-bar-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.35;
}

.domain-bar-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.domain-bar-meta {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--domain-color, var(--azure-bright));
  white-space: nowrap;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--domain-color, var(--azure-blue)) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--domain-color, var(--azure-blue)) 35%, transparent);
}

.domain-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
}

.domain-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
  background: linear-gradient(
    90deg,
    var(--domain-color, var(--azure-blue)),
    color-mix(in srgb, white 35%, var(--domain-color, var(--azure-light)))
  ) !important;
  box-shadow: 0 0 10px color-mix(in srgb, var(--domain-color, var(--azure-blue)) 55%, transparent);
}

/* Domain cards */
.domain-card {
  margin-bottom: 0.85rem;
  overflow: hidden;
}

.domain-card:last-child {
  margin-bottom: 0;
}

.domain-summary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.domain-accent {
  flex-shrink: 0;
  width: 4px;
  height: 36px;
  border-radius: 999px;
}

.domain-summary-text {
  flex: 1;
  min-width: 0;
}

.domain-name {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-bright);
}

.domain-weight {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.domain-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-right: 0.25rem;
}

.domain-card[open] .domain-chevron {
  transform: rotate(-135deg);
  margin-top: 6px;
}

.domain-body {
  padding: 0 1.15rem 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
}

.topic-group {
  padding-top: 1rem;
}

.topic-group h4 {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--azure-light);
}

.topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.topic-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.topic-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.topic-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.topic-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.15s, border-color 0.15s;
}

.topic-item input:checked + .topic-check {
  background: var(--azure-blue);
  border-color: var(--azure-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2 6l3 3 5-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.topic-item input:checked ~ .topic-label {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(148, 168, 196, 0.5);
}

.topic-label {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Notes & resources */
.notes-section,
.resources {
  padding: 1.5rem;
}

#study-notes {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  resize: vertical;
  min-height: 140px;
}

#study-notes:focus {
  outline: 2px solid rgba(0, 120, 212, 0.45);
  outline-offset: 1px;
}

.notes-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.notes-sync-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.2);
}

.notes-sync-badge[data-tone="synced"] {
  color: var(--success);
  border-color: rgba(108, 203, 95, 0.35);
}

.notes-sync-badge[data-tone="syncing"] {
  color: var(--azure-light);
  border-color: rgba(0, 188, 242, 0.35);
}

.notes-sync-badge[data-tone="error"] {
  color: #f4a261;
  border-color: rgba(244, 162, 97, 0.35);
}

.notes-backup-details {
  margin-top: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

.notes-backup-summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.5rem 0;
  user-select: none;
  list-style: none;
}

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

.notes-backup-summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 0.15s;
}

.notes-backup-details[open] .notes-backup-summary::before {
  transform: rotate(90deg);
}

.notes-backup-body {
  padding: 0.75rem 0 0.25rem;
  display: grid;
  gap: 1rem;
}

.notes-backup-subtitle {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.notes-backup-lead {
  margin: 0 0 0.65rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.notes-backup-hint {
  margin: 0.5rem 0 0;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.notes-backup-actions,
.notes-sync-actions,
.notes-signin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notes-signin-btn {
  font-size: 0.8rem;
}

.notes-backup-divider {
  height: 1px;
  background: var(--border);
}

.notes-danger-zone .btn-danger {
  border: 1px solid rgba(244, 99, 99, 0.45);
  background: rgba(244, 99, 99, 0.12);
  color: #ffb4b4;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.notes-danger-zone .btn-danger:hover {
  background: rgba(244, 99, 99, 0.22);
}

.notes-sync-panel code {
  font-size: 0.85em;
  color: var(--azure-light);
}

.notes-storage-setup {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.notes-storage-setup-title {
  margin: 0 0 0.5rem;
}

.notes-storage-steps {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.notes-storage-steps li + li {
  margin-top: 0.35rem;
}

.resource-links {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.resource-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--azure-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.resource-links a:hover {
  text-decoration: underline;
}

.resource-links a::after {
  content: '↗';
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: var(--azure-light);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Main navigation tabs */
.main-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  padding: 1rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.main-nav::-webkit-scrollbar {
  height: 4px;
}

.main-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.nav-tab {
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.nav-tab-active {
  background: linear-gradient(135deg, rgba(0, 120, 212, 0.45), rgba(183, 148, 246, 0.3));
  color: var(--text-bright);
  box-shadow: inset 0 0 0 1px rgba(0, 188, 242, 0.4), 0 2px 12px rgba(0, 120, 212, 0.25);
}

.panel {
  display: none;
  animation: fadeIn 0.25s ease;
}

.panel-active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Milestones */
.milestone-wrap {
  margin-top: 1.25rem;
}

.milestone-title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.milestone-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 0 0.25rem;
}

.milestone-track::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
}

.milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

.milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: background 0.3s, box-shadow 0.3s;
}

.milestone-reached .milestone-dot {
  background: var(--azure-light);
  border-color: var(--azure-light);
  box-shadow: 0 0 12px rgba(0, 188, 242, 0.5);
}

.milestone-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  font-weight: 600;
}

.milestone-reached .milestone-label {
  color: var(--azure-light);
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 280px;
}

.toast-visible {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-color: rgba(108, 203, 95, 0.35);
  background: rgba(20, 48, 32, 0.92);
}

.toast-info {
  border-color: rgba(0, 188, 242, 0.35);
}

/* Domain chips */
.domain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.domain-chip {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.domain-chip:hover {
  border-color: rgba(0, 188, 242, 0.35);
  color: var(--text);
}

.domain-chip-active {
  background: color-mix(in srgb, var(--chip-color, var(--azure-blue)) 28%, transparent);
  border-color: color-mix(in srgb, var(--chip-color, var(--azure-light)) 50%, transparent);
  color: var(--text-bright);
}

/* Domain cards — exam topics */
.domain-card {
  margin-bottom: 1rem;
  padding: 1.15rem;
  transition: box-shadow 0.3s;
}

.domain-card-highlight {
  animation: pulseHighlight 1.2s ease;
}

@keyframes pulseHighlight {
  0%, 100% { box-shadow: var(--shadow); }
  50% { box-shadow: 0 0 0 2px rgba(0, 188, 242, 0.5), var(--shadow); }
}

.domain-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.domain-progress-badge {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--badge-color) 20%, transparent);
  color: var(--badge-color);
  border: 1px solid color-mix(in srgb, var(--badge-color) 40%, transparent);
}

.domain-progress-mini {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  margin: 0.75rem 0 0.35rem;
  overflow: hidden;
}

.domain-progress-mini-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.4s ease;
}

.domain-card-meta {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.topic-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.topic-group-progress {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}

.topic-row {
  transition: background 0.2s;
  border-radius: 8px;
}

.topic-row.topic-done {
  background: rgba(108, 203, 95, 0.06);
}

.topic-row.topic-done .topic-check {
  background: var(--success);
  border-color: var(--success);
}

.topic-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.topic-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  line-height: 1.3;
}

.topic-badge-shared {
  background: rgba(0, 188, 242, 0.2);
  color: var(--azure-light);
  border: 1px solid rgba(0, 188, 242, 0.35);
}

.topic-badge-duration {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  text-transform: none;
  font-weight: 600;
}

.topic-type-demo .topic-label {
  color: var(--text-muted);
}

.topic-type-case .topic-label {
  font-weight: 600;
}

.topic-type-quiz .topic-label {
  color: var(--accent-purple);
}

.study-course-link {
  display: inline-flex;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--azure-light);
}

.course-outline-header {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(120deg, rgba(0, 120, 212, 0.15), rgba(183, 148, 246, 0.1));
  border: 1px solid rgba(0, 188, 242, 0.25);
}

.course-outline-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text-bright);
}

.course-outline-meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.course-section-divider {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.5rem 0 0.75rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--azure-light);
  background: rgba(0, 120, 212, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.course-section-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.course-section-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--azure-bright);
  letter-spacing: 0.02em;
}

.course-section-desc {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.course-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--azure-bright);
  border-left: 3px solid var(--azure-light);
  background: rgba(0, 120, 212, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.course-section-label-icon {
  font-size: 1rem;
}

.topic-group-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.topic-subgroup {
  margin-top: 0.5rem;
}

.topic-subgroup-title {
  margin: 0.75rem 0 0.35rem;
  padding-left: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--azure-bright);
  letter-spacing: 0.02em;
}

.topic-list-shared {
  margin-bottom: 0.5rem;
}

.topic-row-shared .topic-item {
  padding-left: 0.35rem;
  border-left: 2px solid rgba(0, 188, 242, 0.35);
}

/* Video section */
.video-section {
  padding: 1.5rem;
}

.video-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.video-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--azure-light);
}

.video-section h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid var(--border);
}

.video-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.video-play-btn {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.9);
  color: white;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s;
}

.video-facade:hover .video-play-btn {
  transform: scale(1.08);
}

.video-facade-label {
  position: absolute;
  bottom: 1rem;
  z-index: 1;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.55);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.video-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-tip {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 120, 212, 0.1);
  border: 1px solid rgba(0, 188, 242, 0.2);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.card-inner {
  background: transparent;
}

.link-btn {
  border: none;
  background: none;
  color: var(--azure-light);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.link-btn:hover {
  color: white;
}

/* Resource grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.resource-card:hover {
  border-color: rgba(0, 188, 242, 0.35);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.resource-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.resource-card-body {
  flex: 1;
  min-width: 0;
}

.resource-card-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
}

.resource-card-tag {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--azure-bright);
  margin-top: 0.15rem;
}

.resource-card-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.resource-arrow {
  color: var(--azure-light);
  font-size: 1.1rem;
}

.training-resources-section {
  margin-top: 2.5rem;
}

.resource-quick-section {
  margin-bottom: 0.5rem;
}

.resource-catalog-section {
  margin-top: 2.5rem;
}

.resource-catalog-block + .resource-catalog-block {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.resource-catalog-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.resource-catalog-desc {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 52rem;
}

.training-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.training-resource-card {
  display: block;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}

.training-resource-card:hover {
  border-color: rgba(0, 188, 242, 0.35);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.training-resource-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.training-resource-desc {
  margin: 0.85rem 0 0.65rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.training-resource-highlights {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.training-resource-highlights li + li {
  margin-top: 0.25rem;
}

/* Overview grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.overview-grid .card {
  padding: 1.25rem;
}

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

/* Gamification — Study Pulse */
.pulse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pulse-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.pulse-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--azure-light);
}

.pulse-label {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.pulse-weakest,
.pulse-level {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0;
}

/* Daily goal */
.daily-goal-ring-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.daily-goal-ring {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--azure-light) calc(var(--goal-pct) * 1%), rgba(255, 255, 255, 0.08) 0);
  flex-shrink: 0;
}

.daily-goal-pct {
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--bg-card);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.daily-goal-stats {
  margin: 0.35rem 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.daily-goal-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin: 0;
}

/* Domain weakness */
.weakness-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.weakness-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--domain-color, var(--azure-light));
  background: rgba(0, 0, 0, 0.2);
}

.weakness-rank {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.weakness-body {
  flex: 1;
  min-width: 8rem;
}

.weakness-title {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
}

.weakness-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.weakness-actions {
  display: flex;
  gap: 0.35rem;
}

/* Exam history */
.exam-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.exam-history-table th,
.exam-history-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.exam-history-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* AI quiz */
.ai-quiz-lead,
.ai-quiz-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ai-quiz-q {
  margin: 0 0 1rem;
  padding: 0;
  border: none;
}

.ai-quiz-stem {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.ai-quiz-choice {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  cursor: pointer;
}

.ai-quiz-score {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--azure-light);
  margin-bottom: 0.75rem;
}

.ai-quiz-item {
  margin-bottom: 0.5rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.ai-quiz-ok { border-left: 3px solid #22c55e; }
.ai-quiz-wrong { border-left: 3px solid #ef4444; }

.ai-quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Roadmap ideas */
.roadmap-ideas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem;
}

.roadmap-idea {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.roadmap-idea-icon {
  font-size: 1.25rem;
}

.roadmap-idea-title {
  font-weight: 600;
  font-size: 0.88rem;
}

.roadmap-idea-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0.25rem 0 0;
}

.fc-badge-due {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

.account-level {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--azure-light);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 120, 212, 0.15);
  border: 1px solid rgba(0, 188, 242, 0.3);
}

.readiness-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.75rem 0;
}

.readiness-score {
  font-size: 2rem;
  font-weight: 700;
  color: var(--azure-light);
  min-width: 4ch;
}

.readiness-bar-track {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.readiness-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--azure-blue), var(--azure-light));
  transition: width 0.5s ease;
}

.readiness-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.timer-display {
  font-size: 2.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  margin: 0.5rem 0;
  letter-spacing: 0.05em;
}

.timer-display.timer-done {
  color: var(--success);
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  50% { opacity: 0.7; }
}

.timer-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.up-next-inner {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.up-next-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.up-next-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.up-next-topic {
  margin: 0.25rem 0 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
}

.up-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.up-next-done .up-next-topic {
  color: var(--success);
}

.achievements-section {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.achievements-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.achievement {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  opacity: 0.45;
  filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s, transform 0.15s;
  min-width: 80px;
}

.achievement-unlocked {
  opacity: 1;
  filter: none;
  border-color: rgba(110, 231, 160, 0.45);
  background: linear-gradient(145deg, rgba(0, 120, 212, 0.2), rgba(183, 148, 246, 0.15));
  box-shadow: 0 4px 16px rgba(0, 120, 212, 0.2);
}

.achievement-unlocked:hover {
  transform: translateY(-2px);
}

.achievement-icon {
  font-size: 1.35rem;
}

.achievement-title {
  font-size: 0.68rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-muted);
}

.achievement-unlocked .achievement-title {
  color: var(--text-bright);
}

/* Practice Test */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.exams-page-body .exams-main {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
}

.exams-hero-card {
  margin-top: 0.5rem;
}

.exams-page-header {
  margin-bottom: 1rem;
}

.exams-home-link {
  color: inherit;
  text-decoration: none;
}

.exams-home-link:hover {
  color: var(--accent);
}

.pt-question-figure-supplementary {
  margin-bottom: 1rem;
}

/* Interactive certification-style hotspot exhibit */
.pt-hotspot-question {
  margin: 1rem 0;
}

.pt-hotspot-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.pt-hotspot-stage {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.pt-hotspot-exhibit-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.pt-hotspot-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pt-hotspot-zone {
  position: absolute;
  pointer-events: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.practice-test-section {
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.pt-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--azure-light);
  margin: 0 0 0.35rem;
}

.pt-intro-title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.pt-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.exam-auth-gate {
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.5rem 0;
}

.exam-auth-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.exam-auth-title {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

.exam-auth-desc {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.exam-auth-providers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.exam-auth-btn {
  justify-content: center;
}

.exam-auth-entra,
.account-menu-entra,
.notes-signin-entra {
  background: #0078d4 !important;
  border-color: #0078d4 !important;
  color: #ffffff !important;
  border-radius: 2px;
}

.exam-auth-entra:hover,
.account-menu-entra:hover,
.notes-signin-entra:hover {
  background: #106ebe !important;
  border-color: #106ebe !important;
}

.exam-auth-btn-secondary {
  justify-content: center;
  font-size: 0.88rem;
}

.exam-auth-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(244, 162, 97, 0.15);
  border: 1px solid rgba(244, 162, 97, 0.4);
  color: #ffd4a8;
  font-size: 0.88rem;
}

.exam-auth-troubleshoot {
  margin-top: 1.25rem;
  text-align: left;
  max-width: 36rem;
  margin-inline: auto;
}

.exam-auth-troubleshoot summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--azure-bright);
  margin-bottom: 0.5rem;
}

.exam-auth-checklist {
  margin: 0.5rem 0;
  padding-left: 1.2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.exam-auth-checklist code {
  color: var(--azure-light);
  font-size: 0.9em;
}

.exam-auth-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0;
}

.exam-access-request-gate {
  text-align: left;
}

.exam-access-request-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 1rem 0 0.5rem;
}

.exam-request-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.exam-request-message {
  width: 100%;
  min-height: 4.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 179, 71, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.exam-request-message:focus {
  outline: 2px solid rgba(0, 120, 212, 0.55);
  outline-offset: 1px;
}

.exam-request-status {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.exam-request-success {
  color: #8fd9a8;
}

.exam-request-warn {
  color: #ffd4a8;
}

.exam-request-pending {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 120, 212, 0.12);
  border: 1px solid rgba(0, 120, 212, 0.35);
  color: var(--azure-light);
  font-size: 0.88rem;
}

.pt-exam-source {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.pt-question-figure {
  margin: 0 0 1rem;
  padding: 0;
}

.pt-question-image,
.pt-review-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 179, 71, 0.25);
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.pt-review-image {
  max-width: 42rem;
  margin-bottom: 0.75rem;
}

.pt-image-answer-hint {
  margin: 0 0 0.85rem;
  font-size: 0.88rem;
  color: var(--azure-light);
}

.pt-choices-image-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: none;
  padding: 0;
}

.pt-choice-letter-only {
  min-width: 3rem;
  justify-content: center;
  padding: 0.65rem 1rem;
}

.pt-choice-letter-only .pt-choice-key {
  font-size: 1.1rem;
  font-weight: 700;
}

.pt-yesno-matrix {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pt-matrix-row {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 179, 71, 0.2);
  background: rgba(0, 0, 0, 0.18);
}

.pt-matrix-text {
  margin: 0 0 0.65rem;
  line-height: 1.5;
}

.pt-matrix-options {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pt-matrix-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.pt-matrix-choice.pt-choice-selected {
  border-color: rgba(0, 120, 212, 0.55);
  background: rgba(0, 120, 212, 0.12);
}

.pt-review-matrix {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.1rem;
  line-height: 1.55;
}

.pt-review-partial {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.88rem;
  color: var(--azure-light);
}

.pt-choice-hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--azure-bright);
  font-weight: 600;
}

.pt-case-study,
.pt-case-study-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  min-height: 18rem;
}

@media (max-width: 900px) {
  .pt-case-study,
  .pt-case-study-wrapper {
    grid-template-columns: 1fr;
  }
}

.pt-exhibit-panel,
.pt-case-study-exhibit-panel {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 120, 212, 0.35);
  background: rgba(0, 0, 0, 0.22);
  max-height: 28rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 120, 212, 0.55) rgba(0, 0, 0, 0.2);
}

.pt-exhibit-panel::-webkit-scrollbar,
.pt-case-study-exhibit-panel::-webkit-scrollbar {
  width: 8px;
}

.pt-exhibit-panel::-webkit-scrollbar-thumb,
.pt-case-study-exhibit-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 120, 212, 0.55);
  border-radius: 4px;
}

.pt-exhibit-native {
  margin: 0;
  font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary, #e8e8e8);
}

.pt-case-study-question,
.pt-case-study-question-panel {
  padding: 0.25rem 0;
}

.pt-question-body {
  margin-bottom: 1rem;
}

.pt-md-h2, .pt-md-h3, .pt-md-h4 {
  margin: 0.5rem 0 0.35rem;
}

.pt-md-p, .pt-md-list {
  margin: 0.35rem 0;
  line-height: 1.55;
}

.pt-md-code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

.pt-drag-drop-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .pt-drag-drop-layout {
    grid-template-columns: 1fr;
  }
}

.pt-drag-panel-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pt-drag-pool,
.pt-drop-targets-panel {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 179, 71, 0.35);
  background: rgba(0, 0, 0, 0.15);
  min-height: 8rem;
}

.pt-drag-item {
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 120, 212, 0.45);
  background: rgba(0, 120, 212, 0.15);
  cursor: grab;
  user-select: none;
}

.pt-drag-item.pt-dragging {
  opacity: 0.55;
}

.pt-drop-target {
  margin-bottom: 0.75rem;
}

.pt-drop-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.pt-drop-zone {
  min-height: 2.75rem;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.pt-drop-zone.pt-drop-hover {
  border-color: rgba(0, 120, 212, 0.65);
  background: rgba(0, 120, 212, 0.1);
}

.pt-drop-placeholder {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.pt-drag-empty {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 0;
}

.exam-admin-panel {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 179, 71, 0.35);
}

.exam-admin-summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-orange);
  list-style: none;
  user-select: none;
}

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

.exam-admin-summary::before {
  content: '▸ ';
}

.exam-admin-panel[open] .exam-admin-summary::before {
  content: '▾ ';
}

.exam-admin-body {
  padding: 0.75rem 0 0;
}

.exam-admin-lead,
.exam-admin-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
  line-height: 1.5;
}

.exam-admin-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0.75rem 0;
}

.exam-admin-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.exam-admin-status {
  font-size: 0.82rem;
  color: var(--azure-bright);
  min-height: 1.25rem;
  margin: 0.5rem 0;
}

.exam-admin-list-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.88rem;
}

.exam-admin-banks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.exam-admin-bank {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.exam-admin-bank-active {
  border-color: rgba(110, 231, 160, 0.45);
  background: rgba(110, 231, 160, 0.08);
}

.exam-admin-bank-meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.exam-admin-live {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.exam-admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0.85rem 0 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 179, 71, 0.2);
  background: rgba(0, 0, 0, 0.18);
}

.exam-admin-hint-inline {
  font-size: 0.76rem;
  color: var(--text-dim);
  flex: 1 1 16rem;
}

.exam-admin-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  margin: 1rem 0 0;
}

.exam-admin-hint code {
  color: var(--azure-light);
  font-size: 0.9em;
}

.pt-user-badge {
  font-size: 0.78rem;
  color: var(--azure-light);
  margin: 0 0 0.75rem;
}

.pt-intro-lead {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 40rem;
}

.pt-intro-meta {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.pt-last-score {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.pt-intro-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pt-resume-hint {
  font-size: 0.85rem;
  color: var(--accent-orange);
  margin: 0 0 0.75rem;
}

.pt-exam-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.pt-exam-timer-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pt-exam-timer-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}

.pt-exam-timer {
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--azure-bright);
}

.pt-exam-timer-warn {
  color: var(--accent-orange);
  animation: pt-timer-pulse 1s ease infinite;
}

.pt-exam-timer-done {
  color: #f87171;
}

@keyframes pt-timer-pulse {
  50% { opacity: 0.65; }
}

.pt-exam-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.pt-exam-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.pt-topic {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--azure-light);
  background: rgba(0, 188, 242, 0.12);
  border: 1px solid rgba(0, 188, 242, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.pt-progress-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pt-progress-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.pt-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--azure), #22c55e);
  transition: width 0.25s ease;
}

.pt-stem {
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.pt-choices {
  border: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pt-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.pt-choice:hover:not(:has(input:disabled)) {
  border-color: rgba(0, 188, 242, 0.35);
  background: var(--bg-card-hover);
}

.pt-choice input {
  margin-top: 0.25rem;
  accent-color: var(--azure);
}

.pt-choice-selected {
  border-color: rgba(0, 188, 242, 0.5);
  background: rgba(0, 120, 212, 0.12);
}

.pt-choice-correct {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.1);
}

.pt-choice-wrong {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.08);
}

.pt-choice-key {
  font-weight: 700;
  color: var(--azure-light);
  min-width: 1.25rem;
}

.pt-choice-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.45;
}

.pt-explanation {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 120, 212, 0.1);
  border: 1px solid rgba(0, 188, 242, 0.25);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.pt-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pt-answered {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pt-results {
  text-align: center;
}

.pt-score-ring {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  border: 4px solid var(--border);
}

.pt-score-pass {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.08);
}

.pt-score-review {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.08);
}

.pt-score-value {
  font-size: 2rem;
  font-weight: 700;
}

.pt-score-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.pt-results-msg {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.pt-results-kicker {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 0.75rem;
}

.pt-results-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0 0 1.25rem;
}

.pt-results-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.pt-filter-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.pt-filter-btn.pt-filter-active {
  border-color: rgba(0, 188, 242, 0.5);
  color: var(--azure-light);
  background: rgba(0, 120, 212, 0.15);
}

.pt-toolbar-results {
  margin-top: 0.5rem;
}

.pt-qnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
}

.pt-qnav-btn {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.35rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.pt-qnav-btn:hover {
  border-color: rgba(0, 188, 242, 0.4);
  color: var(--text);
}

.pt-qnav-current {
  border-color: var(--azure-light);
  color: var(--azure-light);
  box-shadow: 0 0 0 1px rgba(0, 188, 242, 0.25);
}

.pt-qnav-answered:not(.pt-qnav-current) {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.pt-review-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  cursor: pointer;
  list-style: none;
}

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

.pt-review-body {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.65rem;
}

.pt-review-topic {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-left: auto;
}

.pt-review-correct {
  color: #86efac;
}

.pt-review-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
}

.pt-review-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pt-review-item {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.pt-review-ok {
  border-left: 3px solid #22c55e;
}

.pt-review-wrong {
  border-left: 3px solid #ef4444;
}

.pt-review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.pt-review-num {
  font-weight: 700;
  font-size: 0.85rem;
}

.pt-review-badge {
  font-size: 0.72rem;
  font-weight: 600;
}

.pt-review-stem {
  font-size: 0.88rem;
  margin: 0 0 0.35rem;
  color: var(--text-muted);
}

.pt-review-answer {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.pt-review-explain {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 0 0.65rem;
}

/* Flashcards */
.flashcard-section {
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.flashcard-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.flashcard-filter-wrap,
.flashcard-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.flashcard-filter-wrap select,
.flashcard-search-wrap input {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  min-width: 180px;
}

.flashcard-search-wrap input {
  min-width: 220px;
}

.flashcard-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.flashcard-progress-track {
  height: 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.flashcard-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--fc-accent, var(--azure)), color-mix(in srgb, var(--fc-accent, var(--azure)) 55%, #22c55e));
  box-shadow: 0 0 12px color-mix(in srgb, var(--fc-accent, var(--azure)) 50%, transparent);
  transition: width 0.25s ease;
}

.flashcard {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 300px;
  margin: 0 auto;
  padding: 1.65rem 1.75rem;
  border: 2px solid color-mix(in srgb, var(--fc-accent, var(--azure)) 55%, transparent);
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at top right, color-mix(in srgb, var(--fc-accent, var(--azure)) 28%, transparent), transparent 55%),
    linear-gradient(155deg, rgba(8, 18, 38, 0.95) 0%, rgba(12, 28, 52, 0.88) 100%);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 40px color-mix(in srgb, var(--fc-accent, var(--azure)) 18%, transparent);
}

.flashcard::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--fc-accent, var(--azure)) 12%, transparent), transparent 40%);
  opacity: 0.9;
}

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

.flashcard:hover {
  transform: translateY(-4px) scale(1.012);
  border-color: color-mix(in srgb, var(--fc-accent, var(--azure)) 85%, #fff);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 0 48px color-mix(in srgb, var(--fc-accent, var(--azure)) 35%, transparent);
}

.flashcard:active {
  transform: translateY(-1px) scale(1.004);
}

.flashcard-flipped {
  border-color: color-mix(in srgb, var(--fc-accent, var(--azure)) 90%, #fff);
  box-shadow:
    0 10px 36px rgba(0, 0, 0, 0.4),
    0 0 56px color-mix(in srgb, var(--fc-accent, var(--azure)) 42%, transparent);
}

.flashcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.flashcard-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--fc-accent, var(--azure-light)) 90%, #fff);
  background: color-mix(in srgb, var(--fc-accent, var(--azure)) 22%, rgba(0, 0, 0, 0.35));
  border: 1px solid color-mix(in srgb, var(--fc-accent, var(--azure)) 55%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--fc-accent, var(--azure)) 25%, transparent);
}

.flashcard-tag-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.fc-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fc-badge-known {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.fc-badge-review {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.flashcard-face {
  flex: 1;
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.55;
}

.flashcard-face-label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--fc-accent, var(--azure-light)) 75%, var(--text-muted));
}

.flashcard-flipped .flashcard-front { display: none; }
.flashcard-flipped .flashcard-back { display: block; }

.flashcard-back {
  display: none;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  color: #f0f9ff;
  background: color-mix(in srgb, var(--fc-accent, var(--azure)) 24%, rgba(0, 0, 0, 0.45));
  border: 1px solid color-mix(in srgb, var(--fc-accent, var(--azure)) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.flashcard-front {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.flashcard-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.flashcard-toolbar-secondary {
  margin-top: 0.5rem;
}

.fc-mark-known:hover {
  border-color: rgba(34, 197, 94, 0.5);
  color: #22c55e;
}

.fc-mark-review:hover {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}

.flashcard-memory {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
}

.flashcard-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
}

.flashcard-hint {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.78rem;
  color: color-mix(in srgb, var(--fc-accent, var(--azure-light)) 55%, var(--text-dim));
  text-align: center;
}

/* Study roadmap (overview) */
.study-roadmap-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.study-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.roadmap-domain-card {
  padding: 1.25rem;
  border-left: 4px solid var(--domain-accent, var(--azure-blue));
  background: color-mix(in srgb, var(--domain-accent, var(--azure-blue)) 10%, var(--bg-card));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.roadmap-domain-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.roadmap-domain-weight {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--domain-accent, var(--azure-light));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.roadmap-domain-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-bright);
}

.roadmap-domain-summary {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.roadmap-domain-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.roadmap-domain-progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--domain-accent, var(--azure-blue)),
    color-mix(in srgb, white 30%, var(--domain-accent, var(--azure-light)))
  );
  box-shadow: 0 0 8px color-mix(in srgb, var(--domain-accent, var(--azure-blue)) 50%, transparent);
  transition: width 0.3s ease;
}

.roadmap-domain-stats {
  margin: 0;
  font-size: 0.78rem;
  color: var(--domain-accent, var(--azure-bright));
  font-weight: 600;
}

.roadmap-domain-steps {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.roadmap-domain-steps li + li {
  margin-top: 0.25rem;
}

.roadmap-domain-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.35rem;
}

/* Sandbox workflow */
.sandbox-section {
  padding: 1.5rem;
}

.sandbox-intro {
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.workflow-steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.workflow-step {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.workflow-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 120, 212, 0.2);
  color: var(--azure-light);
  font-weight: 700;
  font-size: 0.9rem;
}

.workflow-step-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.workflow-step-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.workflow-step-tip {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.sandbox-tips-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
}

.sandbox-tips-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.sandbox-tips-list li + li {
  margin-top: 0.35rem;
}

/* Legacy roadmap placeholders (unused) */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.roadmap-card {
  padding: 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.roadmap-icon {
  font-size: 1.5rem;
}

.roadmap-card h4 {
  margin: 0.5rem 0 0.35rem;
  font-size: 0.92rem;
}

.roadmap-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.roadmap-tag {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

/* AI Assistant */
.ai-section {
  padding: 1.5rem;
}

.ai-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ai-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.ai-status {
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  white-space: nowrap;
}

.ai-status-ok { color: var(--success); background: rgba(108, 203, 95, 0.12); }
.ai-status-warn { color: #ffb347; background: rgba(255, 179, 71, 0.12); }
.ai-status-busy { color: var(--azure-light); }

.ai-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.ai-prompt-chip {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.ai-prompt-chip:hover {
  border-color: rgba(0, 188, 242, 0.4);
  color: var(--azure-light);
}

.ai-messages {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ai-welcome {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.ai-msg-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.ai-msg-user .ai-msg-body {
  background: rgba(0, 120, 212, 0.18);
  border: 1px solid rgba(0, 188, 242, 0.2);
}

.ai-msg-assistant .ai-msg-body {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.ai-msg-body {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.ai-msg-body code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
}

.dot-pulse {
  letter-spacing: 0.2em;
  animation: blink 1s infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

.ai-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ai-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
}

.ai-form input:focus {
  outline: 2px solid rgba(0, 120, 212, 0.45);
}

.ai-setup-note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.ai-setup-note code {
  font-size: 0.85em;
  color: var(--azure-light);
}

.ai-setup-note a {
  color: var(--azure-light);
}

/* Remove old details/summary domain styles overlap */
.domain-card .domain-body {
  padding: 0;
  border-top: none;
}

.domain-summary,
.domain-chevron {
  display: none;
}

/* Responsive */
@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-progress {
    order: -1;
  }

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

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .video-section-head {
    flex-direction: column;
  }

  .main-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.75rem;
  }

  .nav-tab {
    white-space: nowrap;
  }

  .overview-grid,
  .overview-grid-secondary {
    grid-template-columns: 1fr;
  }

  .ai-header {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .domain-bar-head {
    flex-direction: column;
    gap: 0.25rem;
  }
}
