/* Sample-local semantic tokens. The library's theme and editor are unchanged. */
@layer mdlib {
  :where(.podcast-page) { max-inline-size: 1440px; margin-inline: auto; padding: 2rem clamp(1rem, 3vw, 3rem) 3rem; }
  :where(.podcast-back) { display: inline-block; margin-block-end: 1.5rem; font-size: .85rem; }
  :where(.podcast) {
    --podcast-bg: #101f1b;
    --podcast-panel: #162922;
    --podcast-input: #10221b;
    --podcast-border: #365046;
    --podcast-text: #e5eee9;
    --podcast-muted: #9db6aa;
    --podcast-accent: #c8eb72;
    --podcast-duration: #ffa69b;
    --podcast-speaker-first: #a5efbd;
    --podcast-speaker-first-bg: #234c35;
    --podcast-speaker-second: #f2d28d;
    --podcast-speaker-second-bg: #4c3d22;
    --podcast-speaker-third: #eac2fa;
    --podcast-speaker-third-bg: #50335e;
    --md-color-text: var(--podcast-text);
    --md-color-muted: var(--podcast-muted);
    --md-color-link: var(--podcast-accent);
    --md-color-border: var(--podcast-border);
    --md-color-code-bg: var(--podcast-input);
    --md-color-surface: var(--podcast-panel);
    --md-color-accent: var(--podcast-accent);
    --md-font-body: system-ui, sans-serif;
    --md-font-heading: system-ui, sans-serif;
    --md-font-mono: ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
    color-scheme: dark;
    color: var(--podcast-text);
    background: var(--podcast-bg);
    border: 1px solid var(--podcast-border);
    border-radius: 24px;
    padding: clamp(1rem, 3vw, 2.5rem);
    font: 15px/1.6 system-ui, sans-serif;
  }
  :where(.podcast *) { box-sizing: border-box; }
  :where(.podcast button, .podcast input, .podcast textarea) { font: inherit; color: inherit; }
  :where(.podcast button) { cursor: pointer; border: 1px solid transparent; background: transparent; border-radius: 7px; padding: .45rem .65rem; line-height: 1.4; }
  :where(.podcast button:hover:enabled) { background: color-mix(in srgb, var(--podcast-accent) 10%, transparent); color: var(--podcast-accent); }
  :where(.podcast button:disabled) { opacity: .35; cursor: default; }
  :where(.podcast :focus-visible) { outline: 2px solid var(--podcast-accent); outline-offset: 3px; }
  :where(.podcast svg) { inline-size: 20px; block-size: 20px; flex-shrink: 0; vertical-align: middle; }
  :where(.podcast-header) { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-block-end: 2rem; }
  :where(.podcast-eyebrow) { display: block; color: var(--podcast-muted); letter-spacing: .15em; font-size: .65rem; font-weight: 650; margin: 0; }
  :where(.podcast-header h1) { font: 650 clamp(2.4rem, 5vw, 3.5rem)/1.15 system-ui, sans-serif; letter-spacing: -.06em; margin: .6rem 0 .35rem; }
  :where(.podcast-title-dot) { color: var(--podcast-accent); }
  :where(.podcast-subtitle) { color: var(--podcast-muted); margin: 0; font-size: .9rem; }
  :where(.podcast-dot) { display: inline-block; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--podcast-accent); margin-inline-end: 6px; vertical-align: middle; }
  :where(.podcast-total) { text-align: end; }
  :where(.podcast-total > div) { display: flex; align-items: center; justify-content: end; gap: .6rem; color: var(--podcast-duration); margin-block: .25rem; }
  :where(.podcast-total output) { font: 450 clamp(1.7rem, 3vw, 2.3rem)/1.4 var(--md-font-mono); letter-spacing: -.06em; }
  :where(#podcast-total-label) { font-size: .72rem; color: var(--podcast-muted); }
  :where(.podcast-workspace) { border: 1px solid var(--podcast-border); border-radius: 13px; background: var(--podcast-panel); overflow: hidden; }
  :where(.podcast-docbar) { display: flex; align-items: center; gap: .35rem; padding: .7rem .8rem 0; border-block-end: 1px solid var(--podcast-border); }
  :where(#podcast-tabs) { display: flex; gap: .25rem; overflow-x: auto; min-inline-size: 0; }
  :where(#podcast-tabs button) { white-space: nowrap; border-radius: 7px 7px 0 0; color: var(--podcast-muted); padding: .6rem .9rem; border-block-end: 2px solid transparent; font-size: .8rem; }
  :where(#podcast-tabs button[aria-selected='true']) { color: var(--podcast-accent); background: var(--podcast-input); border-block-end-color: var(--podcast-accent); }
  :where(.podcast-local) { font-size: .65rem; color: var(--podcast-muted); margin-inline-start: auto; white-space: nowrap; padding-inline: .5rem; }
  :where(.podcast-toolbar) { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .55rem .8rem; border-block-end: 1px solid var(--podcast-border); }
  :where(.podcast-toolgroup) { display: flex; align-items: center; gap: 2px; padding-inline-end: .6rem; border-inline-end: 1px solid var(--podcast-border); }
  :where(.podcast-toolgroup button) { min-inline-size: 32px; block-size: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 5px; }
  :where(.podcast-letter, .podcast-at) { font-weight: 650; font-size: 1.1rem; }
  :where(.podcast-custom) { color: var(--podcast-accent); }
  :where(.podcast-history) { color: var(--podcast-muted); border: 0; }
  :where(.podcast-views) { display: flex; gap: 2px; margin-inline-start: auto; padding: 3px; background: var(--podcast-input); border: 1px solid var(--podcast-border); border-radius: 8px; }
  :where(.podcast-views button) { font-size: .7rem; display: flex; align-items: center; gap: .4rem; padding: .3rem .55rem; color: var(--podcast-muted); }
  :where(.podcast-views svg) { inline-size: 14px; block-size: 14px; }
  :where(.podcast-views button[aria-pressed='true']) { color: var(--podcast-accent); background: var(--podcast-panel); }
  :where(.podcast-panes) { --podcast-split: 50%; display: grid; grid-template-columns: minmax(0, var(--podcast-split)) 5px minmax(0, 1fr); block-size: var(--podcast-height, 650px); max-block-size: var(--podcast-max-height, 76vh); min-block-size: var(--podcast-min-height, 360px); }
  :where(.podcast-write, .podcast-read) { min-inline-size: 0; min-block-size: 0; position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); }
  :where(.podcast-write) { background: var(--podcast-input); }
  :where(.podcast-pane-label) { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1.3rem .45rem; color: var(--podcast-muted); font-size: .62rem; letter-spacing: .1em; }
  :where(#podcast-source-name) { letter-spacing: normal; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  :where(#podcast-input) { inline-size: 100%; block-size: 100%; resize: none; border: 0; border-radius: 0; outline: none; background: transparent; padding: 1rem 1.4rem 2rem; color: #c8d9cf; font: 13px/1.85 var(--md-font-mono); tab-size: 4; }
  :where(.podcast-write:focus-within) { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--podcast-accent) 45%, transparent); }
  :where(.podcast-divider) { cursor: col-resize; background: var(--podcast-border); touch-action: none; position: relative; }
  :where(.podcast-divider::after) { content: ''; position: absolute; inset: 46% 1px; background: var(--podcast-muted); border-radius: 3px; }
  :where(#podcast-preview) { overflow: auto; padding: .9rem 1.7rem 2rem; font-size: var(--podcast-font-size, 15px); line-height: 1.85; overflow-wrap: anywhere; }
  :where(#podcast-preview h1) { font-size: 1.5rem; letter-spacing: -.04em; margin-block: 0 1.4rem; border: 0; }
  :where(#podcast-preview p) { margin-block: 1.25rem; }
  :where(#podcast-preview li) { padding-inline-start: .2rem; margin-block: .45rem; }
  :where(#podcast-preview ul) { padding-inline-start: 1.1rem; }
  :where(#podcast-preview li::marker) { color: var(--podcast-muted); }
  :where(.podcast-mention) { display: inline-block; border-radius: 6px; padding: .08em .5em; font-weight: 650; font-size: .88em; line-height: 1.5; vertical-align: baseline; white-space: nowrap; }
  :where(.podcast-person-0) { color: var(--podcast-speaker-first); background: var(--podcast-speaker-first-bg); }
  :where(.podcast-person-1) { color: var(--podcast-speaker-second); background: var(--podcast-speaker-second-bg); }
  :where(.podcast-person-2) { color: var(--podcast-speaker-third); background: var(--podcast-speaker-third-bg); }
  :where(.podcast-time) { display: inline-block; color: var(--podcast-duration); border: 1px solid var(--podcast-border); padding: .06em .55em; border-radius: 20px; font: .75em/1.7 var(--md-font-mono); vertical-align: baseline; white-space: nowrap; }
  :where(.podcast-item) { line-height: 2; }
  :where(.podcast-item.is-complete .podcast-words) { color: var(--podcast-muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--podcast-muted) 70%, transparent); }
  :where(.podcast-check) { display: inline-grid; place-items: center; inline-size: 19px; block-size: 19px; padding: 0; border: 1px solid var(--podcast-muted); border-radius: 4px; vertical-align: baseline; margin-inline-end: .4rem; font: 700 14px/1 system-ui; }
  :where(.podcast-check[aria-checked='true']) { background: var(--podcast-accent); color: var(--podcast-input); border-color: var(--podcast-accent); }
  :where(.podcast-document) { color: var(--podcast-accent); border: 1px solid var(--podcast-border); font-size: .82rem; padding: .3rem .7rem; margin-block: .2rem; }
  :where(.podcast-invalid) { color: var(--podcast-duration); text-decoration: underline wavy; }
  :where(.podcast-tag) { display: inline-block; border-radius: 6px; padding: .08em .5em; font-weight: 650; font-size: .88em; line-height: 1.5; vertical-align: baseline; white-space: nowrap; }
  :where(.podcast-time.is-running) { color: var(--podcast-bg); background: var(--podcast-accent); border-color: var(--podcast-accent); }
  :where(.podcast-time.is-over) { background: var(--podcast-duration); border-color: var(--podcast-duration); }
  :where(#podcast-preview .is-current) { background: color-mix(in srgb, var(--podcast-accent) 14%, transparent); box-shadow: -8px 0 0 color-mix(in srgb, var(--podcast-accent) 14%, transparent), 8px 0 0 color-mix(in srgb, var(--podcast-accent) 14%, transparent); border-radius: 4px; }
  :where(#podcast-preview .is-done) { color: var(--podcast-muted); }
  :where(.podcast-status) { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-block-start: 1px solid var(--podcast-border); color: var(--podcast-muted); font-size: .65rem; }
  :where(.podcast-below) { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: 1.2rem; }
  :where(.podcast-people) { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .82rem; }
  :where(.podcast-people > span:first-child) { color: var(--podcast-muted); letter-spacing: .12em; font-size: .6rem; margin-inline-end: .3rem; }
  :where(.podcast-below > button) { color: var(--podcast-muted); font-size: .7rem; }
  :where(.podcast-legend) { border-block-start: 1px solid var(--podcast-border); padding-block-start: 1rem; }
  :where(.podcast-legend summary) { cursor: pointer; color: var(--podcast-muted); font-size: .85rem; }
  :where(.podcast-legend summary span) { float: right; }
  :where(.podcast-legend dl) { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-block-end: 0; font-size: .8rem; }
  :where(.podcast-legend dt) { color: var(--podcast-accent); }
  :where(.podcast-legend dd) { margin: .3rem 0 0; color: var(--podcast-muted); }
  :where(.podcast-notice) { color: var(--podcast-duration); font-size: .8rem; margin: .5rem 0 0; }
  :where(.podcast-notice:empty) { display: none; }
  :where(#podcast-mentions) { position: absolute; z-index: 5; inline-size: 200px; padding: .35rem; border: 1px solid var(--podcast-accent); border-radius: 10px; background: var(--podcast-panel); box-shadow: 0 10px 30px #0006; }
  :where(#podcast-mentions button) { display: block; inline-size: 100%; text-align: start; padding: .6rem .8rem; border-radius: 6px; background: transparent; font-weight: 600; font-size: .85rem; }
  :where(#podcast-mentions [aria-selected='true']) { background: color-mix(in srgb, var(--podcast-accent) 12%, transparent); outline: 1px solid var(--podcast-border); }
  :where(.podcast dialog) { color: var(--podcast-text); background: var(--podcast-panel); border: 1px solid var(--podcast-border); border-radius: 16px; inline-size: min(460px, calc(100vw - 2rem)); padding: 1.6rem; }
  :where(.podcast dialog::backdrop) { background: #06110bbd; }
  :where(.podcast dialog h2) { font: 600 1.3rem/1.3 system-ui; margin: 0 0 .6rem; }
  :where(.podcast dialog p) { color: var(--podcast-muted); font-size: .85rem; }
  :where(.podcast dialog label) { display: block; font-size: .8rem; margin-block: 1rem; }
  :where(.podcast dialog input) { display: block; inline-size: 100%; padding: .6rem; margin-block-start: .4rem; background: var(--podcast-input); border: 1px solid var(--podcast-border); border-radius: 7px; }
  :where(.podcast-time-fields) { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; }
  :where(.podcast dialog footer) { display: flex; justify-content: end; gap: .6rem; margin-block-start: 1rem; }
  :where(.podcast .podcast-primary) { background: var(--podcast-accent); color: var(--podcast-bg); font-weight: 600; }
  :where(.podcast[data-view='write'] .podcast-read, .podcast[data-view='preview'] .podcast-write, .podcast:not([data-view='split']) .podcast-divider) { display: none; }
  :where(.podcast:not([data-view='split']) .podcast-panes) { grid-template-columns: minmax(0, 1fr); }
  :where(.podcast-guide) { max-inline-size: 65ch; margin: 2rem auto 0; }
  @media (width < 800px) {
    :where(.podcast-header) { align-items: start; gap: 1rem; }
    :where(.podcast-panes) { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(260px, 1fr) minmax(320px, 1fr); block-size: 850px; max-block-size: none; }
    :where(.podcast-divider) { display: none; }
    :where(.podcast-read) { border-block-start: 1px solid var(--podcast-border); }
    :where(.podcast:not([data-view='split']) .podcast-panes) { grid-template-rows: minmax(0, 1fr); block-size: 600px; }
    :where(.podcast-local, #podcast-hint) { display: none; }
    :where(.podcast-views) { margin-inline-start: 0; }
    :where(.podcast-legend dl) { grid-template-columns: 1fr; }
  }
  @media (width < 500px) {
    :where(.podcast-page) { padding: 1rem .5rem; }
    :where(.podcast) { padding: 1rem .65rem; border-radius: 14px; }
    :where(.podcast-header) { flex-direction: column; margin-block-end: 1.3rem; }
    :where(.podcast-total) { text-align: start; }
    :where(.podcast-total > div) { justify-content: start; }
    :where(.podcast-below) { align-items: start; flex-direction: column; }
    :where(.podcast-toolbar) { gap: .4rem; padding-inline: .5rem; }
    :where(.podcast-toolgroup) { gap: 0; padding-inline-end: .3rem; }
    :where(.podcast-history) { margin-inline-start: auto; }
  }
  /* Hosting modes (data-readonly, data-compact, data-documents, data-durations): last, so they win on equal specificity. */
  :where(.podcast-clock-only, .podcast[data-durations='clock'] .podcast-cs) { display: none; }
  :where(.podcast[data-durations='clock'] .podcast-clock-only) { display: block; }
  :where(.podcast[data-durations='clock'] .podcast-time-fields) { grid-template-columns: 1fr 1fr; }
  :where(.podcast[data-documents='host'] .podcast-docbar, .podcast[data-readonly] .podcast-toolbar, .podcast[data-readonly] .podcast-write, .podcast[data-readonly] .podcast-divider, .podcast[data-readonly] .podcast-docbar) { display: none; }
  :where(.podcast[data-readonly] .podcast-panes) { grid-template-columns: minmax(0, 1fr); block-size: auto; max-block-size: none; min-block-size: 0; }
  :where(.podcast[data-compact]) { padding: 0; border: 0; border-radius: 0; background: transparent; }
  :where(.podcast[data-compact] .podcast-header, .podcast[data-compact] .podcast-below, .podcast[data-compact] .podcast-legend, .podcast[data-compact] .podcast-status, .podcast[data-compact] .podcast-pane-label, .podcast[data-compact] .podcast-local) { display: none; }
  :where(.podcast[data-compact] .podcast-workspace) { border-radius: 8px; }
  :where(.podcast[data-compact] .podcast-write, .podcast[data-compact] .podcast-read) { grid-template-rows: minmax(0, 1fr); } /* no pane label: the single row must fill */
  :where(.podcast[data-compact] #podcast-preview) { padding: .6rem .9rem 1rem; }
}
