/* ==========================================================================
   LISAN — CURRICULUM, DİL ANLATIM, ANLATIM & TAHLİL PREMIUM UI/UX SYSTEM
   High-performance, minimal-premium presentation layer.
   ========================================================================== */

:root {
  --ink: #0F172A;
  --navy: #1E3A8A;
  --body: #1E293B;
  --muted: #475569;
  --subtle: #64748B;
  --paper: #FAF8F5;
  --paper-subtle: #F4F1EB;
  --surface: #FFFFFF;
  --surface-sheen: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.82));
  --blue: #E0F2FE;
  --blue-soft: rgba(224, 242, 254, 0.45);
  --line: rgba(30, 58, 138, 0.10);
  --line-strong: rgba(37, 99, 235, 0.28);
  --accent: #1E3A8A;
  --pm-azure: #2563EB;
  --pm-sky: #0284C7;
  --pm-grad: linear-gradient(135deg, #1E3A8A 0%, #2563EB 55%, #0284C7 100%);
  --pm-grad-subtle: linear-gradient(135deg, rgba(30, 58, 138, 0.04), rgba(37, 99, 235, 0.08));
  --radius-sm: 10px;
  --radius: 20px;
  --radius-lg: 28px;
  --radius-full: 9999px;
  --pm-sh-1: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 16px -6px rgba(30, 58, 138, 0.10);
  --pm-sh-2: 0 4px 6px rgba(15, 23, 42, 0.04), 0 20px 45px -18px rgba(30, 58, 138, 0.20);
  --pm-sh-3: 0 8px 16px rgba(15, 23, 42, 0.05), 0 32px 75px -24px rgba(30, 58, 138, 0.30);
  --pm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-arabic: 'Amiri', 'Noto Naskh Arabic', 'Traditional Arabic', serif;
}

/* Base Document Setup */
html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-body);
  color: var(--body);
  background:
    radial-gradient(1200px 560px at 10% -5%, rgba(224, 242, 254, 0.85), transparent 60%),
    radial-gradient(1000px 500px at 95% 0%, rgba(191, 219, 254, 0.45), transparent 65%),
    var(--paper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
  letter-spacing: -0.011em;
}

::selection {
  background: rgba(37, 99, 235, 0.22);
  color: var(--ink);
}

/* Custom Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 58, 138, 0.22) transparent;
}
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 138, 0.2);
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 58, 138, 0.4);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* ==========================================================================
   PREMIUM FLOATING HEADER
   ========================================================================== */
.course-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(250, 248, 245, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 10px 30px -24px rgba(30, 58, 138, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s var(--pm-ease);
}
.brand:hover {
  transform: translateY(-1px);
}
.brand::before {
  content: "L";
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 38px;
  border-radius: 11px;
  background: var(--pm-grad);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand span {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-tools label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-tools select {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-sheen);
  box-shadow: var(--pm-sh-1);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.header-tools select:hover {
  border-color: var(--line-strong);
  box-shadow: var(--pm-sh-2);
}
.header-tools select:focus {
  outline: none;
  border-color: var(--pm-azure);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Universal Buttons */
button, .button {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-sheen);
  box-shadow: var(--pm-sh-1);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.2s var(--pm-ease), box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
button:hover, .button:hover {
  transform: translateY(-1.5px);
  box-shadow: var(--pm-sh-2);
  border-color: var(--line-strong);
  background: #fff;
  color: var(--navy);
}
button:active, .button:active {
  transform: translateY(0) scale(0.98);
}
button:disabled, .button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

button.primary, .button.primary {
  background: var(--pm-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px -6px rgba(37, 99, 235, 0.5);
}
button.primary:hover, .button.primary:hover {
  background: linear-gradient(135deg, #1E3A8A 0%, #1D4ED8 60%, #0284C7 100%);
  color: #fff;
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, 0.65);
}

/* ==========================================================================
   HUB PAGE (#hub) — DİL ANLATIM MERKEZİ
   ========================================================================== */
#hub {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 32px);
  animation: pm-fade-up 0.5s var(--pm-ease) both;
}

#hub .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-sheen);
  border: 1px solid var(--line);
  box-shadow: var(--pm-sh-1);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--navy);
  margin-bottom: 16px;
}
#hub .eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pm-azure);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

#hub h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 0 0 16px;
}

#hub .outcome {
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.75;
  margin-bottom: 36px;
}

/* The Hub Dual Cards Grid */
#hub .lesson-card {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  background: var(--surface-sheen);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 42px);
  box-shadow: var(--pm-sh-1);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--pm-ease), box-shadow 0.35s var(--pm-ease), border-color 0.25s ease;
}
#hub .lesson-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--pm-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--pm-ease);
}
#hub .lesson-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--pm-sh-3);
}
#hub .lesson-card:hover::before {
  transform: scaleX(1);
}

