:root {
  color-scheme: dark;
  --bg: rgb(13, 17, 23);
  --nav: #111318;
  --panel: #1a1c22;
  --panel-2: #20232a;
  --panel-3: #282c34;
  --line: #30343d;
  --ink: #f4f4f5;
  --muted: #8f96a3;
  --soft: #c7cbd1;
  --green: #2db55d;
  --blue: #4674e8;
  --blue-2: #5b8cff;
  --amber: #ffa116;
  --red: #ef4743;
  --gauge-track: rgba(255, 255, 255, 0.22);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

/* Global reset to remove yellow/orange/blue focus outlines & border rings */
*:focus,
*:focus-visible,
select:focus,
select:focus-visible,
select:hover,
input:focus,
input:focus-visible,
button:focus,
button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

select,
.practice-filter,
.course-select,
#practicePatternFilter,
#difficultyFilter {
  outline: none !important;
}

select:focus,
select:hover,
.practice-filter:focus,
.practice-filter:hover,
#practicePatternFilter:focus,
#practicePatternFilter:hover,
#difficultyFilter:focus,
#difficultyFilter:hover {
  border-color: #3f3f46 !important;
  outline: none !important;
  box-shadow: none !important;
}

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f4f7;
  --nav: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f8fb;
  --panel-3: #eef1f6;
  --line: #d8dde7;
  --ink: #171a21;
  --muted: #687180;
  --soft: #3d4655;
  --green: #16875b;
  --blue: #3264d6;
  --blue-2: #4674e8;
  --amber: #d98200;
  --red: #d64343;
  --gauge-track: rgba(23, 26, 33, 0.2);
  --shadow: 0 18px 48px rgba(37, 43, 55, 0.11);
}

/* Light theme refinements for the main navigation and Practice workspace. */
body[data-theme="light"] .nav-signin-btn {
  background: #ffffff;
  border-color: #cdd3de;
  color: #252b36;
}

body[data-theme="light"] .nav-signin-btn:hover {
  background: #f1f3f7;
  border-color: #aeb7c6;
}

body[data-theme="light"] .controls {
  border-bottom-color: var(--line);
}

body[data-theme="light"] .practice-view-tabs {
  background: var(--panel-2);
}

body[data-theme="light"] .practice-view-tab.active {
  border-color: #cbd2de;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(27, 36, 51, 0.05);
  color: #202631;
}

body[data-theme="light"] .practice-view-tab:hover,
body[data-theme="light"] .random-problem:hover {
  border-color: #aeb7c6;
  color: #202631;
}

body[data-theme="light"] .practice-search:hover,
body[data-theme="light"] .practice-filter:hover,
body[data-theme="light"] .random-problem:hover {
  box-shadow: 0 4px 12px rgba(37, 43, 55, 0.1);
}

/* Light Theme overrides for Navbar Buttons, Hero Section, Pattern Widget & Tracks */
body[data-theme="light"] .nav-streak-pill {
  background: #ffffff;
  border-color: #d8dde7;
  color: #1e293b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .nav-streak-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

body[data-theme="light"] .nav-streak-pill .streak-flame-icon {
  color: #f97316;
}

body[data-theme="light"] .theme-toggle {
  background: #ffffff;
  border-color: #d8dde7;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .theme-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

body[data-theme="light"] .nav-profile-pill {
  background: #ffffff;
  border-color: #d8dde7;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .nav-profile-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body[data-theme="light"] .profile-pill-name {
  color: #0f172a;
}

body[data-theme="light"] .profile-pill-chevron {
  color: #64748b;
}

/* Hero Section Chips & CTA in Light Mode */
body[data-theme="light"] .home-chip {
  background: #ffffff;
  border-color: #d8dde7;
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body[data-theme="light"] .home-chip:hover {
  background: #f8fafc;
  border-color: #16a34a;
  color: #0f172a;
}

body[data-theme="light"] .home-chip.active {
  background: rgba(34, 197, 94, 0.1);
  border-color: #16a34a;
  color: #15803d;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.15);
}

body[data-theme="light"] .btn-browse-first {
  color: #475569;
}

body[data-theme="light"] .btn-browse-first:hover {
  color: #0f172a;
}

body[data-theme="light"] .home-hero-sub-note {
  color: #64748b;
}

/* Pattern -> Problems Widget in Light Mode */
body[data-theme="light"] .pattern-preview-card {
  background: #ffffff;
  border-color: #d8dde7;
  box-shadow: 0 16px 40px rgba(37, 43, 55, 0.08);
}

body[data-theme="light"] .pattern-preview-header {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body[data-theme="light"] .pattern-header-label {
  color: #64748b;
}

body[data-theme="light"] .pattern-tabs-side {
  background: #f8fafc;
  border-right-color: #e2e8f0;
}

body[data-theme="light"] .p-tab {
  color: #475569;
}

body[data-theme="light"] .p-tab:hover:not(.active) {
  background: #f1f5f9;
  color: #0f172a;
}

body[data-theme="light"] .p-tab.active {
  background: #ffffff;
  color: #16a34a;
  border-left-color: #16a34a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .pattern-details-side {
  background: #ffffff;
}

body[data-theme="light"] .pattern-visual-container {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body[data-theme="light"] .pv-box {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

body[data-theme="light"] .pv-box.in-window {
  background: rgba(34, 197, 94, 0.12);
  border-color: #16a34a;
  color: #15803d;
  text-shadow: none;
}

body[data-theme="light"] .pv-sliding-frame {
  border-color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.2);
}

body[data-theme="light"] .pv-stack-bar {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

body[data-theme="light"] .pv-stack-bar.is-top {
  background: rgba(34, 197, 94, 0.16);
  border-color: #16a34a;
  color: #15803d;
}

body[data-theme="light"] .pv-badge {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #15803d;
}

body[data-theme="light"] .pattern-cue-label {
  color: #64748b;
}

body[data-theme="light"] .pattern-cue-text {
  color: #0f172a;
}

body[data-theme="light"] .reach-sub {
  color: #64748b;
}

body[data-theme="light"] .reach-name {
  color: #16a34a;
}

body[data-theme="light"] .reach-tag {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

body[data-theme="light"] .prob-chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

body[data-theme="light"] .pattern-preview-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
  color: #64748b;
}

body[data-theme="light"] .pattern-preview-footer b {
  color: #0f172a;
}

/* Four Tracks Section in Light Mode */
body[data-theme="light"] .tracks-badge {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.35);
  color: #15803d;
}

body[data-theme="light"] .tracks-title {
  color: #0f172a;
}

body[data-theme="light"] .tracks-desc {
  color: #475569;
}

body[data-theme="light"] .track-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

body[data-theme="light"] .track-card:hover {
  border-color: #16a34a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .track-illustration-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body[data-theme="light"] .track-badge-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

body[data-theme="light"] .track-art-sublabel {
  color: #64748b;
}

body[data-theme="light"] .table-row {
  background: #e2e8f0;
}

body[data-theme="light"] .table-row.head {
  background: rgba(34, 197, 94, 0.2);
  border-color: #16a34a;
}

body[data-theme="light"] .table-row.active-row {
  background: rgba(34, 197, 94, 0.15);
  border-color: #16a34a;
}

body[data-theme="light"] .track-mock-mcq {
  background: #ffffff;
  border-color: #e2e8f0;
}

body[data-theme="light"] .mcq-line {
  background: #e2e8f0;
}

body[data-theme="light"] .grid-cell {
  background: #ffffff;
  border-color: #cbd5e1;
}

body[data-theme="light"] .comm-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body[data-theme="light"] .track-card h3 {
  color: #0f172a;
}

body[data-theme="light"] .track-card p {
  color: #475569;
}

body[data-theme="light"] .track-card-footer {
  border-top-color: #e2e8f0;
  color: #64748b;
}

body[data-theme="light"] .track-link {
  color: #16a34a;
}

/* Footer Social Buttons in Light Mode */
body[data-theme="light"] .footer-social-btn {
  background: #ffffff;
  border-color: #d8dde7;
  color: #64748b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body[data-theme="light"] .footer-social-btn:hover {
  background: #f8fafc;
  color: #16a34a;
  border-color: #16a34a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.nav-container-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 16px 0;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  pointer-events: none;
}

.app-nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(18, 20, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body[data-theme="light"] .app-nav {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.nav-brand,
.nav-tabs,
.nav-actions,
.brand-mark,
.avatar,
.mini-actions,
.calendar-top,
.streak-row,
.problem-main,
.links {
  display: flex;
  align-items: center;
}

.nav-brand {
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 180ms ease, opacity 180ms ease;
  user-select: none;
  flex-shrink: 0;
}

.nav-brand:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.nav-brand:hover .brand-logo {
  transform: scale(1.08) rotate(-4deg);
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.brand-name b {
  font-weight: 800;
  color: #38bdf8;
}

body[data-theme="light"] .brand-name b {
  color: #0284c7;
}

.brand-mark {
  justify-content: center;
  width: 42px;
  height: 38px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.nav-tabs {
  justify-content: center;
  gap: 10px;
}

.nav-actions {
  gap: 10px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease;
}

body[data-theme="light"] .nav-toggle {
  border-color: rgba(0, 0, 0, 0.1);
}

.nav-toggle:hover {
  background: var(--panel-3);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.nav-tab {
  min-width: 104px;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-tab.active {
  border-radius: 999px;
  background: #20232a;
  color: var(--amber);
}

body[data-theme="light"] .nav-tab.active {
  background: var(--panel-3);
}

.muted-tab {
  opacity: 0.92;
  cursor: default;
}

.nav-actions {
  gap: 18px;
}

.pro-button,
.icon-button {
  border: 0;
  color: var(--ink);
  font-weight: 900;
}

.pro-button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 42px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 1.05rem;
}

.pro-icon {
  display: none;
}

.pro-label {
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.icon-button {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: transparent;
  font-size: 1.05rem;
}

.theme-toggle {
  position: relative;
}

.theme-toggle::after {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 180px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  color: var(--ink);
  content: attr(data-tooltip);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 150ms ease, transform 150ms ease;
  visibility: hidden;
}

.theme-toggle:hover::after,
.theme-toggle:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #3c3d42;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  box-sizing: border-box;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.app-shell {
  width: 100%;
  min-height: calc(100vh - 70px);
  margin: 0;
  padding: 16px 18px 18px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
}

#roadmapView {
  grid-template-columns: minmax(780px, 1fr) 420px;
  gap: 18px;
}

.roadmap-stage {
  min-height: calc(100vh - 104px);
  border: 0;
  background: transparent;
  overflow: hidden;
  position: relative;
}

.roadmap-heading {
  max-width: 620px;
  padding: 8px 0 0 10px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  letter-spacing: 0;
}

.roadmap-heading p:last-child,
#activeSubtitle {
  color: var(--muted);
  margin-top: 7px;
}

.roadmap-viewport {
  position: relative;
  width: 100%;
  height: calc(100vh - 104px);
  /* Fills the viewport vertically */
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #0b0f19;
  /* Deep charcoal/black like NeetCode */
  /* Very subtle dots pattern grid background */
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  margin-top: 0;
}

body[data-theme="light"] .roadmap-viewport {
  background-color: #f8fafc;
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

.roadmap-viewport:active {
  cursor: grabbing;
}

.roadmap-canvas {
  position: absolute;
  width: 920px;
  height: 900px;
  transform-origin: 0 0;
  margin: 0;
  pointer-events: auto;
}

/* Floating Zoom Controls - Bottom Left Capsule */
.roadmap-zoom-controls {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: auto;
  display: flex;
  flex-direction: column;
  background: rgba(30, 41, 59, 0.75);
  /* Slate glass background */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 2px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  z-index: 10;
  gap: 0;
}

body[data-theme="light"] .roadmap-zoom-controls {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
}

.roadmap-zoom-controls button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

body[data-theme="light"] .roadmap-zoom-controls button {
  color: rgba(0, 0, 0, 0.6);
}

.roadmap-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: none;
  border-color: transparent;
}

body[data-theme="light"] .roadmap-zoom-controls button:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #000;
}

.roadmap-zoom-controls button:active {
  background: rgba(255, 255, 255, 0.18);
  transform: none;
}

body[data-theme="light"] .roadmap-zoom-controls button:active {
  background: rgba(0, 0, 0, 0.1);
}

/* Divider borders between buttons */
.roadmap-zoom-controls button:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px 6px 0 0;
}

body[data-theme="light"] .roadmap-zoom-controls button:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.roadmap-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  pointer-events: none;
}

.roadmap-lines path {
  fill: none;
  stroke: var(--line);
  stroke-linecap: round;
  stroke-width: 4;
  transition: stroke 0.3s ease, stroke-width 0.3s ease, filter 0.3s ease;
}

.roadmap-lines path.active {
  stroke: var(--line-active, var(--green));
  stroke-width: 5;
  filter: drop-shadow(0 0 3px var(--line-active, var(--green)));
}

.roadmap-nodes {
  position: absolute;
  inset: 0;
}

.roadmap-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 142px;
  /* Compact pill width */
  height: 44px;
  /* Compact pill height like NeetCode */
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  /* Pill-like rounded corners */
  background: var(--panel);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  padding: 4px 6px 6px;
  /* Space for the bottom border progress bar */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.roadmap-node:hover:not(.disabled) {
  transform: translate(-50%, -52%) scale(1.03);
  border-color: var(--accent-color, var(--blue));
  box-shadow: 0 0 10px rgba(var(--accent-rgb, 70, 116, 232), 0.35), 0 6px 14px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.roadmap-node.active {
  outline: 2.5px solid rgba(var(--accent-rgb, 70, 116, 232), 0.5);
  outline-offset: 1px;
}

.roadmap-node.done {
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(45, 181, 93, 0.15);
}

.roadmap-node.done:hover {
  box-shadow: 0 0 14px rgba(45, 181, 93, 0.4), 0 6px 14px rgba(0, 0, 0, 0.3);
}

.roadmap-node.disabled {
  opacity: 0.5;
  background: var(--panel-3);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.roadmap-node span {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.74rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}

.roadmap-node small {
  display: none;
  /* Hide fractional solved/total text like NeetCode */
}

.roadmap-node.disabled small {
  display: block;
  /* Show status subtext only on disabled/revision node */
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 1px;
}

/* Progress bar inside node (bottom border style) */
.node-progress-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

body[data-theme="light"] .node-progress-bar {
  background: rgba(0, 0, 0, 0.04);
}

.node-progress-fill {
  height: 100%;
  background: var(--accent-color, var(--blue));
  border-radius: 0;
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.roadmap-node.done .node-progress-fill {
  background: var(--green);
}

.insight-rail {
  display: grid;
  align-content: start;
  gap: 30px;
  padding-top: 0;
}

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.progress-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 462px;
  padding: 34px 34px 24px;
}

.difficulty-list {
  display: grid;
  gap: 18px;
  font-size: 1.08rem;
  font-weight: 900;
}

.difficulty-list span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.difficulty-list b {
  color: var(--ink);
  font-weight: 500;
}

.easy {
  color: var(--green);
}

.medium {
  color: var(--amber);
}

.hard {
  color: var(--red);
}

.gauge {
  position: relative;
  justify-self: center;
  width: 128px;
  min-height: 128px;
  text-align: center;
}

.gauge svg {
  width: 128px;
  height: 128px;
  transform: rotate(-90deg);
}

.gauge-bg,
.gauge-arc {
  fill: none;
  stroke-linecap: round;
  stroke-width: 10;
}

.gauge-bg {
  stroke: var(--gauge-track);
}

.gauge-arc {
  stroke: #ffd02a;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transition: stroke-dashoffset 260ms ease;
}

.gauge strong {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  color: var(--ink);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.course-select {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 278px);
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 900;
  padding: 0 46px 0 20px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Custom NeetCode-style Dropdown Component */
.custom-dropdown {
  position: relative;
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 278px);
}

.dropdown-trigger {
  width: 100%;
  min-height: 48px;
  padding: 8px 16px;
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

body[data-theme="light"] .dropdown-trigger {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

.dropdown-trigger:hover {
  background: #20222c;
  border-color: rgba(255, 255, 255, 0.25);
}

body[data-theme="light"] .dropdown-trigger:hover {
  background: #e2e8f0;
  border-color: rgba(0, 0, 0, 0.2);
}

.dropdown-trigger[aria-expanded="true"] .dropdown-chevron {
  transform: rotate(180deg);
}

.dropdown-chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
  color: rgba(255, 255, 255, 0.6);
}

body[data-theme="light"] .dropdown-chevron {
  color: rgba(0, 0, 0, 0.5);
}

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

.dropdown-label {
  font-weight: 700;
  color: #f8fafc;
}

body[data-theme="light"] .dropdown-label {
  color: #0f172a;
}

/* Dropdown Menu Popup */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 260px;
  background: #16171d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body[data-theme="light"] .dropdown-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow);
}

.dropdown-menu[hidden] {
  display: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="light"] .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.dropdown-item.active {
  background: #242630;
}

body[data-theme="light"] .dropdown-item.active {
  background: #e2e8f0;
}

.item-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.item-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #f8fafc;
}

body[data-theme="light"] .item-title {
  color: #0f172a;
}

.item-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

body[data-theme="light"] .item-progress-bar {
  background: rgba(0, 0, 0, 0.08);
}

.item-progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.sheet-link {
  grid-column: 1 / -1;
  justify-self: center;
  display: grid;
  place-items: center;
  width: min(100%, 278px);
  min-height: 52px;
  border: 1px solid rgba(255, 161, 22, 0.42);
  border-radius: 7px;
  background: rgba(255, 161, 22, 0.1);
  color: var(--amber);
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.2;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.sheet-link:hover {
  border-color: var(--amber);
  background: rgba(255, 161, 22, 0.16);
}

.total-questions {
  grid-column: 1 / -1;
  justify-self: center;
  display: grid;
  gap: 4px;
  width: min(100%, 278px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px 18px;
  text-align: center;
}

.total-questions span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.total-questions strong {
  color: var(--ink);
  font-size: 1.8rem;
}

.mini-actions {
  grid-column: 1 / -1;
  justify-content: center;
  gap: 10px;
}

.mini-actions button {
  position: relative;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.mini-actions button[data-tooltip]:hover::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #14151b;
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.mini-actions button[data-tooltip]:hover::after {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #14151b transparent transparent transparent;
  pointer-events: none;
  z-index: 100;
}

body[data-theme="light"] .mini-actions button[data-tooltip]:hover::before {
  background: #1e293b;
  color: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .mini-actions button[data-tooltip]:hover::after {
  border-color: #1e293b transparent transparent transparent;
}

.calendar-card {
  padding: 20px 16px 22px;
}

.calendar-top {
  justify-content: space-between;
  padding: 0 10px 20px;
}

.calendar-top strong {
  font-size: 1.42rem;
}

.calendar-top button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 3rem;
  line-height: 1;
}

.streak-row {
  justify-content: space-between;
  padding: 18px 14px 26px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.streak-row code {
  color: var(--muted);
  font-size: 0.96rem;
}

.calendar-week,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-week {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  text-align: center;
  font-weight: 700;
}

.calendar-grid {
  gap: 7px;
  padding-top: 18px;
}

.day {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 50%;
  color: var(--muted);
  font-weight: 700;
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
  padding: 0;
  font-family: inherit;
  font-size: 0.95rem;
}

.day:hover {
  transform: scale(1.12);
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

.day.missed::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.day.today {
  border: 2px solid var(--blue-2);
  background: rgba(88, 101, 232, 0.2);
  color: var(--ink);
}

.day.active {
  background: rgba(67, 212, 155, 0.22);
  color: #34d399;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(67, 212, 155, 0.35);
}

.day.active:hover {
  background: rgba(67, 212, 155, 0.38);
  box-shadow: 0 0 16px rgba(67, 212, 155, 0.6);
}

.day.active::before {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.day.future {
  background: rgba(255, 255, 255, 0.04);
  opacity: 0.6;
}

/* Date Activity Modal Styles */
.date-activity-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: #18191c;
  border: 1px solid #27272a;
  border-radius: 20px;
  padding: 24px;
  color: #e8eaed;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.9);
  box-sizing: border-box;
  margin: auto;
  overflow: hidden;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body[data-theme="light"] .date-activity-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #171a21;
}

.date-activity-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #27272a;
  min-width: 0;
}

body[data-theme="light"] .date-activity-header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.date-activity-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  font-size: 1.5rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.date-activity-date {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
}

body[data-theme="light"] .date-activity-date {
  color: #171a21;
}

.date-activity-sub {
  font-size: 0.88rem;
  color: #38bdf8;
  margin: 2px 0 0;
  font-weight: 600;
}

.date-activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: calc(85vh - 160px);
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.date-problem-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #202124;
  border: 1px solid #2d2e33;
  border-radius: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}

body[data-theme="light"] .date-problem-item {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.08);
}

.date-problem-item:hover {
  border-color: #38bdf8;
  transform: translateY(-1px);
}

.date-problem-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.date-sheet-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.date-problem-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-theme="light"] .date-problem-title {
  color: #1e293b;
}

.date-problem-pattern {
  font-size: 0.8rem;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-problem-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.date-link-btn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.15s ease;
  text-decoration: none;
}

.date-link-btn img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.date-link-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #38bdf8;
  transform: scale(1.08);
}

.btn-jump-practice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  background: #272833;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-jump-practice:hover {
  background: #38bdf8;
  color: #0f172a;
  border-color: #38bdf8;
}

.date-empty-state {
  text-align: center;
  padding: 32px 16px;
}

.date-empty-icon {
  font-size: 2.8rem;
  margin-bottom: 10px;
}

.date-empty-state h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
  color: #ffffff;
}

body[data-theme="light"] .date-empty-state h3 {
  color: #1e293b;
}

.date-empty-state p {
  font-size: 0.88rem;
  color: #a1a1aa;
  margin: 0;
}

body[data-theme="light"] input,
body[data-theme="light"] select,
body[data-theme="light"] textarea {
  background: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.login-card {
  position: relative;
  width: min(430px, 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* takeUforward Style Sign In Modal */
.tuf-login-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #0d0e12;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 36px 30px 28px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #f4f4f5;
}

.tuf-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.modal-brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

.tuf-logo-badge {
  width: 32px;
  height: 32px;
  background: #ffffff;
  color: #0d0e12;
  font-weight: 900;
  font-size: 1.15rem;
  border-radius: 6px;
  display: grid;
  place-items: center;
  line-height: 1;
}

.tuf-logo-badge i {
  color: #f97316;
  font-style: normal;
}

.tuf-brand-name {
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.tuf-brand-name b {
  color: #ffffff;
  font-weight: 900;
}

.tuf-welcome-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
}

.tuf-login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tuf-input-group {
  width: 100%;
}

.tuf-input {
  width: 100%;
  height: 46px;
  background: #18191e;
  border: 1px solid #27272a;
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tuf-input::placeholder {
  color: #71717a;
}

.tuf-input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.25);
}

.tuf-btn-continue {
  width: 100%;
  height: 46px;
  background: #2a1a14;
  border: 1px solid #452418;
  border-radius: 8px;
  color: #f97316;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tuf-btn-continue:hover {
  background: #392017;
  border-color: #f97316;
  color: #ffffff;
}

.tuf-divider {
  width: 100%;
  display: flex;
  align-items: center;
  margin: 20px 0;
  position: relative;
}

.tuf-divider::before,
.tuf-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #27272a;
}

.tuf-divider span {
  padding: 0 12px;
  color: #71717a;
  font-size: 0.82rem;
}

.tuf-btn-google {
  width: 100%;
  height: 46px;
  background: #18191e;
  border: 1px solid #27272a;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tuf-btn-google:hover {
  background: #24252b;
  border-color: #3f3f46;
}

.google-sdk-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.google-sdk-container iframe {
  margin: 0 auto !important;
}

.tuf-session-info {
  margin-top: 18px;
  font-size: 0.78rem;
  color: #71717a;
}

.tuf-skip-container {
  margin-top: 22px;
}

.tuf-skip-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tuf-skip-btn:hover {
  color: #ffffff;
}

.tuf-skip-btn .accent-home {
  color: #ea580c;
  font-weight: 600;
}

.tuf-skip-btn:hover .accent-home {
  color: #f97316;
  text-decoration: underline;
}

/* Google Account Chooser Modal (accounts.google.com style) */
.google-auth-backdrop {
  z-index: 10050;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.google-auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #202124;
  border: 1px solid #3c4043;
  border-radius: 20px;
  padding: 28px 24px 24px;
  color: #e8eaed;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.9);
  max-height: 90vh;
  overflow-y: auto;
}

.google-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #9aa0a6;
  font-size: 1.1rem;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.google-auth-close:hover {
  background: #303134;
  color: #ffffff;
}

.google-auth-top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #e8eaed;
  font-weight: 500;
  margin-bottom: 24px;
}

.google-auth-header {
  text-align: left;
  margin-bottom: 20px;
}

.google-auth-header h2 {
  font-size: 1.85rem;
  font-weight: 400;
  color: #e8eaed;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.google-auth-header p {
  font-size: 1rem;
  color: #9aa0a6;
}

.google-auth-header p .brand-link {
  color: #8ab4f8;
  font-weight: 500;
}

.google-account-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #3c4043;
}

.google-acc-item {
  width: 100%;
  padding: 14px 8px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #3c4043;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  border-radius: 4px;
}

.google-acc-item:hover {
  background: #303134;
}

.acc-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.acc-icon-bg {
  background: #303134;
  color: #9aa0a6;
}

.acc-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.acc-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #e8eaed;
}

.acc-email {
  font-size: 0.85rem;
  color: #9aa0a6;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header Pill Sign In Button & Profile Avatar Button */
.nav-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 9999px;
  background: #27272a;
  border: 1px solid #3f3f46;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-signin-btn:hover {
  background: #3f3f46;
  border-color: #52525b;
}

/* Header Action Buttons */
.notif-toggle {
  background: transparent;
  border: none;
  color: #a1a1aa;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.notif-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pro-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border: none;
  height: 34px;
  padding: 0 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pro-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
}

/* User Profile Dropdown Card */
.nav-actions {
  position: relative;
}

.profile-dropdown-card {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: #18191c;
  border: 1px solid #27272a;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
  z-index: 999;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.profile-user-name {
  font-size: 0.98rem;
  font-weight: 600;
  color: #f4f4f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-user-email {
  font-size: 0.82rem;
  color: #a1a1aa;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2a1b12;
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: #f97316;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.profile-dropdown-divider {
  height: 1px;
  background: #27272a;
  margin: 8px 0;
}

.profile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #e4e4e7;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.profile-menu-item:hover {
  background: #27272a;
  color: #ffffff;
}

.profile-menu-item.active-billing {
  background: #24252a;
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-left svg {
  color: #a1a1aa;
  transition: color 0.15s ease;
}

.profile-menu-item:hover .menu-item-left svg {
  color: #ffffff;
}

.chevron-icon {
  color: #71717a;
}

.profile-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: #f87171;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 4px;
}

.profile-logout-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.profile-logout-btn svg {
  color: #f87171;
}

.profile-logout-btn:hover svg {
  color: #ef4444;
}

/* User Profile Modal V2 (Exact Screenshot Match) */
.user-profile-card-v2 {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #202124;
  border: 1px solid #2d2e33;
  border-radius: 20px;
  padding: 24px;
  color: #e8eaed;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.9);
  box-sizing: border-box;
  margin: auto;
}

.edit-view-card {
  max-width: 480px;
}

.user-profile-card-v2 .close-button {
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
}

.user-profile-card-v2 .close-button:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.profile-v2-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  min-width: 0;
}

.profile-v2-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-v2-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid #3c3d42;
}

