/* The Study District: Example work (examples.html). Theme colours only (--paper, --ink, --muted, --line, --wash,
   --accent, --on-accent, --gold, --gold-text), so every theme works. */
.exw .wrap { max-width: 1120px; }
.exw main { outline: none; }
.exw [hidden] { display: none !important; }
.exw :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.exw p, .exw li, .exw td, .exw th { overflow-wrap: anywhere; }
.ex-skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); color: var(--ink); padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; z-index: 10; }
.ex-skip:focus { left: 16px; }
.exw .lede { max-width: 760px; margin: 0 0 8px; }
.ex-made { color: var(--muted); font-size: .95rem; margin: 0 0 18px; }

/* Picker */
.ex-picker { display: grid; gap: 12px; margin: 0 0 8px; }
.ex-group-h { margin: 0 0 6px; color: var(--muted); font-variant: small-caps; letter-spacing: .08em; font-size: .95rem; }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-chip { font: inherit; font-size: .95rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 4px 14px; cursor: pointer; min-height: 38px; line-height: 1.3; text-align: left; }
.ex-chip:hover { border-color: var(--accent); }
.ex-chip small { color: var(--muted); font-size: .82rem; margin-left: 4px; }
.ex-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.ex-chip[aria-pressed="true"] small { color: inherit; opacity: .85; }

/* Example header */
.ex-area { margin-top: 18px; outline: none; min-height: 40vh; }
.ex-area > h2 { margin: 10px 0 2px; }
.ex-sub { color: var(--muted); margin: 0 0 10px; }
.ex-cwlink { font-size: .95rem; }
.ex-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; margin: 14px 0 0; }
.ex-tab { font: inherit; font-size: 1rem; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 8px 14px 6px; cursor: pointer; white-space: nowrap; min-height: 44px; }
.ex-tab:hover { color: var(--ink); }
.ex-tab b { font-weight: 600; }
.ex-tab span { font-size: .88rem; margin-left: 6px; }
.ex-tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.ex-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 6px; }
.ex-score { font-size: 1.05rem; }
.ex-score b { color: var(--accent); font-size: 1.25rem; }
.ex-toggle { font: inherit; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 4px 14px 4px 6px; cursor: pointer; min-height: 38px; }
.ex-toggle .ex-sw { width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; flex: none; }
.ex-toggle .ex-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); transition: left .15s; }
.ex-toggle[aria-pressed="true"] .ex-sw { background: var(--accent); }
.ex-toggle[aria-pressed="true"] .ex-sw::after { left: 17px; background: var(--on-accent); }
.ex-about { background: var(--wash); border-left: 3px solid var(--gold); padding: 8px 14px; border-radius: 3px; margin: 8px 0 14px; font-size: .98rem; }
.ex-about p { margin: 4px 0; }
.ex-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 2px; padding: 0; list-style: none; font-size: .92rem; color: var(--muted); }
.ex-meta b { color: var(--ink); font-weight: 600; }
.ex-key { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .88rem; color: var(--muted); margin: 0 0 8px; }
.ex-key span { display: inline-flex; align-items: center; gap: 6px; }

