:root {
  --blue: #174ea6;
  --blue-dark: #123c83;
  --ink: #172033;
  --muted: #6f7b91;
  --line: #dfe5f3;
  --line-soft: #edf1f8;
  --paper: #fffefb;
  --bg: #f5f7fb;
  --card: #ffffff;
  --green: #1f9d68;
  --danger: #d94040;
  --shadow: 0 20px 60px rgba(21, 38, 82, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Golos Text", "Golos UI", Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 28px 18px 20px;
  background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  background: var(--blue); color: white; font-weight: 800; box-shadow: 0 8px 20px rgba(51,88,255,.24);
}
.brand strong { display:block; font-size: 17px; }
.brand span { display:block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.nav { display:grid; gap: 6px; }
.nav-item {
  border: 0; background: transparent; padding: 12px 14px; border-radius: 12px; display:flex;
  align-items:center; gap:11px; color:#44506a; font-weight:650; text-align:left;
}
.nav-item:hover { background:#f5f7fb; }
.nav-item.active { background:#eef2ff; color:var(--blue-dark); }
.nav-item span { width:22px; text-align:center; }
.sidebar-bottom { margin-top:auto; display:grid; gap:8px; }
.sidebar-bottom p { font-size:11px; color:var(--muted); line-height:1.45; padding:0 7px; margin:4px 0 0; }
.file-label { display:flex !important; align-items:center; justify-content:center; cursor:pointer; }

.main { min-width:0; }
.topbar {
  min-height: 116px; background:rgba(245,247,251,.92); backdrop-filter: blur(12px); position:sticky; top:0; z-index:10;
  display:flex; justify-content:space-between; align-items:center; gap:20px; padding:24px 38px 20px; border-bottom:1px solid var(--line);
}
.eyebrow { color:var(--blue); font-size:11px; font-weight:800; letter-spacing:.14em; }
h1 { margin:4px 0 0; font-size:34px; line-height:1; }
h2 { margin:5px 0 0; font-size:24px; }
.top-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.save-state { color:var(--green); font-size:12px; margin-right:4px; }

button, .file-label { border-radius:10px; padding:10px 14px; border:1px solid transparent; font-weight:700; transition:.15s ease; }
button:active, .file-label:active { transform:translateY(1px); }
.primary { background:var(--blue); color:white; border-color:var(--blue); }
.primary:hover { background:var(--blue-dark); }
.secondary { background:white; color:var(--ink); border-color:var(--line); }
.secondary:hover { border-color:#bcc8df; }
.ghost { background:transparent; border-color:var(--line); color:#59657a; }
.ghost:hover { background:#f6f8fc; }
.danger { background:var(--danger); color:#fff; }
.compact { padding:8px 10px; font-size:12px; }
.wide { width:100%; }

.workspace { padding:30px 38px 60px; max-width:1500px; margin:0 auto; }
.layout-grid { display:grid; grid-template-columns:minmax(0, 1fr) 310px; gap:24px; align-items:start; }
.paper-card, .tool-card { background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); }
.paper-card { overflow:hidden; }
.entry-meta { display:flex; gap:12px; padding:18px 22px; border-bottom:1px solid var(--line); background:#fff; }
.title-input, .date-input {
  border:1px solid transparent; background:#f7f9fd; border-radius:10px; padding:10px 12px; color:var(--ink); outline:none;
}
.title-input { flex:1; font-weight:760; min-width:0; }
.date-input { width:160px; }
.title-input:focus, .date-input:focus { border-color:#aebdff; background:#fff; }

.lined-wrap { position:relative; background:var(--paper); }
.lined-wrap::before {
  content:""; position:absolute; left:58px; top:0; bottom:0; width:1px; background:#f1b8b8; pointer-events:none;
}
.lined-textarea {
  width:100%; min-height:670px; resize:vertical; border:0; outline:0; display:block;
  padding:22px 28px 40px 76px; color:#1d2433; font-family:"Georgia", "Times New Roman", serif; font-size:19px; line-height:32px;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #dbe3f1 31px, #dbe3f1 32px);
  background-attachment:local;
}
.lined-textarea::placeholder { color:#9ba5b7; }

.answer-sheet { padding:14px 22px 28px; background:var(--paper); }
.answer-head { display:flex; justify-content:space-between; gap:10px; align-items:center; padding:4px 0 14px; }
.answer-head strong { font-size:15px; }
.answer-list { display:grid; gap:0; border-top:1px solid #dbe3f1; }
.answer-row { display:grid; grid-template-columns:48px 1fr; min-height:48px; border-bottom:1px solid #dbe3f1; }
.answer-num { display:grid; place-items:center; color:var(--blue); font-weight:800; border-right:1px solid #f1b8b8; }
.answer-input { border:0; background:transparent; outline:0; padding:10px 14px; font-size:15px; }
.answer-input:focus { background:#fbfcff; }
.add-answer { margin-top:14px; }
.notes-block { margin-top:24px; border-top:1px solid var(--line); }
.notes-block .lined-textarea { min-height:250px; font-size:16px; line-height:30px; background-size:auto; padding-top:18px; }

.tools-column { display:grid; gap:16px; position:sticky; top:142px; }
.tool-card { padding:18px; box-shadow:none; }
.tool-label { font-size:10px; color:var(--muted); letter-spacing:.14em; font-weight:850; }
.timer { font-variant-numeric:tabular-nums; font-size:42px; font-weight:800; letter-spacing:-.04em; margin:8px 0 14px; }
.timer-actions { display:grid; grid-template-columns:1fr 1fr 1fr; gap:7px; }
.preset-row { display:flex; gap:6px; flex-wrap:wrap; margin-top:10px; }
.preset-chip { border:1px solid var(--line); background:#f8f9fc; color:#59657a; padding:6px 8px; border-radius:9px; font-size:11px; }
.preset-chip:hover { border-color:#bac7ff; color:var(--blue); }
.stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.stat { padding:12px; background:#f7f9fd; border-radius:12px; }
.stat b { display:block; font-size:22px; }
.stat span { color:var(--muted); font-size:11px; }
.tips-card ul { margin:12px 0 0; padding-left:18px; color:#58647a; line-height:1.55; font-size:13px; }
.tips-card li + li { margin-top:7px; }
.tip-structure { margin-top:12px; display:grid; gap:8px; }
.tip-pill { border-left:3px solid var(--blue); background:#f7f9ff; padding:8px 10px; font-size:12px; line-height:1.4; }

.timer-edit-row { margin: 0 0 12px; }
.timer-edit-row > label { display:block; color:var(--muted); font-size:11px; font-weight:750; margin-bottom:6px; }
.timer-edit-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:7px; }
.timer-minutes-input {
  width:100%; min-width:0; border:1px solid var(--line); border-radius:10px; background:#fbfcfe;
  color:var(--ink); padding:8px 10px; outline:none; font-weight:700;
}
.timer-minutes-input:focus { border-color:#aebdff; background:#fff; }

.dialog { width:min(680px, calc(100vw - 32px)); border:1px solid var(--line); border-radius:18px; padding:0; box-shadow:0 30px 90px rgba(16,31,68,.22); }
.dialog::backdrop { background:rgba(14,22,38,.32); backdrop-filter:blur(3px); }
.dialog-head { display:flex; justify-content:space-between; align-items:center; padding:22px; border-bottom:1px solid var(--line); }
.icon-btn { border:0; background:#f3f5f9; width:36px; height:36px; padding:0; border-radius:50%; font-size:24px; color:#667187; }
.history-list { max-height:60vh; overflow:auto; padding:10px; }
.history-item { display:grid; grid-template-columns:1fr auto; gap:10px; padding:14px 12px; border-bottom:1px solid var(--line-soft); }
.history-item:last-child { border-bottom:0; }
.history-main { border:0; background:transparent; padding:0; text-align:left; }
.history-main strong { display:block; color:var(--ink); }
.history-main span { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
.history-delete { border:0; background:transparent; color:#a56a6a; padding:8px; }
.empty { text-align:center; color:var(--muted); padding:44px 20px; }
.small-dialog { max-width:420px; padding:24px; }
.small-dialog p { color:var(--muted); line-height:1.5; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:20px; }

.fehler-wrap { display:grid; grid-template-columns:minmax(0, 1fr) 330px; gap:24px; }
.fehler-form, .fehler-list-card { background:#fff; border:1px solid var(--line); border-radius:18px; padding:22px; box-shadow:var(--shadow); }
.field { display:grid; gap:7px; margin-top:16px; }
.field label { font-size:12px; color:var(--muted); font-weight:750; }
.field textarea, .field input { border:1px solid var(--line); background:#fbfcfe; border-radius:11px; padding:11px 12px; outline:none; resize:vertical; }
.field textarea:focus, .field input:focus { border-color:#aebdff; background:#fff; }
.fehler-actions { display:flex; justify-content:flex-end; margin-top:16px; }
.fehler-list { display:grid; gap:10px; margin-top:14px; max-height:640px; overflow:auto; }
.error-card { border:1px solid var(--line); border-radius:13px; padding:13px; background:#fff; }
.error-card .wrong { color:#b64d4d; text-decoration:line-through; text-decoration-thickness:1px; }
.error-card .right { color:#17774f; font-weight:700; margin-top:7px; }
.error-card .rule { color:#5f6b81; font-size:12px; line-height:1.45; margin-top:9px; }
.error-card .example { background:#f7f9fd; border-radius:8px; padding:8px; margin-top:8px; font-size:12px; }
.error-card footer { display:flex; justify-content:space-between; align-items:center; gap:8px; color:#98a1b1; font-size:10px; margin-top:10px; }
.error-card footer button { border:0; padding:3px 6px; background:transparent; color:#a76b6b; font-size:11px; }

.words-layout { display:grid; gap:24px; }
.words-form-card, .words-list-card {
  background:#fff; border:1px solid var(--line); border-radius:18px; padding:22px; box-shadow:var(--shadow);
}
.word-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
.word-note-field { grid-column:1 / -1; }
.word-form-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; }
.words-list-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:14px; }
.word-search {
  width:min(320px, 100%); border:1px solid var(--line); border-radius:11px; background:#fbfcfe; padding:10px 12px; outline:none;
}
.word-search:focus { border-color:#aebdff; background:#fff; }
.words-list { display:grid; gap:10px; }
.word-card {
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; align-items:start;
  border:1px solid var(--line); border-radius:14px; padding:15px; background:#fff;
}
.word-main strong { display:block; font-size:17px; }
.word-main > span { display:block; margin-top:3px; color:var(--blue-dark); font-weight:750; }
.word-main p { margin:8px 0 0; color:#59657a; line-height:1.5; white-space:pre-wrap; }
.word-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.word-delete { color:#a76b6b; }

@media (max-width: 1040px) {
  .app-shell { grid-template-columns:86px 1fr; }
  .sidebar { padding:22px 12px 16px; }
  .brand { justify-content:center; padding-left:0; padding-right:0; }
  .brand > div:last-child, .nav-item:not(.active)::after, .nav-item { font-size:0; }
  .nav-item { justify-content:center; padding:12px; }
  .nav-item span { font-size:19px; }
  .sidebar-bottom .ghost, .sidebar-bottom p { display:none !important; }
  .layout-grid, .fehler-wrap { grid-template-columns:1fr; }
  .tools-column { position:static; grid-template-columns:repeat(3,1fr); }
}

@media (max-width: 760px) {
  .app-shell { display:block; padding-bottom:82px; }
  .sidebar { position:fixed; z-index:30; left:0; right:0; bottom:0; top:auto; height:78px; border-right:0; border-top:1px solid var(--line); padding:8px 8px; display:block; }
  .brand, .sidebar-bottom { display:none; }
  .nav { display:grid; grid-template-columns:repeat(5,1fr); gap:2px; height:100%; }
  .nav-item, .nav-item.active { font-size:9px; flex-direction:column; gap:3px; padding:6px 2px; min-width:0; }
  .nav-item span { font-size:17px; width:auto; }
  .topbar { position:static; min-height:auto; padding:18px 16px 14px; align-items:flex-start; }
  h1 { font-size:28px; }
  .top-actions { gap:6px; }
  .save-state { width:100%; text-align:right; }
  .top-actions button { padding:8px 10px; font-size:12px; }
  .workspace { padding:16px 12px 30px; }
  .entry-meta { padding:12px; flex-direction:column; }
  .date-input { width:100%; }
  .lined-wrap::before { left:38px; }
  .lined-textarea { min-height:520px; padding:18px 16px 30px 50px; font-size:17px; line-height:30px; background:repeating-linear-gradient(to bottom,transparent 0,transparent 29px,#dbe3f1 29px,#dbe3f1 30px); }
  .tools-column { grid-template-columns:1fr; }
  .tool-card:not(.timer-card) { display:block; }
  .timer-card { order:-1; }
  .fehler-form, .fehler-list-card { padding:16px; }
  .word-form-grid { grid-template-columns:1fr; }
  .word-note-field { grid-column:auto; }
  .words-form-card, .words-list-card { padding:16px; }
  .words-list-head { align-items:stretch; flex-direction:column; }
  .word-search { width:100%; }
  .word-card { grid-template-columns:1fr; }
  .word-actions { justify-content:flex-start; }
}


/* EPD writing workflow */
.writing-meta-row { display:flex; justify-content:flex-end; padding:12px 18px 0; background:#fff; }
.writing-status-field { display:grid; gap:5px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.06em; }
.writing-status-field select { min-width:150px; border:1px solid var(--line); border-radius:9px; background:#fbfcfe; padding:8px 10px; color:var(--ink); font-weight:700; }
.writing-format-toolbar {
  position:sticky; top:78px; z-index:8; display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  padding:10px 14px; border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.96); backdrop-filter:blur(10px);
}
.writing-format-toolbar button {
  min-height:34px; border:1px solid var(--line); border-radius:8px; background:#fff; padding:6px 9px;
  color:#4c5870; font-size:12px; font-weight:700;
}
.writing-format-toolbar button:hover { border-color:#b9c6ff; background:#f5f7ff; color:var(--blue-dark); }
.writing-format-toolbar .toolbar-action { background:#f7f9ff; color:var(--blue-dark); }
.toolbar-divider { width:1px; height:24px; background:var(--line); margin:0 2px; }
.toolbar-spacer { flex:1; }
.font-size-control { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; font-weight:750; }
.font-size-control select { border:1px solid var(--line); border-radius:8px; background:#fff; padding:6px 7px; color:var(--ink); }
.rich-text-editor { outline:none; white-space:pre-wrap; overflow-wrap:anywhere; }
.rich-text-editor:empty::before { content:attr(data-placeholder); color:#a5adba; pointer-events:none; }
.rich-text-editor ul,.rich-text-editor ol { padding-left:28px; }
.rich-text-editor div,.rich-text-editor p { min-height:1em; }
.writing-analysis { display:grid; gap:7px; margin-top:14px; padding-top:12px; border-top:1px solid var(--line-soft); }
.writing-analysis > div { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:11px; }
.writing-analysis b { color:var(--ink); font-size:12px; }

.epd-dashboard { display:grid; gap:18px; }
.dashboard-hero { padding:24px; }
.dashboard-hero h2 { margin:7px 0 8px; }
.dashboard-hero p { margin:0; color:var(--muted); line-height:1.55; }
.dashboard-days { display:grid; gap:16px; }
.dashboard-day { padding:20px; }
.dashboard-day > header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.dashboard-day h3 { margin:5px 0 0; font-size:20px; }
.day-counts { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.day-counts span { border:1px solid var(--line); background:#f8f9fc; border-radius:999px; padding:6px 9px; color:#59657a; font-size:11px; font-weight:750; }
.dashboard-entry-list { display:grid; gap:8px; }
.dashboard-entry-list button {
  display:grid; grid-template-columns:90px minmax(0,1fr) auto; align-items:center; gap:12px;
  width:100%; text-align:left; border:1px solid var(--line-soft); border-radius:11px; background:#fff; padding:11px 12px;
}
.dashboard-entry-list button:hover { border-color:#cbd5ff; background:#fafbff; }
.dashboard-entry-type { color:var(--blue-dark); font-size:11px; font-weight:800; }
.dashboard-entry-list strong { min-width:0; overflow-wrap:anywhere; }
.dashboard-entry-list small { color:var(--muted); font-size:10px; }

/* MOST Learn: calm, connected study workspace. Existing editor surfaces keep their data model. */
.nav-item.active { background:#e9f1fc; color:var(--blue-dark); }
.brand-mark { border-radius:14px; box-shadow:0 8px 20px rgba(23,78,166,.16); }
.workspace-hero { padding:28px; border:1px solid var(--line); border-radius:20px; background:linear-gradient(115deg,#fff 65%,#edf4fd); }
.workspace-hero h2 { margin:9px 0; font-size:clamp(25px,3vw,34px); }
.workspace-hero p { color:var(--muted); line-height:1.6; max-width:690px; margin:0; }
.start-actions { display:flex; flex-wrap:wrap; gap:10px; }
.start-actions button { min-height:44px; border-radius:999px; }
.backup-panel { border:1px solid var(--line); border-radius:15px; padding:14px 18px; background:#fff; }
.backup-panel summary { cursor:pointer; font-weight:700; color:var(--blue-dark); }
.backup-panel p { margin:12px 0; color:var(--muted); font-size:13px; }
.backup-panel > div { display:flex; flex-wrap:wrap; gap:8px; }
.backup-panel button { min-height:44px; }
.notebook-category-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:18px; }
.category-card { display:grid; gap:10px; text-align:left; border:1px solid var(--line); background:#fff; border-radius:18px; padding:22px; min-height:138px; box-shadow:0 12px 35px rgba(20,45,85,.04); }
.category-card:hover, .category-card:focus-visible { border-color:#98b6e3; background:#f9fbff; }
.category-card > span { color:var(--blue); font-size:26px; }
.category-card strong { font-size:18px; }
.category-card small { color:var(--muted); }
.notebook-context { margin-bottom:20px; border:1px solid var(--line); background:#fff; border-radius:17px; padding:18px 20px 12px; }
.notebook-intro p { margin:7px 0 17px; color:var(--muted); line-height:1.5; }
.notebook-tabs, .answer-mode-tabs { display:flex; flex-wrap:wrap; gap:7px; }
.notebook-tab, .answer-mode-tabs button { background:#f4f7fb; color:#4b5a73; border:1px solid transparent; border-radius:999px; padding:10px 16px; min-height:44px; }
.notebook-tab.active, .answer-mode-tabs [aria-selected="true"] { background:#e7f0fd; border-color:#c3d8f4; color:var(--blue-dark); }
.answer-mode-tabs { margin:2px 0 12px; }
.mode-help { margin:0 0 19px; color:#60708a; font-size:13px; line-height:1.55; max-width:720px; }
.notes-primary { margin-top:0; border-top:0; }
.notes-primary .lined-textarea { min-height:560px; }
.ai-builder { margin-top:18px; padding:24px; border:1px solid var(--line); border-radius:18px; background:#fff; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; max-width:900px; }
.ai-builder label { display:grid; gap:7px; color:#43516a; font-size:13px; font-weight:700; }
.ai-builder input, .ai-builder select, .ai-builder textarea { width:100%; min-width:0; padding:11px 12px; border:1px solid var(--line); border-radius:10px; background:#fbfcfe; color:var(--ink); }
.ai-builder > button { justify-self:start; align-self:center; min-height:44px; border-radius:999px; }
#aiCopyState { align-self:center; color:var(--green); font-size:13px; }
.ai-output-label { grid-column:1/-1; }
.ai-builder textarea { resize:vertical; line-height:1.5; font-weight:400; }
@media (min-width:761px) and (max-width:1040px) {
  .sidebar .study-language-switch { grid-template-columns:1fr; margin:4px 0 12px; }
  .sidebar .study-language-note { display:none; }
}

@media (max-width: 760px) {
  .nav { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .writing-format-toolbar { position:static; padding:9px 10px; }
  .writing-format-toolbar button { min-height:36px; }
  .toolbar-spacer { display:none; }
  .font-size-control { order:2; }
  .rich-text-editor { min-height:520px; }
  .dashboard-day { padding:16px; }
  .dashboard-day > header { display:grid; }
  .day-counts { justify-content:flex-start; }
  .dashboard-entry-list button { grid-template-columns:1fr; gap:4px; }
}

@media (max-width:760px) {
  .sidebar .study-language-switch { position:fixed; top:8px; right:12px; z-index:31; width:152px; margin:0; padding:2px; }
  .sidebar .study-language-note { display:none; }
  .topbar { padding-top:58px; }
  .notebook-category-grid, .ai-builder { grid-template-columns:1fr; }
  .workspace-hero { padding:21px; }
  .notebook-context { padding:16px 12px 12px; }
  .notebook-tabs { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
  .notebook-tab { flex:none; }
  .answer-sheet { padding:14px 12px 24px; }
  .answer-mode-tabs button { flex:1; min-width:120px; }
  .ai-output-label { grid-column:auto; }
  .topbar { flex-wrap:wrap; }
  .top-actions { width:100%; justify-content:flex-start; }
  .save-state { width:auto; text-align:left; }
}


/* Restored MOST Learn V2 Wortschatz layout from the pre-PR29 UI. */
.v2-shell{display:grid;gap:20px;min-width:0}.v2-toolbar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px}.v2-toolbar label{display:grid;gap:6px;font-size:12px;font-weight:700;color:var(--muted);min-width:150px;flex:1}.v2-toolbar input,.v2-toolbar select,.v2-grammar-panel textarea,.v2-prompt textarea{width:100%;min-width:0;border:1px solid var(--line);border-radius:10px;background:#fff;padding:11px 12px;color:var(--ink);font:inherit}.v2-toolbar button{min-height:44px}.v2-topic-card{display:grid;text-align:left;gap:9px;min-height:175px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;color:var(--ink);cursor:pointer;box-shadow:var(--shadow)}.v2-topic-card:hover,.v2-topic-card:focus-visible{border-color:var(--blue);transform:translateY(-2px)}.v2-topic-card strong{font-size:21px}.v2-topic-card small,.v2-topic-card>span:last-child{font-size:13px;color:var(--muted)}.v2-topic-icon{display:grid;place-items:center;background:#edf4ff;color:var(--blue);border-radius:12px;width:42px;height:42px}.v2-tabs{display:flex;gap:6px;overflow-x:auto;max-width:100%;padding:4px;background:#eff3fa;border-radius:14px}.v2-tabs button{border:0;background:transparent;border-radius:10px;padding:10px 15px;white-space:nowrap;color:#53627c;min-height:43px}.v2-tabs button.active,.v2-tabs button[aria-selected=true]{background:white;color:var(--blue);box-shadow:0 2px 10px #172d521a}.v2-tabs small{opacity:.7}.v2-add{background:#f6f9ff}.v2-bulk{justify-content:flex-end}.v2-bulk>span{margin-right:auto;color:var(--muted)}.v2-word-list{display:grid;gap:8px}.v2-word-row{display:grid;grid-template-columns:30px minmax(0,1fr) 160px auto;align-items:center;gap:12px;background:white;border:1px solid var(--line);border-radius:13px;padding:12px 16px}.v2-word-row>div{display:grid;min-width:0;gap:4px}.v2-word-row strong,.v2-word-row span{overflow-wrap:anywhere}.v2-word-row span{color:var(--muted);font-size:13px}.v2-word-row select{min-width:0;border:1px solid var(--line);border-radius:9px;padding:9px}.v2-word-row .v2-check{width:19px;height:19px}.v2-prompt,.v2-grammar-panel{display:grid;gap:15px;padding:24px;background:#fff;border:1px solid var(--line);border-radius:18px;min-width:0}.v2-prompt button{justify-self:start}.v2-grammar-panel>p{max-width:800px;line-height:1.7;color:#40516c}.v2-grammar-panel h3,.v2-grammar-panel h4{margin:0}.v2-grammar-panel h4{margin-top:12px}.v2-grammar-panel textarea{resize:vertical;line-height:1.6}.v2-table-scroll{max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:12px}.v2-table-scroll table{width:100%;border-collapse:collapse;min-width:620px}.v2-table-scroll th,.v2-table-scroll td{text-align:left;border-bottom:1px solid var(--line);padding:13px 16px;white-space:nowrap}.v2-table-scroll th{background:#f2f6fc;color:#354b70}.v2-answer{font-weight:750;color:var(--blue)}.v2-answer.hidden{display:inline-block;background:#dbe5f5;color:transparent;border-radius:5px;min-width:28px;user-select:none}.v2-examples{display:grid;gap:12px;padding-left:24px;line-height:1.6}.v2-choices{display:flex;flex-wrap:wrap;gap:10px}.v2-correct{color:#15724d}.v2-incorrect{color:#ae4141}.v2-back{justify-self:start}
@media(max-width:760px){.v2-toolbar{align-items:stretch}.v2-toolbar label{min-width:min(100%,170px)}.v2-toolbar>button{flex:1}.v2-word-row{grid-template-columns:26px minmax(0,1fr);gap:8px}.v2-word-row select{grid-column:2}.v2-word-row button{grid-column:2;justify-self:start}.v2-grammar-panel{padding:16px}.v2-tabs button{padding:10px 12px}}
.v2-original-decks{background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 18px}.v2-original-decks summary{cursor:pointer;font-weight:700}.v2-original-decks p{color:var(--muted);font-size:13px}.v2-original-decks button{margin:4px 8px 4px 0}

/* Completion is a separate grammar metric; the Start weekly activity is unchanged. */
.sidebar-progress { display:grid; grid-template-columns:44px minmax(0,1fr); align-items:center; column-gap:9px; padding:12px; border:1px solid #d7e5fa; border-radius:17px; background:linear-gradient(135deg,#f4f9ff,#ebf2ff); box-shadow:0 7px 20px #224f9a12; }
.sidebar-progress > img { width:44px; height:44px; object-fit:contain; }
.sidebar-progress strong, .sidebar-progress [lang="ru"] { display:block; }
.sidebar-progress strong { font-size:12px; color:#143a78; }
.sidebar-progress [lang="ru"] { font-size:10px; color:#7384a2; }
.sidebar-progress .grammar-progress-value { grid-column:1/-1; padding:0; margin:6px 0 2px; color:#174ea6; font-size:19px; font-weight:800; }
.grammar-progress-track { grid-column:1/-1; height:6px; border-radius:10px; background:#d8e7fa; overflow:hidden; }
.grammar-progress-track i { display:block; height:100%; width:0; background:linear-gradient(90deg,#3578e7,#34c2ef); border-radius:inherit; }
.grammar-progress-count { grid-column:1/-1; color:#627999; font-size:9px; line-height:1.35; margin-top:5px; }
.save-state, .file-local-status, .local-only-note, #grammarNoteState, #grammarNoteSaved { display:none !important; }
@media (min-width:761px) and (max-width:1040px) { .sidebar-progress { grid-template-columns:1fr; justify-items:center; padding:8px 3px; } .sidebar-progress > div:first-of-type, .grammar-progress-count { display:none; } .sidebar-progress .grammar-progress-value { font-size:12px; } }

.sidebar .nav-item .start-nav-label { display:block; min-width:0; width:auto; text-align:left; font-size:12px; line-height:1.12; }
.sidebar .start-nav-label > span, .sidebar .start-nav-label > small { display:block; width:auto; text-align:left; }
.sidebar .start-nav-label > small { margin-top:3px; color:#7888a2; font-size:10px; font-weight:500; }
@media (min-width:761px) and (max-width:1040px) { .sidebar .nav-item .start-nav-label { display:none; } }
@media (max-width:760px) { .sidebar .nav-item .start-nav-label { display:block; text-align:center; font-size:9px; overflow-wrap:anywhere; } .sidebar .start-nav-label > span, .sidebar .start-nav-label > small { text-align:center; } .sidebar .start-nav-label > small { font-size:8px; margin-top:1px; } }
@media (max-width:760px) {
  .sidebar .nav-item .start-nav-label > span { font-size:9px; line-height:1.1; }
  .sidebar .nav-item .start-nav-label > small { font-size:8px; line-height:1.1; }
}
