/* Local v2 visual trial. Screen-only: existing A4 styles and data stay intact. */
@media screen {
  body.da-theme {
    --ui-accent:#28554b; --ui-deep:#1f443b; --ui-soft:#e5eee5; --ui-tint:#d4e2d1;
    --ui-edge:#c6d6c8; --ui-ink:#253c33; --ui-muted:#52675c; --ui-paper:#fffdf7;
    --ui-ground:#f3f5ed; --ui-glow:#e1ebdc;
    --primary:var(--ui-accent); --primary-hover:var(--ui-deep); --primary-color:var(--ui-accent);
    --da-accent:var(--ui-accent); --da-ink:var(--ui-ink); --da-muted:var(--ui-muted); --da-border:var(--ui-edge);
    --primary-soft:var(--ui-soft); --text-main:var(--ui-ink); --text-soft:var(--ui-muted);
    background:radial-gradient(ellipse at 0% 0%,var(--ui-glow),transparent 65%),linear-gradient(140deg,var(--ui-ground),#faf8f1);
    color:var(--ui-ink); min-height:100vh;
  }
  body.da-theme-yks {--ui-accent:#73513c;--ui-deep:#573b2b;--ui-soft:#f3e9da;--ui-tint:#ead9c3;--ui-edge:#dfcbb6;--ui-ink:#40362b;--ui-muted:#70604f;--ui-ground:#faf5ec;--ui-glow:#f0e1cf;}
  body.da-theme-tracking {--ui-accent:#326375;--ui-deep:#264d5d;--ui-soft:#e3eef0;--ui-tint:#d0e4e3;--ui-edge:#bed5d9;--ui-ink:#253e47;--ui-muted:#506b73;--ui-ground:#f0f6f5;--ui-glow:#dcecef;}
  body.da-theme-tracking {background:#edf0f5;isolation:isolate;}
  body.da-theme-tracking::before {content:"";position:fixed;inset:0;z-index:-1;background:url("/assets/tracking-background.webp?v=stairs-2") center center / cover no-repeat;pointer-events:none;}
  body.da-theme-calc {--ui-accent:#386258;--ui-deep:#284c43;--ui-soft:#e3eee8;--ui-tint:#d4e4df;--ui-edge:#bfd5cb;--ui-ground:#f1f5ef;--ui-glow:#dfebe3;}
  body.da-theme-school {
    --bg-color:var(--ui-ground);--bg-color-light:var(--ui-paper);--text-muted:var(--ui-muted);--border:var(--ui-edge);
    --glass-bg:#fffdf7f2;--glass-border:var(--ui-edge);--glass-shadow:0 12px 30px -20px #294f3330;
    --accent:var(--ui-accent);--accent-light:var(--ui-soft);--nav-bg:#fffdf7eb;--input-bg:#fff;
    --card-bg:#fffdf7f2;--card-hover:#f4f7ef;--chip-idle:#edf2e8;--chip-hover:#e3ecda;
    --icon-bg:#e3ecda;--icon-border:var(--ui-edge);--h1-grad-start:var(--ui-deep);--h1-grad-end:#627a58;
  }
  .da-theme :is(.control-panel,.da-card,.da-stat,.da-auth,.filter-card,.school-card,.calculator-card,.results-card) {
    border-color:var(--ui-edge); border-radius:24px;
    box-shadow:0 12px 28px -22px #2b44394d,inset 0 1px 0 #fff;
  }
  .da-theme .control-panel {background:linear-gradient(135deg,var(--ui-paper),var(--ui-soft));}
  .da-theme :is(.da-card,.da-stat,.da-settings-card,.calculator-card,.results-card) {background:var(--ui-paper);}
  .da-theme :is(.header-title,.form-section-title,.main-label) {color:var(--ui-accent);}
  .da-theme.da-program-page .panel-header {padding:20px 22px;background:linear-gradient(120deg,var(--ui-tint),var(--ui-soft));border:1px solid var(--ui-edge);border-radius:20px;}
  .da-theme .input-group {border-color:var(--ui-edge);background:#fffdf7f5;box-shadow:0 5px 14px -10px #294f3340;}
  .da-theme .input-group::before {background:linear-gradient(180deg,var(--ui-accent),var(--ui-tint));}
  .da-theme .input-group:hover,.da-theme .input-group:focus-within {border-color:var(--ui-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-accent) 12%,transparent);}
  .da-theme .input-group :is(label,.main-label) {color:var(--ui-accent);}
  .da-theme :is(.percentage-select-shell,.paragraph-count-field,.check-label,.task-label,.print-visibility-option,.priority-option) {border-color:var(--ui-edge);background:var(--ui-soft);color:var(--ui-accent);}
  .da-theme .percentage-select-shell::after {border-color:var(--ui-accent);}
  .da-theme :is(.check-label,.task-label,.print-visibility-option):has(input:checked) {background:var(--ui-accent);border-color:var(--ui-accent);color:#fffdf2;box-shadow:0 3px 8px #263f331a;}
  .da-theme .control-panel input[type=checkbox],.da-theme .control-panel input[type=radio] {accent-color:var(--ui-accent);}
  .da-theme :is(.da-tool-nav,.da-nav,.da-footer) {border-color:var(--ui-edge);}
  .da-theme :is(.da-tool-nav-home,.da-tool-nav-links a,.da-tool-nav-links button,.da-entry a,.da-entry button,.da-links a,.da-links button,.btn-back) {
    background:#fffdf7e6;border:1px solid var(--ui-edge);border-radius:13px;color:var(--ui-accent);text-decoration:none;
  }
  .da-theme :is(.da-tool-nav-home,.da-entry a,.da-entry button) {display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;font-weight:700;}
  .da-theme :is(.da-tool-nav-links,.da-links) {gap:8px;}
  .da-theme :is(.da-tool-nav-links a,.da-links a):hover,.da-theme .da-links a[aria-current=page] {background:var(--ui-soft);border-color:var(--ui-accent);color:var(--ui-deep);}
  .da-theme .da-program-toolbar {background:#fffdf7e6;border-color:var(--ui-edge);border-radius:18px;}
  .da-theme .da-program-toolbar input {border-color:var(--ui-edge);}
  .da-theme :is(.control-panel .btn,.da-program-toolbar button,.da-page-button,.da-settings-card button,.da-settings-done,.da-upgrade-dialog button,.da-week-topic-actions button) {background:linear-gradient(115deg,var(--ui-accent),var(--ui-deep));color:#fffdf2;border-radius:12px;box-shadow:0 4px 10px #263f3317;}
  .da-theme .control-panel :is(.btn-secondary,.btn-lock,.btn-muted) {background:var(--ui-soft);color:var(--ui-accent);border-color:var(--ui-edge);}
  .da-theme .control-panel .btn-danger {background:#f9e9e3;color:#9b382a;border-color:#e8c6bb;}
  .da-theme-yks .control-panel #clearTopicsBtn {background:#f9e9e3!important;color:#9b382a;}
  .da-theme-yks .control-panel .btn[onclick="generatePlan()"] {background:var(--ui-soft)!important;color:var(--ui-accent);}
  .da-theme-yks .control-panel .btn[onclick="toggleAllManualSubjects(true)"] {background:var(--ui-accent)!important;}
  .da-theme-yks .control-panel .btn[onclick="toggleAllManualSubjects(false)"] {background:var(--ui-soft)!important;color:var(--ui-accent);}
  .da-theme .control-panel .btn-print {background:linear-gradient(115deg,var(--ui-accent),var(--ui-deep));color:#fffdf2;}
  .da-theme :is(.control-panel,.da-program-toolbar,.da-settings-dialog,.da-upgrade-dialog,.topic-dialog) :is(input,select,textarea):focus-visible {outline:3px solid color-mix(in srgb,var(--ui-accent) 30%,white);outline-offset:2px;}
  .da-theme :is(.control-panel,.da-program-toolbar,.da-nav) :is(a,button):focus-visible {outline:3px solid color-mix(in srgb,var(--ui-accent) 40%,white);outline-offset:3px;}
  .da-theme .control-panel :is(.time-schedule-panel,.time-slot-card,.da-free-features) {background:var(--ui-paper);border-color:var(--ui-edge);box-shadow:0 5px 16px -12px #294f3340;}
  .da-theme .control-panel :is(.time-schedule-panel summary,.time-slot-card strong,.summary-heading) {color:var(--ui-accent);}
  .da-theme :is(.da-feature-badge,.da-range-locked,.da-free-features a) {background:var(--ui-soft);border-color:var(--ui-edge);color:var(--ui-accent);border-radius:10px;}
  .da-theme .da-free-features {color:var(--ui-muted);}
  .da-theme .control-panel input[readonly] {background:#f2f3ec;color:var(--ui-muted);}
  .da-theme .da-upgrade-actions a {background:var(--ui-accent);color:#fffdf2;border-color:var(--ui-accent);}
  .da-theme .da-upgrade-actions button {background:var(--ui-soft);color:var(--ui-accent);border-color:var(--ui-edge);}
  .da-theme-tracking .input-group .radio-group label:has(input:checked) {color:#fffdf2;transform:none;}
  /* Topic and account dialogs reuse the current tool's palette. */
  .da-theme :is(.topic-dialog,.da-settings-dialog,.da-upgrade-dialog,.da-week-topic-dialog,.question-edit-dialog) {background:var(--ui-paper);border-color:var(--ui-edge);border-radius:22px;color:var(--ui-ink);}
  .da-theme :is(.topic-header,.da-week-topic-heading) {background:linear-gradient(115deg,var(--ui-accent),var(--ui-deep));color:#fffdf2;}
  .da-theme .topic-tabs {padding:14px;gap:10px;background:var(--ui-soft);border-color:var(--ui-edge);}
  .da-theme .topic-tab {border:1px solid var(--ui-edge);border-radius:12px;background:var(--ui-paper);color:var(--ui-muted);box-shadow:none;}
  .da-theme .topic-tab.active {background:var(--ui-accent);color:#fffdf2;border-color:var(--ui-accent);box-shadow:0 4px 10px #263f3317;}
  .da-theme :is(.topic-count,.topic-unit-title,.topic-catalog-context) {background:var(--ui-soft);color:var(--ui-accent);}
  .da-theme :is(.topic-body,.topic-footer,.da-settings-dialog-header,.da-settings-dialog-footer) {background:var(--ui-paper);border-color:var(--ui-edge);}
  .da-theme .topic-card.selected {background:var(--ui-soft);border-color:var(--ui-accent);box-shadow:0 4px 10px #263f3317;}
  .da-theme :is(.topic-check,.da-week-topic-list input) {accent-color:var(--ui-accent);}
  .da-theme .topic-pill:has(input:checked),.da-theme .topic-footer .btn {background:var(--ui-accent);border-color:var(--ui-accent);color:#fffdf2;}
  .da-theme :is(.da-settings-close,.da-status,.da-settings-status,.da-badge) {background:var(--ui-soft);color:var(--ui-accent);}
  .da-theme .da-status.error,.da-theme .da-settings-status.error {background:#f9e9e3;color:#99372b;}
  /* Tracking modes retain their behavior and share a calm blue/green palette. */
  .da-theme-tracking .control-panel:is(.mode-lgs,.mode-yks) {
    --mode-accent:var(--ui-accent);--mode-accent-2:var(--ui-deep);--mode-accent-3:#3b6b61;
    --mode-soft:var(--ui-soft);--mode-border:var(--ui-edge);--mode-shadow:#3263751a;
    --mode-header:linear-gradient(120deg,#326375,#28554b);--mode-panel:linear-gradient(135deg,#fffdf7e6,#e3eef0d9);background:var(--mode-panel);
    -webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);
  }
  .da-theme-tracking .panel-header-wrapper {border-radius:20px;}
  .da-theme-tracking .panel-header-wrapper .tool-tabs label {background:#ffffff26;color:#fffdf2;border-color:#ffffff66;}
  .da-theme-tracking .panel-header-wrapper .tool-tabs label:has(input:checked) {background:#fffdf7;color:#264d5d;border-color:#fffdf7;}
  /* Calculator and school search keep their existing component layouts. */
  .da-theme-calc .panel-header {background:linear-gradient(115deg,#386258,#284c43);box-shadow:0 7px 18px #284c431a;border-radius:20px;}
  .da-theme-calc .exam-tab {background:var(--ui-paper);border-color:var(--ui-edge);color:var(--ui-accent);border-radius:13px;}
  .da-theme-calc .exam-tab.active {background:var(--ui-accent);color:#fffdf2;}
  .da-theme-school .bg-layer {display:none;}
  .da-theme-school .premium-nav {background:#fffdf7eb;border-color:var(--ui-edge);box-shadow:0 4px 14px #284c4310;}
  .da-theme-school .nav-back {background:var(--ui-soft);border:1px solid var(--ui-edge);border-radius:13px;padding:10px 14px;}
  .da-theme-school .filter-card,.da-theme-school .school-card {background:var(--ui-paper);}
  .da-theme-school .dashboard-header h1 {font-size:clamp(28px,4vw,48px);}
  body.da-theme-calc[data-active-exam] {
    --exam-accent-rgb:56 98 88;--exam-second-rgb:91 119 95;--exam-third-rgb:128 147 114;
    --exam-panel-end:229 238 232;--exam-left-tint-rgb:253 251 245;--exam-left-deep-rgb:237 242 231;
    --exam-right-tint-rgb:232 240 229;--exam-right-deep-rgb:217 229 214;--exam-input-bg:#f5f7f0;
  }
  body.da-theme-calc[data-active-exam] :is(.control-panel,.calculator-card,.results-card) {border-color:var(--ui-edge);box-shadow:0 12px 28px -22px #2b44394d;}
  .da-theme-calc .exam-switch {background:var(--ui-soft);border-color:var(--ui-edge);box-shadow:none;}
  .da-theme-calc .clear-button {background:var(--ui-soft);color:var(--ui-accent);border-color:var(--ui-edge);}
  .da-theme-school .nav-brand {background:linear-gradient(120deg,var(--ui-deep),#627a58);background-clip:text;-webkit-background-clip:text;}
  .da-theme-school .meta-tag[class*="tag-color-"] {background:#f3eadb;color:#715434;border-color:#dfccb0;}
  .da-theme-school .perc-badge {background:var(--ui-soft);color:var(--ui-accent);border-color:var(--ui-edge);}
  /* Account and admin screens use quieter surfaces, with common buttons. */
  .da-theme.da-page .da-brand-mark {background:var(--ui-accent);box-shadow:0 4px 12px #28554b26;}
  .da-theme.da-page :is(.da-hero,.da-auth-story) {background:linear-gradient(115deg,#28554b,#1f443b);border-radius:22px;color:#fffdf2;}
  .da-theme.da-page .da-auth-story {border-radius:0;}
  .da-theme.da-page :is(.da-hero p,.da-auth-story p,.da-hero-email,.da-hero .da-eyebrow,.da-auth-story .da-eyebrow,.da-auth-story small) {color:#e9f0dd;}
  .da-theme.da-page :is(button,a.da-button) {background:linear-gradient(115deg,var(--ui-accent),var(--ui-deep));color:#fffdf2;border:1px solid var(--ui-deep);border-radius:12px;box-shadow:0 4px 10px #263f3326;}
  .da-theme.da-page button:hover,.da-theme.da-page a.da-button:hover {background:var(--ui-deep);box-shadow:0 5px 14px #263f3333;}
  .da-theme.da-page button.secondary {background:linear-gradient(135deg,var(--ui-paper),var(--ui-soft));color:var(--ui-accent);border-color:#7e9c8a;}
  .da-theme.da-page button.secondary:hover {background:var(--ui-soft);border-color:var(--ui-accent);}
  .da-theme.da-page a.da-button.secondary {background:linear-gradient(115deg,var(--ui-accent),var(--ui-deep));color:#fffdf2;border-color:var(--ui-deep);}
  .da-theme.da-page a.da-button.secondary:hover {background:var(--ui-deep);}
  .da-theme.da-page td .da-actions :is(button,a.da-button) {border-width:1px;border-style:solid;}
  .da-theme.da-page :is(button,a.da-button):focus-visible {outline:3px solid var(--ui-accent);outline-offset:3px;}
  .da-theme.da-page a.da-button.da-admin-return {padding:11px 18px;}
  .da-theme.da-page :is(button.danger,button.da-signout,button.da-settings-logout),.da-theme .da-tool-nav .da-signout {background:#f9e9e3;color:#99372b;border-color:#c48275;}
  .da-theme.da-page :is(.da-tool,.da-topic-unit-group) {background:var(--ui-paper);border-color:var(--ui-edge);border-radius:18px;}
  .da-theme.da-page .da-tool:hover {background:var(--ui-soft);border-color:var(--ui-accent);}
  .da-theme.da-page :is(.da-tool-icon,.da-eyebrow,.da-stat strong) {color:var(--ui-accent);}
  .da-theme.da-page .da-tool-icon {background:var(--ui-soft);}
  .da-theme.da-page :is(input:not([type=checkbox]),select,textarea) {border-color:var(--ui-edge);}
  .da-theme.da-page :is(thead,.da-topic-subject>summary) {background:var(--ui-soft);}
  .da-theme.da-page :is(.da-lead,.da-muted,.da-stat span,.da-tool>span:not(.da-tool-icon)) {color:var(--ui-muted);}
  .da-theme.da-page .da-badge-success {background:#e0eee1;color:#2d6240;}
  .da-theme.da-page :is(.da-catalog-groups,.da-catalog-exams) button {background:var(--ui-paper);border-color:var(--ui-edge);color:var(--ui-accent);}
  .da-theme.da-page :is(.da-catalog-groups,.da-catalog-exams) button[aria-pressed=true] {background:var(--ui-accent);color:#fffdf2;border-color:var(--ui-accent);}
  .da-theme.da-page .da-membership-steps span {color:#e9f0dd;}
  .da-theme.da-page .da-membership-story .da-purchase-button {color:var(--ui-accent);background:var(--ui-paper);border-color:var(--ui-edge);}
  /* Pomodoro keeps its duration and timer controls; only the shell changes. */
  .da-home .pomo-content {background:linear-gradient(135deg,#fffdf7,#e8efe0);border-color:#c6d6c8;border-radius:24px;}
  .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) {
    background:#e3e9e5 url("/assets/home-landscape.webp") center center / cover no-repeat;
    backdrop-filter:none;
    padding:max(20px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  }
  .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-content {
    width:min(100%,640px);max-width:640px;height:auto;max-height:100%;
    padding:clamp(18px,3vw,32px);border:1px solid #c6d6c8;border-radius:28px;
    background:linear-gradient(135deg,#fffdf7f2,#e8efe0ed);
    -webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);
    box-shadow:0 20px 60px -18px #1f443b66,inset 0 1px 0 #fff;
  }
  .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-content>* {flex-shrink:0;}
  .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-toolbar {margin-bottom:12px;flex-shrink:0;}
  .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-content::after {content:none;}
  .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) :is(.pomo-settings,.pixel-grid,.pomo-actions) {flex-shrink:0;max-width:100%;}
  @media (orientation:landscape) and (max-height:520px) {
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) {padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-content {padding:12px 18px;border-radius:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 16px;}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) :is(.pomo-toolbar,.pomo-fullscreen-note,#breakSettings,.pixel-grid,#pomoMsg,.pomo-actions) {grid-column:1/-1;}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-toolbar {margin-bottom:0;}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) #pomoTimer {margin-bottom:0!important;}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-settings {width:100%;margin:0;}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pixel-grid {margin:4px 0;padding:0;}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) #pomoMsg {margin-bottom:0!important;font-size:.85rem!important;line-height:1.4;}
    .da-home .pomo-modal:is(:fullscreen,.pomo-focus-fallback) .pomo-actions {width:100%;}
  }
  .da-home .pomo-settings {background:#fffdf7;border-color:#c6d6c8;}
  .da-home :is(.pomo-select-shell,.pomo-input-shell) {border-color:#c6d6c8;}
  .da-home :is(.close-pomo,.pomo-fullscreen-btn) {background:#e5eee5;color:#28554b;border-color:#c6d6c8;}
  .da-home .pomo-modal .pixel-box {background:#fff;border-color:#8ca89a;box-shadow:0 1px 3px #28554b12;}
  .da-home .pomo-modal .pixel-fill {background:#28554b;}
  .da-home .pomo-modal .pixel-box.dead .pixel-fill {background:#6d6055;}
  .da-home #pomoBtn {background:linear-gradient(115deg,#386258,#244d43)!important;color:#fffdf2!important;box-shadow:0 5px 12px #28554b1f;}
  .da-home #pomoBtn.btn-blue {background:linear-gradient(115deg,#326375,#264d5d)!important;}
  .da-home #pomoPause {background:#e9d9bb!important;color:#5d452a!important;}
  .da-home #pomoGiveUp {background:#f4e1d7!important;color:#963e2d!important;}
  .da-home #pomoBtn:hover {filter:brightness(1.08);}
  .da-home .pomo-select-shell::after {border-color:#28554b;}
  .da-home :is(.pomo-select-shell,.pomo-input-shell):focus-within {border-color:#28554b;box-shadow:0 0 0 4px #28554b1f;}
  .da-theme-school .da-school-navigation {padding:18px 22px;background:var(--ui-paper);border:1px solid var(--ui-edge);border-radius:20px;margin-bottom:30px;box-shadow:0 6px 18px -14px #28554b40;}
  .da-theme-school .dashboard-header .nav-brand {font-size:13px;letter-spacing:.06em;margin-bottom:12px;}
  .da-theme-calc.embed-mode #da-tool-navigation {display:none;}
  @media(max-width:760px) {
    .da-theme.da-program-page .panel-header {padding:16px;}
    .da-theme .da-tool-nav-links {gap:6px;}
    .da-theme .topic-tabs {padding:10px;gap:8px;}
    .da-theme .topic-tab {padding:12px 8px;}
    .da-theme :is(.da-links a,.da-links button) {min-width:0;}
  }
  /* Varied pastel cards keep related controls visually distinct. */
  .da-theme :is(.da-card,.da-stat,.da-settings-card,.calculator-card,.results-card,.filter-card,.school-card,.manual-schedule-panel,.day-selection-card,.time-slot-card) {background:linear-gradient(135deg,var(--ui-paper),var(--ui-soft));border-color:var(--ui-edge);}
  .da-theme.da-page .da-tool {background:linear-gradient(135deg,#fffdf7,#e8eee2);}
  .da-theme.da-page .da-tool:nth-child(3n+2),.da-theme .da-stat:nth-child(3n+2) {background:linear-gradient(135deg,#fffdf7,#e7eef0);border-color:#c0d0d4;}
  .da-theme.da-page .da-tool:nth-child(3n),.da-theme .da-stat:nth-child(3n) {background:linear-gradient(135deg,#fffdf7,#f1e6d9);border-color:#deccb6;}
  .da-theme .topic-card {background:linear-gradient(135deg,#fffdf7,var(--ui-soft));border-color:var(--ui-edge);}
  .da-theme .topic-card.selected {background:var(--ui-soft);border-color:var(--ui-accent);}
  .da-theme .da-week-topic-group label:has(input:checked) {background:var(--ui-soft);border-color:var(--ui-accent);}
  .da-theme .da-week-topic-group input {accent-color:var(--ui-accent);}
  .da-theme .da-week-topic-actions .da-week-topic-clear {background:var(--ui-soft);color:var(--ui-accent);border-color:var(--ui-edge);}
  .da-theme-yks :is(.day-selection-title,.manual-schedule-heading strong) {color:var(--ui-accent);}
  .da-theme-yks .day-subject-label:has(input:checked) {background:var(--ui-soft);border-color:var(--ui-accent);color:var(--ui-accent);}
  .da-theme-yks .day-subject-label input {accent-color:var(--ui-accent);}
  .da-theme-yks .modern-tasks-panel {grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));}
  /* Cool slate contrasts with the warm YKS shell; output options lean teal. */
  .da-theme-yks .modern-task-card {--task-ink:#355764;--task-soft:#e4edf0;--task-edge:#b7cbd0;--task-muted:#526b75;background:linear-gradient(135deg,#fffdf8,#f0f4f4);border-color:var(--task-edge);box-shadow:0 6px 16px -12px #35576450;}
  .da-theme-yks .modern-task-card:nth-child(2) {--task-ink:#315c4e;--task-soft:#e3eeea;--task-edge:#afccc1;--task-muted:#506b60;background:linear-gradient(135deg,#fffdf8,#f0f5ef);}
  .da-theme-yks .modern-card-title {color:var(--task-ink);border-color:var(--task-edge);}
  .da-theme-yks .modern-toggle-row {background:#fafbf8;border-color:#d5ddda;}
  .da-theme-yks .modern-toggle-row:hover {background:var(--task-soft);border-color:var(--task-edge);}
  .da-theme-yks .modern-toggle-row:has(input:checked) {background:linear-gradient(120deg,var(--task-soft),#f1f5ef);border-color:var(--task-edge);}
  .da-theme-yks .modern-toggle-row .toggle-title,.da-theme-yks .modern-toggle-row:has(input:checked) .toggle-title {color:var(--task-ink);}
  .da-theme-yks .modern-toggle-row .toggle-subtitle {color:var(--task-muted);}
  .da-theme-yks .control-panel input.modern-checkbox {accent-color:var(--task-ink);}
  .da-theme-yks .q-input-wrapper {background:#fff;border-color:var(--task-edge);}
  .da-theme-yks .q-input-wrapper input {color:var(--task-ink);}
  /* Calculation cards use a muted palette without losing exam/fit semantics. */
  body.da-theme-calc[data-active-exam] .subject-card {--subject-accent:#794b3b;--subject-paper:#f4e9e1;--subject-edge:#d6b8a8;background:linear-gradient(135deg,#fffdf8,var(--subject-paper));border-color:var(--subject-edge);border-left-color:var(--subject-accent);box-shadow:0 6px 16px -12px #35576440;}
  body.da-theme-calc[data-active-exam] .subject-card:nth-child(6n+2) {--subject-accent:#355764;--subject-paper:#e9eff0;--subject-edge:#b7cbd0;}
  body.da-theme-calc[data-active-exam] .subject-card:nth-child(6n+3) {--subject-accent:#455e38;--subject-paper:#eaf0e2;--subject-edge:#bccdac;}
  body.da-theme-calc[data-active-exam] .subject-card:nth-child(6n+4) {--subject-accent:#785438;--subject-paper:#f4e9d9;--subject-edge:#d9c09e;}
  body.da-theme-calc[data-active-exam] .subject-card:nth-child(6n+5) {--subject-accent:#775159;--subject-paper:#f2e8e7;--subject-edge:#d3b9bb;}
  body.da-theme-calc[data-active-exam] .subject-card:nth-child(6n+6) {--subject-accent:#61516b;--subject-paper:#eeeaef;--subject-edge:#c9becb;}
  body.da-theme-calc[data-active-exam] :is(.metric-box,.mini-input input) {background:#fffdf8;border-color:#d1dcd3;}
  body.da-theme-calc[data-active-exam] :is(.result-item,.yearly-card,.yks-net-item,.yks-score-section) {background:linear-gradient(135deg,#fffdf8,#eaf0e5);border-color:#c6d6c8;}
  body.da-theme-calc[data-active-exam] .results-card .result-item.highlight {background:linear-gradient(135deg,#e3eeea,#e8eff1);border-color:#afccc1;}
  body.da-theme-calc[data-active-exam] .yks-score-title {background:#e7eef0;color:#355764;}
  .da-theme-calc .yks-subject-group {border-color:#c6d6c8;background:#fffdf8;}
  .da-theme-calc .yks-subject-group[data-tone=tyt] {--group-accent:#73513c;}
  .da-theme-calc .yks-subject-group[data-tone=ayt] {--group-accent:#355764;}
  .da-theme-calc .yks-subject-group[data-tone=ydt] {--group-accent:#315c4e;}
  .da-theme-calc .yks-fixed-group {background:linear-gradient(135deg,#f3e9da,#e7eef0);border-color:#dfcbb6;}
  .da-theme-calc .school-card.fit-safe {background:linear-gradient(135deg,#eaf0e2,#fffdf8);border-color:#bccdac;}
  .da-theme-calc .school-card.fit-reach {background:linear-gradient(135deg,#f4e9d9,#fffdf8);border-color:#d9c09e;}
  .da-theme-calc .school-card.fit-hard {background:linear-gradient(135deg,#f4e9e1,#fffdf8);border-color:#d6b8a8;}
  .da-theme-calc :is(.school-legend .fit-safe,.school-card.fit-safe .school-card-score span) {background:#eaf0e2;color:#455e38;}
  .da-theme-calc :is(.school-legend .fit-reach,.school-card.fit-reach .school-card-score span) {background:#f4e9d9;color:#785438;}
  .da-theme-calc :is(.school-legend .fit-hard,.school-card.fit-hard .school-card-score span) {background:#f4e9e1;color:#794b3b;}
  .da-theme-school .school-card:nth-child(3n+2) {background:linear-gradient(135deg,#fffdf7,#e9eff0);border-color:#b7cbd0;}
  .da-theme-school .school-card:nth-child(3n) {background:linear-gradient(135deg,#fffdf7,#f4e9d9);border-color:#d9c09e;}

  .da-program-page .control-panel :is(.summary-action-row,.topic-action-buttons) {border-top-color:color-mix(in srgb,var(--ui-accent) 65%,var(--ui-paper));}

  .da-theme-yks #soruOzeti .score-chip {--score-paper:#e9eff0;--score-edge:#b7cbd0;--score-ink:#355764;background:linear-gradient(140deg,#fffdf8,var(--score-paper))!important;color:var(--score-ink)!important;border-color:var(--score-edge)!important;box-shadow:0 6px 16px -12px #253c3340,inset 0 1px 0 #fff9;}
  .da-theme-yks #soruOzeti .score-chip:nth-child(2) {--score-paper:#eaf0e2;--score-edge:#bccdac;--score-ink:#455e38;}
  .da-theme-yks #soruOzeti .score-chip:nth-child(3) {--score-paper:#f4e9d9;--score-edge:#d9c09e;--score-ink:#785438;}
  .da-theme-yks #soruOzeti .score-label {color:var(--score-ink);opacity:1;}
  .da-theme-yks #soruOzeti .score-value {color:#253c33;}

  /* Compact topic rows keep the title, tasks and day controls together. */
  .da-program-page .topic-body {padding:16px 20px;}
  .da-program-page .topic-grid {gap:8px;}
  .da-program-page .topic-card {min-height:0;padding:8px 10px;gap:8px;grid-template-columns:36px minmax(0,1fr) auto;border-width:1px;}
  .da-program-page .topic-select-label {display:flex;align-items:center;justify-content:center;min-width:36px;min-height:44px;cursor:pointer;}
  .da-program-page .topic-check {width:20px;height:20px;margin:0;}
  .da-program-page .topic-info {display:flex;align-items:center;gap:7px;flex-wrap:wrap;}
  .da-program-page .topic-name {font-size:14px;line-height:1.3;}
  .da-program-page .topic-info .topic-grade-badge {margin:0;padding:2px 6px;font-size:10px;}
  .da-program-page .topic-actions {grid-column:auto;gap:5px;flex-wrap:nowrap;}
  .da-program-page .topic-pill {padding:6px 8px;min-height:44px;box-sizing:border-box;font-size:12px;}
  .da-program-page .topic-unit-title {padding:8px 12px;margin:6px 0 0;font-size:15px;}
  .da-theme-lgs .topic-grid {grid-template-columns:1fr;}
  .da-program-page .topic-card:has(.topic-day-field) {grid-template-columns:36px minmax(0,1fr) auto minmax(180px,220px);}
  .da-program-page .topic-day-field {grid-column:auto;display:flex;flex-direction:column;align-items:stretch;gap:2px;}
  .da-program-page .topic-day-field label {font-size:10px;}
  .da-program-page .topic-day-field select {width:100%;min-height:38px;padding:5px 7px;font-size:12px;}
  @media (max-width:1000px) {
    .da-program-page .topic-card:has(.topic-day-field) {grid-template-columns:36px minmax(0,1fr) auto;}
    .da-program-page .topic-day-field {grid-column:2/-1;flex-direction:row;align-items:center;gap:8px;}
    .da-program-page .topic-day-field select {width:min(240px,100%);}
  }
  @media (max-width:820px) {
    .da-program-page .topic-grid {grid-template-columns:1fr;}
  }
  @media (max-width:600px) {
    .da-program-page .topic-body {padding:12px;}
    .da-program-page .topic-card {grid-template-columns:28px minmax(0,1fr);padding:7px 8px;gap:5px 8px;}
    .da-program-page .topic-select-label {min-width:28px;}
    .da-program-page .topic-actions {grid-column:2/-1;justify-content:flex-start;}
    .da-program-page .topic-pill {font-size:11px;padding:5px 8px;}
    .da-program-page .topic-day-field {grid-column:2/-1;flex-direction:column;align-items:stretch;gap:2px;}
    .da-program-page .topic-day-field select {width:100%;min-height:44px;}
  }

  .da-theme :is(.topic-catalog-context,.topic-unit-title) {background:transparent;border-radius:0;}

}

/* Consistent navigation and controls on compact screens. */
@media screen {
 .da-theme :is(.da-nav,.da-tool-nav) button.da-mobile-menu-toggle,.da-mobile-current {display:none;}
 .da-nav>div:first-child {flex-shrink:0;min-width:0;}
 .da-nav-menu {display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;min-width:0;}
 .da-account-links {border-left:1px solid var(--ui-edge);padding-left:12px;}
 .da-theme .da-password-field {position:relative;min-width:0;}
 .da-theme .da-password-field input {padding-right:56px;min-height:52px;}
 .da-theme.da-page .da-password-field button.da-password-toggle,.da-theme .da-settings-dialog .da-password-field button.da-password-toggle {position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;min-width:44px;min-height:44px;height:44px;margin:0;padding:0;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:var(--ui-accent);box-shadow:none;font:700 12px/1.3 system-ui;}
 .da-theme.da-page .da-password-field button.da-password-toggle[aria-pressed=true],.da-theme .da-settings-dialog .da-password-field button.da-password-toggle[aria-pressed=true] {background:var(--ui-soft);color:var(--ui-accent);}
 .da-auth-options {display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;font-size:12px;flex-wrap:wrap;}
 .da-auth-options>span {color:var(--ui-muted);}
 .da-auth-options a {min-height:44px;display:inline-flex;align-items:center;font-weight:700;text-underline-offset:3px;}
 .da-recovery-card .da-actions>button {width:100%;min-height:48px;}
 .da-theme :is(.da-grid,.da-dashboard-grid,.da-settings-grid,.da-tool-grid)>* {min-width:0;}
 .da-theme .da-status {overflow-wrap:anywhere;}
 .da-theme .da-nav-menu :is(a,button) {min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
}
@media screen and (max-width:1199px) {
 .da-theme.da-page .da-nav {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:8px 0 18px;margin-bottom:20px;}
 .da-theme .da-brand {font-size:17px;gap:9px;letter-spacing:-.5px;}
 .da-theme .da-brand-mark {width:34px;height:34px;font-size:20px;border-radius:11px;flex-shrink:0;}
 .da-theme .da-identity {padding-left:43px;font-size:11px;line-height:1.5;margin-top:4px;}
 .da-theme :is(.da-nav,.da-tool-nav) button.da-mobile-menu-toggle {display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:76px;min-height:44px;padding:9px 12px;transition:none;border:1px solid var(--ui-edge);border-radius:12px;background:var(--ui-paper);color:var(--ui-accent);font:700 12px/1.4 system-ui;box-shadow:0 4px 12px -8px #28554b50;}
 .da-theme :is(.da-nav,.da-tool-nav) button.da-mobile-menu-toggle[aria-expanded=true] {background:var(--ui-accent);color:#fffdf7;}
 .da-theme .da-nav-menu {display:none;grid-column:1/-1;width:100%;padding:14px;background:linear-gradient(135deg,var(--ui-paper),var(--ui-soft));border:1px solid var(--ui-edge);border-radius:16px;box-shadow:0 10px 25px -20px #28554b60;}
 .da-theme .da-menu-open .da-nav-menu {display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;align-items:stretch;gap:12px;}
 .da-theme .da-mobile-current {display:block;color:var(--ui-muted);font:700 11px/1.4 system-ui;padding:0 2px 2px;letter-spacing:.02em;}
 .da-theme .da-nav-menu .da-links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;justify-content:stretch;}
 .da-theme .da-nav-menu .da-links :is(a,button) {width:100%;min-height:46px;margin:0;padding:9px 8px;font-size:12px;line-height:1.4;text-align:center;white-space:normal;overflow-wrap:anywhere;border-radius:11px;}
 .da-theme .da-account-links {padding:12px 0 0;border-left:0;border-top:1px solid var(--ui-edge);}
 .da-theme .da-tool-nav {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding-bottom:14px;margin-bottom:18px;}
 .da-theme .da-tool-nav-home {justify-self:start;font-size:12px;padding:9px 12px;}
 .da-theme .da-tool-nav-links {display:none;grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;padding:12px;background:var(--ui-paper);border:1px solid var(--ui-edge);border-radius:14px;}
 .da-theme .da-menu-open .da-tool-nav-links {display:grid;}
 .da-theme .da-tool-nav-links :is(a,button) {min-height:46px;font-size:12px;padding:9px 8px;overflow-wrap:anywhere;}
}
@media screen and (max-width:600px) {
 .da-theme.da-page .da-shell {padding:14px 14px 36px;}
 .da-theme.da-page :is(.da-card,.da-settings-card) {padding:18px;border-radius:18px;}
 .da-theme.da-page h1 {font-size:25px;line-height:1.25;letter-spacing:-.6px;overflow-wrap:anywhere;}
 .da-theme.da-page h2 {font-size:19px;}
 .da-theme.da-page .da-hero {padding:22px;border-radius:18px;gap:12px;}
 .da-theme.da-page .da-hero p {font-size:13px;}
 .da-theme.da-page .da-actions,.da-theme .da-branding-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-items:stretch;}
 .da-theme.da-page .da-actions>:is(a,button),.da-theme .da-branding-actions>:is(a,button) {display:flex;align-items:center;justify-content:center;min-width:0;min-height:46px;margin:0;width:100%;padding:10px;font-size:12px;line-height:1.4;text-align:center;white-space:normal;}
 .da-theme.da-page .da-actions>:only-child,.da-theme .da-branding-actions>:only-child {grid-column:1/-1;}
 .da-theme.da-page .da-actions>[role=status] {grid-column:1/-1;}
 .da-theme .da-book-toolbar>.da-book-save button {min-height:56px;}
 .da-theme.da-page :is(input:not([type=checkbox]),select,textarea),.da-theme .control-panel :is(input:not([type=checkbox]):not([type=radio]),select) {font-size:16px;}
 .da-theme.da-page .da-stat-grid {gap:8px;}
 .da-theme.da-page .da-stat {padding:14px 10px;border-radius:14px;}
 .da-theme.da-page .da-stat strong {font-size:25px;}
 .da-theme.da-page .da-tool-grid {grid-template-columns:1fr;gap:10px;}
 .da-theme.da-page .da-tool {padding:18px 18px 18px 72px;min-height:96px;border-radius:15px;}
 .da-theme.da-page .da-tool-icon {position:absolute;left:18px;top:20px;width:38px;height:38px;margin:0;}
 .da-theme.da-page .da-tool strong {font-size:14px;padding-right:16px;}
 .da-theme.da-page .da-tool>b {top:18px;right:14px;}
 .da-theme.da-page .da-auth {display:flex;flex-direction:column;border-radius:18px;margin:12px 0;}
 .da-theme.da-page .da-auth-form {order:-1;padding:24px 20px;}
 .da-theme.da-page .da-auth-story {padding:24px 20px;border-top:1px solid var(--ui-edge);}
 .da-theme.da-page .da-auth-options>span {display:none;}
 .da-theme.da-page .da-auth-options {justify-content:flex-end;margin-top:6px;}
 .da-theme.da-page .da-footer {gap:12px;flex-wrap:wrap;}
 .da-theme .da-resource-selector {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
 .da-theme .da-resource-selector label {grid-column:1/-1;min-width:0;}
 .da-theme .da-resource-selector :is(a,button) {font-size:12px;min-height:46px;padding:10px;text-align:center;display:flex;align-items:center;justify-content:center;}
 .da-theme .da-save-actions {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
 .da-theme .da-save-actions button {min-width:0;font-size:12px;padding:10px;}
 .da-theme .radio-group {display:grid;grid-template-columns:repeat(auto-fit,minmax(62px,1fr));gap:8px;}
 .da-theme .radio-group label {padding:10px 6px;min-height:44px;display:flex;align-items:center;justify-content:center;text-align:center;}
}
@media print {.da-mobile-menu-toggle,.da-nav-menu{display:none!important;}}

@media screen {.da-theme.da-page .da-password-field button.da-password-toggle:hover,.da-theme .da-settings-dialog .da-password-field button.da-password-toggle:hover{background:var(--ui-soft);color:var(--ui-accent);box-shadow:none;}.da-password-toggle svg{display:block;pointer-events:none;}}

/* Align topic task buttons with the day select, excluding its caption. */
@media screen {
 .da-program-page .topic-actions {align-self:end;align-items:center;}
 .da-program-page .topic-pill {height:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;}
 .da-program-page .topic-day-field {position:relative;align-self:end;}
 .da-program-page .topic-day-field label {line-height:14px;margin:0;}
 .da-program-page .topic-day-field select {height:44px;min-height:44px;box-sizing:border-box;}
 .da-program-page .topic-day-warning {position:absolute;left:0;top:100%;padding-top:2px;line-height:12px;}
 .da-program-page .topic-card:has(.topic-day-warning) {padding-bottom:24px;}
}
@media screen and (min-width:601px) and (max-width:1000px) {
 .da-program-page .topic-card:has(.topic-day-field) {grid-template-columns:36px minmax(0,1fr) minmax(160px,220px);}
 .da-theme-lgs .topic-info {grid-column:2/-1;}
 .da-theme-lgs .topic-actions {grid-column:2;grid-row:2;justify-content:flex-start;}
 .da-program-page .topic-day-field {grid-column:3;grid-row:2;flex-direction:column;align-items:stretch;gap:2px;}
 .da-program-page .topic-day-field select {width:100%;}
}

/* Brand mark spans both the title and the account identity line. */
@media screen {
 .da-theme.da-page .da-brand {display:inline-flex;align-items:center;gap:12px;}
 .da-theme.da-page .da-brand-text {display:flex;flex-direction:column;gap:4px;min-width:0;}
 .da-theme.da-page .da-brand-title {line-height:24px;display:block;}
 .da-theme.da-page .da-brand .da-identity {padding:0;margin:0;font-size:12px;font-weight:400;line-height:18px;letter-spacing:0;}
 .da-theme.da-page .da-brand:has(.da-identity) .da-brand-mark {width:50px;height:50px;min-width:50px;font-size:28px;border-radius:15px;}
}
@media screen and (max-width:1199px) {
 .da-theme.da-page .da-brand {gap:10px;}
 .da-theme.da-page .da-brand-title {line-height:22px;}
 .da-theme.da-page .da-brand .da-identity {font-size:11px;line-height:17px;}
 .da-theme.da-page .da-brand:has(.da-identity) .da-brand-mark {width:48px;height:48px;min-width:48px;font-size:27px;border-radius:14px;}
}
@media screen {
 .da-theme.da-page .da-brand {max-width:100%;min-width:0;}
 .da-theme.da-page .da-brand .da-identity {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}

/* Keep the full desktop header on one baseline; switch to Menu before it wraps. */
@media screen and (min-width:1200px) {
 .da-theme.da-page .da-nav {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;}
 .da-theme.da-page .da-nav-menu {display:flex;flex-wrap:nowrap;gap:10px;align-items:center;}
 .da-theme.da-page .da-nav-menu .da-links {display:flex;flex-wrap:nowrap;gap:6px;align-items:center;flex-shrink:0;}
 .da-theme.da-page .da-nav-menu .da-account-links {padding-left:10px;}
 .da-theme.da-page .da-nav-menu :is(a,button) {height:44px;min-height:44px;padding:8px 10px;font:650 12px/1.35 system-ui;white-space:nowrap;margin:0;}
}

@media screen {
 .da-theme.da-page .da-curriculum-switch button {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;text-align:left;white-space:normal;line-height:1.45;}
 .da-theme.da-page .da-curriculum-switch button[aria-pressed=false] {background:var(--ui-paper);color:var(--ui-accent);border-color:var(--ui-edge);box-shadow:none;}
 .da-theme.da-page .da-curriculum-switch button[aria-pressed=false]:hover {background:var(--ui-soft);border-color:var(--ui-accent);}
 .da-theme.da-page .da-curriculum-switch button[aria-pressed=true] {background:var(--ui-accent);color:#fffdf2;border-color:var(--ui-accent);}
}

/* Soft actions need a visible edge as well as a background. */
@media screen {
 .da-theme .control-panel :is(.btn-secondary,.btn-lock,.btn-muted),
 .da-theme-yks .control-panel .btn[onclick="toggleAllManualSubjects(false)"] {
  border:1px solid color-mix(in srgb,var(--ui-accent) 65%,var(--ui-paper));
 }
 .da-theme .control-panel :is(.btn-secondary,.btn-lock,.btn-muted):hover:not(:disabled),
 .da-theme-yks .control-panel .btn[onclick="toggleAllManualSubjects(false)"]:hover:not(:disabled) {
  border-color:var(--ui-accent);background:var(--ui-tint);color:var(--ui-deep);
 }
 .da-theme .control-panel .btn:disabled {opacity:.5;cursor:not-allowed;}
 .da-program-page .topic-actions {flex-wrap:wrap;gap:6px;}
 .da-program-page .topic-video-fields {grid-column:2/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px;min-width:0;}
 .da-program-page .topic-video-fields label {display:flex;flex-direction:column;gap:4px;font:600 12px/1.4 system-ui;color:var(--ui-accent);min-width:0;}
 .da-program-page .topic-video-fields input {width:100%;box-sizing:border-box;height:44px;min-width:0;border:1px solid var(--ui-edge);border-radius:9px;padding:8px 10px;font:400 14px/1.4 system-ui;background:#fff;color:var(--ui-ink);}
 .da-program-page .topic-video-fields input:user-invalid {border-color:#9b382a;}
 .da-program-page .topic-video-error {grid-column:1/-1;color:#9b382a;font:500 12px/1.4 system-ui;}
 .da-program-page .topic-video-error:empty {display:none;}
 .da-program-page .topic-action-buttons .btn {white-space:normal;line-height:1.4;}
}
@media screen and (min-width:1001px) {
 .da-program-page .topic-grid {grid-template-columns:minmax(0,1fr);}
 .da-program-page .topic-card {grid-template-columns:36px minmax(0,1fr) auto;}
 .da-program-page .topic-card:has(.topic-day-field) {grid-template-columns:36px minmax(0,1fr) auto minmax(180px,220px);}
 .da-program-page .topic-select-label,.da-program-page .topic-info {align-self:end;min-height:44px;}
 .da-program-page .topic-info {grid-column:2;grid-row:1;}
 .da-program-page .topic-actions {grid-column:3;grid-row:1;justify-content:flex-start;}
 .da-program-page .topic-day-field {grid-column:4;grid-row:1;flex-direction:column;align-items:stretch;gap:2px;}
 .da-program-page .topic-day-field select {width:100%;}
 .da-program-page .topic-video-fields {grid-row:2;}
}
@media screen and (min-width:701px) and (max-width:1000px) {
 .da-program-page .topic-grid {grid-template-columns:minmax(0,1fr);}
 .da-program-page .topic-card {grid-template-columns:28px minmax(0,1fr);}
 .da-program-page .topic-info {grid-column:2;grid-row:1;}
 .da-program-page .topic-actions {grid-column:2;grid-row:2;justify-content:flex-start;}
 .da-program-page .topic-day-field {grid-column:2;grid-row:3;flex-direction:row;align-items:center;gap:8px;}
 .da-program-page .topic-day-field select {width:240px;}
 .da-program-page .topic-video-fields {grid-row:auto;}
}
@media screen and (max-width:700px) {
 .da-program-page .topic-card {grid-template-columns:28px minmax(0,1fr);}
 .da-program-page .topic-info {grid-column:2;grid-row:auto;}
 .da-program-page .topic-video-fields {grid-template-columns:minmax(0,1fr);grid-row:auto;}
 .da-program-page .topic-video-fields input {font-size:16px;}
 .da-program-page .topic-actions {grid-column:2/-1;grid-row:auto;}
 .da-program-page .topic-day-field {grid-column:2/-1;grid-row:auto;flex-direction:column;align-items:stretch;gap:2px;}
 .da-program-page .topic-day-field select {width:100%;}
}
.ders-video a {color:inherit;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere;}
.ders-video {overflow-wrap:anywhere;}
@media screen {
 .da-theme .topic-pill {border:1px solid color-mix(in srgb,var(--ui-accent) 65%,var(--ui-paper));background:var(--ui-paper);color:var(--ui-accent);}
}
@media screen and (max-width:700px) {
 .da-program-page .topic-subtitle {font-size:12px;line-height:1.4;}
}
@media screen {
 .da-demo-entry {margin:22px 0;border:1px solid #7e9c8a;border-radius:14px;background:var(--ui-paper);padding:16px;}
 .da-demo-entry summary {cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;font-weight:750;color:var(--ui-accent);}
 .da-demo-entry p {font-size:13px;line-height:1.6;color:var(--ui-muted);}
 .da-demo-entry form button {margin-top:12px;width:100%;min-height:46px;}
 .da-demo-entry small {display:block;font-size:11px;line-height:1.5;color:var(--ui-muted);}
 .da-demo-entry .da-status {white-space:normal;overflow-wrap:anywhere;}
 .da-theme.da-page .da-stat-grid:has(#demoCount) {grid-template-columns:repeat(4,minmax(0,1fr));}
 .da-users-tabs {display:flex;flex-wrap:wrap;gap:10px;margin:16px 0;}
 .da-theme.da-page .da-users-tabs button {min-height:44px;padding:10px 16px;display:flex;align-items:center;justify-content:center;gap:10px;}
 .da-theme.da-page .da-users-tabs button[aria-pressed=false] {background:var(--ui-paper);color:var(--ui-accent);border-color:#7e9c8a;}
 .da-users-tabs span {padding:2px 6px;background:#ffffff24;border-radius:6px;}
}
@media screen and (max-width:600px) {
 .da-theme.da-page .da-stat-grid:has(#demoCount),.da-users-tabs {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
 .da-theme.da-page .da-users-tabs button {padding:10px 8px;font-size:12px;gap:6px;}
}
/* Interactive plan tools stay outside the printed programme. */
.da-swap-status{margin:10px 0 0;font-size:13px;color:var(--ui-accent,#28584e);line-height:1.5}.da-swap-status:empty{display:none}
#swapLessonsBtn[aria-pressed=true]{background:var(--ui-accent,#28584e);color:#fff}
.da-swap-mode [data-plan-day]{cursor:pointer;outline:2px dashed #669688;outline-offset:-3px;touch-action:manipulation}
.da-swap-mode [data-plan-day].da-swap-first{outline:3px solid #28584e;box-shadow:inset 0 0 0 5px #ffffffa0}
[data-plan-day][role=button]:focus-visible{outline:3px solid #28584e;outline-offset:2px}

.da-question-dialog{width:min(400px,calc(100vw - 32px));padding:24px;border:1px solid #bfd1c4;border-radius:18px;background:#fffdf7;color:#253e36;box-shadow:0 20px 60px #18352d40}.da-question-dialog::backdrop{background:#102c2580}.da-question-dialog h2{margin:0;font-size:20px}.da-question-dialog p{font-size:13px;line-height:1.5}.da-question-dialog label{display:block;margin:16px 0 8px;font-weight:700}.da-question-dialog input{width:100%;min-height:48px;font-size:18px;padding:10px;border:1px solid #9db9ab;border-radius:9px;box-sizing:border-box}.da-question-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.da-question-actions button{min-height:44px;border:1px solid #8aaa9b;border-radius:9px;padding:10px 20px;font-weight:700;color:#28584e;background:#edf3eb}.da-question-actions button[type=submit]{background:#28584e;color:#fff}
@media(max-width:700px){.topic-action-buttons{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}.topic-action-buttons .btn{width:100%;min-width:0;min-height:46px;padding:10px 8px!important;font-size:12px!important;white-space:normal}}
@media print{.da-swap-status,.da-question-dialog{display:none!important}.da-swap-mode [data-plan-day],.da-swap-mode [data-plan-day].da-swap-first{outline:none!important;box-shadow:none!important}}

@media print{[data-plan-day]{outline:none!important;box-shadow:none!important}}

.da-weekly-option{width:100%;border:1px solid #bdd0c3;border-radius:9px;background:#edf3eb;color:#28584e;min-height:44px;margin-top:12px;padding:8px;font:600 12px/1.4 system-ui;cursor:pointer}
@media(min-width:701px){
 .da-program-page .summary-action-row{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
 .da-program-page .topic-action-buttons{display:grid;grid-template-columns:1.55fr repeat(5,minmax(0,1fr));width:100%;max-width:none;gap:8px;margin-left:0;padding-top:12px}
 .da-program-page .topic-action-buttons .btn{min-width:0;min-height:44px;padding:8px 7px;font-size:12px;line-height:1.3;margin:0;white-space:normal}
}
.da-program-page .topic-action-buttons .btn{grid-column:auto}
.da-program-page .topic-action-buttons{align-items:stretch}

.da-program-page .topic-action-buttons .btn{justify-content:center;text-align:center}
.da-theme .control-panel #clearTopicsBtn{border:1px solid #bd8070;background:#f9e9e3;color:#9b382a}
.da-question-dialog{position:fixed;inset:0;margin:auto;max-height:calc(100dvh - 32px);overflow:auto}
.da-theme-yks .ders-kart[data-edit-question]{cursor:pointer}.da-theme-yks .ders-kart[data-edit-question]:hover{box-shadow:inset 0 0 0 2px var(--ui-edge)}
.da-theme-yks .question-edit-hint{margin-left:4px;font-size:.9em}
@media print{.question-edit-hint{display:none!important}}

.da-program-page .plan-lock-status{margin-top:12px;padding:10px 12px;border:1px solid var(--ui-edge,#9fbcae);border-radius:10px;background:var(--ui-soft,#edf3eb);color:var(--ui-accent,#28584e);font-size:12px;font-weight:600;line-height:1.5}

.day-rating{display:flex;align-items:center;justify-content:center;gap:3px;color:var(--ui-accent,#28584e);padding:2px 0}
.day-rating svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linejoin:round}
@media print{.day-rating{color:#33463e}}

/* Priority choices show a persistent check, for guests and members alike. */
@media screen {
 .da-program-page .priority-options .main-label {text-align:center;}
 .da-program-page .priority-options .check-label {min-height:44px;justify-content:center;text-align:center;}
 .da-program-page .priority-options .check-label::before {content:'✓';position:absolute;left:6px;top:6px;visibility:hidden;font-size:12px;line-height:1;}
 .da-program-page .priority-options .check-label:has(.zor-ders:checked) {background:var(--ui-accent);border-color:var(--ui-accent);color:var(--ui-paper);}
 .da-program-page .priority-options .check-label:has(.zor-ders:checked)::before {visibility:visible;}
 .da-program-page .priority-options .check-label:focus-within {outline-color:var(--ui-accent);}
}
@media screen and (max-width:700px) {
 .da-program-page .topic-tabs {max-height:150px;overflow-y:auto;flex-shrink:0;}
 .da-program-page .topic-header {padding:16px;}
 .da-program-page .topic-title {font-size:20px;line-height:1.25;}
 .da-program-page .topic-subtitle {font-size:12px;line-height:1.4;}
}
