:root {
  --bg: #f1f6fa;
  --hero-bg-start: #e5f2fa;
  --hero-bg-end: #effaf5;
  --surface: #ffffff;
  --surface-2: #edf2f7;
  --surface-3: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border: #cbd5e1;
  --primary: #14532d;
  --primary-mid: #166534;
  --primary-hover: #0f3f22;
  --primary-soft: #dcfce7;
  --brand-red: #dc2626;
  --accent-red: #e11d48;
  --accent-red-soft: #ffe4e6;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --key-bg: #ffffff;
  --key-border: #cbd5e1;
  --key-shadow: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --font-bn: 'Noto Sans Bengali', 'Hind Siliguri', 'Kohinoor Bangla', 'Bangla Sangam MN', sans-serif;
  --font-en: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0b1120;
  --hero-bg-start: #0f172a;
  --hero-bg-end: #0f2922;
  --surface: #131c31;
  --surface-2: #1c2841;
  --surface-3: #263554;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-soft: #64748b;
  --border: #293856;
  --primary: #10b981;
  --primary-mid: #059669;
  --primary-hover: #047857;
  --primary-soft: rgba(16, 185, 129, 0.16);
  --brand-red: #f87171;
  --accent-red: #fb7185;
  --accent-red-soft: rgba(251, 113, 133, 0.16);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.15);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.15);
  --key-bg: #19243b;
  --key-border: #334155;
  --key-shadow: #090e1a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 26px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-bn), var(--font-en);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.15rem;
}

.hidden {
  display: none !important;
}