#hub .lesson-card .eyebrow {
  margin-bottom: 12px;
  align-self: flex-start;
}

#hub .lesson-card h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 4px 0 12px;
}

#hub .lesson-card p {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.75;
  margin: 0 0 24px;
  flex-grow: 1;
}

#hub .lesson-card span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  transition: color 0.2s ease, transform 0.2s var(--pm-ease);
}
#hub .lesson-card:hover span {
  color: var(--pm-azure);
  transform: translateX(4px);
}

/* ==========================================================================
   LEARN PAGE (.course-layout) — STÜDYO & ÇALIŞMA ALANI
   ========================================================================== */
.course-layout {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px clamp(16px, 3.5vw, 40px) 72px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

/* Sidebar Index */
.course-index {
  position: sticky;
  top: 96px;
  background: var(--surface-sheen);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--pm-sh-1);
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.course-index .eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--navy);
  margin-bottom: 6px;
}

.course-index h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.035em;
  margin: 0 0 8px;
  color: var(--ink);
}

#course-count {
  font-size: 0.8rem;
  color: var(--subtle);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.search-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}
.search-label input[type="search"] {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  transition: all 0.2s ease;
}
.search-label input[type="search"]:focus {
  border-color: var(--pm-azure);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 14px;
  cursor: pointer;
}
.check-label input[type="checkbox"] {
  accent-color: var(--pm-azure);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Lesson Index Button List */
#lesson-index {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 4px;
  margin-top: 4px;
  flex-grow: 1;
}

#lesson-index button {
  text-align: left;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s var(--pm-ease), border-color 0.18s ease;
}
#lesson-index button:hover {
  background: rgba(224, 242, 254, 0.5);
  transform: translateX(2px);
  border-color: var(--line);
}
#lesson-index button[aria-current="true"] {
  background: linear-gradient(90deg, #fff, var(--blue));
  border-color: var(--line-strong);
  box-shadow: var(--pm-sh-1);
  position: relative;
}
#lesson-index button[aria-current="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 3.5px;
  border-radius: 0 4px 4px 0;
  background: var(--pm-azure);
}
#lesson-index button[aria-current="true"] span {
  font-weight: 700;
  color: var(--navy);
}

#lesson-index .index-meta {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--subtle);
  letter-spacing: 0.02em;
}

/* Workspace (Right Column) */
.course-workspace {
  min-width: 0;
}

.workspace-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 8px 12px;
  background: var(--surface-sheen);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--pm-sh-1);
}

.mode-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(30, 58, 138, 0.05);
  padding: 4px;
  border-radius: 14px;
}
.mode-tabs button, .mode-tabs .button {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.mode-tabs button:hover, .mode-tabs .button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  transform: none;
}
.mode-tabs button[aria-pressed="true"] {
  background: #fff;
  color: var(--navy);
  box-shadow: var(--pm-sh-1);
}

.voice-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.voice-label select {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.status {
  font-size: 0.82rem;
  color: var(--subtle);
  margin: 0 0 16px 4px;
  min-height: 1.2rem;
}

/* ==========================================================================
   LESSON CARD & CONTENT COMPONENTS (Anlatım & Tahlil)
   ========================================================================== */
.lesson-card {
  background: var(--surface-sheen);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 52px);
  box-shadow: var(--pm-sh-2);
  margin-bottom: 32px;
  animation: pm-fade-up 0.35s var(--pm-ease) both;
}

.lesson-card .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.lesson-card .meta span {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--blue-soft);
  border: 1px solid rgba(37, 99, 235, 0.16);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.lesson-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0 0 12px;
}

.lesson-card .outcome {
  font-size: clamp(1.02rem, 1.3vw, 1.22rem);
  color: var(--muted);
  line-height: 1.7;
  max-width: 68ch;
  margin: 0 0 24px;
}

/* Pedagogical Connection / Bridge */
.connection {
  padding: 18px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(224, 242, 254, 0.5));
  border: 1px solid var(--line);
  border-left: 4px solid var(--pm-azure);
  box-shadow: var(--pm-sh-1);
  margin: 24px 0;
  font-size: 0.92rem;
}
.connection p {
  margin: 0 0 8px;
  font-weight: 500;
  color: var(--ink);
}
.connection a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 18px;
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.18s ease, transform 0.18s var(--pm-ease);
}
.connection a:hover {
  color: var(--pm-azure);
  transform: translateX(2px);
}

.notice {
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(254, 243, 199, 0.6);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #92400E;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 20px 0;
}

.lesson-card section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.lesson-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 16px;
}

