/* AI Skill Designer. Header colours follow Agile Project Manager. */
:root {
  --asd-bg: #f5f7fa;
  --asd-panel: #ffffff;
  --asd-soft: #eef2f7;
  --asd-ink: #0f172a;
  --asd-muted: #5b6b80;
  --asd-line: #d5dde8;
  --asd-accent: #2563eb;
  --asd-accent-ink: #ffffff;
  --asd-danger: #b42318;
  --asd-warning: #b54708;
  --asd-header-bg: #16233a;
  --asd-header-text: #dbe7f5;
}

body { background: var(--asd-bg); color: var(--asd-ink); font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.tab-bar { background: var(--asd-header-bg); }
.tab-bar .title { color: var(--asd-header-text); }
.asd-app-view { height: calc(100vh - 45px); overflow: auto; padding: 12px; }

.asd-page { max-width: 1600px; margin: 0 auto; }
.asd-page h2 { font-size: 1.35rem; margin: 0; }
.asd-page h3 { font-size: 1.05rem; margin: 0; }
.asd-page h4 { font-size: 0.95rem; margin: 0; }
.asd-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.asd-heading > * { min-width: 0; overflow-wrap: anywhere; }
.asd-intro, .asd-hint { color: var(--asd-muted); font-size: 0.85rem; margin: 4px 0 10px; }
.asd-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.8rem; color: var(--asd-muted); }
[hidden] { display: none !important; }