.profile-v2-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-v2-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  flex: 1;
}

.profile-v2-name {
  font-size: 1.35rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-v2-handle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: #a1a1aa;
  min-width: 0;
}

.profile-v2-handle-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.copy-handle-btn {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.copy-handle-btn:hover {
  color: #ffffff;
}

.profile-v2-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: #d4d4d8;
  margin-bottom: 24px;
  padding-top: 12px;
  border-top: 1px solid #2d2e33;
  min-width: 0;
}

.profile-v2-email-row svg {
  color: #a1a1aa;
  flex-shrink: 0;
}

.profile-v2-email-row span#modalProfileEmail {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

/* Custom Status Dropdown (Matching Screenshot) */
.status-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.status-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  background: #141517;
  border: 1px solid #27272a;
  border-radius: 12px;
  color: #e4e4e7;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-dropdown-trigger:hover {
  background: #1c1d21;
  border-color: #3f3f46;
}

.status-dropdown-trigger .dropdown-chevron-icon {
  color: #a1a1aa;
  transition: transform 0.15s ease;
}

.status-dropdown-wrapper.open .dropdown-chevron-icon {
  transform: rotate(180deg);
}

.status-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 170px;
  background: #16171a;
  border: 1px solid #27272a;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.85);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: dropdownFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.pattern-dropdown-menu {
  width: 240px;
  max-height: 280px;
  overflow-y: auto;
}

.status-dropdown-option {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #a1a1aa;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-dropdown-option:hover {
  background: #222327;
  color: #ffffff;
}

.status-dropdown-option.active {
  background: #2e2e32;
  color: #ffffff;
  font-weight: 600;
}

.private-pill-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a1a1aa;
  background: #2a2b30;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  margin-left: 4px;
}

.btn-edit-profile-v2 {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  background: #2a2b30;
  border: 1px solid #3c3d42;
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-edit-profile-v2:hover {
  background: #34353b;
  border-color: #52525b;
}

/* View 2: Edit Profile View */
.back-to-profile-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-bottom: 16px;
  padding: 0;
  transition: color 0.15s ease;
}

.back-to-profile-btn:hover {
  color: #ffffff;
}

.edit-profile-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 24px;
}

.edit-section-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edit-section-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f4f4f5;
}

.edit-section-desc {
  font-size: 0.85rem;
  color: #a1a1aa;
  margin-bottom: 12px;
  line-height: 1.4;
}

.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 8px;
}

.photo-preview-wrap {
  position: relative;
}

.camera-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: #2a2b30;
  border: 2px solid #202124;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #a1a1aa;
}

.upload-photo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  background: #2a2b30;
  border: 1px solid #3c3d42;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.upload-photo-btn:hover {
  background: #34353b;
  border-color: #52525b;
}

.photo-hint-text {
  font-size: 0.78rem;
  color: #71717a;
}

.edit-profile-divider {
  height: 1px;
  background: #2d2e33;
  margin: 20px 0;
}

.edit-name-input {
  width: 100%;
  height: 44px;
  background: #2a2b30;
  border: 1px solid #3c3d42;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.edit-name-input:focus {
  border-color: #10b981;
}

.save-name-btn-wrap {
  margin-top: 14px;
}

.btn-save-display-name {
  height: 40px;
  padding: 0 20px;
  background: #10b981;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-save-display-name:hover {
  background: #059669;
}

/* User Profile & Pro Modals */
.user-profile-card,
.pro-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #18191c;
  border: 1px solid #27272a;
  border-radius: 20px;
  padding: 28px 24px;
  color: #f4f4f5;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.9);
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.user-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-profile-details h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.user-profile-details p {
  font-size: 0.88rem;
  color: #a1a1aa;
  margin: 2px 0 6px 0;
}

.pro-badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #818cf8;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 9999px;
}

.user-profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.profile-stat-box {
  background: #24252a;
  border: 1px solid #27272a;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-stat-box strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: #38bdf8;
}

.profile-stat-box span {
  font-size: 0.8rem;
  color: #a1a1aa;
  margin-top: 4px;
}

.user-profile-actions {
  display: flex;
  gap: 10px;
}

.user-profile-actions button {
  flex: 1;
}

/* Pro Modal Styles */
.pro-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.pro-modal-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin: 0 auto 12px auto;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.pro-modal-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.pro-modal-header p {
  font-size: 0.9rem;
  color: #a1a1aa;
  margin-top: 4px;
}

.pro-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-features-list li {
  background: #24252a;
  border: 1px solid #27272a;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #e4e4e7;
}

/* Floating NeetCode Sign In Popover */
.popover-backdrop {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 10000;
}

.neet-signin-card {
  width: 320px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  color: #f4f4f5;
  animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.neet-signin-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.neet-signin-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.neet-signin-row {
  width: 100%;
  height: 48px;
  background: #27272a;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.neet-signin-row:hover {
  background: #3f3f46;
  border-color: rgba(255, 255, 255, 0.15);
}

.neet-row-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.last-used-badge {
  background: #6366f1;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.02em;
}

.neet-signin-footer {
  padding-top: 14px;
  border-top: 1px solid #27272a;
  font-size: 0.8rem;
  color: #a1a1aa;
  line-height: 1.4;
}

.neet-signin-footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* Google OAuth Choose an Account Modal */
.google-auth-backdrop {
  z-index: 10050;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.google-auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #1f1f1f;
  border: 1px solid #333333;
  border-radius: 24px;
  padding: 32px 28px 24px;
  color: #e3e3e3;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8);
}

.google-auth-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #9aa0a6;
  font-size: 1.1rem;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.google-auth-close:hover {
  background: #333333;
  color: #ffffff;
}

.google-auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.google-big-logo {
  margin-bottom: 12px;
}

.google-auth-header h2 {
  font-size: 1.45rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 4px;
}

.google-auth-header p {
  font-size: 0.92rem;
  color: #9aa0a6;
}

.google-auth-header p .brand-highlight {
  color: #ffffff;
  font-weight: 600;
}

.google-account-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #333333;
  border-bottom: 1px solid #333333;
  margin-bottom: 20px;
}

.google-acc-item {
  width: 100%;
  padding: 14px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #2d2d2d;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.google-acc-item:last-child {
  border-bottom: none;
}

.google-acc-item:hover {
  background: #2d2d2d;
}

.acc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.acc-icon-avatar {
  background: #333333;
  color: #9aa0a6;
}

.acc-info {
  display: flex;
  flex-direction: column;
}

.acc-info strong {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e3e3e3;
}

.acc-info span {
  font-size: 0.82rem;
  color: #9aa0a6;
  margin-top: 1px;
}

.use-another-text {
  font-size: 0.92rem !important;
  color: #e3e3e3;
  font-weight: 500 !important;
}

.google-auth-notice {
  font-size: 0.76rem;
  color: #9aa0a6;
  line-height: 1.45;
  text-align: left;
}

.google-sdk-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.custom-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #14151a;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-google-btn:hover {
  background: #1e2027;
  border-color: rgba(255, 255, 255, 0.28);
}

