/* ═══════════════════════════════════════════
   IS MUNI — the Settings card, the onboarding step, the hub (#/is), the
   private deadline card and the course page's Marks and Syllabus tabs
   ═══════════════════════════════════════════

   Everything is prefixed .ism- and loaded on every page (index.html), like
   lecture-media.css. The look follows the app's cards: grey hints, brand
   for the way forward, amber for "keep this to yourself", red only for
   what deletes. Things that are the student's own and private carry a
   lock and a dashed edge, so a private deadline never reads as one the
   whole course can see. The dark block at the end uses the --d-* tokens. */

/* ── Text ── */
.ism-lead { font-size: 0.875rem; color: #4b5563; margin-bottom: 0.25rem; }
.ism-label { font-size: 0.75rem; font-weight: 600; color: #6b7280; margin-bottom: 0.25rem; }
.ism-hint { font-size: 0.75rem; color: #9ca3af; line-height: 1.4; }
.ism-note {
  display: flex; align-items: flex-start; gap: 0.375rem;
  font-size: 0.75rem; color: #6b7280; margin-top: 0.75rem;
}
.ism-note svg { margin-top: 0.1rem; }
.ism-error, .ism-warn {
  display: flex; align-items: flex-start; gap: 0.375rem;
  font-size: 0.8125rem; border-radius: 0.625rem; padding: 0.5rem 0.625rem; margin-top: 0.5rem;
}
.ism-error { background: #fef2f2; color: #b91c1c; }
.ism-warn { background: #fffbeb; color: #92400e; }
.ism-error svg, .ism-warn svg { margin-top: 0.15rem; }
.ism-connected {
  display: flex; align-items: center; gap: 0.375rem;
  font-size: 0.875rem; font-weight: 500; color: #15803d;
}
.ism-section { margin-top: 0.875rem; padding-top: 0.75rem; border-top: 1px solid #f3f4f6; }
.ism-section-title {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem;
}

/* ── Chips, marks and counts ── */
.ism-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.ism-chip {
  font-size: 0.75rem; padding: 0.125rem 0.5rem; border-radius: 999px;
  background: #f3f4f6; color: #4b5563;
}
.ism-new {
  flex-shrink: 0; font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.0625rem 0.375rem; border-radius: 0.3rem; background: #eef2ff; color: #4f46e5;
}
.ism-is-mark {
  flex-shrink: 0; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.0625rem 0.3rem; border-radius: 0.3rem; border: 1px solid #c7d2fe; color: #4f46e5; background: #fff;
}
.ism-count {
  display: inline-block; min-width: 1.1rem; text-align: center; font-size: 0.6875rem; font-weight: 600;
  padding: 0 0.3rem; border-radius: 999px; background: #4f46e5; color: #fff; margin-left: 0.25rem;
}
.ism-points, .ism-final {
  flex-shrink: 0; font-size: 0.75rem; font-weight: 600; padding: 0.0625rem 0.4rem; border-radius: 0.375rem;
}
.ism-points { background: #ecfdf5; color: #047857; }
.ism-final { background: #eef2ff; color: #4338ca; }

/* ── The two ways in ── */
.ism-ways { display: grid; gap: 0.75rem; }
@media (min-width: 768px) {
  .ism-card .ism-ways { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); align-items: start; }
}
.ism-way { border: 1px solid #e5e7eb; border-radius: 0.875rem; padding: 0.75rem; min-width: 0; }
.ism-way-title { display: flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.375rem; }
.ism-steps { list-style: decimal; padding-left: 1.1rem; font-size: 0.8125rem; color: #4b5563; display: grid; gap: 0.25rem; }
.ism-steps q { font-weight: 600; }
.ism-tick { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; margin-top: 0.5rem; cursor: pointer; }
.ism-tick input { width: 1rem; height: 1rem; accent-color: #4f46e5; }
.ism-fresh { margin-top: 0.625rem; display: grid; gap: 0.625rem; min-width: 0; }
.ism-copy-block { min-width: 0; }
.ism-copy { display: flex; align-items: stretch; gap: 0.375rem; min-width: 0; }
.ism-code {
  flex: 1; min-width: 0; font-size: 0.75rem; line-height: 1.4;
  padding: 0.375rem 0.5rem; border-radius: 0.5rem; background: #f9fafb; border: 1px solid #e5e7eb;
  overflow-wrap: anywhere; word-break: break-all; user-select: all;
}
.ism-copy-btn { flex-shrink: 0; align-self: flex-start; }
.ism-copy-btn.ism-copied { border-color: #10b981; color: #047857; }
.ism-waiting { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: #4f46e5; }

/* ── Install-free: Studar's bridge first, the extension beside it ──
   The bridge's box is the way most students take, so it carries the brand
   edge; its sentences are the promise, set as a short list a student can
   read before pressing the button. "More options" folds the AI app and
   this computer away. */
.ism-main {
  border: 1px solid #c7d2fe; background: #f5f7ff; border-radius: 0.875rem; padding: 0.75rem; min-width: 0;
}
.ism-facts { display: grid; gap: 0.3rem; margin-top: 0.625rem; font-size: 0.8125rem; color: #374151; }
.ism-facts li { display: flex; align-items: flex-start; gap: 0.4rem; }
.ism-facts svg { margin-top: 0.15rem; color: #6366f1; }
.ism-how {
  display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.5rem;
  font-size: 0.8125rem; color: #4f46e5; text-decoration: underline; text-underline-offset: 2px;
}
.ism-more { margin-top: 0.75rem; }
.ism-more > summary { cursor: pointer; font-size: 0.8125rem; font-weight: 500; color: #4b5563; }
.ism-more > summary:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 0.25rem; }

/* ── Progress of a sync ── */
.ism-progress { margin-top: 0.5rem; }
.ism-bar { height: 0.375rem; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.ism-bar span { display: block; height: 100%; background: #6366f1; border-radius: inherit; transition: width 0.4s ease; }

/* ── Lists in the card ── */
.ism-details summary { cursor: pointer; font-size: 0.8125rem; color: #4b5563; }
.ism-list { margin: 0.375rem 0 0.25rem 1rem; list-style: disc; font-size: 0.8125rem; color: #4b5563; }
.ism-token { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.5rem; border-radius: 0.625rem; background: #f9fafb; }

/* ── Onboarding ── */
.ism-onboard { text-align: left; }
.ism-found { border: 1px solid #d1fae5; background: #f0fdf4; border-radius: 0.875rem; padding: 0.75rem; }

/* ── Dashboard ── */
.ism-dash-line {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: 0.75rem; font-size: 0.8125rem; font-weight: 500;
  background: #eef2ff; color: #4338ca;
}
.ism-dash-line:hover { background: #e0e7ff; }
.ism-dash-line.ism-dash-warn { background: #fffbeb; color: #92400e; }
.ism-dash-line.ism-dash-warn:hover { background: #fef3c7; }
.ism-offer { display: flex; align-items: flex-start; gap: 0.75rem; }
.ism-offer-icon {
  flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: 0.75rem;
  display: flex; align-items: center; justify-content: center; background: #eef2ff; color: #4f46e5;
}
.ism-offer-close {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; margin: -0.25rem -0.25rem 0 0; border-radius: 0.5rem; color: #9ca3af;
}
.ism-offer-close:hover { background: #f3f4f6; color: #4b5563; }
.ism-offer-close:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }

/* ── A private deadline among the course's ── */
.ism-dl-card { border-style: dashed; }
.ism-dl-actions { display: inline-flex; align-items: center; gap: 0.125rem; flex-shrink: 0; }
.ism-private { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.6875rem; color: #9ca3af; margin-right: 0.25rem; }
.ism-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; color: #6b7280;
}
.ism-act:hover { background: #f3f4f6; color: #4f46e5; }
.ism-act:disabled { opacity: 0.5; }
.ism-act:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }
.ism-private-note { display: flex; align-items: flex-start; gap: 0.375rem; font-size: 0.75rem; color: #6b7280; margin-top: 0.75rem; }

/* The calendar draws deadlines itself; a private one is known by its link. */
a.cal-event-pill[href^="#/deadline/is-"] { border-style: dashed !important; }
a.cal-list-item[href^="#/deadline/is-"] .cal-list-title::after {
  content: 'IS'; margin-left: 0.375rem; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0 0.25rem; border-radius: 0.25rem; border: 1px solid #c7d2fe; color: #4f46e5; vertical-align: middle;
}

/* ── Notebook blocks and texts from IS ── */
.ism-block { border: 1px solid #e5e7eb; border-radius: 0.875rem; padding: 0.625rem 0.75rem; background: #fff; }
.ism-block.is-new { border-color: #a5b4fc; box-shadow: 0 0 0 1px #e0e7ff inset; }
.ism-text { font-size: 0.875rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: #374151; }
.ism-text a, .ism-links a { color: #4f46e5; text-decoration: underline; }
.ism-links { list-style: disc; margin: 0.5rem 0 0.25rem 1rem; font-size: 0.8125rem; display: grid; gap: 0.125rem; }

/* ── Noticeboard ── */
.ism-notice { border: 1px solid #e5e7eb; border-radius: 0.875rem; background: #fff; }
.ism-notice summary { cursor: pointer; padding: 0.625rem 0.75rem; list-style: none; }
.ism-notice summary::-webkit-details-marker { display: none; }
.ism-notice[open] summary { border-bottom: 1px solid #f3f4f6; }
.ism-notice-title { font-size: 0.875rem; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ism-notice-body { padding: 0.625rem 0.75rem 0.75rem; }

/* ── Syllabus ──
   Close to IS's own "Interaktivní osnova": numbered chapters that open and
   close, the teacher's headings, lists and tables, and IS's coloured boxes
   (quotes in the Markdown the server makes, views/isMuni.js). */
.ism-syllabus-head { margin-bottom: 0.75rem; }
.ism-syllabus-title { font-size: 1rem; font-weight: 700; color: #111827; margin-bottom: 0.125rem; overflow-wrap: anywhere; }
.ism-chapters { display: grid; gap: 0.5rem; }
.ism-chapter { border: 1px solid #e5e7eb; border-radius: 0.75rem; background: #fff; min-width: 0; }
.ism-chapter summary {
  cursor: pointer; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500; overflow-wrap: anywhere;
  display: flex; align-items: baseline; gap: 0.5rem; list-style: none;
}
.ism-chapter summary::-webkit-details-marker { display: none; }
.ism-chapter summary::before { content: '▸'; color: #9ca3af; font-size: 0.75rem; transition: transform 0.15s; flex-shrink: 0; }
.ism-chapter[open] summary::before { transform: rotate(90deg); }
.ism-chapter[open] > summary { border-bottom: 1px solid #f3f4f6; font-weight: 600; color: #111827; }
.ism-chapter-no { color: #9ca3af; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 1.25rem; flex-shrink: 0; }
.ism-chapter-title { min-width: 0; }
.ism-chapter-body { padding: 0.625rem 0.75rem 0.75rem; display: grid; gap: 0.5rem; min-width: 0; }
.ism-study {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem;
  color: #4338ca; background: #eef2ff; border-radius: 999px; padding: 0.125rem 0.625rem;
}
.ism-chapter-open { justify-self: start; display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: #4f46e5; }
.ism-read-progress { margin-top: 0.375rem; }
.ism-read-failed { color: #b91c1c; }

/* The chapter's text: the app's Markdown look (app.css .md-content), a size
   down, with IS's boxes and tables. */
.ism-md { font-size: 0.9375rem; line-height: 1.6; min-width: 0; }
.ism-md > :first-child { margin-top: 0; }
.ism-md > :last-child { margin-bottom: 0; }
.ism-md p, .ism-md li { overflow-wrap: anywhere; }
.ism-md h3 { font-size: 1.0625rem; margin: 1rem 0 0.35rem; color: #1e3a8a; }
.ism-md h4 { font-size: 0.975rem; margin: 0.85rem 0 0.3rem; color: #1e3a8a; }
.ism-md h5, .ism-md h6 { font-size: 0.9375rem; font-weight: 600; margin: 0.75rem 0 0.25rem; color: #374151; }
.ism-md ul, .ism-md ol { margin: 0.4em 0 0.4em 1.3rem; }
.ism-md blockquote {
  border-left: 4px solid #f59e0b; background: #fffbeb; color: #374151;
  border-radius: 0 0.625rem 0.625rem 0; padding: 0.5rem 0.75rem; margin: 0.75em 0;
}
.ism-md blockquote > :first-child { margin-top: 0; }
.ism-md blockquote > :last-child { margin-bottom: 0; }
.ism-md blockquote blockquote { border-left-color: #6366f1; background: #eef2ff; }
.ism-md a { color: #4f46e5; overflow-wrap: anywhere; }
.ism-md code { font-size: 0.85em; }
.ism-md pre { font-size: 0.8125rem; }
.ism-table-wrap { overflow-x: auto; margin: 0.75em 0; max-width: 100%; overscroll-behavior-x: contain; }
.ism-md .ism-table-wrap table { display: table; width: auto; min-width: 0; margin: 0; font-size: 0.875rem; }
.ism-md th, .ism-md td { padding: 0.35rem 0.6rem; }

/* "Read the syllabuses of all courses" in the hub. */
.ism-bulk {
  display: grid; gap: 0.25rem; justify-items: start; margin-bottom: 0.875rem;
  border: 1px dashed #c7d2fe; border-radius: 0.875rem; padding: 0.625rem 0.75rem; background: #f8faff;
}
.ism-found-row {
  display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.375rem 0.5rem;
  border-radius: 0.625rem; background: #f9fafb; cursor: pointer;
}
.ism-found-row input { margin-top: 0.2rem; width: 1rem; height: 1rem; accent-color: #4f46e5; flex-shrink: 0; }

/* ── A seminar group: "Tvoje skupina: PV110/02" ── */
.ism-group-line {
  display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; min-width: 0;
  font-size: 0.8125rem; font-weight: 500; color: #4338ca; margin-bottom: 0.5rem;
}
.ism-group-line .ism-hint { font-weight: 400; }
.ism-hub-groups { display: grid; gap: 0.125rem; margin-bottom: 0.75rem; }
.ism-hub-groups .ism-group-line { margin-bottom: 0; flex-wrap: nowrap; }
.ism-hub-groups .ism-group-line:hover span:first-of-type { text-decoration: underline; }

/* ── What "Find deadlines in the syllabus" found ──
   New (green, as before), already there (grey), the dates that disagree
   (amber: the student has to choose), other groups (collapsed). */
.ism-finds { display: grid; gap: 0.875rem; min-width: 0; }
.ism-finds-sec { border: 1px solid #e5e7eb; border-radius: 0.875rem; padding: 0.75rem; background: #fff; min-width: 0; }
.ism-finds-sec[data-ism-finds="new"] { border-color: #d1fae5; background: #f0fdf4; }
.ism-finds-sec[data-ism-finds="conflicts"] { border-color: #fde68a; background: #fffbeb; }
.ism-finds-title { display: flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; font-weight: 600; color: #111827; margin-bottom: 0.25rem; }
.ism-finds-count {
  font-size: 0.6875rem; font-weight: 600; min-width: 1.25rem; padding: 0 0.375rem; border-radius: 999px;
  background: #e5e7eb; color: #374151; text-align: center;
}
.ism-found-item { display: grid; gap: 0.25rem; }
.ism-found-item .ism-words-box { margin-left: 2rem; }
.ism-merge { padding: 0.375rem 0.5rem; border-radius: 0.625rem; background: #f9fafb; min-width: 0; overflow-wrap: anywhere; }
.ism-words-box { min-width: 0; }
.ism-words-box > summary { cursor: pointer; font-size: 0.75rem; color: #4f46e5; width: fit-content; }
.ism-words-box > summary:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 0.25rem; }
.ism-words-box[open] > summary { margin-bottom: 0.25rem; }
.ism-words { font-size: 0.875rem; line-height: 1.5; }
.ism-ai-summary { font-size: 0.8125rem; color: #4b5563; margin-top: 0.375rem; overflow-wrap: anywhere; }
.ism-ai-label {
  display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.6875rem; font-weight: 600;
  padding: 0.05rem 0.4rem; border-radius: 999px; background: #ede9fe; color: #6d28d9; vertical-align: 0.05em;
}
.ism-conflict { border: 1px solid #fde68a; border-radius: 0.75rem; padding: 0.625rem; background: #fff; display: grid; gap: 0.5rem; min-width: 0; }
.ism-conflict.is-done { border-color: #e5e7eb; }
.ism-conflict-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.5rem; }
.ism-conflict-date { display: grid; gap: 0.125rem; padding: 0.375rem 0.5rem; border-radius: 0.5rem; background: #f9fafb; min-width: 0; overflow-wrap: anywhere; }
.ism-conflict-date .ism-label { margin-bottom: 0; }
.ism-conflict-when { font-size: 0.875rem; font-weight: 600; color: #111827; }
.ism-conflict-choices { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.ism-conflict-done { font-size: 0.8125rem; color: #047857; }
.ism-other-groups > summary { cursor: pointer; list-style: none; }
.ism-other-groups > summary::-webkit-details-marker { display: none; }
.ism-other-groups > summary .ism-finds-title::after { content: '▸'; color: #9ca3af; font-size: 0.75rem; transition: transform 0.15s; }
.ism-other-groups[open] > summary .ism-finds-title::after { transform: rotate(90deg); }
.ism-other-groups > summary:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; border-radius: 0.25rem; }
.ism-unverified { display: block; }
.ism-cut { margin-top: 0.375rem; font-size: 0.8125rem; }
/* The student's own date from the syllabus, on a deadline card and its page. */
.ism-mine-date {
  font-size: 0.625rem; font-weight: 600; padding: 0.05rem 0.375rem; border-radius: 999px;
  background: #fef3c7; color: #92400e; vertical-align: 0.1em;
}
.ism-override { display: flex; align-items: flex-start; gap: 0.375rem; font-size: 0.8125rem; color: #92400e; margin-top: 0.375rem; }
.ism-override svg { margin-top: 0.15rem; }
.ism-syllabus-note { margin-top: 0.75rem; padding-top: 0.625rem; border-top: 1px solid #f3f4f6; display: grid; gap: 0.5rem; }
.ism-syllabus-note-part { display: grid; gap: 0.25rem; min-width: 0; }
/* The student's own words and date on a course's deadline page (views/deadlines.js). */
.ism-own-words { margin-bottom: 1rem; min-width: 0; overflow-wrap: anywhere; }

/* ── The course page's tab strip ──
   Marks and Syllabus make a synced course's strip wider than a phone. It
   scrolls sideways by itself rather than pushing the whole page wider;
   the tab being shown is scrolled into it (isMuni.js). The hub's own two
   tabs, with their counts, do the same. */
#course-tabs, #ism-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
#course-tabs::-webkit-scrollbar, #ism-tabs::-webkit-scrollbar { display: none; }
#course-tabs > .tab, #ism-tabs > .tab { flex-shrink: 0; white-space: nowrap; }

/* ── Timetable: whose rows ── */
.ism-switch { display: inline-flex; padding: 0.1875rem; border-radius: 0.75rem; background: #f3f4f6; gap: 0.125rem; }
.ism-switch-btn {
  font-size: 0.8125rem; font-weight: 500; padding: 0.3125rem 0.75rem; border-radius: 0.5625rem; color: #6b7280;
}
.ism-switch-btn:hover { color: #4f46e5; }
.ism-switch-btn.active { background: #fff; color: #4f46e5; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.ism-switch-btn:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }

/* ── Phones ── */
@media (max-width: 767px) {
  .ism-private span { display: none; }
  .ism-act { width: 2.25rem; height: 2.25rem; }
  .ism-way { padding: 0.625rem; }
  .ism-finds-sec { padding: 0.625rem; }
  .ism-found-item .ism-words-box { margin-left: 1.5rem; }
  /* the three choices one under another, each the whole width: big enough to tap */
  .ism-conflict-choices { display: grid; }
  .ism-conflict-choices .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ism-bar span { transition: none; }
}

@media (forced-colors: active) {
  .ism-new, .ism-is-mark, .ism-count, .ism-points, .ism-final { border: 1px solid CanvasText; }
}

/* ══════════════ Dark mode ══════════════ */
.dark .ism-lead, .dark .ism-steps, .dark .ism-details summary, .dark .ism-list { color: var(--d-text2); }
.dark .ism-label, .dark .ism-note, .dark .ism-private-note { color: var(--d-text3); }
.dark .ism-hint, .dark .ism-private { color: var(--d-text3); }
.dark .ism-error { background: #2a1215; color: #fca5a5; }
.dark .ism-warn { background: #2a1d08; color: #fcd34d; }
.dark .ism-connected { color: #4ade80; }
.dark .ism-section { border-top-color: var(--d-border-l); }
.dark .ism-chip { background: var(--d-surface2); color: var(--d-text2); }
.dark .ism-new { background: var(--d-brand-bg); color: var(--d-brand); }
.dark .ism-is-mark { background: transparent; border-color: var(--d-brand); color: var(--d-brand); }
.dark .ism-count { background: var(--d-brand); color: var(--d-bg); }
.dark .ism-points { background: #052e16; color: #6ee7b7; }
.dark .ism-final { background: var(--d-brand-bg); color: var(--d-brand); }
.dark .ism-way { border-color: var(--d-border); background: var(--d-surface); }
.dark .ism-code { background: var(--d-surface2); border-color: var(--d-border); color: var(--d-text); }
.dark .ism-waiting { color: var(--d-brand); }
.dark .ism-bar { background: var(--d-surface3); }
.dark .ism-bar span { background: var(--d-brand); }
.dark .ism-token, .dark .ism-found-row { background: var(--d-surface2); }
.dark .ism-found { background: #052e16; border-color: #14532d; }
.dark .ism-dash-line { background: var(--d-brand-bg); color: var(--d-brand); }
.dark .ism-dash-line:hover { background: var(--d-surface3); }
.dark .ism-dash-line.ism-dash-warn { background: #2a1d08; color: #fcd34d; }
.dark .ism-offer-icon { background: var(--d-brand-bg); color: var(--d-brand); }
.dark .ism-offer-close { color: var(--d-text3); }
.dark .ism-offer-close:hover { background: var(--d-surface3); color: var(--d-text2); }
.dark .ism-act { color: var(--d-text3); }
.dark .ism-act:hover { background: var(--d-surface3); color: var(--d-brand); }
.dark .ism-block, .dark .ism-notice, .dark .ism-chapter { background: var(--d-surface); border-color: var(--d-border); }
.dark .ism-block.is-new { border-color: var(--d-brand); box-shadow: 0 0 0 1px var(--d-brand-bg) inset; }
.dark .ism-notice[open] summary { border-bottom-color: var(--d-border-l); }
.dark .ism-text { color: var(--d-text2); }
.dark .ism-syllabus-title, .dark .ism-chapter[open] > summary { color: var(--d-text); }
.dark .ism-chapter[open] > summary { border-bottom-color: var(--d-border-l); }
.dark .ism-chapter summary::before, .dark .ism-chapter-no { color: var(--d-text3); }
.dark .ism-study { background: var(--d-brand-bg); color: var(--d-brand); }
.dark .ism-chapter-open, .dark .ism-md a { color: var(--d-brand); }
.dark .ism-md h3, .dark .ism-md h4 { color: #a5b4fc; }
.dark .ism-md h5, .dark .ism-md h6 { color: var(--d-text2); }
.dark .ism-md blockquote { border-left-color: #d97706; background: #2a1d08; color: var(--d-text2); }
.dark .ism-md blockquote blockquote { border-left-color: var(--d-brand); background: var(--d-brand-bg); }
.dark .ism-read-failed { color: #fca5a5; }
.dark .ism-bulk { border-color: var(--d-border); background: var(--d-surface); }
.dark .ism-text a, .dark .ism-links a { color: var(--d-brand); }
.dark a.cal-list-item[href^="#/deadline/is-"] .cal-list-title::after { border-color: var(--d-brand); color: var(--d-brand); }
.dark .ism-switch { background: var(--d-surface2); }
.dark .ism-switch-btn { color: var(--d-text3); }
.dark .ism-switch-btn:hover { color: var(--d-brand); }
.dark .ism-switch-btn.active { background: var(--d-surface3); color: var(--d-brand); box-shadow: none; }
.dark .ism-main { background: var(--d-brand-bg); border-color: var(--d-border); }
.dark .ism-facts { color: var(--d-text2); }
.dark .ism-facts svg, .dark .ism-how { color: var(--d-brand); }
.dark .ism-more > summary { color: var(--d-text2); }
.dark .ism-group-line { color: var(--d-brand); }
.dark .ism-finds-sec { background: var(--d-surface); border-color: var(--d-border); }
.dark .ism-finds-sec[data-ism-finds="new"] { background: #052e16; border-color: #14532d; }
.dark .ism-finds-sec[data-ism-finds="conflicts"] { background: #2a1d08; border-color: #78350f; }
.dark .ism-finds-title, .dark .ism-conflict-when { color: var(--d-text); }
.dark .ism-finds-count { background: var(--d-surface3); color: var(--d-text2); }
.dark .ism-merge, .dark .ism-conflict-date { background: var(--d-surface2); }
.dark .ism-conflict { background: var(--d-surface); border-color: #78350f; }
.dark .ism-conflict.is-done { border-color: var(--d-border); }
.dark .ism-conflict-done { color: #6ee7b7; }
.dark .ism-words-box > summary { color: var(--d-brand); }
.dark .ism-ai-summary { color: var(--d-text2); }
.dark .ism-ai-label { background: #2e1065; color: #c4b5fd; }
.dark .ism-mine-date { background: #2a1d08; color: #fcd34d; }
.dark .ism-override { color: #fcd34d; }
.dark .ism-syllabus-note { border-top-color: var(--d-border-l); }