/* ===================================================================== */
/* Topbar & BijoyCharaLikho Brand Logo                                   */
/* ===================================================================== */
.topbar {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

[data-theme="dark"] .topbar {
  background: rgba(19, 28, 49, 0.92);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand-window-icon {
  width: 42px;
  height: 38px;
  border: 2px solid #334155;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

.bw-topbar {
  height: 9px;
  background: #93c5fd;
  border-bottom: 1.5px solid #334155;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 4px;
}

.bw-topbar i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: inline-block;
}

.bw-topbar i:nth-child(1) { background: #ef4444; }
.bw-topbar i:nth-child(2) { background: #f59e0b; }
.bw-topbar i:nth-child(3) { background: #10b981; }

.bw-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.bw-char {
  font-family: var(--font-bn);
  font-weight: 800;
  font-size: 1.15rem;
  color: #1e293b;
  line-height: 1;
}

.bw-pen {
  transform: rotate(-8deg);
}

.brand-wordmark {
  font-family: var(--font-en);
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.bw-green {
  color: #146c43;
}

[data-theme="dark"] .bw-green {
  color: #34d399;
}

.bw-red {
  color: var(--brand-red);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.nav-link {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  padding: 0.38rem 0.72rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link-highlight {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(20, 83, 45, 0.2);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.live-counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(20, 83, 45, 0.2);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

/* ===================================================================== */
/* HERO SECTION (Matching user's exact design & cutout illustration)     */
/* ===================================================================== */
.hero-section {
  background: linear-gradient(135deg, var(--hero-bg-start) 0%, #f5fbfd 52%, var(--hero-bg-end) 100%);
  border-bottom: 1px solid var(--border);
  padding: 1.8rem 0 2.1rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr;
  align-items: center;
  gap: 2rem;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-pill-badge {
  display: inline-block;
  background: #bbf7d0;
  color: #14532d;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.34rem 1rem;
  border-radius: 999px;
  margin-bottom: 0.95rem;
  box-shadow: 0 2px 6px rgba(20, 83, 45, 0.08);
}

.hero-title-bn {
  font-family: var(--font-bn);
  font-size: clamp(1.95rem, 3.3vw, 2.75rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.22;
  margin-bottom: 0.25rem;
}

.hero-title-en {
  font-family: var(--font-en);
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.24;
  margin-bottom: 0.95rem;
}

.hero-subtitle-bn {
  font-family: var(--font-bn);
  font-size: clamp(1.18rem, 1.8vw, 1.48rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.38;
  margin-bottom: 0.45rem;
}

.hero-subtitle-en {
  font-family: var(--font-en);
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 1.35rem;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.hero-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.55rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-align: center;
  line-height: 1.2;
}

.hero-btn:hover {
  transform: translateY(-2px);
}

.hero-btn-primary {
  background: linear-gradient(180deg, #1f6f43 0%, #14532d 100%);
  color: #ffffff;
  border: 2px solid #14532d;
  box-shadow: 0 8px 20px rgba(20, 83, 45, 0.28);
}

.hero-btn-primary:hover {
  background: linear-gradient(180deg, #166534 0%, #0f3f22 100%);
}

.hero-btn-outline {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border: 2px solid #1f6f43;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .hero-btn-outline {
  background: var(--surface);
  border-color: var(--primary);
}

.hero-btn-tutor {
  background: var(--surface);
  color: var(--primary);
  border: 2px dashed var(--primary);
}

.hero-btn-main {
  font-family: var(--font-bn);
  font-size: 1.08rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-btn-sub {
  font-family: var(--font-en);
  font-size: 0.78rem;
  opacity: 0.9;
  font-weight: 500;
}

.hero-trust-pills {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-en);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(226, 238, 234, 0.85);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 83, 45, 0.15);
}

[data-theme="dark"] .trust-pill {
  background: var(--surface-2);
}

.trust-check {
  color: #15803d;
  font-weight: 800;
}

.hero-artwork-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-artwork-frame {
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(203, 213, 225, 0.8);
}

.hero-illustration-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===================================================================== */
/* Buttons & Common Controls                                             */
/* ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.btn:hover:not(:disabled) {
  background: var(--surface-3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-mid);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-accent {
  background: #e11d48;
  color: #ffffff;
}

.btn-accent:hover:not(:disabled) {
  background: #be123c;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-icon {
  padding: 0.45rem;
  border-color: var(--border);
  background: var(--surface);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.32rem 0.7rem;
}

/* Main Content */
.main-content {
  flex: 1;
  padding-top: 1.15rem;
  padding-bottom: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

/* Controls Card */
.controls-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.05rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.control-group-grow {
  flex: 1;
  min-width: 210px;
}

.control-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.segmented {
  display: inline-flex;
  background: var(--surface-2);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.68rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.select-input {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.42rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.select-input:focus {
  border-color: var(--primary);
}

.passage-select-wrap {
  display: flex;
  gap: 0.35rem;
}

.passage-select-wrap .select-input {
  flex: 1;
}

.controls-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.subrow-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}

.checkbox-pill input[type="checkbox"] {
  accent-color: var(--primary);
  cursor: pointer;
}

.select-inline {
  font-family: inherit;
  font-size: 0.79rem;
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.custom-passage-box {
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.custom-passage-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.custom-passage-row textarea {
  flex: 1;
  font-family: var(--font-bn), var(--font-en);
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

/* ===================================================================== */
/* BIJOY EKUSHE INTERACTIVE TUTOR SECTION                                */
/* ===================================================================== */
.tutor-card {
  background: var(--surface);
  border: 2px solid var(--primary-mid);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.tutor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.tutor-main-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.tutor-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.tutor-lesson-picker {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tutor-tip-banner {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(20, 83, 45, 0.25);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.86rem;
  font-weight: 500;
}

.tutor-char-track {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  background: var(--surface-2);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tutor-char-box {
  min-width: 44px;
  height: 44px;
  padding: 0 0.55rem;
  border-radius: 8px;
  background: #fef3c7;
  color: #78350f;
  border: 1px solid #f59e0b;
  font-size: 1.25rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}

[data-theme="dark"] .tutor-char-box {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #475569;
}

.tutor-char-box:hover {
  transform: translateY(-2px);
}

.tutor-char-box.t-active {
  background: #16a34a;
  color: #ffffff;
  border-color: #15803d;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.tutor-char-box.t-done {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: var(--ok);
  opacity: 0.65;
}

.tutor-stage-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  align-items: stretch;
}

.tutor-target-Spotlight {
  background: var(--surface-2);
  border: 2px solid var(--primary-mid);
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tutor-big-char {
  font-size: 3.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  margin: 0.25rem 0;
}

.tutor-progress-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tutor-instruction-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

.tutor-shortcut-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.tutor-info-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tutor-pills-lg .k-pill {
  font-size: 0.95rem;
  padding: 0.24rem 0.6rem;
}

.tutor-finger-badge {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.tutor-practice-output-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.tutor-output-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tutor-completed-output {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ok);
  letter-spacing: 0.08em;
}

.tutor-status-alert {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.tutor-status-ready {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok);
}

.tutor-status-error {
  background: var(--accent-red-soft);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
  animation: shake 0.25s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Bilingual Banner */
.bilingual-banner {
  background: var(--primary-soft);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.bilingual-steps {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.bi-step {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  opacity: 0.65;
}

.bi-step.active {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.bi-step.done {
  opacity: 1;
  border-color: var(--ok);
}

.bi-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-mid);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bi-step small {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.bi-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Live Metrics Bar */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.65rem;
}

.metric-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-timer {
  border-left: 4px solid var(--primary-mid);
}

.metric-timer.timer-urgent {
  border-left-color: var(--accent-red);
  background: var(--accent-red-soft);
}

.metric-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.2;
}

.metric-accent {
  color: var(--primary);
}

.metric-danger {
  color: var(--accent-red);
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-soft);
  font-weight: 600;
}

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

/* Workspace Card */
.workspace-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.passage-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.passage-lang-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
}

.passage-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.passage-word-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mac-os-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  background: var(--ok-soft);
  color: var(--ok);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
}

/* Target Display */
.target-display {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  font-size: 1.32rem;
  line-height: 2;
  max-height: 210px;
  overflow-y: auto;
  user-select: none;
  scroll-behavior: smooth;
}

.t-word {
  display: inline-block;
  padding: 0.04rem 0.24rem;
  margin: 0 0.06rem;
  border-radius: 5px;
  transition: background 0.1s ease;
}

.t-word.w-current {
  background: var(--primary-soft);
  outline: 2px solid var(--primary-mid);
  font-weight: 600;
}

.t-word.w-current.w-err-live {
  background: var(--accent-red-soft);
  outline-color: var(--accent-red);
  color: var(--accent-red);
}

.t-word.w-done-ok {
  color: var(--ok);
}

.t-word.w-done-err {
  background: var(--accent-red-soft);
  color: var(--accent-red);
  text-decoration: underline wavy var(--accent-red);
}

.exam-mode-target .t-word.w-done-ok,
.exam-mode-target .t-word.w-done-err {
  color: var(--text-muted);
  background: transparent;
  text-decoration: none;
}

/* Key Hint Bar */
.key-hint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  flex-wrap: wrap;
}

.hint-word-box,
.hint-keys-box,
.hint-next-box {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.hint-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.hint-current-word {
  font-size: 1.1rem;
  color: var(--primary);
  padding: 0.05rem 0.45rem;
  background: var(--surface);
  border-radius: 5px;
  border: 1px solid var(--border);
}

.hint-key-pills {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
}

.k-pill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.14rem 0.45rem;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.k-pill .k-bn {
  font-family: var(--font-bn);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.k-pill.k-done {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
  opacity: 0.75;
}

.k-pill.k-active {
  background: var(--primary-mid);
  border-color: var(--primary-mid);
  color: #ffffff;
  font-weight: 700;
  transform: scale(1.05);
}

.k-pill.k-active .k-bn {
  color: #e2e8f0;
}

.hint-next-pill {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid var(--warn);
}

/* Typing Textarea */
.input-area-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.typing-input {
  width: 100%;
  font-family: var(--font-bn), var(--font-en);
  font-size: 1.32rem;
  line-height: 1.85;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.typing-input:focus {
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.typing-input.input-error {
  border-color: var(--accent-red);
}

.input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.input-status {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Virtual Keyboard */
.keyboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem 1rem;
  box-shadow: var(--shadow-sm);
}

.keyboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.keyboard-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.keyboard-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.keyboard-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.swatch-next {
  background: var(--primary-mid);
}

.swatch-shift {
  background: var(--warn);
}

.swatch-pressed {
  background: var(--text);
}

.keyboard-quick-rules {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.virtual-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: none;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kb-row {
  display: grid;
  grid-template-columns: repeat(60, minmax(0, 1fr));
  gap: 5px;
  min-width: 740px;
}

.kb-key {
  background: var(--key-bg);
  border: 1px solid var(--key-border);
  border-bottom: 3px solid var(--key-shadow);
  border-radius: 6px;
  height: 48px;
  padding: 3px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.06s ease, background 0.1s ease;
}

.kb-key-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  line-height: 1;
}

.kb-en {
  font-family: var(--font-mono);
  color: var(--text-soft);
  font-weight: 600;
}

.kb-bn-shift {
  color: var(--accent-red);
  font-weight: 600;
  font-size: 0.82rem;
}

.kb-key-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  line-height: 1.1;
}

.kb-bn-norm {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.kb-key.kb-mod {
  justify-content: center;
  align-items: center;
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
}

.kb-key.kb-next {
  background: var(--primary-mid);
  border-color: var(--primary-hover);
  color: #ffffff;
}

.kb-key.kb-next .kb-en,
.kb-key.kb-next .kb-bn-norm,
.kb-key.kb-next .kb-bn-shift {
  color: #ffffff;
}

.kb-key.kb-shift-needed {
  background: var(--warn);
  border-color: var(--warn);
  color: #ffffff;
}

.kb-key.kb-pressed {
  transform: translateY(2px);
  border-bottom-width: 1px;
  filter: brightness(0.92);
}

/* Result Card */
.result-card {
  background: var(--surface);
  border: 2px solid var(--primary-mid);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.9rem;
  flex-wrap: wrap;
}

.result-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
}

.result-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 0.15rem;
}

.result-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.result-badges-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.verdict-badge {
  font-size: 1rem;
  font-weight: 700;
  padding: 0.45rem 1rem;
  border-radius: 8px;
}

.verdict-pass {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok);
}

.verdict-fail {
  background: var(--accent-red-soft);
  color: var(--accent-red);
  border: 1px solid var(--accent-red);
}

.percentile-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid var(--warn);
}

.bilingual-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.85rem;
  background: var(--surface-2);
  padding: 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.bi-card {
  background: var(--surface);
  padding: 0.75rem 0.95rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.result-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.result-stat-card.primary-stat {
  background: var(--primary-soft);
  border-color: var(--primary-mid);
}

.r-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.r-big {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
}

.primary-stat .r-big {
  color: var(--primary);
}

.r-danger {
  color: var(--accent-red);
}

.r-unit {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.formula-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
}

.formula-col h4 {
  font-size: 0.86rem;
  margin-bottom: 0.3rem;
  color: var(--primary);
}

.formula-math {
  margin-top: 0.2rem;
  color: var(--text-muted);
}

.sub-heading {
  font-size: 0.96rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.mistake-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.55rem;
}

.mistake-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  font-size: 0.86rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mistake-words {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.m-wrong {
  color: var(--accent-red);
  text-decoration: line-through;
}

.m-correct {
  color: var(--ok);
  font-weight: 700;
  font-size: 1rem;
}

.m-keys {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.diff-legend {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.diff-tag {
  font-size: 0.75rem;
  padding: 0.14rem 0.5rem;
  border-radius: 5px;
  font-weight: 600;
}

.diff-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.diff-sub {
  background: var(--accent-red-soft);
  color: var(--accent-red);
}

.diff-del {
  background: var(--warn-soft);
  color: var(--warn);
}

.diff-ins {
  background: var(--surface-3);
  color: var(--text-muted);
}

.result-diff-view {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  line-height: 1.95;
  max-height: 220px;
  overflow-y: auto;
}

.d-word {
  display: inline-block;
  padding: 0.05rem 0.3rem;
  margin: 0.08rem;
  border-radius: 4px;
}

.result-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ===================================================================== */
/* POST-TEST CONDITIONAL POPUP AD MODAL                                  */
/* ===================================================================== */
.ad-modal-card {
  max-width: 680px;
  overflow: hidden;
  border: 2px solid var(--primary-mid);
}

.ad-modal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.ad-meta-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ad-type-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid var(--warn);
}

.ad-sponsor-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.ad-modal-body {
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ad-completed-notice {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
}

.ad-media-stage {
  width: 100%;
  min-height: 220px;
  background: #0f172a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.ad-video-player,
.ad-video-canvas,
.ad-banner-img {
  width: 100%;
  max-height: 310px;
  display: block;
  object-fit: cover;
}

.ad-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ad-headline-text {
  font-size: 0.95rem;
}

.ad-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ===================================================================== */
/* SEO Guide Cards                                                       */
/* ===================================================================== */
.seo-guide-section {
  margin-top: 0.5rem;
}

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

.seo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.seo-card h2 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.seo-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.seo-list {
  padding-left: 1.1rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.modal-lg {
  max-width: 980px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.1rem;
}

.modal-body {
  padding: 1.1rem 1.2rem;
  overflow-y: auto;
}

.guide-search-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  background: var(--surface-2);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.jukto-live-result {
  font-size: 0.92rem;
  min-height: 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1rem;
}

.guide-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
  color: var(--primary);
}

.guide-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--border);
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.guide-table th {
  background: var(--surface-2);
  font-weight: 700;
}

.guide-table code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.jukto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.5rem;
}

.jukto-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.jukto-char {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.jukto-parts {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.jukto-keys {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.modal-footer-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.95rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ===================================================================== */
/* Multi-Page Navigation, Hub Cards, Route Headers & Dedicated Pages     */
/* ===================================================================== */
.nav-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav-link.active {
  background: var(--primary);
  color: #ffffff !important;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(20, 83, 45, 0.22);
}

.live-counter-pill {
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@keyframes counterBumpPulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.22); }
  100% { transform: scale(1); }
}

.live-counter-pill.counter-bump {
  animation: counterBumpPulse 0.65s ease;
}

.hero-btn,
.seg-btn {
  text-decoration: none;
}

.home-hub-section {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.hub-header {
  margin-bottom: 1rem;
}

.hub-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.hub-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.95rem;
}

.hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.hub-card-featured {
  background: linear-gradient(145deg, var(--surface) 0%, var(--primary-soft) 100%);
  border-color: rgba(20, 83, 45, 0.35);
}

.hub-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--primary);
  margin-bottom: 0.55rem;
}

.hub-badge-exam {
  background: var(--warn-soft);
  color: var(--warn);
}

.hub-badge-tutor {
  background: var(--primary);
  color: #ffffff;
}

.hub-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.38rem;
  color: var(--text);
}

.hub-card p {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  flex: 1;
}

.hub-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.route-header-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.route-page-title {
  font-size: 1.32rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 0.25rem;
}

.route-page-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.page-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.page-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--border);
}

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

.jukto-search-bar {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

.jukto-search-bar .select-input {
  flex: 1;
  min-width: 240px;
}

.jukto-card-clickable {
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.jukto-card-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

kbd {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.1rem 0.38rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .metrics-bar {
    grid-template-columns: repeat(3, 1fr);
  }
  .result-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tutor-stage-grid {
    grid-template-columns: 1fr;
  }
  .tutor-shortcut-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .tutor-practice-output-wrap {
    grid-template-columns: 1fr;
  }
}

@media print {
  .no-print {
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .result-card {
    border: 1px solid #000;
    box-shadow: none;
  }
  .result-diff-view {
    max-height: none;
    overflow: visible;
  }
}