.google-g-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.note-card {
  position: relative;
  width: min(980px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #101113;
  box-shadow: var(--shadow);
  padding: 38px 36px 36px;
}

.note-card h2 {
  color: #ff7a35;
  font-size: 1.35rem;
}

.note-copy {
  margin-top: 18px;
  color: var(--soft);
  font-size: 1.06rem;
}

#noteText {
  width: 100%;
  min-height: 440px;
  margin-top: 24px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: #1a1b1d;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.5;
  padding: 16px;
}

.note-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 20px;
}

.note-actions button {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  font-size: 1.03rem;
}

.note-cancel {
  background: transparent;
}

.note-save {
  background: #5a2f1e;
  color: #ff7a35;
}

.login-card h2 {
  font-size: 1.8rem;
}

.login-copy,
#loginStatus {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-form button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #07120d;
  font-weight: 900;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  font-weight: 900;
}

.practice-layout {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
}

.courses-layout {
  align-content: start;
  gap: 18px;
}

#coursesSubtitle {
  margin-top: 7px;
  color: var(--muted);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.course-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  padding: 20px;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.course-card:hover {
  border-color: var(--amber);
  background: linear-gradient(135deg, rgba(255, 161, 22, 0.18), rgba(255, 161, 22, 0.04));
  box-shadow: 0 12px 28px rgba(255, 161, 22, 0.2);
  transform: translateY(-5px);
}

.course-card:hover .course-badge {
  background: var(--amber);
  color: #15100a;
  box-shadow: 0 0 16px rgba(255, 161, 22, 0.5);
}

.course-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255, 161, 22, 0.16);
  color: var(--amber);
  font-size: 1.2rem;
  font-weight: 900;
}

.course-card strong {
  align-self: end;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.course-card small {
  color: var(--muted);
  font-weight: 700;
}

.practice-hub {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(30px, 6vw, 78px) 0 48px;
}

.practice-hub-header {
  display: grid;
  justify-items: center;
  margin: 0 0 44px;
  text-align: center;
}

.practice-hub-header h1 {
  margin-top: 26px;
  font-size: clamp(2.5rem, 6vw, 4.7rem);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.practice-hub-header h1 span {
  color: #ffad27;
}

.practice-tagline {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.05rem;
}

.practice-logo-orbit {
  position: relative;
  display: grid;
  place-items: center;
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background: #111217;
  box-shadow: 0 0 24px rgba(255, 166, 25, 0.32), 0 0 65px rgba(109, 73, 255, 0.14);
}

.practice-logo-orbit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from 20deg, rgba(255, 158, 24, 0.12) 0%, rgba(255, 158, 24, 0.55) 7%, #ff9e18 16%, #ff9e18 24%, #16151b 27% 95%, rgba(255, 158, 24, 0.12) 98% 100%);
  animation: logo-orbit-spin 3.2s linear infinite;
}

.practice-logo-orbit::after {
  content: "";
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: #111217;
  border: 4px solid #090a0e;
}

@keyframes practiceLogoFlyUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  3% {
    transform: translateY(-2px) rotate(-1deg);
    opacity: 1;
  }

  6% {
    transform: translateY(2px) rotate(1deg);
    opacity: 1;
  }

  9% {
    transform: translateY(-1px) rotate(-0.5deg);
    opacity: 1;
  }

  13% {
    transform: translateY(1px) scale(1.02);
    opacity: 1;
  }

  /* Blasts straight up into space */
  36% {
    transform: translateY(-360px) scale(1.15);
    opacity: 0;
  }

  /* Repositions invisibly below */
  50% {
    transform: translateY(320px) scale(0.85);
    opacity: 0;
  }

  /* Shoots back up smoothly from the bottom */
  60% {
    transform: translateY(220px) scale(0.9);
    opacity: 0.8;
  }

  78% {
    transform: translateY(-10px) scale(1.05);
    opacity: 1;
  }

  88% {
    transform: translateY(4px) scale(0.99);
    opacity: 1;
  }

  95% {
    transform: translateY(-2px) scale(1.01);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes practiceFlameThrust {
  0% {
    transform: translateX(-50%) translateY(0) scale(0);
    opacity: 0;
  }

  4% {
    transform: translateX(-50%) translateY(4px) scaleX(1) scaleY(1.2);
    opacity: 0.9;
    filter: drop-shadow(0 0 16px #ff9800) drop-shadow(0 0 28px #f44336);
  }

  10% {
    transform: translateX(-50%) translateY(8px) scaleX(1.3) scaleY(1.7);
    opacity: 1;
    filter: drop-shadow(0 0 22px #fff176) drop-shadow(0 0 36px #ff3d00);
  }

  14% {
    transform: translateX(-50%) translateY(12px) scaleX(1.5) scaleY(2.2);
    opacity: 1;
  }

  36% {
    transform: translateX(-50%) translateY(-340px) scaleX(0.5) scaleY(3);
    opacity: 0;
  }

  /* In transit below */
  50% {
    transform: translateX(-50%) translateY(320px) scale(0);
    opacity: 0;
  }

  /* Flame as rocket zooms up from bottom */
  60% {
    transform: translateX(-50%) translateY(220px) scaleX(1.1) scaleY(1.5);
    opacity: 0.8;
    filter: drop-shadow(0 0 16px #ff9800);
  }

  75% {
    transform: translateX(-50%) translateY(2px) scaleX(1) scaleY(1.2);
    opacity: 0.6;
    filter: drop-shadow(0 0 12px #ff9800);
  }

  84% {
    transform: translateX(-50%) translateY(0) scale(0);
    opacity: 0;
  }

  100% {
    transform: translateX(-50%) translateY(0) scale(0);
    opacity: 0;
  }
}

.practice-flame {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 32px;
  height: 52px;
  background: radial-gradient(ellipse at top, #ffffff 0%, #fff176 25%, #ff9800 55%, #f44336 85%, transparent 100%);
  border-radius: 45% 45% 50% 50%;
  filter: drop-shadow(0 0 14px #ff9800) drop-shadow(0 0 24px #f44336);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  will-change: transform, opacity;
}

.practice-logo-orbit img {
  position: relative;
  z-index: 2;
  width: 105px;
  height: 105px;
  object-fit: contain;
  border: none;
  border-radius: 0;
  background: transparent;
  transition: transform 0.3s ease;
  will-change: transform, opacity;
  pointer-events: none;
}

.practice-logo-orbit:hover img,
.practice-logo-orbit.is-launching img {
  animation: practiceLogoFlyUp 3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.practice-logo-orbit:hover .practice-flame,
.practice-logo-orbit.is-launching .practice-flame {
  animation: practiceFlameThrust 3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

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

.premium-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  border: 1px solid #2b2d38;
  border-radius: 999px;
  background: #111218;
  color: #e7e8ec;
  padding: 10px 21px;
  font-size: 0.81rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.premium-pill i {
  display: block;
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #176b45;
  animation: premium-dot-blink 1.2s ease-in-out infinite;
}

@keyframes premium-dot-blink {
  50% {
    opacity: 0.35;
  }
}

.practice-alert {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 16px;
  width: min(100%, 565px);
  margin-top: 36px;
  border: 1px solid rgba(247, 72, 79, 0.48);
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(89, 17, 27, 0.56), rgba(38, 9, 14, 0.76));
  box-shadow: 0 0 28px rgba(237, 60, 71, 0.12);
  padding: 16px 18px;
  text-align: left;
}

.alert-symbol {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(239, 71, 67, 0.23);
  color: #ff7777;
  font-size: 1.5rem;
  font-weight: 900;
}

.practice-alert span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.practice-alert strong {
  color: #ff7377;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practice-alert small {
  color: #f1d4d5;
  font-size: 0.78rem;
}

.practice-alert button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: #ef4743;
  color: #fff;
  padding: 0 16px;
  font-size: 0.77rem;
  font-weight: 900;
  white-space: nowrap;
}

.ecosystem-search {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  margin-bottom: 46px;
  border: 1px solid rgba(167, 98, 255, 0.5);
  border-radius: 24px;
  background: #0a0b10;
  box-shadow: 0 0 26px rgba(176, 65, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 0 28px;
  width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.ecosystem-search svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  fill: none;
  stroke: #9296a7;
  stroke-width: 2;
}

.ecosystem-search input {
  min-height: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  font-weight: 700;
  padding: 0;
}

.ecosystem-search input:focus {
  border: 0;
  box-shadow: none;
}

.ecosystem-search input::-webkit-search-cancel-button,
.ecosystem-search input::-webkit-search-decoration {
  appearance: none;
}

.ecosystem-search input::placeholder {
  color: #777988;
}

.ecosystem-list {
  display: grid;
  gap: 28px;
  width: min(720px, 100%);
  margin: 0 auto;
}

.ecosystem-card {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 60px;
  align-items: center;
  gap: 24px;
  width: 100%;
  min-height: 134px;
  overflow: hidden;
  border: 1px solid #242631;
  border-radius: 24px;
  background: #0d0e14;
  color: var(--ink);
  padding: 22px 24px 22px 42px;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ecosystem-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: var(--ecosystem-color);
}

.ecosystem-card:hover {
  transform: translateX(6px);
  border-color: color-mix(in srgb, var(--ecosystem-color) 76%, #fff 24%);
  background: color-mix(in srgb, var(--ecosystem-color) 8%, #0d0e14);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ecosystem-color) 34%, transparent), 0 0 10px color-mix(in srgb, var(--ecosystem-color) 20%, transparent);
}

.ecosystem-card:hover .ecosystem-icon {
  border-color: color-mix(in srgb, var(--ecosystem-color) 55%, #fff 12%);
  background: color-mix(in srgb, var(--ecosystem-color) 14%, #08090d);
  box-shadow: none;
}

.ecosystem-card:hover .ecosystem-arrow {
  background: var(--ecosystem-color);
  color: #111218;
  box-shadow: 0 0 8px color-mix(in srgb, var(--ecosystem-color) 38%, transparent);
}

.ecosystem-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 1px solid #20232d;
  border-radius: 50%;
  background: #08090d;
  color: var(--ecosystem-color);
  font-size: 1.3rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.ecosystem-icon img,
.ecosystem-card-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ecosystem-card:hover .ecosystem-icon img,
.ecosystem-card:hover .ecosystem-card-logo,
.ecosystem-icon:hover img {
  transform: scale(1.15);
}

.dropdown-item-logo,
.dropdown-selected-logo {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover .dropdown-item-logo,
.dropdown-trigger:hover .dropdown-selected-logo,
.dropdown-item-logo:hover,
.dropdown-selected-logo:hover {
  transform: scale(1.22);
}

.ecosystem-copy {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.ecosystem-copy strong {
  font-size: clamp(1.25rem, 3vw, 1.72rem);
  line-height: 1.05;
}

.ecosystem-copy small {
  color: #b2b4c2;
  font-size: clamp(0.88rem, 1.8vw, 1.05rem);
  font-weight: 500;
}

.ecosystem-arrow {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #1a1b21;
  color: #b8bbc7;
  font-size: 2.05rem;
  line-height: 1;
}

.ecosystem-empty {
  color: var(--muted);
  text-align: center;
}

.ecosystem-card[hidden] {
  display: none;
}

body[data-theme="light"] .practice-hub {
  background: radial-gradient(circle at 50% 12%, rgba(255, 181, 39, 0.12), transparent 26%);
}

body[data-theme="light"] .practice-logo-orbit {
  box-shadow: 0 0 22px rgba(255, 166, 25, 0.32), 0 0 55px rgba(109, 73, 255, 0.13);
}

body[data-theme="light"] .premium-pill {
  border-color: #dce0e9;
  background: #fff;
  color: #242936;
  box-shadow: 0 7px 16px rgba(39, 46, 62, 0.08);
}

body[data-theme="light"] .ecosystem-search {
  border-color: rgba(115, 73, 214, 0.45);
  background: #fff;
  box-shadow: 0 12px 26px rgba(100, 75, 159, 0.11);
}

body[data-theme="light"] .ecosystem-search input {
  background: transparent;
  color: #252936;
}

body[data-theme="light"] .ecosystem-search input::placeholder {
  color: #838a9b;
}

body[data-theme="light"] .ecosystem-search svg {
  stroke: #737c90;
}

body[data-theme="light"] .ecosystem-card {
  border-color: #dce1eb;
  background: #fff;
  box-shadow: 0 10px 24px rgba(38, 45, 59, 0.07);
}

body[data-theme="light"] .ecosystem-card:hover {
  border-color: var(--ecosystem-color);
  background: #fffdf9;
  box-shadow: 0 14px 30px rgba(38, 45, 59, 0.12);
}

body[data-theme="light"] .ecosystem-icon {
  border-color: #e3e6ed;
  background: #f8f9fc;
}

body[data-theme="light"] .ecosystem-copy strong {
  color: #1e2430;
}

body[data-theme="light"] .ecosystem-copy small {
  color: #6a7384;
}

body[data-theme="light"] .ecosystem-arrow {
  background: #f0f2f7;
  color: #4a5264;
}

body[data-theme="light"] .practice-alert {
  border-color: rgba(224, 85, 92, 0.44);
  background: linear-gradient(90deg, #fff2f2, #fff9f9);
  box-shadow: 0 10px 25px rgba(199, 70, 77, 0.1);
}

body[data-theme="light"] .practice-alert small {
  color: #704d53;
}

body[data-theme="light"] .practice-footer {
  color: #788194;
}

body[data-theme="light"] .practice-footer strong {
  color: #4f5869;
}

.dev-wall-section {
  margin-top: 60px;
  width: 100%;
}

.dev-wall-title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 28px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.dev-wall-title span {
  color: #ff9e18;
}

.dev-wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  width: 100%;
}

.dev-card {
  position: relative;
  background: #0d0e12;
  border: 1px solid #1f222e;
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.dev-card:hover {
  transform: translateY(-5px);
  border-color: #ff9e18;
  box-shadow: 0 12px 35px rgba(255, 158, 24, 0.18);
}

.card-tag {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #4ade80;
}

/* Card 1: Hello World */
.card-hello .terminal-text {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 1.6rem;
  color: #4ade80;
  font-weight: 700;
}

.card-hello .blinking-cursor {
  animation: blink 1s infinite;
}

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

.card-hello .terminal-sub {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Card 2: Github / Future */
.card-github {
  text-align: center;
}

.card-github .github-icon {
  color: #fff;
  margin-bottom: 10px;
}

.card-github .code-symbol {
  font-family: monospace;
  font-size: 2.2rem;
  font-weight: 900;
  color: #60a5fa;
  margin-bottom: 6px;
}

.card-github p {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #94a3b8;
  font-weight: 700;
}

/* Card 3: 1% Better */
.card-better {
  text-align: center;
}

.card-better .now-badge {
  color: #ef4444;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: 0.15em;
}

.card-better .better-title {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
}

.card-better .better-title span {
  color: #ff9e18;
}

.card-better small {
  margin-top: 12px;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: #64748b;
  font-weight: 800;
}

/* Card 4: Routine */
.card-routine {
  display: flex;
  flex-direction: row;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.routine-item {
  font-family: monospace;
  font-size: 0.95rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
}

/* Card 5: Code Block */
.card-codeblock {
  align-items: flex-start;
  background: #08090c;
  border-color: #181a24;
  width: 100%;
  box-sizing: border-box;
}

.card-codeblock pre {
  margin: 0;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #e2e8f0;
  width: 100%;
  overflow-x: auto;
}

.card-codeblock .kwd {
  color: #f43f5e;
  font-weight: bold;
}

.card-codeblock .fn {
  color: #38bdf8;
}

.card-codeblock .bool {
  color: #fbbf24;
}

.card-codeblock .cmt {
  color: #64748b;
  font-style: italic;
}

/* Card 6: Humor */
.card-humor {
  text-align: center;
}

.card-humor h3 {
  font-size: 1.15rem;
  color: #cbd5e1;
  font-weight: 600;
  margin: 0;
}

.card-humor .semicolon {
  font-size: 3.8rem;
  font-family: monospace;
  color: #ef4444;
  font-weight: 900;
  line-height: 1;
  margin: 4px 0;
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.card-humor span {
  font-size: 0.88rem;
  color: #64748b;
  font-family: monospace;
  letter-spacing: 0.05em;
}

/* Card 7: Loop & Engineers */
.card-loop {
  text-align: center;
}

.card-loop .loop-text {
  font-family: monospace;
  font-size: 1.15rem;
  color: #38bdf8;
  font-weight: 700;
  margin-bottom: 14px;
  word-break: break-word;
}

.card-loop .engineers-text {
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #ffffff;
}

.practice-footer {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 105px;
  color: #8b8d9d;
  text-align: center;
}

.practice-footer>div {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f2ad21;
}

.practice-footer i {
  display: block;
  width: 100px;
  height: 1.5px;
  border-radius: 1px;
  background: #505463;
  opacity: 0.85;
}

.practice-footer span {
  display: inline-block;
  font-size: 1.15rem;
  line-height: 1;
  color: #f59e0b;
  animation: star-pulse-anim 2.2s ease-in-out infinite alternate;
}

@keyframes star-pulse-anim {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.3));
  }

  50% {
    transform: scale(1.35);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.95));
  }

  100% {
    transform: scale(0.8);
    opacity: 0.6;
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.3));
  }
}

.practice-footer strong {
  color: #c2c3ce;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.practice-footer small {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .practice-hub {
    padding-top: 0;
  }

  .practice-logo-orbit {
    width: 108px;
    height: 108px;
  }

  .practice-logo-orbit img {
    width: 98px;
    height: 98px;
  }

  .premium-pill {
    margin-top: 24px;
    padding: 8px 14px;
    font-size: 0.67rem;
  }

  .practice-hub-header h1 {
    margin-top: 21px;
    font-size: 2.65rem;
  }

  .practice-tagline {
    font-size: 0.86rem;
    line-height: 1.5;
  }

  .practice-tagline br {
    display: none;
  }

  .practice-alert {
    grid-template-columns: 42px 1fr;
    gap: 12px;
    border-radius: 16px;
    margin-top: 26px;
    padding: 13px;
  }

  .alert-symbol {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  .practice-alert button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 39px;
  }

  .ecosystem-search {
    min-height: 70px;
    margin-bottom: 28px;
    border-radius: 18px;
    padding: 0 18px;
  }

  .ecosystem-search svg {
    width: 23px;
    height: 23px;
  }

  .ecosystem-list {
    gap: 16px;
  }

  .ecosystem-card {
    grid-template-columns: 58px minmax(0, 1fr) 42px;
    gap: 14px;
    min-height: 104px;
    border-radius: 18px;
    padding: 16px 16px 16px 27px;
  }

  .ecosystem-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    font-size: 1rem;
  }

  .ecosystem-copy {
    gap: 6px;
  }

  .ecosystem-copy small {
    line-height: 1.3;
  }

  .ecosystem-arrow {
    width: 42px;
    height: 42px;
    font-size: 1.45rem;
  }

  .practice-footer {
    margin-top: 70px;
  }

  .practice-footer strong {
    font-size: 0.62rem;
  }

  .modal-backdrop {
    padding: 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10000;
  }

  .tuf-login-card,
  .user-profile-card-v2,
  .pro-card,
  .settings-card,
  .note-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: auto;
    padding: 24px 16px !important;
    border-radius: 16px !important;
    box-sizing: border-box;
  }

  .tuf-input {
    height: 46px;
    font-size: 16px;
  }

  .controls {
    gap: 8px;
  }

  .practice-filter,
  #practicePatternFilter {
    min-height: 44px;
    font-size: 0.92rem;
    padding: 0 12px;
  }

  .pattern-button {
    min-height: 48px;
    padding: 8px 10px;
  }

  .pattern-button strong {
    font-size: 0.88rem;
  }
}

.patterns-panel,
.practice-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.patterns-panel {
  position: sticky;
  top: 86px;
  height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.practice-library {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

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

.library-tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--soft);
  font-size: 0.75rem;
  font-weight: 800;
}

.library-tab:hover,
.library-tab.active {
  border-color: var(--amber);
  background: rgba(255, 161, 22, 0.12);
  color: var(--amber);
}

.practice-panel {
  min-width: 0;
  padding: 18px;
  height: calc(100vh - 104px);
  overflow-y: auto;
}

textarea {
  width: 100%;
  min-height: 360px;
  height: 100%;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 14px;
  outline: none;
  line-height: 1.55;
}

textarea:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 161, 22, 0.14);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.back-to-practice {
  min-height: 40px;
  border: 1.5px solid #059669;
  border-radius: 999px;
  background: #064e3b;
  color: #34d399;
  font-size: 0.88rem;
  font-weight: 900;
  padding: 0 18px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.back-to-practice strong {
  font-weight: 900;
  letter-spacing: 0.02em;
}

.back-to-practice:hover {
  border-color: #10b981;
  background: #065f46;
  color: #a7f3d0;
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.login-gate {
  width: 100%;
  min-height: 44px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 161, 22, 0.42);
  border-radius: 8px;
  background: rgba(255, 161, 22, 0.1);
  color: var(--amber);
  font-weight: 900;
  text-align: center;
}

.login-gate[hidden] {
  display: none;
}

h2 {
  font-size: clamp(1.5rem, 2.35vw, 2.1rem);
  letter-spacing: 0;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input:focus {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

select:focus,
.course-select:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: none;
  outline: none;
}

.sidebar-search {
  margin-bottom: 14px;
}

.pattern-list {
  display: grid;
  gap: 6px;
  overflow: auto;
  padding-right: 4px;
}

.pattern-group-header {
  margin-top: 10px;
  padding: 8px 10px 4px 6px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.pattern-group-header:first-child {
  margin-top: 0;
}

.pattern-button.subtopic-item {
  margin-left: 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 8px 8px 0;
}

.pattern-button.subtopic-item:hover,
.pattern-button.subtopic-item.active {
  border-left-color: #38bdf8;
}

.pattern-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
  text-align: left;
}

.pattern-button:hover,
.pattern-button.active {
  border-color: #3f3f46;
  background: rgba(255, 255, 255, 0.08);
}

.pattern-button>span:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pattern-button strong {
  display: block;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pattern-button small {
  display: block;
  margin-top: 0;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.ring {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 900;
  flex-shrink: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.12fr) repeat(3, minmax(120px, 0.9fr));
  gap: 10px;
  margin-bottom: 12px;
}

.stat-block {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 14px 16px;
}

.stat-block.wide {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 104px;
}

.overall-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}

.stat-block span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-block strong {
  display: block;
  margin-top: 8px;
  font-size: 1.45rem;
}

.view-gauge {
  position: relative;
  width: 92px;
  min-height: 92px;
  text-align: center;
}

.view-gauge svg {
  width: 92px;
  height: 92px;
  transform: rotate(-90deg);
}

.view-gauge-bg,
.view-gauge-arc {
  fill: none;
  stroke-linecap: round;
  stroke-width: 11;
}

.view-gauge-bg {
  stroke: var(--gauge-track);
}

.view-gauge-arc {
  stroke: #ffd02a;
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transition: stroke-dashoffset 260ms ease;
}

.view-gauge strong {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.view-difficulty-summary {
  display: none;
}

.view-difficulty-summary span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.view-difficulty-summary i {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  display: inline-block;
}

.view-difficulty-summary .easy i {
  background: var(--green);
}

.view-difficulty-summary .medium i {
  background: var(--amber);
}

.view-difficulty-summary .hard i {
  background: var(--red);
}

.view-difficulty-summary b {
  color: var(--ink);
  font-weight: 500;
}

.all-pattern-view .stats-grid {
  grid-template-columns: 1fr;
}

.single-pattern-view .overall-main {
  grid-template-columns: 1fr auto;
}

.single-pattern-view .overall-main>div:last-child {
  order: 1;
}

.single-pattern-view .view-gauge {
  order: 2;
  justify-self: end;
}

.all-pattern-view .stat-block.wide {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) 1fr;
  gap: 28px;
  min-height: 128px;
  align-items: center;
  background: rgba(90, 42, 24, 0.42);
  border-color: rgba(255, 116, 38, 0.28);
}

body[data-theme="light"] .all-pattern-view .stat-block.wide {
  background: #fff7ef;
}

.all-pattern-view .stats-grid .stat-block:not(.wide) {
  display: none;
}

.all-pattern-view .gauge-separator,
.all-pattern-view #overallTotal {
  display: none;
}

.all-pattern-view .view-difficulty-summary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
}

.controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 18px 0;
  padding-bottom: 18px;
  border-bottom: 1px solid #27272a;
}

.practice-view-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}

.practice-view-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-weight: 800;
}

.practice-view-tab.active {
  border-color: #575960;
  background: #3a3b3f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  color: #fff;
}

.practice-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 1500px);
  height: 46px;
  max-height: 46px;
  flex: 1 1 700px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  cursor: text;
  transition: width 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.practice-search svg {
  display: none;
}

.practice-search input {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 18px;
}

.practice-search:focus-within {
  border-color: #3f3f46;
  box-shadow: none;
}

.practice-filter {
  width: 250px;
  min-width: 0;
  flex: 0 1 250px;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 0 14px;
  font-size: 0.95rem;
  font: inherit;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

/* Status menu shares the website's dark surface, border, and text palette. */
#practicePatternFilter option {
  background: var(--panel);
  color: var(--ink);
}

#difficultyFilter {
  width: 200px;
  flex-basis: 200px;
}

.random-problem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-height: 46px;
  max-height: 46px;
  margin-left: auto;
  min-width: 176px;
  flex: 0 0 176px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--ink);
  padding: 0 16px;
  font-weight: 800;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.random-problem span {
  margin-right: 8px;
  color: var(--muted);
  font-size: 1.2rem;
}

.random-problem .random-problem-label {
  margin-right: 0;
  font-size: inherit;
  color: inherit;
}

/* On wide screens the search field takes only the remaining space, keeping the
   complete filter bar on a single row. */
@media (min-width: 981px) {
  .controls {
    flex-wrap: nowrap;
  }

  .practice-search {
    width: auto;
    min-width: 180px;
    flex: 1 1 auto;
  }

  .practice-filter {
    flex: 0 1 205px;
    width: 205px;
  }

  #difficultyFilter {
    flex-basis: 166px;
    width: 166px;
  }

  .random-problem {
    margin-left: 0;
  }
}