.lesson-card .body-text {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--body);
  max-width: 70ch;
}

/* Examples (.example) */
.example {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 24px;
  margin: 14px 0;
  box-shadow: var(--pm-sh-1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.example:hover {
  border-color: var(--line-strong);
  box-shadow: var(--pm-sh-2);
}

.target-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.target {
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.5;
}
.target[lang="ar"], .target[lang="fa"] {
  font-family: var(--font-arabic);
  font-size: 1.7rem;
  line-height: 1.85;
  font-weight: 500;
}

.translation {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 4px 0;
}

.nuance {
  font-size: 0.84rem;
  color: var(--subtle);
  background: var(--paper-subtle);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 8px;
}

.mini {
  padding: 5px 12px;
  font-size: 0.74rem;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--navy);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-weight: 700;
}

/* Interactive Details/Accordion */
details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  padding: 12px 18px;
  margin: 12px 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}
details[open] {
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--pm-sh-1);
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
summary:hover {
  color: var(--pm-azure);
}

/* Practice Forms */
.practice {
  background: linear-gradient(180deg, #fff, rgba(240, 248, 255, 0.4));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin: 16px 0;
  box-shadow: var(--pm-sh-1);
}
.practice legend {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
}
.choice-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 6px 0;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.choice-option:hover {
  background: var(--blue-soft);
  border-color: rgba(37, 99, 235, 0.15);
}
.choice-option input[type="radio"] {
  accent-color: var(--pm-azure);
  width: 17px;
  height: 17px;
  cursor: pointer;
}
.choice-option span {
  font-size: 0.92rem;
  color: var(--body);
}

.practice input[type="text"] {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  margin: 10px 0 14px;
  transition: all 0.2s ease;
}
.practice input[type="text"]:focus {
  border-color: var(--pm-azure);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.practice .feedback {
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--blue-soft);
  border-left: 4px solid var(--pm-azure);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 14px;
  animation: pm-fade-up 0.25s var(--pm-ease) both;
}

/* Production Task Box */
.task-box {
  background: linear-gradient(180deg, #fff, rgba(240, 248, 255, 0.6));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--pm-sh-1);
}
.task-box textarea, #analysis textarea {
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.75;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 140px;
  margin: 12px 0;
  transition: all 0.2s ease;
}
.task-box textarea:focus, #analysis textarea:focus {
  border-color: var(--pm-azure);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.rubric {
  padding-left: 20px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.8;
}

.save-note {
  font-size: 0.76rem;
  color: var(--subtle);
  margin-top: 6px;
}

/* Vocabulary highlights in lesson */
.vocabulary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.vocab-item {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--pm-sh-1);
}
.vocab-item p {
  margin: 4px 0;
}

/* Lesson Footer (Prev / Next / Done) */
.lesson-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 24px;
  margin-top: 36px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   ANALYSIS VIEW (#analysis) — METİN TAHLİLİ EKRANI
   ========================================================================== */
#text-picker {
  font-family: var(--font-body);
  font-size: 0.94rem;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-sheen);
  box-shadow: var(--pm-sh-1);
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 28px;
  cursor: pointer;
  transition: all 0.2s ease;
}
#text-picker:hover {
  border-color: var(--line-strong);
  box-shadow: var(--pm-sh-2);
}
#text-picker:focus {
  border-color: var(--pm-azure);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: none;
}

.persian-target-actions {
  display: inline-flex;
  gap: 8px;
  margin-top: 8px;
}

/* Animations */
@keyframes pm-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 950px) {
  .course-layout {
    display: block;
    padding: 18px 16px 56px;
  }
  .course-index {
    display: none;
  }
  .mobile-picker {
    display: grid;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 16px;
  }
  .mobile-picker select {
    font-family: var(--font-body);
    font-size: 0.9rem;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
  }
  .vocabulary-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .course-header {
    padding: 10px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }
  .course-header .brand {
    font-size: 1.3rem !important;
    gap: 8px !important;
  }
  .course-header .brand span {
    display: none !important;
  }
  .header-tools {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .header-tools label {
    display: none !important;
  }
  .header-tools select {
    font-size: 0.78rem !important;
    padding: 6px 8px !important;
    max-width: 130px !important;
  }
  .header-tools .button {
    font-size: 0.78rem !important;
    padding: 6px 10px !important;
    white-space: nowrap !important;
  }
  .lesson-card {
    padding: 22px 18px;
    border-radius: 20px;
  }
  .workspace-bar {
    padding: 8px;
  }
  .mode-tabs {
    width: 100%;
    overflow-x: auto;
  }
  .lesson-footer {
    flex-direction: column;
  }
  .lesson-footer > button {
    width: 100%;
  }
}

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