/* Light theme for the Rubricator app (chat, intake, My Rubrics, login, join).
   The app is dark by default; js/theme.js sets html[data-theme="light"] when the
   person picks light. These rules override the dark page styles, so a colour
   changed there may need its light counterpart changed here. */

/* ── companion.html ── */
html[data-theme="light"] .chat-section { background: #F2F0EB; }
html[data-theme="light"] .chat-card { background: #FFFFFF; border: 1px solid rgba(31,56,100,0.16); box-shadow: 0 24px 64px rgba(31,56,100,0.12); }
html[data-theme="light"] .chat-topbar { background: rgba(31,56,100,0.04); border-bottom: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .chat-topbar-title { color: rgba(28,27,24,0.98); }
html[data-theme="light"] .credits-badge { background: rgba(31,56,100,0.07); border: 1px solid rgba(31,56,100,0.18); color: rgba(28,27,24,0.75); }
html[data-theme="light"] .credits-count { color: rgb(28,27,24); }
html[data-theme="light"] .credits-count.low { color: #B91C1C; }
html[data-theme="light"] .user-chip { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .logout-btn { color: rgba(28,27,24,0.52); }
html[data-theme="light"] .logout-btn:hover { color: #B91C1C; }
html[data-theme="light"] .chat-messages::-webkit-scrollbar-thumb { background: rgba(31,56,100,0.12); }
html[data-theme="light"] .msg--assistant .msg__bubble { background: #F3F5F9; color: rgb(28,27,24); border: 1px solid rgba(31,56,100,0.18); }
html[data-theme="light"] .msg--assistant .msg__bubble p,
html[data-theme="light"] .msg--assistant .msg__bubble li,
html[data-theme="light"] .msg--assistant .msg__bubble td,
html[data-theme="light"] .msg--assistant .msg__bubble blockquote { color: rgb(28,27,24); }
html[data-theme="light"] .msg--assistant .msg__bubble strong { color: rgb(28,27,24); }
html[data-theme="light"] .msg--assistant .msg__bubble th { background: rgba(31,56,100,0.09); color: rgb(28,27,24); }
html[data-theme="light"] .msg--assistant .msg__bubble td { border-top: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .msg--assistant .msg__bubble tr:nth-child(even) td { background: rgba(31,56,100,0.03); }
html[data-theme="light"] .msg__meta { color: rgba(28,27,24,0.49); }
html[data-theme="light"] .thumb-btn { border: 1px solid rgba(31,56,100,0.18); color: rgba(28,27,24,0.6); }
html[data-theme="light"] .thumb-btn:hover { border-color: rgba(31,56,100,0.4); color: rgba(28,27,24,0.9); }
html[data-theme="light"] .quality-badge--high { color: #15803D; }
html[data-theme="light"] .quality-badge--medium { color: #A16207; }
html[data-theme="light"] .quality-badge--low { color: #B91C1C; }
html[data-theme="light"] .truncation-notice { color: #78350F; }
html[data-theme="light"] .typing { background: rgba(31,56,100,0.07); }
html[data-theme="light"] .chat-input-row { border-top: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .chat-input { background: rgba(31,56,100,0.06); border: 1px solid rgba(31,56,100,0.18); color: rgb(28,27,24); }
html[data-theme="light"] .chat-input::placeholder { color: rgba(28,27,24,0.52); }
html[data-theme="light"] .chat-input:focus { border-color: rgba(31,56,100,0.4); }
html[data-theme="light"] .chat-send:disabled { background: rgba(31,56,100,0.09); }
html[data-theme="light"] .starter-btn { border: 1px solid rgba(31,56,100,0.22); color: rgba(28,27,24,0.75); }
html[data-theme="light"] .starter-btn:hover { color: rgb(28,27,24); }
html[data-theme="light"] .chat-error { color: #B91C1C; }
html[data-theme="light"] .restored-note { color: rgba(28,27,24,0.68); background: rgba(31,56,100,0.05); border: 1px solid rgba(31,56,100,0.16); }
html[data-theme="light"] .no-credits-banner { color: #B91C1C; }

/* ── my-rubrics.html ── */
html[data-theme="light"] body:has(.mr-header) { background: #F2F0EB; }
html[data-theme="light"] .mr-header { background: #F2F0EB; border-bottom: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .mr-header h1 { color: rgb(28,27,24); }
html[data-theme="light"] .mr-header p { color: rgba(28,27,24,0.68); }
html[data-theme="light"] .mr-back { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .mr-back:hover { color: rgba(28,27,24,0.83); }
html[data-theme="light"] .mr-search { background: rgba(31,56,100,0.06); border: 1px solid rgba(31,56,100,0.18); color: rgb(28,27,24); }
html[data-theme="light"] .mr-search::placeholder { color: rgba(28,27,24,0.52); }
html[data-theme="light"] .mr-filter { background: rgba(31,56,100,0.06); border: 1px solid rgba(31,56,100,0.18); color: rgb(28,27,24); }
html[data-theme="light"] .mr-count { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .mr-loading,
html[data-theme="light"] .mr-empty { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .mr-spinner { border: 3px solid rgba(31,56,100,0.22); }
html[data-theme="light"] .mr-empty h3 { color: rgba(28,27,24,0.83); }
html[data-theme="light"] .mr-card { background: #FFFFFF; border: 1px solid rgba(31,56,100,0.16); }
html[data-theme="light"] .mr-card-title { color: rgb(28,27,24); }
html[data-theme="light"] .mr-star { color: rgba(28,27,24,0.49); }
html[data-theme="light"] .mr-star.starred { color: #9A4A0C; }
html[data-theme="light"] .mr-tag { background: rgba(31,56,100,0.07); color: rgba(28,27,24,0.75); }
html[data-theme="light"] .mr-tag--quality-high { color: #15803D; }
html[data-theme="light"] .mr-tag--quality-medium { color: #A16207; }
html[data-theme="light"] .mr-tag--quality-low { color: #B91C1C; }
html[data-theme="light"] .mr-date { color: rgba(28,27,24,0.52); }
html[data-theme="light"] .mr-btn { border: 1px solid rgba(31,56,100,0.22); color: rgba(28,27,24,0.75); }
html[data-theme="light"] .mr-btn:hover { border-color: rgba(31,56,100,0.4); color: rgb(28,27,24); }
html[data-theme="light"] .mr-btn--danger:hover { color: #B91C1C; }
html[data-theme="light"] .mr-modal-bg { background: rgba(31,56,100,.35); }
html[data-theme="light"] .mr-modal { background: #FFFFFF; border: 1px solid rgba(31,56,100,0.18); }
html[data-theme="light"] .mr-modal-head { border-bottom: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .mr-modal-head h2 { color: rgb(28,27,24); }
html[data-theme="light"] .mr-modal-head p { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .mr-modal-close { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .mr-modal-body { color: rgb(28,27,24); }
html[data-theme="light"] .mr-modal-body th { background: rgba(31,56,100,0.09); color: rgb(28,27,24); }
html[data-theme="light"] .mr-modal-body td { border-top: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .mr-modal-foot { border-top: 1px solid rgba(31,56,100,0.14); }

/* ── login.html ── */
html[data-theme="light"] body:has(.login-wrap) { background: #F2F0EB; }
html[data-theme="light"] .login-card { background: #FFFFFF; border: 1px solid rgba(31,56,100,0.16); box-shadow: 0 24px 64px rgba(31,56,100,0.12); }
html[data-theme="light"] .login-logo-text { color: rgb(28,27,24); }
html[data-theme="light"] .login-heading { color: rgb(28,27,24); }
html[data-theme="light"] .login-sub { color: rgba(28,27,24,0.64); }
html[data-theme="light"] .form-label { color: rgba(28,27,24,0.64); }
html[data-theme="light"] .form-input { background: rgba(31,56,100,0.06); border: 1px solid rgba(31,56,100,0.18); color: rgb(28,27,24); }
html[data-theme="light"] .form-input::placeholder { color: rgba(28,27,24,0.49); }
html[data-theme="light"] .login-btn:disabled { background: rgba(31,56,100,0.09); }
html[data-theme="light"] .login-error { color: #B91C1C; }
html[data-theme="light"] .login-footer { color: rgba(28,27,24,0.49); }
html[data-theme="light"] .login-footer a { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .login-footer a:hover { color: rgba(28,27,24,0.83); }
html[data-theme="light"] .login-home { color: rgba(28,27,24,0.71); }
html[data-theme="light"] .login-home:hover { color: rgb(28,27,24); }
html[data-theme="light"] .login-language .lang-toggle { border-color: rgba(31,56,100,0.21); }
html[data-theme="light"] .login-language .lang-btn { color: rgba(28,27,24,0.71); }

/* ── join.html ── */
html[data-theme="light"] .join-status { color: rgba(28,27,24,0.83); }
html[data-theme="light"] .join-creds { background: rgba(31,56,100,0.06); border: 1px solid rgba(31,56,100,0.18); }
html[data-theme="light"] .join-creds dt { color: rgba(28,27,24,0.64); }
html[data-theme="light"] .join-creds dd { color: rgb(28,27,24); }
html[data-theme="light"] .join-note { color: rgb(28,27,24); }
html[data-theme="light"] .join-note strong { color: #9A4A0C; }

/* ── js/intake.js ── */
html[data-theme="light"] #intake-overlay { background: rgba(31,56,100,.35); }
html[data-theme="light"] #intake-modal { background: #FFFFFF; border: 1px solid rgba(31,56,100,0.16); box-shadow: 0 32px 80px rgba(31,56,100,0.18); }
html[data-theme="light"] .itk-header { border-bottom: 1px solid rgba(31,56,100,0.12); }
html[data-theme="light"] .itk-close-btn { border: 1px solid rgba(31,56,100,0.28); color: rgba(28,27,24,0.6); }
html[data-theme="light"] .itk-close-btn:hover { border-color: rgba(31,56,100,0.4); color: rgb(28,27,24); background: rgba(31,56,100,0.07); }
html[data-theme="light"] .itk-brand-name { color: rgba(28,27,24,0.94); }
html[data-theme="light"] .itk-dot { background: rgba(31,56,100,0.12); }
html[data-theme="light"] .itk-restored { color: rgba(28,27,24,0.86); }
html[data-theme="light"] .itk-restored button { color: #9A4A0C; }
html[data-theme="light"] .itk-body { scrollbar-color: rgba(31,56,100,0.18) transparent; }
html[data-theme="light"] .itk-body::-webkit-scrollbar-thumb { background: rgba(31,56,100,0.11); }
html[data-theme="light"] .itk-footer { border-top: 1px solid rgba(31,56,100,0.12); }
html[data-theme="light"] .itk-step-title { color: rgb(28,27,24); }
html[data-theme="light"] .itk-step-sub { color: rgba(28,27,24,0.64); }
html[data-theme="light"] .itk-label { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .itk-input,
html[data-theme="light"] .itk-select,
html[data-theme="light"] .itk-textarea { background: rgba(31,56,100,0.05); border: 1px solid rgba(31,56,100,0.16); color: rgb(28,27,24); }
html[data-theme="light"] .itk-input::placeholder,
html[data-theme="light"] .itk-textarea::placeholder { color: rgba(28,27,24,0.47); }
html[data-theme="light"] .itk-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(28,27,24,0.6)' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); }
html[data-theme="light"] .itk-select option { background: #FFFFFF; color: rgb(28,27,24); }
html[data-theme="light"] .itk-purpose-card { border: 1.5px solid rgba(31,56,100,0.16); background: rgba(31,56,100,0.03); }
html[data-theme="light"] .itk-purpose-card:hover { border-color: rgba(31,56,100,0.34); background: rgba(31,56,100,0.05); }
html[data-theme="light"] .itk-purpose-title { color: rgb(28,27,24); }
html[data-theme="light"] .itk-purpose-desc { color: rgba(28,27,24,0.64); }
html[data-theme="light"] .itk-pill { border: 1px solid rgba(31,56,100,0.22); color: rgba(28,27,24,0.71); }
html[data-theme="light"] .itk-pill:hover { border-color: rgba(31,56,100,0.4); color: rgb(28,27,24); }
html[data-theme="light"] .itk-pill.active { color: rgb(28,27,24); }
html[data-theme="light"] .itk-toggle { background: rgba(31,56,100,0.06); }
html[data-theme="light"] .itk-toggle-btn { color: rgba(28,27,24,0.64); }
html[data-theme="light"] .itk-bloom-tab { border: 1px solid rgba(31,56,100,0.16); color: rgba(28,27,24,0.6); }
html[data-theme="light"] .itk-verb { border: 1px solid rgba(31,56,100,0.16); color: rgba(28,27,24,0.71); }
html[data-theme="light"] .itk-verb:hover { border-color: rgba(31,56,100,0.4); color: rgb(28,27,24); }
html[data-theme="light"] .itk-preview { background: rgba(31,56,100,0.04); border: 1px solid rgba(31,56,100,0.14); color: rgba(28,27,24,0.83); }
html[data-theme="light"] .itk-preview .placeholder { color: rgba(28,27,24,0.49); }
html[data-theme="light"] .itk-slider { background: rgba(31,56,100,0.12); }
html[data-theme="light"] .itk-slider-val { color: rgb(28,27,24); }
html[data-theme="light"] .itk-check-item { border: 1px solid rgba(31,56,100,0.12); }
html[data-theme="light"] .itk-check-item:hover { background: rgba(31,56,100,0.04); border-color: rgba(31,56,100,0.18); }
html[data-theme="light"] .itk-check-text h4 { color: rgb(28,27,24); }
html[data-theme="light"] .itk-check-text p { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .itk-source-tabs { border-bottom: 1px solid rgba(31,56,100,0.12); }
html[data-theme="light"] .itk-source-tab { color: rgba(28,27,24,0.6); }
html[data-theme="light"] .itk-source-tab.active { color: rgb(28,27,24); }
html[data-theme="light"] .itk-analyzing { color: rgba(28,27,24,0.68); }
html[data-theme="light"] .itk-spin { border: 2px solid rgba(31,56,100,0.22); }
html[data-theme="light"] .itk-task-card { border: 1px solid rgba(31,56,100,0.16); background: rgba(31,56,100,0.03); }
html[data-theme="light"] .itk-task-card:hover { border-color: rgba(31,56,100,0.34); }
html[data-theme="light"] .itk-task-name { color: rgb(28,27,24); }
html[data-theme="light"] .itk-task-benefit.high { color: #15803D; }
html[data-theme="light"] .itk-task-benefit.medium { color: #A16207; }
html[data-theme="light"] .itk-task-desc { color: rgba(28,27,24,0.64); }
html[data-theme="light"] .itk-suggestion-tag { color: #9A4A0C; }
html[data-theme="light"] .itk-review-card { background: rgba(31,56,100,0.04); border: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .itk-review-row { border-bottom: 1px solid rgba(31,56,100,0.11); }
html[data-theme="light"] .itk-review-key { color: rgba(28,27,24,0.52); }
html[data-theme="light"] .itk-review-val { color: rgba(28,27,24,0.94); }
html[data-theme="light"] .itk-review-val.objective { color: #9A4A0C; }
html[data-theme="light"] .itk-review-edit { color: rgba(28,27,24,0.52); }
html[data-theme="light"] .itk-warning { color: #9A4A0C; }
html[data-theme="light"] .itk-session-card { background: rgba(31,56,100,0.04); border: 1px solid rgba(31,56,100,0.14); }
html[data-theme="light"] .itk-btn-primary:disabled { background: rgba(31,56,100,0.09); color: rgba(28,27,24,0.52); }
html[data-theme="light"] .itk-btn-ghost { color: rgba(28,27,24,0.68); border: 1px solid rgba(31,56,100,0.18); }
html[data-theme="light"] .itk-btn-ghost:hover { color: rgb(28,27,24); border-color: rgba(31,56,100,0.4); }
html[data-theme="light"] .itk-error { color: #B91C1C; }
html[data-theme="light"] .itk-hint { color: rgba(28,27,24,0.52); }
html[data-theme="light"] .itk-divider { border-top: 1px solid rgba(31,56,100,0.12); }

/* ── Inline colours set in the markup and by the page scripts ── */
html[data-theme="light"] .chat-wrap > p { color: rgba(28,27,24,.55) !important; }
html[data-theme="light"] .chat-topbar-right .logout-btn[style] { color: rgba(28,27,24,.72) !important; border-color: rgba(31,56,100,.22) !important; }
html[data-theme="light"] .msg__bubble [style*="color:#fff"],
html[data-theme="light"] .mr-modal-body [style*="color:#fff"] { color: rgb(28,27,24) !important; }
html[data-theme="light"] .msg__bubble [style*="color:#F0C080"],
html[data-theme="light"] .mr-modal-body [style*="color:#F0C080"] { color: #9A4A0C !important; }
html[data-theme="light"] .msg [id^="save-title-"] { background: rgba(31,56,100,.05) !important; border-color: rgba(31,56,100,.22) !important; color: rgb(28,27,24) !important; }
html[data-theme="light"] .msg [id^="save-confirm-"] { color: rgb(28,27,24) !important; }
html[data-theme="light"] .msg [style*="color:#86efac"] { color: #15803D !important; }
html[data-theme="light"] #intake-modal [style*="color:rgba(255,255,255"] { color: rgba(28,27,24,.62) !important; }
html[data-theme="light"] .typing span { background: rgba(31,56,100,.4); }

/* ── The toggle (both themes) ── */
.theme-toggle {
  display: inline-flex; align-items: center; gap: .3rem;
  font: 600 .75rem var(--sans, 'Outfit', sans-serif); line-height: 1.4;
  padding: 3px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap;
  background: none; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.2);
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: #fff; border-color: rgba(255,255,255,.45); }
.theme-toggle .theme-to-dark { display: none; }
html[data-theme="light"] .theme-toggle { color: rgba(28,27,24,.75); border-color: rgba(31,56,100,.25); }
html[data-theme="light"] .theme-toggle:hover { color: rgb(28,27,24); border-color: rgba(31,56,100,.5); }
html[data-theme="light"] .theme-toggle .theme-to-light { display: none; }
html[data-theme="light"] .theme-toggle .theme-to-dark { display: inline; }
.login-language { gap: .5rem; align-items: center; }
html[data-theme="light"] .login-language .lang-btn.active { color: #fff; }

/* ── Revision note under a medium or low rubric ── */
html[data-theme="light"] .revise-note { color: rgba(28,27,24,.85); background: rgba(197,90,17,.07); }
html[data-theme="light"] .revise-note__head { color: rgb(28,27,24); }
html[data-theme="light"] .revise-note__foot { color: rgba(28,27,24,.6); }
html[data-theme="light"] .revise-btn { color: #9A4A0C; border-color: rgba(154,74,12,.45); }
html[data-theme="light"] .revise-btn:hover { background: rgba(154,74,12,.08); }