.practice-search:hover,
.practice-filter:hover,
.random-problem:hover {
  transform: translateY(-2px);
  border-color: #3f3f46;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.random-problem:hover,
.practice-view-tab:hover {
  border-color: #3f3f46;
  color: #ffffff;
}

.problem-row.random-highlight {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28), 0 0 22px rgba(56, 189, 248, 0.18);
}

@media (max-width: 980px) {
  .controls {
    flex-wrap: wrap;
  }

  .random-problem {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .controls {
    gap: 10px;
  }

  .practice-view-tabs,
  .random-problem {
    width: 100%;
  }

  .practice-view-tab {
    flex: 1;
  }

  .practice-search:focus-within {
    width: calc(100% - 64px);
  }
}

@media (max-width: 576px) {

  .practice-filter,
  #difficultyFilter {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
}

/* Some phones report a wide viewport in landscape or browser desktop mode.
   Keep the Practice controls usable based on touch input as well as width. */
@media (hover: none) and (pointer: coarse) {
  .controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .practice-view-tabs,
  .practice-search,
  .practice-filter,
  #difficultyFilter,
  .random-problem {
    width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 46px;
    box-sizing: border-box;
  }

  .practice-view-tabs {
    display: flex;
  }

  .practice-view-tab {
    flex: 1;
  }

  .random-problem {
    margin-left: 0;
  }
}

.add-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 190px 120px minmax(180px, 1fr) 76px;
  gap: 10px;
  margin-bottom: 14px;
}

.add-form button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: var(--amber);
  color: #161006;
  font-weight: 900;
}

.table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
}

.table-head,
.problem-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.55fr) minmax(112px, 0.55fr) minmax(112px, 0.55fr) 76px 88px 106px;
  gap: 14px;
  align-items: center;
}