/* Buttons: Foundation's defaults force white text, so every state is set here. */
.asd-button { display: inline-block; margin: 0; padding: 6px 12px; min-height: 34px; border: 1px solid var(--asd-line); border-radius: 6px; background: var(--asd-panel); color: var(--asd-ink); font-size: 0.875rem; line-height: 1.3; cursor: pointer; }
.asd-button:hover, .asd-button:focus { background: var(--asd-soft); color: var(--asd-ink); }
.asd-button:disabled { opacity: 0.5; cursor: default; }
.asd-button.asd-primary { background: var(--asd-accent); border-color: var(--asd-accent); color: var(--asd-accent-ink); }
.asd-button.asd-primary:hover, .asd-button.asd-primary:focus { background: #1d4ed8; color: var(--asd-accent-ink); }
.asd-button.asd-danger { background: var(--asd-danger); border-color: var(--asd-danger); color: #fff; }
.asd-button.asd-danger:hover, .asd-button.asd-danger:focus { background: #912018; color: #fff; }
.asd-button.asd-icon { width: 34px; padding: 0; font-size: 1.1rem; }
.asd-page :focus-visible { outline: 2px solid var(--asd-accent); outline-offset: 2px; }

.asd-page input, .asd-page select, .asd-page textarea { margin: 0; border-radius: 6px; border-color: var(--asd-line); box-shadow: none; font-size: 0.9rem; }
.asd-page select { height: 34px; padding: 4px 8px; width: auto; }
.asd-page label { font-weight: 600; font-size: 0.875rem; color: var(--asd-ink); margin: 14px 0 6px; }
.asd-count { float: right; font-weight: 400; color: var(--asd-muted); }

.asd-status { min-height: 1.4em; margin: 4px 0 8px; font-size: 0.85rem; color: var(--asd-muted); }
.asd-error { color: var(--asd-danger) !important; }
.asd-near { color: var(--asd-warning) !important; font-weight: 600; }
.asd-size-line { margin: 4px 0; }
.asd-instructions-heading .asd-count { font-size: 0.8rem; }
.asd-notice { background: #fff7e6; border: 1px solid #f5d38a; border-radius: 6px; padding: 8px 12px; font-size: 0.875rem; }

/* My Skills */
.asd-skill-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.asd-skill-card { background: var(--asd-panel); border: 1px solid var(--asd-line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.asd-skill-card h3 { overflow-wrap: anywhere; }
/* ASD-R-042: tag chips styled as in Web Links */
.asd-tagfilter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.asd-tag-chip { display: inline-block; margin: 0; padding: 5px 14px; border-radius: 16px; background: #fff; color: #555; font-size: 0.8rem; line-height: 1.3; cursor: pointer; border: 1px solid #e2ddd6; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.asd-tag-chip:hover, .asd-tag-chip:focus { background: #f3f0ff; color: #3b2a8f; }
.asd-tag-chip.active, .asd-tag-chip.active:hover, .asd-tag-chip.active:focus { background: #7651fd; color: #fff; border-color: #7651fd; }
.asd-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.asd-card-tags .asd-tag-chip { padding: 2px 10px; font-size: 0.75rem; box-shadow: none; }
.asd-meta { color: var(--asd-muted); font-size: 0.78rem; margin: 0; }
.asd-description { font-size: 0.875rem; margin: 0; flex: 1; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.asd-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.asd-confirm { font-size: 0.85rem; color: var(--asd-danger); width: 100%; }
.asd-empty { color: var(--asd-muted); }

/* Skill Editor */
.asd-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--asd-panel); border: 1px solid var(--asd-line); border-radius: 10px; padding: 8px 12px; }
.asd-toolbar h2 { font-size: 1.1rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-right: auto; min-width: 0; overflow-wrap: anywhere; }
.asd-page .asd-inline-label { margin: 0; font-weight: 500; }
.asd-save-state { font-size: 0.8rem; color: var(--asd-muted); }
.asd-save-state.asd-unsaved { color: #9a5b00; }

.asd-workspace { display: grid; grid-template-columns: 210px minmax(0, 1.25fr) minmax(0, 1fr); border: 1px solid var(--asd-line); border-radius: 10px; overflow: hidden; background: var(--asd-panel); }
.asd-resources { background: var(--asd-soft); padding: 14px 10px; border-right: 1px solid var(--asd-line); min-width: 0; }
.asd-resource-actions { display: flex; gap: 4px; margin: 10px 0; }
.asd-resource-actions select { flex: 1; min-width: 0; }
.asd-file { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--asd-ink); padding: 6px 8px; margin: 0; border-radius: 6px; font-size: 0.85rem; overflow-wrap: anywhere; cursor: pointer; }
.asd-file:hover, .asd-file:focus { background: #e1e8f2; color: var(--asd-ink); }
.asd-file.asd-selected { background: #dbe6fb; color: #1e3a8a; font-weight: 600; }
.asd-folder { font-size: 0.75rem; font-weight: 600; color: var(--asd-muted); margin: 14px 0 4px; }
.asd-authoring { padding: 16px 20px; min-width: 0; }
.asd-preview { padding: 16px; background: #f9fbfd; border-left: 1px solid var(--asd-line); min-width: 0; }
#asdMarkdownPreview { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: #334155; background: transparent; border: 0; margin: 10px 0 0; padding: 0; }
.asd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.asd-page details { margin: 14px 0; border-top: 1px solid var(--asd-line); padding-top: 10px; }
.asd-page summary { cursor: pointer; font-weight: 600; color: #334155; }
.asd-metadata-heading { margin-top: 14px; }
.asd-metadata-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px; gap: 6px; margin: 6px 0; }
.asd-instructions-heading { margin-top: 18px !important; }
.asd-body-editor { min-width: 0; }
#editorSkillBody .wmd-surface { min-height: 360px; }
#editorSkillBody .wmd-toolbar { flex-wrap: wrap; }
#asdResourceText { height: 55vh; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 10px; }
#asdResourceImage { max-width: 100%; max-height: 400px; object-fit: contain; margin: 12px 0; }
.asd-confirm-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--asd-danger); font-size: 0.875rem; }

.asd-dialog h3 { font-size: 1.05rem; margin: 0 0 8px; }
.asd-dialog label { font-weight: 600; font-size: 0.875rem; margin: 10px 0 6px; }
.asd-dialog input { margin: 0; border-radius: 6px; font-size: 0.9rem; }
.asd-dialog p { font-size: 0.9rem; }
.asd-dialog { border: 1px solid var(--asd-line); border-radius: 10px; width: 440px; max-width: calc(100vw - 32px); padding: 20px; }
.asd-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.asd-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Library search */
.asd-search { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.asd-search input { max-width: 420px; margin: 0; }
.asd-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Check chip in the editor toolbar */
.asd-check-chip { margin: 0; padding: 4px 10px; min-height: 28px; border-radius: 14px; border: 1px solid var(--asd-line); background: var(--asd-soft); color: var(--asd-ink); font-size: 0.8rem; cursor: pointer; }
.asd-check-chip:hover, .asd-check-chip:focus { background: #e1e8f2; color: var(--asd-ink); }
.asd-check-chip.asd-chip-error { background: #fdecea; border-color: #f4b4ac; color: var(--asd-danger); }
.asd-check-chip.asd-chip-warning { background: #fff7e6; border-color: #f5d38a; color: #8a5300; }
.asd-check-chip.asd-chip-ok { background: #e8f6ee; border-color: #a6d9b8; color: #1d6b3a; }

/* Right-hand panels */
.asd-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--asd-line); margin-bottom: 10px; }
.asd-tab { margin: 0 0 -1px; padding: 6px 12px; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; background: transparent; color: var(--asd-muted); font-size: 0.875rem; cursor: pointer; }
.asd-tab:hover, .asd-tab:focus { background: var(--asd-soft); color: var(--asd-ink); }
.asd-tab[aria-selected="true"] { background: var(--asd-panel); border-color: var(--asd-line); color: var(--asd-ink); font-weight: 600; }
.asd-badge { font-weight: 400; color: var(--asd-muted); }
.asd-check-summary { font-size: 0.875rem; margin: 0 0 8px; }
.asd-check-list { list-style: none; margin: 0; padding: 0; }
.asd-check { margin: 0 0 6px; }
.asd-check-link { display: block; width: 100%; text-align: left; margin: 0; padding: 8px 10px; border: 1px solid var(--asd-line); border-left-width: 4px; border-radius: 6px; background: var(--asd-panel); color: var(--asd-ink); font-size: 0.85rem; line-height: 1.4; cursor: pointer; }
.asd-check-link:hover, .asd-check-link:focus { background: var(--asd-soft); color: var(--asd-ink); }
.asd-check-error .asd-check-link { border-left-color: var(--asd-danger); }
.asd-check-warning .asd-check-link { border-left-color: #d08a00; }
.asd-check-level { font-weight: 700; margin-right: 6px; }
.asd-check-error .asd-check-level { color: var(--asd-danger); }
.asd-check-warning .asd-check-level { color: #8a5300; }
.asd-history-list { list-style: none; margin: 0; padding: 0; }
.asd-history-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--asd-line); font-size: 0.85rem; }
.asd-history-label { min-width: 0; overflow-wrap: anywhere; }
.asd-button.asd-small { min-height: 28px; padding: 3px 8px; font-size: 0.8rem; }
.asd-revision-view { margin-top: 12px; border: 1px solid var(--asd-line); border-radius: 8px; padding: 10px; background: var(--asd-panel); }
.asd-revision-text, .asd-diff { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; background: transparent; border: 0; padding: 0; margin: 8px 0 0; max-height: 60vh; overflow: auto; }
.asd-diff-add { display: block; background: #e8f6ee; color: #14532d; }
.asd-diff-del { display: block; background: #fdecea; color: #7f1d1d; }
.asd-diff-same { display: block; color: #475569; }

.asd-export-dialog { width: 560px; }
.asd-export-files { max-height: 30vh; overflow: auto; margin: 0 0 10px 18px; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.asd-export-error { color: var(--asd-danger); font-size: 0.875rem; }
.asd-export-warning { color: #8a5300; font-size: 0.875rem; }

/* Lifecycle board */
.asd-board-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.asd-board-filters input[type=search] { width: 240px; margin: 0; }
.asd-page .asd-check-label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 500; }
.asd-check-label input { margin: 0; }
.asd-board { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.asd-board-inner { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 10px; min-width: 1250px; }
.asd-board-column { background: var(--asd-soft); border: 1px solid var(--asd-line); border-radius: 10px; padding: 8px; min-height: 300px; scroll-snap-align: start; }
.asd-board-column.drag-over { outline: 2px dashed var(--asd-accent); }
.asd-column-heading { font-size: 0.95rem !important; margin: 4px 4px 8px !important; }
.asd-board-card { background: var(--asd-panel); border: 1px solid var(--asd-line); border-radius: 8px; padding: 10px; margin-bottom: 8px; cursor: grab; display: flex; flex-direction: column; gap: 6px; }
.asd-board-card:focus { outline: 2px solid var(--asd-accent); outline-offset: 2px; }
.asd-board-card h3 { font-size: 0.95rem !important; margin: 0; overflow-wrap: anywhere; }
.asd-board-card .asd-description { -webkit-line-clamp: 2; font-size: 0.8rem; }
.asd-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.asd-chip { font-size: 0.72rem; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--asd-line); background: var(--asd-soft); color: var(--asd-muted); }
.asd-chip.asd-chip-ok { background: #e8f6ee; border-color: #a6d9b8; color: #1d6b3a; }
.asd-chip.asd-chip-warning { background: #fff7e6; border-color: #f5d38a; color: #8a5300; }
.asd-chip.asd-chip-error { background: #fdecea; border-color: #f4b4ac; color: var(--asd-danger); }

/* Editor panels: plan, tests, releases, feedback */
.asd-targets { border: 0; padding: 0; margin: 14px 0 0; }
.asd-targets legend { font-weight: 600; font-size: 0.875rem; margin-bottom: 6px; }
.asd-targets label { display: inline-flex; align-items: center; gap: 4px; margin: 0 12px 4px 0; font-weight: 400; }
.asd-targets input { margin: 0; }
.asd-hint-inline { font-weight: 400; color: var(--asd-muted); font-size: 0.8rem; }
.asd-use-case { border: 1px solid var(--asd-line); border-radius: 8px; padding: 8px 10px; margin: 0 0 10px; }
.asd-use-case legend { font-weight: 600; font-size: 0.85rem; padding: 0 4px; }
.asd-use-case label { margin: 6px 0 4px; font-size: 0.8rem; }
.asd-panel-section { margin-bottom: 14px; }
.asd-page .asd-subheading, .asd-dialog .asd-subheading { font-size: 0.9rem; margin: 12px 0 6px; }
.asd-pre { white-space: pre-wrap; font-size: 0.85rem; }
.asd-plain-list { margin: 0 0 0 18px; font-size: 0.85rem; }
.asd-release { border-bottom: 1px solid var(--asd-line); padding: 8px 0; }
.asd-feedback { border-left: 3px solid #d08a00; padding: 4px 8px; margin: 6px 0; font-size: 0.85rem; }
.asd-feedback.asd-closed { border-left-color: var(--asd-line); opacity: 0.7; }
.asd-override { color: var(--asd-danger); }
.asd-failure-list { margin: 0 0 8px 18px; font-size: 0.875rem; }
.asd-lifecycle-dialog textarea, .asd-lifecycle-dialog input, .asd-lifecycle-dialog select { width: 100%; margin: 0 0 6px; }
.asd-wide-dialog { width: 640px; max-height: 85vh; overflow: auto; }

@media (max-width: 1100px) {
  .asd-workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .asd-preview { grid-column: 2; border-left: 0; border-top: 1px solid var(--asd-line); }
  .asd-resources { grid-row: span 2; }
}
@media (max-width: 680px) {
  .asd-board-inner { grid-template-columns: repeat(5, 85vw); min-width: 0; }
  .asd-board-filters input[type=search] { width: 100%; }
  .asd-app-view { padding: 8px; }
  .asd-workspace { display: block; }
  .asd-resources { border-right: 0; border-bottom: 1px solid var(--asd-line); }
  .asd-authoring, .asd-preview { padding: 12px; }
  .asd-grid { grid-template-columns: 1fr; }
  .asd-toolbar h2 { width: 100%; }
}
.asd-checkbox { display: flex; gap: 8px; align-items: center; font-size: 0.875rem; margin: 8px 0; color: var(--asd-ink); }
.asd-example-prompts li { margin: 6px 0; font-style: italic; }
.asd-review-group { margin: 12px 0 4px; font-size: 0.85rem; color: var(--asd-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.asd-suggestion { border: 1px solid var(--asd-line); border-radius: 6px; padding: 8px 10px; margin: 6px 0; }
.asd-suggestion textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 0.8rem; margin: 4px 0; }
.asd-suggestion-accepted { border-color: #a6d9b8; background: #f3faf6; }
.asd-suggestion-dismissed { opacity: 0.65; }
.asd-test-run { border: 1px solid var(--asd-line); border-radius: 6px; padding: 6px 10px; margin: 6px 0; font-size: 0.85rem; }
.asd-test-run summary { cursor: pointer; }
.asd-test-run-submitted { border-color: #f5d38a; background: #fffbf0; }
.asd-test-run-approved { border-color: #a6d9b8; }
.asd-test-run-rejected { opacity: 0.7; }
.asd-run-prompts { margin: 6px 0 6px 18px; padding: 0; }
.asd-test-run .asd-actions input { flex: 1; min-width: 140px; }
.asd-workflow-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.asd-workflow-toolbar [aria-pressed="true"] { background: #fff4dd; border-color: #d97706; }
.asd-workflow-spacer { flex: 1; }
.asd-workflow-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.asd-workflow-canvas-wrap { min-width: 0; border: 1px solid var(--asd-line); border-radius: 6px; overflow: hidden; }
.asd-workflow-canvas-wrap canvas { display: block; width: 100%; height: 540px; touch-action: none; }
.asd-workflow-side { font-size: 0.85rem; }
.asd-workflow-side input, .asd-workflow-side textarea { width: 100%; }
.asd-workflow-boxes, .asd-workflow-edges, .asd-workflow-issues { list-style: none; margin: 0 0 8px; padding: 0; }
.asd-workflow-box-button { width: 100%; text-align: left; background: var(--asd-soft); color: var(--asd-ink); border: 1px solid var(--asd-line); border-radius: 4px; padding: 4px 8px; margin: 2px 0; font-size: 0.8rem; cursor: pointer; }
.asd-workflow-box-button.asd-selected { border-color: #d97706; background: #fff4dd; }
.asd-workflow-edges li { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; }
.asd-workflow-edges input { flex: 1; min-width: 80px; width: auto; }
.asd-workflow-issues li { color: #8a5300; margin: 2px 0; }
.asd-workflow-markdown { white-space: pre-wrap; font-size: 0.75rem; max-height: 260px; overflow: auto; background: var(--asd-soft); padding: 6px; border-radius: 4px; }
@media (max-width: 900px) { .asd-workflow-layout { grid-template-columns: 1fr; } }
.asd-wizard-steps { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 8px 0; padding: 0; }
.asd-wizard-step { background: var(--asd-soft); color: var(--asd-ink); border: 1px solid var(--asd-line); border-radius: 14px; padding: 4px 10px; font-size: 0.8rem; cursor: pointer; margin: 0; }
.asd-wizard-step.asd-done { border-color: #a6d9b8; }
.asd-wizard-step.asd-current { background: #2b4a7a; border-color: #2b4a7a; color: #fff; }
.asd-wizard-body { max-width: 860px; }
.asd-wizard-body h3:focus { outline: none; }
.asd-wizard-field { margin: 10px 0; }
.asd-wizard-field input, .asd-wizard-field textarea { width: 100%; }
.asd-wizard-choice, .asd-wizard-usecase { border: 1px solid var(--asd-line); border-radius: 6px; padding: 8px 12px; margin: 10px 0; }
.asd-wizard-choice legend, .asd-wizard-usecase legend { font-weight: 600; font-size: 0.9rem; padding: 0 4px; }
.asd-wizard-option { display: flex; gap: 8px; align-items: baseline; margin: 6px 0; font-size: 0.875rem; color: var(--asd-ink); }
.asd-wizard-checks, .asd-wizard-checklist { list-style: none; padding: 0; margin: 6px 0 12px; font-size: 0.875rem; }
.asd-wizard-checks li, .asd-wizard-checklist li { margin: 4px 0; }
.asd-wizard-ok { color: #1d6b3a; }
.asd-wizard-warn { color: #8a5300; }
.asd-wizard-preview { white-space: pre-wrap; font-size: 0.78rem; max-height: 420px; overflow: auto; background: var(--asd-soft); padding: 8px; border-radius: 4px; }
.asd-wizard-examples { margin: 8px 0; font-size: 0.85rem; }
.asd-wizard-nav { display: flex; align-items: center; gap: 8px; margin: 16px 0; max-width: 860px; }
.asd-wizard-next { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* Provenance info button and popup (ASD-R-040). Same look as the AI Prompt Builder; fixed so it
   also works inside modal dialogs. */
.asd-info, .asd-info-sample { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; min-width: 22px; margin: 0 2px; padding: 0; border: 1px solid #93a8c6; border-radius: 50%; background: #eef4ff; color: #1e40af; font: italic 700 13px/1 Georgia, "Times New Roman", serif; cursor: pointer; vertical-align: middle; }
.asd-info:hover, .asd-info:focus, .asd-info[aria-expanded=true] { background: var(--asd-accent); border-color: var(--asd-accent); color: #fff; }
.asd-info:disabled { opacity: 0.4; cursor: default; }
.asd-info-sample { cursor: default; }
.asd-prov { position: fixed; z-index: 10000; width: min(440px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow: auto; background: var(--asd-panel); color: var(--asd-ink); border: 1px solid #9fb0c8; border-radius: 10px; box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22); padding: 12px 14px; font-size: 0.85rem; }
.asd-prov.asd-prov-sheet { position: fixed; left: 8px !important; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: 75vh; }
.asd-prov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.asd-prov-head h3 { font-size: 0.95rem; margin: 0; outline: none; }
.asd-prov-close { margin: 0; padding: 0 6px; border: 0; background: transparent; color: var(--asd-muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.asd-prov-close:hover, .asd-prov-close:focus { background: transparent; color: var(--asd-ink); }
.asd-prov-intro { margin: 6px 0; color: var(--asd-muted); font-size: 0.8rem; }
.asd-prov-list { margin: 0 0 0 1.2em; padding: 0; }
.asd-prov-citation { margin: 0 0 12px; padding-top: 8px; border-top: 1px solid var(--asd-line); }
.asd-prov-citation:first-child { border-top: 0; padding-top: 0; }
.asd-prov-line, .asd-prov-meta, .asd-prov-where, .asd-prov-note, .asd-prov-stale { margin: 2px 0; font-size: 0.82rem; line-height: 1.4; }
.asd-prov-title { font-weight: 600; color: #1d4ed8; text-decoration: underline; }
.asd-prov-meta { color: var(--asd-muted); }
.asd-prov-quote { margin: 6px 0; padding: 4px 0 4px 10px; border-left: 3px solid #93a8c6; color: #1e293b; font-size: 0.82rem; font-style: italic; line-height: 1.45; }
.asd-prov-note { color: #334155; background: var(--asd-soft); border-radius: 4px; padding: 3px 6px; }
.asd-prov-stale { color: #8a4b00; }

.asd-prov :focus-visible { outline: 2px solid var(--asd-accent); outline-offset: 2px; }
.asd-sources-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 12px; }
.asd-source-card { background: var(--asd-panel); border: 1px solid var(--asd-line); border-radius: 10px; padding: 14px; min-width: 0; }
.asd-source-card h3 { overflow-wrap: anywhere; }
.asd-cited-by { font-size: 0.84rem; margin: 6px 0 0 1.2em; }

/* Sources buttons beside wizard labels, options and step headings (ASD-R-040). */
.asd-label-row { display: flex; align-items: center; gap: 4px; }
.asd-label-row label { margin-right: 0; }
.asd-wizard-option-row { display: flex; align-items: center; gap: 4px; }
.asd-wizard-option-row .asd-wizard-option { flex: 1; min-width: 0; }
.asd-wizard-step-head { display: flex; align-items: center; gap: 6px; }
.asd-guidance { display: inline-block; vertical-align: middle; }
.asd-check-list .asd-info { margin-left: 4px; }

/* AISE-T-006: formatted SKILL.md preview (MarkdownView); the Markdown option keeps the monospace text. */
#asdMarkdownPreview .asd-preview-text, #asdMarkdownPreview .mdv-markdown, .asd-revision-text .asd-preview-text, .asd-revision-text .mdv-markdown { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: #334155; background: none; border: 0; padding: 0; margin: 0; }
.asd-preview-formatted { font: 13px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1e293b; margin-top: 6px; }
.asd-front-matter { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 12px; display: table !important; }
.asd-front-matter th { width: 30%; color: #64748b; font-weight: 600; background: #f8fafc; }
.asd-front-description > :last-child { margin-bottom: 0; }
.asd-front-description ul { margin: 4px 0 0; }
.asd-front-matter th, .asd-front-matter td { border: 1px solid #e2e8f0; padding: 4px 8px; vertical-align: top; overflow-wrap: anywhere; }