/* The work and its margin notes */
.ex-doc { border-top: 1px solid var(--line); padding-top: 6px; }
.ex-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.ex-noann .ex-row { grid-template-columns: minmax(0, 1fr); }
.ex-body { min-width: 0; max-width: 720px; }
.ex-body p { margin: 8px 0; }
.ex-body h3 { color: var(--accent); font-weight: 600; font-size: 1.15rem; margin: 22px 0 4px; }
.ex-body h4 { font-weight: 600; font-size: 1.02rem; margin: 16px 0 2px; }
.ex-body ul, .ex-body ol { margin: 6px 0; padding-left: 1.3em; }
.ex-title { text-align: center; padding: 6px 0 2px; }
.ex-title p { margin: 2px 0; }
.ex-title .ex-tt { font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.ex-title .ex-ts { color: var(--muted); font-size: .95rem; }
.ex-eq { text-align: center; margin: 10px 0; font-size: 1.05rem; overflow-x: auto; }
.ex-eq i { font-style: italic; }
.ex-gap { color: var(--muted); font-style: italic; border: 1px dashed var(--line); border-radius: 6px; padding: 6px 12px; margin: 12px 0; font-size: .95rem; }
.ex-quote { border-left: 3px solid var(--line); margin: 10px 0; padding: 2px 0 2px 14px; color: var(--ink); }
.ex-quote p { margin: 2px 0; }
.ex-say { margin: 8px 0; }
.ex-say b { color: var(--accent); font-weight: 600; }
.ex-ref { font-size: .92rem; padding-left: 1.6em; text-indent: -1.6em; margin: 4px 0; }
mark.ex-hl { background: none; color: inherit; border-bottom: 2px solid var(--gold); padding: 0 1px; }
mark.ex-hl.ex-neg { border-bottom-style: dashed; border-bottom-color: var(--accent); }
mark.ex-hl sup, .ex-n { font-size: .7em; font-weight: 600; color: var(--gold-text); margin-left: 1px; }
mark.ex-hl.ex-neg sup { color: var(--accent); }
.ex-noann mark.ex-hl { border-bottom: 0; padding: 0; }
.ex-noann mark.ex-hl sup { display: none; }
.ex-notes { min-width: 0; padding-top: 8px; display: grid; gap: 8px; }
.ex-noann .ex-notes { display: none; }
.ex-note { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 6px; padding: 6px 10px; font-size: .9rem; line-height: 1.45; }
.ex-note.ex-neg { border-left-color: var(--accent); }
.ex-note.ex-mid { border-left-color: var(--muted); }
.ex-note-h { margin-bottom: 2px; line-height: 1.5; }
.ex-note-h > span { margin-right: 6px; }
.ex-note-h .ex-sign { display: inline-block; line-height: 1.3; }
.ex-note-h .ex-n { font-size: .82rem; }
.ex-crit { font-weight: 600; color: var(--ink); }
.ex-band { font-size: .82rem; color: var(--muted); }
.ex-sign { font-size: .78rem; border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; color: var(--muted); }

/* Tables and figures inside the work */
.ex-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; max-width: 100%; }
.ex-table { border-collapse: collapse; width: 100%; font-size: .92rem; background: var(--paper); }
.ex-table caption { text-align: left; color: var(--muted); font-size: .88rem; padding: 0 0 4px; caption-side: top; }
.ex-table th, .ex-table td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.ex-table thead th { color: var(--accent); font-weight: 600; }
.exw .ex-table th, .exw .ex-table td { overflow-wrap: normal; }
.ex-table tbody td:first-child, .ex-table thead th:first-child { white-space: nowrap; }
.ex-table td.n, .ex-table th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-fig { margin: 12px 0; }
.ex-fig svg { width: 100%; height: auto; max-width: 600px; display: block; margin: 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.ex-fig figcaption { color: var(--muted); font-size: .88rem; text-align: center; margin-top: 4px; }
.exc-ax { stroke: var(--muted); stroke-width: 1.2; fill: none; }
.exc-grid { stroke: var(--line); stroke-width: .8; fill: none; }
.exc-pt { fill: var(--accent); }
.exc-pt2 { fill: var(--gold); }
.exc-err { stroke: var(--accent); stroke-width: 1.1; }
.exc-fit { stroke: var(--gold); stroke-width: 1.8; fill: none; }
.exc-fit2 { stroke: var(--muted); stroke-width: 1.6; fill: none; stroke-dasharray: 6 4; }
.exc-ln { stroke: var(--ink); stroke-width: 1.8; fill: none; }
.exc-ln2 { stroke: var(--accent); stroke-width: 1.8; fill: none; }
.exc-ln3 { stroke: var(--gold); stroke-width: 1.8; fill: none; }
.exc-dash { stroke: var(--muted); stroke-width: 1; fill: none; stroke-dasharray: 4 3; }
.exc-area { fill: var(--gold); opacity: .28; stroke: none; }
.exc-area2 { fill: var(--accent); opacity: .18; stroke: none; }
.exc-t { fill: var(--ink); font-size: 12px; font-family: var(--serif); }
.exc-tm { fill: var(--muted); font-size: 11px; font-family: var(--serif); }

/* Breakdown */
.ex-break { margin-top: 26px; border-top: 1px solid var(--line); }
.ex-break h3 { color: var(--accent); font-size: 1.2rem; margin: 18px 0 6px; }
.ex-btable { border-collapse: collapse; width: 100%; background: var(--paper); font-size: .95rem; }
.ex-btable th, .ex-btable td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.ex-btable thead th { color: var(--accent); font-weight: 600; }
.ex-btable td.ex-m { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.ex-btable tr.ex-asp th { font-weight: 500; padding-left: 22px; }
.ex-btable tr.ex-asp td.ex-m { font-weight: 500; color: var(--muted); }
.ex-btable tfoot td, .ex-btable tfoot th { font-weight: 600; background: var(--wash); }
.ex-bar-m { display: block; height: 5px; background: var(--line); border-radius: 3px; margin-top: 5px; overflow: hidden; min-width: 60px; }
.ex-bar-m i { display: block; height: 100%; background: var(--accent); }
.ex-lift { background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 8px; padding: 6px 16px 10px; margin-top: 14px; }
.ex-lift h3 { margin-top: 8px; }
.ex-lift li { margin: 4px 0; }
.ex-load { color: var(--muted); padding: 30px 0; }

@media (max-width: 900px) {
  .ex-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ex-notes { padding: 0 0 8px; }
  .ex-note { font-size: .88rem; }
}
@media (max-width: 560px) {
  .ex-btable thead { display: none; }
  .ex-btable, .ex-btable tbody, .ex-btable tfoot, .ex-btable tr, .ex-btable td, .ex-btable th { display: block; width: 100%; }
  .ex-btable tr { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 8px; background: var(--paper); }
  .ex-btable td, .ex-btable th { border: 0; padding: 4px 10px; }
  .ex-btable td.ex-m { padding-top: 0; }
  .ex-btable tfoot tr { background: var(--wash); }
  .ex-tab { padding: 8px 9px 6px; font-size: .95rem; }
  .ex-tab span { margin-left: 3px; }
  .ex-body h3 { font-size: 1.08rem; }
}