.table-head {
  min-height: 42px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-list {
  max-height: calc(100vh - 300px);
  overflow: auto;
}

.problem-row {
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.problem-row:last-child {
  border-bottom: 0;
}

.problem-row:hover {
  background: rgba(255, 161, 22, 0.06);
}

.problem-main {
  min-width: 0;
  gap: 12px;
}

.check {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--amber);
}

.check:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.problem-title {
  display: block;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.problem-row.done .problem-title {
  color: var(--muted);
  text-decoration: line-through;
}

.platform {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.pattern-name {
  color: var(--soft);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  width: fit-content;
  min-width: 74px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.pill.easy {
  background: rgba(67, 212, 155, 0.18);
  color: #72e8b7;
}

.pill.medium {
  background: rgba(240, 163, 58, 0.18);
  color: var(--amber);
}

.pill.hard {
  background: rgba(238, 104, 104, 0.18);
  color: #ff9a9a;
}

.links {
  gap: 7px;
  flex-wrap: wrap;
}

.link-chip,
.delete-button,
.note-button,
.revision-button {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.link-chip {
  min-width: 38px;
  width: 38px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.link-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.link-chip span {
  font-size: 0.78rem;
  line-height: 1;
}

.link-chip.leetcode {
  background: transparent;
}

body[data-theme="light"] .link-chip.leetcode {
  background: #111827;
  border-radius: 999px;
}

.link-chip.gfg {
  background: transparent;
}

.link-chip.youtube {
  background: transparent;
}

.link-chip.blind75-link {
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-chip.blind75-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease;
}

.link-chip.blind75-link:hover img {
  transform: scale(1.18);
}

.link-chip.compiler {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 6px;
  transition: transform 160ms ease;
}

.link-chip.compiler img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 5px;
  display: block;
  transition: transform 0.2s ease;
}

.link-chip.compiler:hover img {
  transform: scale(1.18);
}

.link-chip:hover {
  transform: translateY(-2px);
  border-color: transparent;
}

.link-chip:hover,
.delete-button:hover,
.note-button:hover,
.revision-button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.mini-actions button:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: var(--panel-3);
  color: var(--ink);
}

.course-select:hover,
.course-select:focus {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--ink);
  outline: none;
  box-shadow: none;
}


.resource-links,
.practice-links {
  justify-content: flex-start;
}

.resource-links .link-chip.article {
  background: transparent;
}

.note-button,
.revision-button {
  width: 38px;
  min-width: 38px;
  font-size: 1.35rem;
}

.note-button.has-note {
  border-color: var(--amber);
  color: var(--amber);
}

.revision-button.active {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(255, 161, 22, 0.13);
}

.empty-state {
  padding: 46px 18px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  #roadmapView {
    grid-template-columns: 1fr;
  }

  .practice-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  textarea {
    min-height: 220px;
  }

  .progress-card {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: 100%;
    margin: 0;
    padding: 12px;
  }

  .practice-layout {
    grid-template-columns: 1fr;
  }

  .patterns-panel {
    position: static;
    height: auto;
  }

  .practice-panel {
    height: auto;
    overflow-y: visible;
  }

  .pattern-list {
    display: flex;
    flex-direction: column;
    max-height: 280px;
    overflow-y: auto;
    width: 100%;
  }

  .controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .practice-search,
  .practice-filter,
  .random-problem,
  .practice-view-tabs {
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    box-sizing: border-box;
  }

  #practicePatternFilter,
  #difficultyFilter {
    width: 100% !important;
    max-width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    font-size: 0.92rem;
    box-sizing: border-box;
  }

  .search-field,
  .add-form input:first-child,
  .add-form input:nth-child(4),
  .add-form button {
    grid-column: 1 / -1;
  }

  .table-head {
    display: none;
  }

  .problem-list {
    max-height: none;
  }

  .problem-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pattern-name,
  .links {
    padding-left: 34px;
  }
}

@media (max-width: 860px) {
  .app-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 60px;
    padding: 0 16px;
    gap: 10px;
  }

  .nav-brand {
    order: 0;
    width: auto;
    min-height: auto;
    gap: 8px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .brand-name {
    display: none;
  }

  .nav-toggle {
    display: flex;
    order: 1;
    margin-left: 2px;
    flex-shrink: 0;
  }

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

  .pro-button {
    padding: 0 8px;
    justify-content: center;
    height: 34px;
  }

  .pro-icon {
    display: block;
  }

  .pro-label {
    display: none;
  }

  .nav-actions {
    order: 2;
    justify-content: flex-end;
    margin-left: auto;
    gap: 8px;
  }

  .nav-tabs {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 14px;
    background: var(--nav);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease, visibility 180ms;
  }

  .profile-dropdown-card {
    position: fixed;
    top: 64px;
    right: 12px;
    left: auto;
    width: min(290px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    z-index: 1000;
  }

  .app-nav.nav-open .nav-tabs {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .app-nav.nav-open~.nav-overlay {
    display: block;
  }

  .nav-tab {
    width: 100%;
    min-height: 46px;
    text-align: left;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.98rem;
    font-weight: 600;
  }

  .nav-tab.active {
    border-radius: 8px;
  }

  .progress-card,
  .stats-grid,
  .controls,
  .add-form,
  .pattern-list,
  .insight-rail {
    grid-template-columns: 1fr;
  }

  .progress-card {
    padding: 24px;
  }

  .pattern-name,
  .links {
    padding-left: 0;
  }

  .course-select,
  .sheet-link,
  .total-questions {
    width: 100%;
  }

  .roadmap-viewport {
    height: calc(100vh - 84px);
    min-height: 420px;
    border-radius: 8px;
    margin-top: 0;
  }

  .roadmap-zoom-controls {
    bottom: 14px;
    left: 14px;
  }

  .roadmap-zoom-controls button {
    width: 38px;
    height: 38px;
  }
}

@media (min-width: 861px) {
  .nav-overlay {
    display: none !important;
  }
}

@media (max-width: 660px) {
  .app-nav {
    min-height: 56px;
    padding: 0 12px;
    gap: 6px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .nav-toggle {
    width: 36px;
    height: 36px;
  }

  .nav-actions {
    gap: 6px;
  }

  .nav-signin-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .nav-tabs {
    top: 56px;
    max-height: calc(100vh - 56px);
  }

  .nav-tab {
    min-width: 0;
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.95rem;
  }

  .nav-tabs {
    gap: 6px;
  }

  .profile-dropdown-card {
    top: 60px;
    right: 8px;
    width: min(280px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
    padding: 14px 12px;
  }
}

@media (max-width: 480px) {
  .app-nav {
    padding: 0 10px;
    gap: 5px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .theme-toggle {
    width: 32px;
    height: 32px;
  }

  .pro-button {
    height: 32px;
    padding: 0 6px;
  }

  .nav-signin-btn {
    height: 32px;
    padding: 0 8px;
    font-size: 0.75rem;
  }

  .nav-toggle {
    width: 34px;
    height: 34px;
  }

  .profile-dropdown-card {
    top: 58px;
    right: 6px;
    width: calc(100vw - 12px);
    max-width: 290px;
  }

  .user-profile-card-v2 {
    padding: 20px 16px !important;
    border-radius: 16px !important;
    max-width: calc(100vw - 24px) !important;
  }

  .profile-v2-header {
    gap: 12px;
    margin-bottom: 16px;
  }

  .profile-v2-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .profile-v2-name {
    font-size: 1.15rem;
  }

  .profile-v2-handle-row {
    font-size: 0.85rem;
  }

  .profile-v2-email-row {
    font-size: 0.84rem;
    gap: 8px;
    margin-bottom: 18px;
  }

  .btn-edit-profile-v2 {
    height: 42px;
    font-size: 0.92rem;
  }

  .date-activity-card {
    padding: 18px 14px !important;
    border-radius: 16px !important;
    max-width: calc(100vw - 20px) !important;
  }

  .date-activity-header {
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .date-activity-icon {
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
  }

  .date-activity-date {
    font-size: 1.1rem;
  }

  .date-problem-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }

  .date-problem-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .btn-jump-practice {
    flex: 1;
    justify-content: center;
  }
}

/* Compact phone layout: preserves the vertical flow while showing more of the
   Practice workspace without requiring oversized controls. */
@media (max-width: 600px) {
  .app-shell {
    padding: 8px;
  }

  .practice-layout {
    gap: 8px;
  }

  .patterns-panel,
  .practice-panel {
    padding: 12px;
    border-radius: 7px;
  }

  .patterns-panel {
    padding-bottom: 10px;
  }

  .practice-library {
    padding-bottom: 10px;
  }

  .pattern-list {
    max-height: 260px;
  }

  .pattern-button {
    min-height: 48px;
    padding: 6px 10px;
    gap: 8px;
  }

  .pattern-button strong {
    font-size: 0.85rem;
  }

  .pattern-button small {
    font-size: 0.72rem;
  }

  .pattern-button .ring {
    width: 32px;
    height: 32px;
    font-size: 0.68rem;
  }

  .practice-panel .section-header {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .practice-panel .section-header>div {
    flex: 1 1 auto;
    min-width: 0;
  }

  .practice-panel .back-to-practice {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.8rem;
    flex-shrink: 0;
  }

  .controls {
    margin: 10px 0;
    padding-bottom: 10px;
    gap: 7px;
  }

  .practice-view-tabs,
  .practice-search,
  .practice-filter,
  #practicePatternFilter,
  #difficultyFilter,
  .random-problem {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    flex-basis: 38px;
    font-size: 0.8rem;
  }

  .practice-view-tab {
    min-height: 32px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .practice-search input {
    padding: 0 12px;
    font-size: 0.8rem;
  }

  .random-problem {
    min-width: 0;
    padding: 0 10px;
  }

  .random-problem span {
    font-size: 1rem;
  }

  /* Auto-size manage progress card on phone screens */
  .all-pattern-view .stat-block.wide {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    gap: 12px;
    min-height: 0;
    padding: 14px;
    border-radius: 12px;
  }

  .all-pattern-view .overall-main {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
  }

  .all-pattern-view .view-gauge,
  .all-pattern-view .view-gauge svg {
    width: 68px;
    min-height: 68px;
    height: 68px;
    flex-shrink: 0;
  }

  .all-pattern-view .view-gauge strong {
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.82rem;
  }

  .all-pattern-view .overall-main>div:nth-child(2) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
  }

  .all-pattern-view .overall-main span#overallLabel {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    font-weight: 900;
  }

  .all-pattern-view .overall-main strong#overallSummary {
    font-size: clamp(1.35rem, 5.5vw, 1.8rem);
    font-weight: 900;
    line-height: 1.1;
    margin-top: 4px;
  }

  .all-pattern-view .view-difficulty-summary {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    padding-top: 8px;
    border-top: 1px dashed rgba(255, 255, 255, 0.12);
  }

  .all-pattern-view .view-difficulty-summary span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: clamp(0.64rem, 2.2vw, 0.76rem);
    font-weight: 700;
    white-space: nowrap;
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
  }

  .all-pattern-view .view-difficulty-summary i {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
  }
}

@media (max-width: 380px) {
  .nav-actions .pro-button {
    display: none;
  }
}

/* Settings Modal Styling */
.settings-card {
  position: relative;
  background: #15161b;
  /* Solid deep dark color like the image */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: min(440px, 90%);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  color: #fff;
}

body[data-theme="light"] .settings-card {
  background: #ffffff;
  color: #171a21;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow);
}

.settings-card h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px;
}

body[data-theme="light"] .settings-card h2 {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 10px 0;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

body[data-theme="light"] .settings-label {
  color: #171a21;
}

/* Switch styling exactly like NeetCode modal */
.switch-container {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
  flex-shrink: 0;
}

.switch-container input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #555861;
  /* off color in NeetCode settings */
  border-radius: 34px;
  transition: background-color 0.2s ease;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch-container input:checked+.switch-slider {
  background-color: #3b82f6;
  /* blue color when active */
}

.switch-container input:checked+.switch-slider:before {
  transform: translateX(24px);
}

.settings-close-btn {
  align-self: center;
  background: #272833;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  padding: 8px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-top: 10px;
}

body[data-theme="light"] .settings-close-btn {
  background: #eef1f6;
  border-color: rgba(0, 0, 0, 0.15);
  color: #171a21;
}

.settings-close-btn:hover {
  background: #323342;
  border-color: rgba(255, 255, 255, 0.3);
}

body[data-theme="light"] .settings-close-btn:hover {
  background: #d8dde7;
  border-color: rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   RISINGBRAIN ECOSYSTEM STYLES (HOME, DOMAIN, SCREENING, PUZZLES, STORIES)
   ========================================================================== */

:root {
  --rb-emerald: #10b981;
  --rb-emerald-light: #34d399;
  --rb-emerald-glow: rgba(16, 185, 129, 0.18);
  --rb-dark-bg: #090b0e;
  --rb-surface: #13171f;
  --rb-surface-card: #181d27;
  --rb-surface-hover: #1f2533;
  --rb-border: #242b3b;
  --rb-border-light: rgba(255, 255, 255, 0.08);
  --rb-text-primary: #f8fafc;
  --rb-text-muted: #94a3b8;
}

body[data-theme="light"] {
  --rb-emerald: #059669;
  --rb-emerald-light: #10b981;
  --rb-emerald-glow: rgba(16, 185, 129, 0.12);
  --rb-dark-bg: #f8fafc;
  --rb-surface: #ffffff;
  --rb-surface-card: #ffffff;
  --rb-surface-hover: #f1f5f9;
  --rb-border: #e2e8f0;
  --rb-border-light: rgba(0, 0, 0, 0.08);
  --rb-text-primary: #0f172a;
  --rb-text-muted: #64748b;
}

/* --- RISINGBRAIN PIXEL-PERFECT THEME --- */
.text-rb-green {
  color: #22c55e !important;
}

.rb-brand-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #10b981;
  border-radius: 9px;
  color: #000000;
  flex-shrink: 0;
}

/* The public landing page follows the focused RisingBrain treatment. The
   workspace navigation stays available on the learning screens. */
body.home-page-active {
  padding-left: 0 !important;
  --bg: rgb(13, 17, 23);
  --nav: #101114;
  --panel: #111215;
  --panel-2: #17191d;
  --panel-3: #1d2025;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f5f5f6;
  --muted: #a4a5aa;
  --soft: #d2d3d7;
}

body.home-page-active .app-vertical-dock {
  display: none !important;
}

body.home-page-active .nav-tabs {
  display: flex !important;
}

body.home-page-active .app-nav {
  max-width: 100%;
  min-height: 48px;
  padding: 7px 23px;
  border-radius: 18px;
  background: rgba(14, 15, 18, 0.92);
}

body.home-page-active .brand-name {
  font-size: 1.15rem;
  font-weight: 700;
}

body.home-page-active .brand-name b {
  color: #38bdf8;
  font-weight: 800;
}

body.home-page-active .theme-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

body.home-page-active .nav-actions {
  gap: 10px;
}

/* --- TOP NAVBAR PILL BUTTONS (Matching Screenshot) --- */
.nav-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  height: 38px;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-streak-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.nav-streak-pill .streak-flame-icon {
  color: #94a3b8;
  transition: color 0.2s;
}

.nav-streak-pill:hover .streak-flame-icon {
  color: #f97316;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: scale(1.04);
}

.nav-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  height: 38px;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-profile-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.profile-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
}

.profile-pill-name {
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.profile-pill-chevron {
  color: #94a3b8;
  margin-left: 1px;
  transition: transform 0.2s;
}

.nav-profile-pill[aria-expanded="true"] .profile-pill-chevron {
  transform: rotate(180deg);
}

/* --- HOME LANDING VIEW --- */
.home-landing-view {
  display: none;
  width: 100%;
  padding: 3.5rem 1.5rem 5rem;
  max-width: 1240px;
  margin: 0 auto;
}

.home-landing-view.active {
  display: block;
}

.home-hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.home-hero-title {
  font-size: clamp(2.4rem, 6.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #ffffff;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

body[data-theme="light"] .home-hero-title {
  color: #0f172a;
}

.home-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--muted);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto 2.2rem;
}

.home-hero-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 2.5rem;
}

.home-chip {
  padding: 8px 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(34, 197, 94, 0.6);
  color: #ffffff;
  transform: translateY(-2px);
}

.home-chip.active {
  border-color: #22c55e;
  color: #ffffff;
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.2);
}

.home-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 1.25rem;
}

.btn-start-free-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 9999px;
  background: #22c55e;
  color: #000000;
  font-size: 0.96rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 22px rgba(34, 197, 94, 0.35);
  transition: all 0.25s ease;
}

.btn-start-free-hero:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.45);
}

.btn-browse-first {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 9999px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.96rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-browse-first:hover {
  color: #ffffff;
  transform: translateX(2px);
}

.home-hero-sub-note {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0;
  margin-bottom: 3.5rem;
}

/* --- PATTERN TO PROBLEMS PREVIEW WIDGET --- */
.pattern-preview-card {
  width: 100%;
  max-width: 960px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  margin-bottom: 4rem;
  text-align: left;
}

.pattern-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.pattern-dots {
  display: flex;
  gap: 6px;
}

.pattern-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.pattern-dots span:nth-child(1) {
  background: #ef4444;
}

.pattern-dots span:nth-child(2) {
  background: #f59e0b;
}

.pattern-dots span:nth-child(3) {
  background: #10b981;
}

.pattern-header-label {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--muted);
}

.pattern-preview-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 280px;
}

@media (max-width: 768px) {
  .pattern-preview-body {
    grid-template-columns: 1fr;
  }
}

.pattern-tabs-side {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  gap: 4px;
}

.p-tab {
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.p-tab:hover {
  color: var(--ink);
  background: var(--panel-2);
}

.p-tab.active {
  background: var(--panel-3);
  color: var(--rb-emerald-light);
  font-weight: 600;
  border-left: 3px solid var(--rb-emerald);
}

.pattern-details-side {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- PATTERN VISUAL CONTAINER & ANIMATIONS --- */
.pattern-visual-container {
  background: rgba(14, 17, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px 14px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.pv-array-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
  max-width: 100%;
}

.pv-array-boxes {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.pv-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #475569;
  transition: all 0.3s ease;
  user-select: none;
  box-sizing: border-box;
}

.pv-box.in-window {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  text-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.pv-sliding-frame {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  border: 2px solid #22c55e;
  background: rgba(34, 197, 94, 0.14);
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.2);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

/* Monotonic Stack Visual */
.pv-stack-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 52px;
  padding: 4px 10px;
}

.pv-stack-bar {
  width: 38px;
  border-radius: 6px 6px 0 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.pv-stack-bar.is-top {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
  color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

/* Binary Search & Pointers */
.pv-box.pv-target {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.pv-box.pv-ptr-l {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.pv-box.pv-ptr-r {
  border-color: #f43f5e;
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.12);
}

.pv-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

@media (max-width: 600px) {
  .pv-box {
    width: 28px;
    height: 28px;
    min-width: 28px;
    font-size: 0.75rem;
  }

  .pv-array-boxes {
    gap: 4px;
  }
}

.pattern-cue-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.pattern-cue-text {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 1.25rem;
}

.pattern-reach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
}

.reach-sub {
  color: var(--muted);
  font-size: 0.88rem;
}

.reach-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rb-emerald-light);
}

.reach-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--soft);
}

.pattern-problems-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prob-chip {
  padding: 6px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--soft);
  font-family: monospace;
}

.pattern-preview-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.pattern-preview-footer b {
  color: var(--ink);
}

/* --- STATS COUNTER GRID --- */
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 960px;
  margin-bottom: 4.5rem;
}

@media (max-width: 640px) {
  .home-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.home-stat-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--rb-emerald-light);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

/* --- 4 TRACKS SECTION --- */
.home-tracks-section {
  width: 100%;
  text-align: left;
}

.tracks-header {
  margin-bottom: 2rem;
}

.tracks-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--rb-emerald-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tracks-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  margin-bottom: 12px;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}

.tracks-badge .badge-dot {
  font-size: 0.65rem;
  color: #22c55e;
}

.tracks-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  margin: 6px 0 10px;
  letter-spacing: -0.02em;
}

.tracks-desc {
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  width: 100%;
}

@media (max-width: 1200px) {
  .tracks-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.track-card {
  background: rgba(14, 17, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.track-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.track-illustration-box {
  width: 100%;
  height: 120px;
  background: rgba(20, 24, 33, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}

.track-badge-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-transform: uppercase;
  z-index: 2;
}

.track-svg-art {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.track-art-sublabel {
  position: absolute;
  bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* Card 2: Mock Table */
.track-mock-table {
  width: 110px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.table-row {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.table-row.head {
  height: 8px;
  background: rgba(34, 197, 94, 0.25);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.table-row.active-row {
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid #22c55e;
  position: relative;
}

.table-row.active-row::after {
  content: '';
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

/* Card 3: MCQ Mock */
.track-mock-mcq {
  width: 110px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mcq-option {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mcq-radio {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #475569;
}

.mcq-radio-checked {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  color: #000;
  font-size: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.mcq-line {
  height: 3px;
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.mcq-line-active {
  height: 4px;
  width: 48px;
  background: #22c55e;
  border-radius: 2px;
}

/* Card 4: Grid 2x2 */
.track-mock-grid {
  display: grid;
  grid-template-columns: repeat(2, 26px);
  grid-template-rows: repeat(2, 26px);
  gap: 6px;
}

.grid-cell {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.grid-cell.active-cell {
  border: 2px solid #22c55e;
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* Card 5: Community Mini Cards */
.track-mock-community {
  display: grid;
  grid-template-columns: repeat(2, 50px);
  gap: 6px;
}

.comm-card {
  height: 34px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  position: relative;
}

.comm-card.active-comm {
  border: 1.5px solid #22c55e;
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.25);
}

.comm-card.active-comm::before {
  content: '●';
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 6px;
  color: #22c55e;
}

.track-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 8px;
}

.track-card p {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 16px;
  flex-grow: 1;
}

.track-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 12px;
}

.track-link {
  font-weight: 600;
  color: #22c55e;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s;
  margin-left: auto;
}

.track-card:hover .track-link {
  transform: translateX(4px);
}

/* --- HOW IT WORKS: THREE HABITS REPEATED --- */
.home-how-it-works-section {
  width: 100%;
  margin-top: 5rem;
  text-align: left;
}

.how-habits-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 2rem;
}

.habit-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
}

.habit-row.reversed {
  grid-template-columns: 1.1fr 1fr;
}

.habit-row.reversed .habit-info {
  order: 2;
}

.habit-row.reversed .habit-visual {
  order: 1;
}

@media (max-width: 860px) {

  .habit-row,
  .habit-row.reversed {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .habit-row.reversed .habit-info {
    order: 1;
  }

  .habit-row.reversed .habit-visual {
    order: 2;
  }
}

.habit-step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.step-num {
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rb-emerald-light);
}

.step-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.habit-heading {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  line-height: 1.3;
}

.habit-text {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.habit-pattern-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.h-pattern-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 9999px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--soft);
  font-weight: 500;
}

.h-pattern-pill.active {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--ink);
}

.pill-count {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--muted);
}

.habit-checklist-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.h-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.h-check-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.h-check-item.done .h-check-box {
  background: #22c55e;
  border-color: #22c55e;
  color: #000;
}

.h-check-item.done .h-check-name {
  color: var(--muted);
}

.h-check-name {
  flex-grow: 1;
  color: var(--ink);
  font-weight: 500;
}

.h-check-diff {
  font-family: monospace;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.h-check-diff.medium {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.h-check-diff.hard {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.h-check-fade-footer {
  padding: 10px 18px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  font-family: monospace;
  background: var(--panel);
}

.habit-revision-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.h-rev-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.h-rev-icon {
  font-size: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
}

.h-rev-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h-rev-meta strong {
  font-size: 0.88rem;
  color: var(--ink);
}

.h-rev-meta span {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: monospace;
}

/* --- REVIEWS MARQUEE --- */
.home-reviews-section {
  width: 100%;
  margin-top: 5rem;
}

.tracks-header.center {
  text-align: center;
  margin-bottom: 2.5rem;
}

.tracks-header.center .tracks-desc {
  margin: 0 auto;
}

.reviews-marquee-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  padding: 10px 0;
}

.reviews-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollReviews 38s linear infinite;
}

.reviews-track:hover {
  animation-play-state: paused;
}

@keyframes scrollReviews {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.review-card {
  width: 320px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.review-stars {
  color: #f59e0b;
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.review-body {
  font-size: 0.86rem;
  color: var(--soft);
  line-height: 1.55;
  margin: 0 0 18px;
  flex-grow: 1;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.author-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: #000;
  flex-shrink: 0;
}

.author-avatar.emerald {
  background: linear-gradient(135deg, #34d399, #059669);
}

.author-avatar.teal {
  background: linear-gradient(135deg, #2dd4bf, #0d9488);
}

.author-avatar.green {
  background: linear-gradient(135deg, #4ade80, #16a34a);
}

.author-avatar.cyan {
  background: linear-gradient(135deg, #22d3ee, #0891b2);
}

.author-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.author-info strong {
  font-size: 0.85rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.author-info span {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- FAQ ACCORDION --- */
.home-faq-section {
  width: 100%;
  max-width: 860px;
  margin: 5.5rem auto 0;
}

.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: var(--panel-2);
}

.faq-item.active {
  border-color: rgba(34, 197, 94, 0.5);
  background: #111a2c;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  gap: 16px;
  transition: color 0.15s ease;
}

.faq-question:hover {
  color: #22c55e;
}

.faq-chevron {
  font-size: 0.95rem;
  font-weight: 800;
  color: #94a3b8;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
  color: #22c55e;
}

.faq-answer {
  display: none;
  padding: 0 24px 22px;
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.65;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
  animation: fadeIn 0.2s ease;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-answer p {
  margin: 0;
}

body[data-theme="light"] .faq-item {
  background: #ffffff;
  border-color: #e2e8f0;
}

body[data-theme="light"] .faq-item.active {
  background: #f8fafc;
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .faq-question {
  color: #0f172a;
}

body[data-theme="light"] .faq-answer {
  color: #475569;
  border-top-color: #f1f5f9;
}

/* --- BOTTOM CTA BANNER --- */
.home-bottom-cta-banner {
  width: 100%;
  margin: 6rem 0 3rem;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.08) 0%, var(--panel) 100%);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 28px;
  padding: 50px 30px;
  text-align: center;
}

.bottom-cta-inner {
  max-width: 720px;
  margin: 0 auto;
}

.bottom-cta-title {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 14px;
}

.bottom-cta-desc {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

/* --- HOME SITE FOOTER --- */
.home-site-footer {
  width: 100%;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
  max-width: 320px;
  margin: 0;
}

.footer-links-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin: 0 0 14px;
}

.footer-links-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-col a {
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links-col a:hover {
  color: var(--rb-emerald-light);
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.footer-social-btn:hover {
  color: #22c55e;
  background: var(--panel-3);
  border-color: rgba(34, 197, 94, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   TRACK SHARED TOOLBARS & COMPONENTS
   ========================================================================== */
.track-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 7px 15px;
  border-radius: 9999px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-pill:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.filter-pill.active {
  background: var(--panel-3);
  color: var(--rb-emerald-light);
  border-color: var(--rb-emerald);
  font-weight: 600;
}

.track-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 260px;
}

.track-search-box input {
  background: transparent;
  border: none;
  color: var(--ink);
  font-size: 0.88rem;
  width: 100%;
}

.pill-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
}

.pill-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.pill-badge.purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.pill-badge.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.pill-badge.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

.pill-badge.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* ==========================================
   NAVIGATION STYLING
   ========================================== */
body {
  padding-left: 0;
  box-sizing: border-box;
}

.app-vertical-dock {
  display: none !important;
}

body.track-dock-active {
  padding-left: 78px !important;
  box-sizing: border-box;
}

body.track-dock-active .nav-container-wrapper {
  display: none !important;
}

body.track-dock-active .domain-header-row,
body.track-dock-active .apt-header-row {
  top: 0 !important;
}

body.track-dock-active .domain-left-sidebar,
body.track-dock-active .domain-right-toc,
body.track-dock-active .apt-left-sidebar,
body.track-dock-active .apt-right-toc {
  top: 74px !important;
  height: calc(100vh - 90px) !important;
  max-height: calc(100vh - 90px) !important;
}

body.track-dock-active .app-vertical-dock {
  position: fixed;
  left: 14px;
  top: 14px;
  bottom: 14px;
  width: 54px;
  background: rgb(13, 17, 23);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 5px;
  z-index: 999;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

body.track-dock-active .dock-logo-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  padding: 5px;
  margin-bottom: 6px;
  flex-shrink: 0;
  overflow: hidden;
}

body.track-dock-active .dock-brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

body.track-dock-active .dock-logo-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.2);
}

body.track-dock-active .dock-logo-btn:active {
  transform: scale(0.96);
}

body.track-dock-active .dock-nav-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

body.track-dock-active .dock-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: #8b949e;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.track-dock-active .dock-nav-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f0f6fc;
}

body.track-dock-active .dock-nav-btn.active {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

body.track-dock-active .dock-nav-btn.active::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  background: #22c55e;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

body.track-dock-active .dock-tooltip {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  background: rgb(13, 17, 23);
  color: #f0f6fc;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 1001;
}

body.track-dock-active .dock-tooltip::before {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: transparent rgb(13, 17, 23) transparent transparent;
}

body.track-dock-active .dock-nav-btn:hover .dock-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(2px);
}

body.track-dock-active .dock-bottom-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

body.track-dock-active .dock-streak-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgb(13, 17, 23);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 3px 8px;
  color: #f0883e;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  width: auto;
  min-width: 38px;
  height: 24px;
  font-family: inherit;
}

body.track-dock-active .dock-streak-pill:hover {
  background: #1c212c;
  border-color: rgba(240, 136, 62, 0.4);
  transform: scale(1.05);
}

body.track-dock-active .dock-streak-pill .dock-flame-icon {
  width: 13px;
  height: 13px;
  stroke: #f0883e;
}

body.track-dock-active .dock-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgb(13, 17, 23);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.track-dock-active .dock-theme-btn:hover {
  background: #1c212c;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.06);
}

body.track-dock-active .dock-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #052e16;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: -0.02em;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
  font-family: inherit;
  padding: 0;
}

body.track-dock-active .dock-avatar-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.5);
}

/* ==========================================
   RISINGBRAIN EXACT DOMAIN UI STYLING
   ========================================== */
.domain-exact-layout {
  display: none;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  box-sizing: border-box;
}

.domain-exact-layout.active {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header Row: Subject Cards + Search Box (Sticky Top Bar) */
.domain-header-row {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.domain-subject-cards {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.domain-subject-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 10px;
  background: rgb(13, 17, 23);
  border: 1px solid #1e2530;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  font-family: inherit;
}

.domain-subject-card:hover {
  background: #111722;
  border-color: #2b3545;
}

.domain-subject-card.active {
  background: rgba(34, 197, 94, 0.04);
  border-color: #22c55e;
}

.subject-icon-box {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: #161d28;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #8b949e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.domain-subject-card.active .subject-icon-box {
  background: #22c55e;
  border-color: #22c55e;
  color: #042410;
}

.domain-subject-card.active .subject-icon-box svg {
  stroke: #042410;
}

.subject-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.subject-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e6edf3;
  letter-spacing: -0.01em;
}

.domain-subject-card.active .subject-title {
  color: #ffffff;
}

.subject-topics-count {
  font-size: 0.72rem;
  color: #6e7681;
  font-weight: 500;
}

.domain-subject-card.active .subject-topics-count {
  color: #22c55e;
  font-weight: 600;
}

.domain-search-box-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgb(13, 17, 23);
  border: 1px solid #1e2530;
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 320px;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.domain-search-box-pill:focus-within {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.domain-search-box-pill svg {
  color: #6e7681;
  flex-shrink: 0;
}

.domain-search-box-pill input {
  background: transparent;
  border: none;
  outline: none;
  color: #f0f6fc;
  font-size: 0.85rem;
  width: 100%;
  font-family: inherit;
}

.domain-search-box-pill input::placeholder {
  color: #6e7681;
}

/* 3-Column Reader Body Grid */
.domain-body-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: start;
  width: 100%;
}

/* Left Sidebar: Modules & Topics */
.domain-left-sidebar {
  position: sticky;
  top: 146px;
  height: calc(100vh - 162px);
  max-height: calc(100vh - 162px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 197, 94, 0.3) transparent;
  z-index: 10;
}

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

.domain-left-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.domain-left-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

.domain-left-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 197, 94, 0.4);
}

.domain-sidebar-group {
  margin-bottom: 18px;
}

.domain-sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.domain-sidebar-group-header .group-count {
  font-size: 0.72rem;
  color: #4ade80;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  padding: 2px 7px;
  border-radius: 12px;
}

.domain-sidebar-group-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.domain-sidebar-topic-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 0.86rem;
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
}

.domain-sidebar-topic-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.domain-sidebar-topic-btn.active {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  font-weight: 600;
  border-color: rgba(34, 197, 94, 0.3);
}

.domain-sidebar-topic-btn .topic-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.domain-sidebar-topic-btn.active .topic-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.domain-empty-sidebar {
  padding: 24px 12px;
  font-size: 0.84rem;
  color: #64748b;
  text-align: center;
}

/* Center Main Reading Pane */
.domain-center-pane {
  min-width: 0;
  width: 100%;
}

.domain-reading-card {
  background: rgb(13, 17, 23);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 36px 42px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.domain-content-top-header {
  margin-bottom: 28px;
}

.topic-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #22c55e;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.breadcrumb-sep {
  color: #475569;
}

.domain-topic-h1 {
  font-size: 2.35rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0;
}

.domain-section-block {
  margin-bottom: 36px;
  scroll-margin-top: 90px;
}

.source-data-banner-ribbon {
  display: inline-flex;
  align-items: center;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 8px;
  padding: 7px 16px;
  margin-bottom: 12px;
}

.source-banner-text {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #4ade80;
  text-transform: uppercase;
}

.source-data-note {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0 0 18px 0;
  line-height: 1.5;
}

.domain-code-pill-emerald {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.16);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 600;
}

.section-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 14px 0;
}

.problem-statement-text {
  font-size: 0.96rem;
  color: #cbd5e1;
  margin: 0 0 14px 0;
  line-height: 1.6;
}

.section-prose {
  font-size: 0.96rem;
  color: #cbd5e1;
  line-height: 1.75;
}

.domain-prose-p {
  margin: 0 0 14px 0;
}

.domain-code-pill {
  background: rgba(255, 255, 255, 0.08);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.86rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.domain-inline-code-block {
  background: #06090e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 18px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.5;
  margin: 14px 0;
}

/* SQL Table Styles (Matching RisingBrain /domain/sql/select) */
.rb-table-container {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(34, 197, 94, 0.22);
  background: #060e0a;
  margin: 14px 0 24px 0;
}

.rb-table-top-bar {
  background: #0f2e1b;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.35);
  display: flex;
  align-items: center;
}

.table-name-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #4ade80;
}

.rb-clean-sql-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.rb-clean-sql-table thead {
  background: #0d2818;
  border-bottom: 1px solid rgba(34, 197, 94, 0.35);
}

.rb-clean-sql-table th {
  padding: 14px 20px;
  font-weight: 700;
  color: #4ade80;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.rb-clean-sql-table td {
  padding: 13px 20px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.rb-clean-sql-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.rb-clean-sql-table tbody tr:hover {
  background: rgba(34, 197, 94, 0.06);
}

.domain-right-toc {
  position: sticky;
  top: 146px;
  height: fit-content;
  max-height: calc(100vh - 162px);
  overflow-y: auto;
  z-index: 10;
}

/* SQL Query Box */
.sql-query-card {
  background: #06090e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  margin: 14px 0;
}

.sql-query-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sql-lang-tag {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
}

.btn-copy-query {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-copy-query:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.sql-code-block {
  padding: 18px 20px;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.6;
  color: #f1f5f9;
  overflow-x: auto;
}

.sql-kw {
  color: #38bdf8;
  font-weight: 700;
}

.sql-str {
  color: #fde047;
}

/* Right TOC */

.domain-toc-sticky-box {
  padding: 10px 0;
}

.toc-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.toc-nav-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-item-link {
  display: block;
  font-size: 0.86rem;
  color: #94a3b8;
  padding: 4px 0 4px 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: all 0.15s ease;
}

.toc-item-link:hover {
  color: #e2e8f0;
}

.toc-item-link.active {
  color: #22c55e;
  font-weight: 600;
  border-left-color: #22c55e;
}

/* Domain Mode Switcher & Status Line */
.domain-topic-summary {
  font-size: 1.05rem;
  color: #94a3b8;
  margin: 12px 0 8px;
  line-height: 1.6;
}

.domain-topic-status-line {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 20px;
  font-weight: 500;
}

.domain-mode-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.domain-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c1017;
  color: #8b949e;
  font-family: inherit;
}

.domain-mode-tab:hover {
  background: #141b24;
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.15);
}

.domain-mode-tab.active {
  background: #0d2818;
  border-color: #22c55e;
  color: #4ade80;
}

.domain-mode-tab.active svg {
  stroke: #4ade80;
}

/* Story / Real-world Scenario Box */
.domain-story-box {
  margin: 0 0 32px 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #cbd5e1;
}

.domain-story-p {
  margin: 0 0 14px 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #cbd5e1;
}

/* Recap Items */
.recap-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  line-height: 1.6;
  color: #cbd5e1;
}

.recap-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  margin-top: 8px;
  flex-shrink: 0;
}

/* Interactive Practice Quiz Arena */
.domain-practice-arena {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.domain-quiz-card {
  background: #06090e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s ease;
}

.quiz-q-num {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #4ade80;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.quiz-q-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 18px 0;
  line-height: 1.5;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  line-height: 1.5;
}

.quiz-option-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.quiz-option-btn .opt-label {
  font-weight: 800;
  font-size: 0.84rem;
  color: #64748b;
  min-width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.quiz-option-btn.selected {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  color: #ffffff;
}

.quiz-option-btn.selected .opt-label {
  background: #38bdf8;
  color: #042410;
}

.quiz-option-btn.correct {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.12) !important;
  color: #4ade80 !important;
}

.quiz-option-btn.correct .opt-label {
  background: #22c55e !important;
  color: #042410 !important;
}

.quiz-option-btn.wrong {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
}

.quiz-option-btn.wrong .opt-label {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.quiz-explanation-box {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Floating Bottom Right Green Feedback Button */
.domain-floating-feedback-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #22c55e;
  border: none;
  display: none;
  place-items: center;
  color: #042410;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.domain-floating-feedback-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.55);
}

.domain-floating-feedback-btn svg {
  stroke: #042410;
}

#domainView.active~.domain-floating-feedback-btn,
body.track-dock-active .domain-floating-feedback-btn {
  display: grid;
}

@media (max-width: 1100px) {
  .domain-body-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .domain-right-toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .domain-body-grid {
    grid-template-columns: 1fr;
  }

  .domain-left-sidebar {
    position: static;
    max-height: 240px;
  }

  .domain-reading-card {
    padding: 24px 18px;
  }
}

body[data-theme="light"] .code-snippet-box {
  background: #f1f5f9;
  color: #0369a1;
}

.explanation-callout {
  background: var(--panel-2);
  border-left: 3px solid var(--rb-emerald);
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 0.84rem;
  color: var(--soft);
  line-height: 1.5;
}

/* ==========================================================================
   SCREENING (APTITUDE & LOGICAL REASONING) EXACT 3-COLUMN LAYOUT
   ========================================================================== */
.apt-exact-layout {
  display: none;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  box-sizing: border-box;
}

#screeningView.active,
.apt-exact-layout.active {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


/* Top Header Bar */
.apt-header-row {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(10, 13, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.apt-subject-cards {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.apt-home-dashboard {
  width: 100%;
  padding: 22px;
  border: 1px solid #252d38;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(18, 25, 35, 0.96), rgba(13, 18, 26, 0.96));
}

#screeningView .apt-header-row,
#screeningView .apt-body-grid {
  display: none;
}

#screeningView [hidden] {
  display: none !important;
}

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

.apt-home-eyebrow {
  margin: 0 0 6px;
  color: #22c55e;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.apt-home-heading h2 {
  margin: 0;
  color: #f1f5f9;
  font-size: 1.25rem;
}

.apt-home-heading p:not(.apt-home-eyebrow) {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

.apt-home-all-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 10px;
  color: #4ade80;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.apt-home-all-link:hover {
  background: rgba(34, 197, 94, 0.1);
}

.apt-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.apt-home-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #27313e;
  border-radius: 12px;
  background: rgba(9, 13, 19, 0.72);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.apt-home-card:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(20, 33, 28, 0.8);
}

.apt-home-card:focus-visible,
.apt-home-all-link:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 3px;
}

.apt-home-card-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  font-size: 1rem;
  font-weight: 800;
}

.apt-home-card strong,
.apt-home-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apt-home-card strong {
  color: #e2e8f0;
  font-size: 0.84rem;
  line-height: 1.3;
}

.apt-home-card small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.4;
}

.apt-home-arrow {
  color: #64748b;
  font-size: 0.85rem;
}

.apt-home-card {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  min-height: 100%;
  padding: 20px;
  background: #171d26;
}

.apt-home-card:hover {
  transform: none;
}

.apt-home-card-content {
  min-width: 0;
}

.apt-home-card-content h3 {
  margin: 0;
  color: #f1f5f9;
  font-size: 1.05rem;
}

.apt-home-card-content > p {
  margin: 6px 0 14px;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.45;
}

.apt-home-card-links {
  display: grid;
  gap: 3px;
}

.apt-home-topic-btn {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 5px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #e2e8f0;
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.apt-home-topic-btn:hover,
.apt-home-topic-btn:focus-visible {
  outline: none;
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}

.apt-home-topic-btn > span {
  color: #94a3b8;
  font-size: 1.15rem;
}

.apt-home-topic-btn small {
  color: #64748b;
  font-size: 0.7rem;
}

.apt-home-question-bank {
  width: 100%;
  min-height: 420px;
  padding: 22px;
  border: 1px solid #252d38;
  border-radius: 18px;
  background: #10151d;
}

.apt-bank-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #27313e;
}

.apt-bank-back {
  padding: 8px 11px;
  border: 1px solid #334155;
  border-radius: 9px;
  background: #171d26;
  color: #cbd5e1;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.apt-bank-brand {
  color: #4ade80;
  font-size: 0.8rem;
  font-weight: 700;
}

.apt-bank-heading {
  padding: 24px 0 10px;
}

.apt-bank-heading h2 {
  margin: 0;
  color: #f1f5f9;
  font-size: 1.7rem;
}

.apt-bank-heading > p:last-child {
  margin: 7px 0 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

.apt-bank-question-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.apt-bank-question-card {
  padding: 20px;
  border: 1px solid #27313e;
  border-radius: 14px;
  background: #171d26;
}

.apt-bank-question-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 0.75rem;
}

.apt-bank-question-card h3 {
  margin: 14px 0;
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  white-space: pre-line;
}

.apt-bank-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.apt-bank-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #334155;
  border-radius: 9px;
  background: #10151d;
  color: #cbd5e1;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.apt-bank-option:not(:disabled):hover {
  border-color: #22c55e;
}

.apt-bank-option > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  background: #27313e;
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
}

.apt-bank-option.correct {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
}

.apt-bank-option.incorrect {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.apt-bank-explanation {
  margin-top: 13px;
  padding: 13px 15px;
  border-left: 3px solid #64748b;
  border-radius: 0 8px 8px 0;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.55;
}

.apt-bank-explanation.is-correct {
  border-left-color: #22c55e;
}

.apt-bank-explanation.is-incorrect {
  border-left-color: #ef4444;
}

.apt-bank-explanation p {
  margin: 5px 0 0;
  white-space: pre-line;
}

.apt-bank-empty {
  margin-top: 16px;
  padding: 30px;
  border: 1px dashed #334155;
  border-radius: 12px;
  color: #94a3b8;
  text-align: center;
}

body[data-theme="light"] .apt-home-dashboard {
  border-color: #dbe3ec;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

body[data-theme="light"] .apt-home-heading h2,
body[data-theme="light"] .apt-home-card strong {
  color: #0f172a;
}

body[data-theme="light"] .apt-home-heading p:not(.apt-home-eyebrow),
body[data-theme="light"] .apt-home-card small {
  color: #64748b;
}

body[data-theme="light"] .apt-home-card {
  border-color: #e2e8f0;
  background: #ffffff;
}

body[data-theme="light"] .apt-home-card:hover {
  background: #f0fdf4;
}

body[data-theme="light"] .apt-home-card {
  background: #ffffff;
}

body[data-theme="light"] .apt-home-card-content h3,
body[data-theme="light"] .apt-bank-heading h2,
body[data-theme="light"] .apt-bank-question-card h3 {
  color: #0f172a;
}

body[data-theme="light"] .apt-home-topic-btn,
body[data-theme="light"] .apt-bank-option {
  color: #334155;
}

body[data-theme="light"] .apt-home-question-bank,
body[data-theme="light"] .apt-bank-question-card {
  border-color: #e2e8f0;
  background: #ffffff;
}

body[data-theme="light"] .apt-bank-back,
body[data-theme="light"] .apt-bank-option {
  border-color: #cbd5e1;
  background: #f8fafc;
}

body[data-theme="light"] .apt-bank-explanation {
  background: #f8fafc;
  color: #334155;
}

@media (max-width: 1000px) {
  .apt-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .apt-home-dashboard {
    padding: 16px;
  }

  .apt-home-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .apt-home-grid {
    grid-template-columns: 1fr;
  }

  .apt-home-question-bank {
    padding: 16px;
  }

  .apt-bank-options {
    grid-template-columns: 1fr;
  }

  .apt-bank-heading h2 {
    font-size: 1.4rem;
  }
}

.apt-subject-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 12px;
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  font-family: inherit;
}

.apt-subject-card:hover {
  background: #111722;
  border-color: #2b3545;
}

.apt-subject-card.active {
  background: rgba(34, 197, 94, 0.06);
  border-color: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.14);
}

.apt-subject-card .subject-icon-box {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #161d28;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #8b949e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.apt-subject-card.active .subject-icon-box {
  background: #22c55e;
  border-color: #22c55e;
  color: #042410;
}

.apt-subject-card.active .subject-icon-box svg {
  stroke: #042410;
}

/* 3-Column Body Grid */
.apt-body-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: start;
  width: 100%;
}

/* Left Sidebar */
.apt-left-sidebar {
  position: sticky;
  top: 146px;
  height: calc(100vh - 162px);
  max-height: calc(100vh - 162px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 197, 94, 0.3) transparent;
  z-index: 10;
}

.apt-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #6e7681;
  padding: 6px 12px 10px;
  text-transform: uppercase;
}

.apt-group-header .group-count {
  font-size: 0.72rem;
  color: #6e7681;
  font-weight: 700;
}

.apt-topics-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apt-topic-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #94a3b8;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  font-family: inherit;
}

.apt-topic-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.apt-topic-btn.active {
  background: #092816;
  color: #4ade80;
  font-weight: 600;
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

.apt-topic-btn .topic-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.apt-topic-btn .topic-count-badge {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
  flex-shrink: 0;
}

.apt-topic-btn.active .topic-count-badge {
  color: #4ade80;
}

/* Center Reading/Practice Pane */
.apt-center-pane {
  min-width: 0;
  width: 100%;
}

.apt-reading-card {
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 36px 42px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.apt-eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #22c55e;
  text-transform: uppercase;
  margin: 0 0 8px;
}

.apt-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}

.apt-topic-title {
  font-size: 2.35rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0;
}

.apt-q-count {
  font-size: 0.9rem;
  color: #8b949e;
  font-weight: 500;
  white-space: nowrap;
}

.apt-subtitle {
  font-size: 0.92rem;
  color: #6e7681;
  margin: 0 0 24px;
}

/* Mode Switcher Tabs */
.apt-mode-tabs {
  display: inline-flex;
  background: #070a0e;
  border: 1px solid #1e2530;
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 32px;
}

.apt-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #8b949e;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.apt-mode-tab:hover {
  color: #e2e8f0;
}

.apt-mode-tab.active {
  background: #143521;
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.apt-mode-tab svg {
  stroke: currentColor;
}

/* Notes Section Styling */
.apt-section-heading {
  font-size: 1.28rem;
  font-weight: 800;
  color: #22c55e;
  margin: 32px 0 16px;
  scroll-margin-top: 100px;
  letter-spacing: -0.01em;
}

.apt-notes-table-container {
  border: 1px solid #1e2532;
  border-radius: 14px;
  overflow: hidden;
  background: #080b10;
  margin-bottom: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.apt-notes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.apt-notes-table th {
  padding: 14px 20px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #6e7681;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #1e2532;
  background: #090c12;
}

.apt-notes-table td {
  padding: 14px 20px;
  font-size: 0.92rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  line-height: 1.5;
}

.apt-notes-table td:first-child {
  font-weight: 800;
  color: #ffffff;
  width: 150px;
  white-space: nowrap;
}

.apt-notes-table tr:last-child td {
  border-bottom: none;
}

.apt-notes-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.apt-section-summary-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #1e2532;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 24px;
}

.apt-keypoints-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apt-keypoint-item {
  display: flex;
  gap: 10px;
  font-size: 0.92rem;
  color: #cbd5e1;
  line-height: 1.55;
  background: #080b10;
  border: 1px solid #1e2532;
  border-radius: 10px;
  padding: 12px 18px;
}

.apt-keypoint-bullet {
  color: #22c55e;
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
}

/* Practice / Quiz Component in Center */
.apt-quiz-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.apt-quiz-card {
  background: #080b10;
  border: 1px solid #1e2532;
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.apt-quiz-card:hover {
  border-color: #2b3545;
}

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

.apt-quiz-number {
  font-size: 0.78rem;
  font-weight: 800;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  padding: 3px 10px;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.apt-quiz-difficulty {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.apt-quiz-difficulty.easy {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.apt-quiz-difficulty.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

.apt-quiz-difficulty.hard {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.apt-quiz-q-text {
  font-size: 1.02rem;
  font-weight: 600;
  color: #f0f6fc;
  line-height: 1.5;
  margin: 0 0 18px;
  white-space: pre-line;
}

.apt-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.apt-option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0f131a;
  border: 1px solid #1e2532;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  font-family: inherit;
}

.apt-option-btn:hover:not(:disabled) {
  background: #151a24;
  border-color: #3b4556;
  color: #ffffff;
}

.apt-option-letter {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1a202c;
  border: 1px solid #2d3748;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.74rem;
  color: #94a3b8;
  flex-shrink: 0;
}

.apt-option-btn.correct-choice {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: #22c55e !important;
  color: #4ade80 !important;
  font-weight: 600;
}

.apt-option-btn.correct-choice .apt-option-letter {
  background: #22c55e;
  color: #042410;
  border-color: #22c55e;
}

.apt-option-btn.wrong-choice {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
  font-weight: 600;
}

.apt-option-btn.wrong-choice .apt-option-letter {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

.apt-explanation-box {
  background: rgba(34, 197, 94, 0.05);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-left: 3px solid #22c55e;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  white-space: pre-line;
}

.apt-explanation-title {
  font-weight: 800;
  color: #4ade80;
  margin-bottom: 4px;
}

/* Right TOC */
.apt-right-toc {
  position: sticky;
  top: 146px;
  width: 220px;
  flex-shrink: 0;
}

/* Light Theme Overrides for Aptitude Track */
body[data-theme="light"] .apt-header-row {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(0, 0, 0, 0.08);
}

body[data-theme="light"] .apt-subject-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body[data-theme="light"] .apt-subject-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body[data-theme="light"] .apt-subject-card.active {
  background: #f0fdf4;
  border-color: #16a34a;
  box-shadow: 0 0 16px rgba(22, 163, 74, 0.12);
}

body[data-theme="light"] .apt-subject-card.active .subject-icon-box {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

body[data-theme="light"] .apt-subject-card.active .subject-icon-box svg {
  stroke: #ffffff;
}

body[data-theme="light"] .apt-topic-btn {
  color: #64748b;
}

body[data-theme="light"] .apt-topic-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

body[data-theme="light"] .apt-topic-btn.active {
  background: #f0fdf4;
  color: #15803d;
  border-color: #16a34a;
}

body[data-theme="light"] .apt-topic-btn.active .topic-count-badge {
  color: #16a34a;
}

body[data-theme="light"] .apt-reading-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

body[data-theme="light"] .apt-topic-title {
  color: #0f172a;
}

body[data-theme="light"] .apt-mode-tabs {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

body[data-theme="light"] .apt-mode-tab {
  color: #64748b;
}

body[data-theme="light"] .apt-mode-tab.active {
  background: #ffffff;
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.4);
}

body[data-theme="light"] .apt-notes-table-container {
  background: #ffffff;
  border-color: #e2e8f0;
}

body[data-theme="light"] .apt-notes-table th {
  background: #f8fafc;
  color: #475569;
  border-color: #e2e8f0;
}

body[data-theme="light"] .apt-notes-table td {
  color: #334155;
  border-color: #f1f5f9;
}

body[data-theme="light"] .apt-notes-table td:first-child {
  color: #0f172a;
}

body[data-theme="light"] .apt-keypoint-item {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

body[data-theme="light"] .apt-quiz-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body[data-theme="light"] .apt-quiz-q-text {
  color: #0f172a;
}

body[data-theme="light"] .apt-option-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

body[data-theme="light"] .apt-option-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

@media (max-width: 1200px) {
  .apt-body-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .apt-right-toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .apt-body-grid {
    grid-template-columns: 1fr;
  }

  .apt-left-sidebar {
    position: static;
    height: auto;
    max-height: none;
  }

  .apt-options-grid {
    grid-template-columns: 1fr;
  }

  .apt-reading-card {
    padding: 24px 18px;
  }
}


/* ==========================================================================
   PUZZLES TRACK (3-COLUMN READER LAYOUT)
   ========================================================================== */
.puzzles-exact-layout {
  display: none;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  box-sizing: border-box;
}

.puzzles-exact-layout.active {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header Row: Subject Card + Search Box (Sticky Top Bar) */
.puzzles-header-row {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(10, 13, 18, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 10px 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.puzzles-subject-cards {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.puzzles-subject-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px 8px 10px;
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  font-family: inherit;
}

.puzzles-subject-card:hover {
  background: #111722;
  border-color: #2b3545;
}

.puzzles-subject-card.active {
  background: rgba(34, 197, 94, 0.04);
  border-color: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.12);
}

.puzzles-subject-card.active .subject-icon-box {
  background: #22c55e;
  border-color: #22c55e;
  color: #042410;
}

.puzzles-subject-card.active .subject-icon-box svg {
  stroke: #042410;
}

.puzzles-stats-pill {
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 9999px;
  padding: 7px 16px;
  font-size: 0.82rem;
  color: #94a3b8;
}

.puzzles-stats-pill strong {
  color: #22c55e;
}

.puzzles-search-box-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 12px;
  padding: 8px 16px;
  min-width: 300px;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.puzzles-search-box-pill:focus-within {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.puzzles-search-box-pill svg {
  color: #6e7681;
  flex-shrink: 0;
}

.puzzles-search-box-pill input {
  background: transparent;
  border: none;
  outline: none;
  color: #f0f6fc;
  font-size: 0.85rem;
  width: 100%;
  font-family: inherit;
}

.puzzles-search-box-pill input::placeholder {
  color: #6e7681;
}

/* 3-Column Reader Body Grid */
.puzzles-body-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: start;
  width: 100%;
}

/* Left Sidebar: 12 Topics */
.puzzles-left-sidebar {
  position: sticky;
  top: 146px;
  height: calc(100vh - 162px);
  max-height: calc(100vh - 162px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 197, 94, 0.3) transparent;
  z-index: 10;
}

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

.puzzles-left-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

.puzzles-sidebar-group {
  margin-bottom: 18px;
}

.puzzles-sidebar-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.puzzles-sidebar-group-header .group-count {
  font-size: 0.72rem;
  color: #4ade80;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  padding: 2px 7px;
  border-radius: 12px;
}

.puzzles-sidebar-group-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.puzzles-sidebar-topic-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  font-size: 0.86rem;
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.puzzles-sidebar-topic-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.puzzles-sidebar-topic-btn.active {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  font-weight: 600;
  border-color: rgba(34, 197, 94, 0.3);
}

.puzzles-sidebar-topic-btn .topic-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.puzzles-sidebar-topic-btn.active .topic-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* Center Main Reading Pane */
.puzzles-center-pane {
  min-width: 0;
  width: 100%;
}

.puzzles-reading-card {
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 36px 42px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.puzzles-topic-lead-intro {
  font-size: 1.02rem;
  color: #cbd5e1;
  line-height: 1.68;
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.puzzle-article-block {
  margin-bottom: 48px;
  scroll-margin-top: 100px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.puzzle-article-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.puzzle-article-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.puzzle-h2-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.puzzle-meta-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.puzzle-badge-diff {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.puzzle-badge-diff.easy {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.puzzle-badge-diff.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.puzzle-badge-diff.hard {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.puzzle-badge-company {
  font-size: 0.74rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 6px;
}

.btn-puzzle-mark-solve {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-puzzle-mark-solve:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: #4ade80;
}

.btn-puzzle-mark-solve.is-solved {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #4ade80;
}

/* Puzzle Graphic / Illustration Card */
.puzzle-graphic-card {
  background: #fdf6e2;
  border: 1px solid #e2d3b3;
  border-radius: 16px;
  padding: 24px 28px;
  margin: 18px 0 24px;
  color: #1e293b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.puzzle-graphic-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.puzzle-graphic-subtitle {
  font-size: 0.96rem;
  font-weight: 500;
  color: #334155;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 20px;
  line-height: 1.45;
}

.puzzle-bottles-row {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.puzzle-bottle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.puzzle-bottle-svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.puzzle-bottle-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
  margin-top: 4px;
}

.puzzle-dots-sep {
  font-size: 1.6rem;
  font-weight: 900;
  color: #475569;
  letter-spacing: 0.15em;
  align-self: center;
  padding: 0 4px;
}

.puzzle-skull-bubble {
  position: absolute;
  top: -26px;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.85rem;
  color: #0f172a;
}

/* Problem Statement & Body */
.puzzle-statement-text {
  font-size: 1rem;
  color: #e2e8f0;
  line-height: 1.68;
  margin: 0 0 20px;
}

.puzzle-algo-connection-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: #4ade80;
}

/* Puzzle Reveal Actions */
.puzzle-actions-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
}

.btn-puzzle-reveal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-puzzle-reveal:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.btn-puzzle-reveal.btn-sol {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.btn-puzzle-reveal.btn-sol:hover {
  background: rgba(34, 197, 94, 0.22);
}

.btn-puzzle-reveal.active-reveal {
  background: #22c55e;
  color: #042410;
  border-color: #22c55e;
}

.puzzle-drawer-box {
  margin-top: 14px;
  border-radius: 12px;
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
}

.drawer-inner-hint {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 0.92rem;
  color: #fde68a;
  line-height: 1.6;
}

.drawer-inner-sol {
  background: #06090e;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.65;
}

.drawer-inner-sol pre {
  margin: 12px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  color: #f1f5f9;
}

/* Right Sidebar: TOC */
.puzzles-right-toc {
  position: sticky;
  top: 146px;
  height: fit-content;
  max-height: calc(100vh - 162px);
  overflow-y: auto;
  z-index: 10;
}

.puzzles-toc-sticky-box {
  padding: 10px 0;
}

.puzzles-toc-item-link {
  display: block;
  font-size: 0.82rem;
  color: #94a3b8;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1.35;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.puzzles-toc-item-link:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.04);
}

.puzzles-toc-item-link.active {
  color: #4ade80;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.08);
}

/* Responsive Grid for Puzzles */
@media (max-width: 1200px) {
  .puzzles-body-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .puzzles-right-toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .puzzles-body-grid {
    grid-template-columns: 1fr;
  }

  .puzzles-left-sidebar {
    position: static;
    height: auto;
    max-height: 280px;
  }

  .puzzles-reading-card {
    padding: 24px 18px;
  }
}

/* ==========================================================================
   INTERVIEW EXPERIENCES TRACK (EXACT SCREENSHOT LAYOUT)
   ========================================================================== */
.interview-exact-layout {
  display: none;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  box-sizing: border-box;
}

.interview-exact-layout.active {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* 1. Top Hero Section */
.interview-hero-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem 2.2rem;
  background: radial-gradient(circle at 50% 20%, rgba(34, 197, 94, 0.12) 0%, rgba(6, 9, 14, 0) 70%);
  border-radius: 24px;
  margin-bottom: 0.5rem;
}

.interview-hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 1.25rem;
}

.interview-hero-h1 {
  font-size: 2.85rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.interview-hero-h1 .emerald-highlight {
  color: #22c55e;
}

.interview-hero-sub {
  font-size: 1.05rem;
  color: #94a3b8;
  max-width: 720px;
  line-height: 1.6;
  margin: 0 0 1.75rem;
}

.interview-hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1.75rem;
}

.interview-hero-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #cbd5e1;
}

.btn-share-experience-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: #22c55e;
  border: 1px solid #16a34a;
  border-radius: 9999px;
  color: #042410;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-share-experience-cta:hover {
  background: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(34, 197, 94, 0.5);
}

/* 2. Search & Filters Toolbar */
.interview-toolbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 14px;
  padding: 10px 16px;
  width: 100%;
}

.interview-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

.interview-search-input-wrap svg {
  color: #64748b;
  flex-shrink: 0;
}

.interview-search-input-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 0.9rem;
  width: 100%;
  font-family: inherit;
}

.interview-search-input-wrap input::placeholder {
  color: #64748b;
}

.interview-filters-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.interview-pill-group {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.interview-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.interview-filter-chip:hover {
  color: #e2e8f0;
}

.interview-filter-chip.active {
  background: #22c55e;
  color: #042410;
  font-weight: 700;
}

.interview-filter-v-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 2px;
}

/* 3. Subheader Count & Sort Row */
.interview-subbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 4px;
  margin-top: 4px;
}

.interview-count-badge {
  font-size: 0.88rem;
  font-weight: 700;
  color: #cbd5e1;
}

.interview-sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #64748b;
}

.interview-sort-chip {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.interview-sort-chip.active {
  background: rgba(34, 197, 94, 0.15);
  border-color: #22c55e;
  color: #4ade80;
}

/* 4. Experience Cards Grid (3 Columns) */
.interview-grid-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

@media (max-width: 1100px) {
  .interview-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .interview-grid-container {
    grid-template-columns: 1fr;
  }
}

.interview-exp-card {
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.interview-exp-card:hover {
  border-color: rgba(34, 197, 94, 0.45);
  background: #0c1219;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.interview-exp-card:hover .exp-card-headline {
  color: #4ade80;
}

/* Card Header */
.exp-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.exp-company-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.exp-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  font-weight: 800;
  font-size: 1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.exp-company-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.exp-company-name {
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
}

.exp-role-name {
  font-size: 0.78rem;
  color: #94a3b8;
}

.exp-verdict-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.exp-verdict-tag.selected {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.exp-verdict-tag.rejected {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.exp-verdict-tag.pending {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

/* Card Meta Tags */
.exp-card-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.exp-tag-diff {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: capitalize;
}

.exp-tag-diff.medium {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.exp-tag-diff.easy {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.exp-tag-diff.hard {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.exp-tag-rounds {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
}

.exp-card-headline {
  font-size: 0.96rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.42;
  margin: 0 0 8px;
  transition: color 0.15s ease;
}

.exp-card-excerpt {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 5. Detail Modal & Share Modal */
.interview-detail-modal-card {
  position: relative;
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 20px;
  width: 90%;
  max-width: 780px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.share-exp-modal-card {
  position: relative;
  background: #090d12;
  border: 1px solid #1e2530;
  border-radius: 20px;
  width: 90%;
  max-width: 680px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.share-exp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {

  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #cbd5e1;
}

.form-input,
.form-select,
.form-textarea {
  background: #04070a;
  border: 1px solid #1e2530;
  border-radius: 10px;
  padding: 10px 14px;
  color: #f1f5f9;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.btn-cancel-modal {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit-exp {
  padding: 10px 22px;
  background: #22c55e;
  border: 1px solid #16a34a;
  border-radius: 10px;
  color: #042410;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-submit-exp:hover {
  background: #4ade80;
}

/* ==========================================================================
   ONLINE CODE COMPILER & LOGIC PLAYGROUND STYLES (LEETCODE THEME)
   ========================================================================== */
.compiler-backdrop {
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 7, 13, 0.88);
  backdrop-filter: blur(10px);
}

.compiler-backdrop.is-fullscreen-active {
  padding: 0 !important;
}

.compiler-modal-card {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: 92vh;
  max-height: 920px;
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transition: max-width 0.2s ease, max-height 0.2s ease, border-radius 0.2s ease;
}

.compiler-modal-card.is-fullscreen {
  max-width: 100vw !important;
  max-height: 100vh !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
}

.compiler-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #282828;
  background: #202020;
  gap: 16px;
  flex-wrap: wrap;
}

.compiler-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 200px;
}

.compiler-header-brand {
  font-size: 0.95rem;
  font-weight: 800;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
  padding-right: 4px;
}

.problem-card-heading {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a2a;
}

.problem-main-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: #f5f5f5;
  line-height: 1.35;
}

.compiler-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #f5f5f5;
  margin: 0;
  white-space: normal;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 580px;
  letter-spacing: -0.01em;
}

.compiler-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

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

.compiler-badge.medium {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.compiler-badge.hard {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.compiler-phase-tag {
  font-size: 0.76rem;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.compiler-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Zoom Controls */
.compiler-zoom-group {
  display: inline-flex;
  align-items: center;
  background: #141414;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  padding: 2px 4px;
  gap: 2px;
}

.compiler-btn-icon {
  width: 32px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #d4d4d4;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.compiler-btn-icon:hover {
  background: #282828;
  color: #38bdf8;
}

.zoom-level-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9ca3af;
  min-width: 38px;
  text-align: center;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

.compiler-select {
  padding: 6px 12px;
  border-radius: 8px;
  background: #141414;
  border: 1px solid #2e2e2e;
  color: #f3f4f6;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s ease;
}

.compiler-select:focus {
  border-color: #22c55e;
}

.compiler-btn-outline {
  padding: 6px 13px;
  border-radius: 8px;
  background: #141414;
  border: 1px solid #2e2e2e;
  color: #d1d5db;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.compiler-btn-outline:hover {
  background: #262626;
  color: #ffffff;
  border-color: #404040;
}

.compiler-btn-outline.btn-mark-solved.is-solved {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

.compiler-close-btn {
  background: #141414 !important;
  border: 1px solid #2e2e2e !important;
  color: #9ca3af !important;
  font-size: 1rem !important;
  border-radius: 8px !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.compiler-close-btn:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

/* 2-Column Split Workspace with Drag Resizers */
.compiler-workspace {
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

@media (max-width: 860px) {
  .compiler-workspace {
    flex-direction: column;
  }
}

/* Left Pane */
.compiler-left-pane {
  width: 440px;
  min-width: 220px;
  max-width: 75%;
  flex-shrink: 0;
  background: #181818;
  border-right: 1px solid #262626;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* Horizontal Resizer (Left vs Right) */
.compiler-resizer-h {
  width: 8px;
  cursor: col-resize;
  background: #121212;
  border-left: 1px solid #242424;
  border-right: 1px solid #242424;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  z-index: 10;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.compiler-resizer-h:hover,
.compiler-resizer-h.is-active-resizing {
  background: rgba(34, 197, 94, 0.25);
  border-color: #22c55e;
}

.resizer-handle-bar {
  width: 3px;
  height: 36px;
  border-radius: 4px;
  background: #3f3f46;
  transition: background 0.15s ease, height 0.15s ease;
}

.compiler-resizer-h:hover .resizer-handle-bar,
.compiler-resizer-h.is-active-resizing .resizer-handle-bar {
  background: #22c55e;
  height: 48px;
}

@media (max-width: 860px) {
  .compiler-resizer-h {
    display: none;
  }

  .compiler-left-pane {
    width: 100% !important;
    height: 280px;
    border-bottom: 1px solid #262626;
  }
}

/* Right Pane: Editor & Output */
.compiler-right-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 280px;
  min-height: 0;
  background: #121212;
  overflow: hidden;
}

/* Vertical Resizer (Editor vs Terminal) */
.compiler-resizer-v {
  height: 8px;
  cursor: row-resize;
  background: #121212;
  border-top: 1px solid #242424;
  border-bottom: 1px solid #242424;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  z-index: 10;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.compiler-resizer-v:hover,
.compiler-resizer-v.is-active-resizing {
  background: rgba(34, 197, 94, 0.25);
  border-color: #22c55e;
}

.resizer-handle-bar-v {
  width: 36px;
  height: 3px;
  border-radius: 4px;
  background: #3f3f46;
  transition: background 0.15s ease, width 0.15s ease;
}

.compiler-resizer-v:hover .resizer-handle-bar-v,
.compiler-resizer-v.is-active-resizing .resizer-handle-bar-v {
  background: #22c55e;
  width: 48px;
}

.compiler-tabs-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #262626;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.compiler-tab-btn {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #9ca3af;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.compiler-tab-btn:hover {
  color: #f3f4f6;
  background: #242424;
}

.compiler-tab-btn.active {
  background: #242424;
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.35);
}

.compiler-tab-content {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
}

.compiler-tab-content.active {
  display: flex;
}

.compiler-desc-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 4px;
}

/* LeetCode Style Problem Presentation */
.problem-statement-box {
  background: #202020;
  border: 1px solid #2c2c2c;
  border-left: 4px solid #22c55e;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.problem-statement-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f3f4f6;
  line-height: 1.65;
  margin: 0;
  letter-spacing: 0.01em;
  white-space: pre-wrap;
}

.problem-pattern-preview-card {
  background: #1e1e1e;
  border: 1px solid #333333;
  border-left: 4px solid #38bdf8;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pattern-preview-header {
  font-size: 0.85rem;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pattern-visual-block {
  margin: 0;
  background: #121212;
  color: #a3e635;
  border: 1px solid #282828;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: pre-wrap;
  letter-spacing: 0.08em;
  overflow-x: auto;
}

.problem-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9ca3af;
  margin-top: 6px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.problem-example-card {
  background: #202020;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
}

.problem-example-card .example-title {
  font-weight: 800;
  color: #38bdf8;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.problem-example-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.problem-example-row .row-tag {
  font-weight: 800;
  color: #9ca3af;
  min-width: 65px;
}

.problem-example-row code,
.problem-example-row pre {
  background: #141414;
  color: #67e8f9;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #282828;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  margin: 0;
  white-space: pre-wrap;
  flex: 1;
}

.problem-tip-box {
  background: #242218;
  border: 1px solid #3d3419;
  border-left: 4px solid #eab308;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: #fde68a;
  line-height: 1.5;
}

.problem-tip-box strong {
  color: #fbbf24;
}

.compiler-stdin-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
}

.stdin-helper-text {
  font-size: 0.85rem;
  color: #9ca3af;
  line-height: 1.5;
  margin: 0;
}

.stdin-helper-text code {
  background: #242424;
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
}

.compiler-stdin-area {
  width: 100%;
  flex: 1;
  min-height: 160px;
  background: #202020;
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  color: #f3f4f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  padding: 14px;
  resize: none;
  outline: none;
  transition: border-color 0.15s ease;
}

.compiler-stdin-area:focus {
  border-color: #22c55e;
}

/* Right Pane: Editor & Output */
.compiler-right-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #121212;
}

.compiler-editor-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-bottom: 1px solid #242424;
}

.editor-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #242424;
  font-size: 0.8rem;
  color: #9ca3af;
  gap: 12px;
}

.editor-left-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-lang-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #f3f4f6;
  font-size: 0.82rem;
}

.editor-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #242424;
  border: 1px solid #333333;
  color: #d1d5db;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-sub-btn:hover {
  background: #333333;
  color: #ffffff;
  border-color: #38bdf8;
}

.editor-tip {
  font-size: 0.76rem;
  color: #6b7280;
}

.editor-tip b {
  color: #9ca3af;
}

.editor-container {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  background: #1e1e1e;
}

.editor-line-numbers {
  width: 48px;
  padding: 14px 12px 14px 0;
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Fira Code", monospace;
  font-size: 15px;
  line-height: 1.55;
  color: #6e7681;
  background: #1e1e1e;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  user-select: none;
  overflow: hidden;
  white-space: pre-line;
  transition: font-size 0.1s ease;
}

.editor-code-layer {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #1e1e1e;
}

.compiler-highlight-pre,
.compiler-code-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 14px 16px;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Fira Code", monospace;
  font-size: 15px;
  line-height: 1.55;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
  border: none;
  outline: none;
  border-radius: 0;
  transition: font-size 0.1s ease;
}

.compiler-highlight-pre {
  pointer-events: none;
  background: #1e1e1e;
  color: #d4d4d4;
  z-index: 1;
}

.compiler-highlight-code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  tab-size: inherit;
  display: block;
}

.compiler-code-area {
  z-index: 2;
  background: transparent;
  color: transparent;
  caret-color: #569cd6;
  resize: none;
  -webkit-text-fill-color: transparent;
}

/* LeetCode / VS Code Dark+ Syntax Highlighting Theme */
.token-keyword {
  color: #569cd6;
  font-weight: 600;
}

/* Blue: class, public, private, int, void, return, if, for, def */
.token-type {
  color: #4ec9b0;
  font-weight: 600;
}

/* Teal: Solution, vector, string, ListNode, Scanner, Map, List */
.token-string {
  color: #ce9178;
}

/* Terra cotta: "hello", 'a' */
.token-number {
  color: #b5cea8;
}

/* Light sage green: 123, 0, 3.14 */
.token-comment {
  color: #6a9955;
  font-style: italic;
}

/* VS Code green: // comment, # comment */
.token-builtin {
  color: #dcdcaa;
  font-weight: 500;
}

/* Pale yellow: cout, cin, printf, print, System.out */
.token-operator {
  color: #d4d4d4;
}

/* White / Light grey: +, -, *, &, <, >, = */
.token-punctuation {
  color: #d4d4d4;
}

/* White / Light grey: ;, ,, (, ), {, }, [, ] */
.token-preprocessor {
  color: #9cdcfe;
  font-weight: 600;
}

/* Light blue: #include, #define */

/* Bottom Output Terminal */
.compiler-bottom-pane {
  height: 220px;
  display: flex;
  flex-direction: column;
  background: #181818;
}

.compiler-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #242424;
}

.execution-meta {
  font-size: 0.84rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exec-running {
  color: #f59e0b;
  font-weight: 700;
}

.exec-success {
  color: #22c55e;
  font-weight: 700;
}

.exec-error {
  color: #ef4444;
  font-weight: 700;
}

.action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compiler-btn-run {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}

.compiler-btn-run:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.45);
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.compiler-btn-run:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.compiler-terminal-box {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
  background: #121212;
}

.compiler-stdout {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e5e7eb;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: text;
}

.term-muted {
  color: #64748b;
  font-style: italic;
}

.term-error {
  color: #f87171;
  font-weight: 700;
}

/* Problem Row Launch Button */
.compiler-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, 0.15) !important;
  color: #c084fc !important;
  border: 1px solid rgba(139, 92, 246, 0.35) !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

.compiler-link-btn:hover {
  background: rgba(139, 92, 246, 0.3) !important;
  color: #ffffff !important;
  border-color: #8b5cf6 !important;
  transform: translateY(-1px);
}

.date-sheet-badge.logic-building {
  background: rgba(139, 92, 246, 0.15);
  color: #a855f7;
  border-color: rgba(139, 92, 246, 0.3);
}

/* Floating Feedback & Help Button */
.app-floating-feedback-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #22c55e;
  color: #042410;
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-floating-feedback-btn:hover {
  background: #16a34a;
  color: #ffffff;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.55);
}

body[data-theme="light"] .app-floating-feedback-btn {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35);
}

body[data-theme="light"] .app-floating-feedback-btn:hover {
  background: #15803d;
  box-shadow: 0 12px 28px rgba(22, 163, 74, 0.5);
}
