/* Editorial workspace — candidate management layer. Version: package.json. */
:root {
  --paper: #f6f5f9;
  --ink: #22263b;
  --muted: #62657b;
  --line: #dddde7;
  --soft: #f0edf7;
  --accent: #ddd6fe;
}
main { width: min(1380px, calc(100% - 64px)); padding-top: 36px; }
.topbar { padding-inline: max(32px, calc((100vw - 1380px) / 2)); }
.intro { align-items: end; gap: 30px; margin-bottom: 30px; }
.intro h1 { font-size: clamp(30px, 3.2vw, 44px); max-width: none; letter-spacing: -.04em; line-height: 1.12; }
.intro > p { max-width: 430px; font-size: 14px; color: var(--muted); }
.eyebrow { color: var(--tool-purple); letter-spacing: .11em; font-size: 11px; }
.tabs { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 6px; gap: 5px; margin-bottom: 22px; }
.tabs button { border: 0; border-radius: 7px; padding: 10px 17px; font-size: 14px; }
.tabs button.active { background: var(--tool-purple); color: white; }
.panel { border-radius: 12px; box-shadow: none; }
.metric-grid { gap: 12px; grid-template-columns: repeat(6, minmax(0,1fr)); }
.metric-grid article { border-radius: 10px; background: white; border: 1px solid var(--line); padding: 18px; }
.metric-grid article span { font-size: 32px; color: var(--tool-purple); }
.metric-grid article strong { font-size: 12px; color: var(--muted); font-weight: 600; }
.library-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 30px 0 20px; }
.library-heading h2 { font-size: 30px; line-height: 1.2; letter-spacing: -.025em; margin: 4px 0 8px; }
.library-heading p { margin: 0; font-size: 13px; color: var(--muted); }
.library-heading .eyebrow { color: var(--tool-purple); font-size: 10px; }
.library-heading .actions { flex-shrink: 0; }
.button.primary, .primary-action { background: var(--tool-purple) !important; color: white; border-color: var(--tool-purple); }
.button.secondary { background: white; }
.button, button { border-radius: 6px; }
.library-panel { padding: 0; overflow: visible; }
.library-toolbar { display: grid; grid-template-columns: minmax(220px, 2.3fr) repeat(4, minmax(125px, 1fr)); gap: 12px; padding: 22px; background: #faf9fd; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--line); }
.library-toolbar label { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .025em; }
.library-toolbar input, .library-toolbar select { padding: 10px 11px; min-height: 43px; margin-top: 6px; font-size: 13px; background: white; border-radius: 6px; }
.library-results { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 22px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.library-results .checkbox-field { margin: 0; display: flex; gap: 7px; font-size: 12px; align-items: center; }
.library-results button { border: 0; padding: 0; text-decoration: underline; background: transparent; font-size: 12px; color: var(--tool-purple); }
.library-panel .record-list { gap: 0; }
.story-workflow-views { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: white; }
.story-workflow-views button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; font-size: 12px; background: white; border: 1px solid var(--line); }
.story-workflow-views button[aria-pressed="true"] { background: var(--tool-purple); border-color: var(--tool-purple); color: white; }
.story-workflow-views span { font-weight: 700; }
.library-panel .story-group-heading { margin: 0; padding: 16px 22px; background: #faf9fd; color: var(--tool-purple); border-bottom: 1px solid var(--line); font-size: 20px; }
.library-panel .record { margin: 0; padding: 20px 22px; background: white; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }
.library-panel .record:last-child { border-bottom: 0; }
.library-panel .record h3, .library-panel .record-title-heading { font-size: 16px; font-weight: 650; line-height: 1.45; }
.library-panel .record p { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.library-panel .record .story-preview-content p { font-size: 14px; color: var(--ink); }
.library-panel .record-actions { align-content: start; align-items: start; justify-content: end; max-width: 205px; gap: 6px; }
.library-panel .record-actions > button { font-size: 11px; padding: 7px 9px; min-height: 32px; }
.record-organisation { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 22px; }
.record-select { margin: 0; display: flex; padding: 0; }
input[type=checkbox] { accent-color: var(--tool-purple); width: 16px; height: 16px; flex-shrink: 0; }
.group-chip, .spotlight-chip { display: inline-flex; align-items: center; font-size: 10px; font-weight: 650; padding: 3px 8px; border-radius: 4px; background: #f0edf8; color: #674a91; }
.spotlight-chip { background: #fff4d8; color: #7a5710; }
.badge { border: 0; background: #f0f1f7; color: #51576e; border-radius: 4px; font-size: 10px; margin-right: 5px; }
.is-archived { background: #fafafa !important; }
.record-menu { position: relative; font-size: 12px; min-width: 100px; }
.record-menu > summary { cursor: pointer; list-style: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: white; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.record-menu > summary::-webkit-details-marker { display: none; }
.record-menu > div { position: absolute; z-index: 4; right: 0; top: 100%; min-width: 205px; padding: 6px; background: white; border: 1px solid var(--line); box-shadow: 0 8px 28px #27203824; border-radius: 7px; display: grid; }
.record-menu button { text-align: left; font-size: 12px; border: 0; padding: 9px 10px; background: white; color: var(--ink); }
.record-menu button:hover { background: var(--soft); }
.library-pagination { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.library-pagination button { background: white; font-size: 12px; border: 1px solid var(--line); padding: 7px 13px; }
button:disabled { cursor: not-allowed; }
.library-selection { background: #ede7fa; display: flex; align-items: center; gap: 10px; padding: 12px 22px; font-size: 12px; flex-wrap: wrap; }
.library-selection label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; }
.library-selection select { padding: 6px; width: auto; margin: 0; font-size: 12px; background: white; }
.library-selection button { padding: 7px 10px; font-size: 11px; border: 1px solid #c4b5df; background: white; }
.library-empty { padding: 35px 22px; color: var(--muted); text-align: center; font-size: 13px; }
.library-empty strong { color: var(--ink); }
.library-empty p { margin-bottom: 0; }
.composer { margin: 0 0 18px; border: 1px dashed #c7bcdf; border-radius: 8px; background: #faf9fe; }
.composer > summary { padding: 12px 18px; cursor: pointer; color: var(--tool-purple); font-size: 12px; font-weight: 650; }
.composer:not([open]) { display: none; }
.composer > .panel { margin: 0; border: 0; background: transparent; }
.wide-form { max-width: none; }
.evidence-workspace { margin-top: 38px; padding-top: 8px; border-top: 3px solid var(--soft); }
.evidence-workspace > .library-heading { margin-top: 26px; }
.source-picker-search { margin-top: 12px; }
.source-picker-count { margin: 10px 0; color: var(--tool-purple); font-size: 12px; font-weight: 700; }
.source-picker-list { max-height: 420px; overflow: auto; padding-right: 4px; }
.source-picker-rights { overflow-wrap: anywhere; }
.desk-spotlight { margin-bottom: 22px; }
.desk-spotlight h2 { margin: 3px 0 0; }
#build-commit { font-family: ui-monospace, monospace; font-size: 12px; overflow-wrap: anywhere; }
#desk-spotlight-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
#desk-spotlight-list > .library-empty { grid-column: 1/-1; }
.spotlight-card { display: grid; gap: 9px; background: #faf9fd; border: 1px solid var(--line); padding: 18px; text-align: left; }
.spotlight-card span { font-size: 10px; text-transform: uppercase; color: var(--tool-purple); letter-spacing: .08em; }
.spotlight-card strong { font-size: 14px; line-height: 1.4; }
.spotlight-card small { font-size: 11px; color: var(--muted); }
.issue-lineup { font-size: 12px; margin-top: 12px; }
.issue-lineup summary { color: var(--tool-purple); cursor: pointer; }
.issue-lineup ol { padding-left: 22px; }
.issue-lineup li { margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
dialog { color: var(--ink); width: min(750px, calc(100% - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: 0 24px 100px #1f163940; }
dialog::backdrop { background: #17102580; backdrop-filter: blur(3px); }
dialog h2 { margin: 0; font-size: 25px; }
dialog .section-intro { font-size: 13px; }
dialog input:disabled, dialog select:disabled, dialog textarea:disabled { background: #eeedf3; opacity: .8; cursor: not-allowed; }
dialog .actions { margin-top: 22px; }
.notice:empty { display: none; }
.candidate-banner { margin: 0 0 22px; padding: 9px 13px; border: 1px solid #dbca92; border-radius: 6px; background: #fffae9; color: #725a1e; font-size: 12px; }
.replacement-original { padding: 12px; background: var(--soft); font-size: 14px; border-radius: 6px; }
.story-picker-item { position: relative; }
.picker-order { display: flex; gap: 6px; padding: 0 12px 12px 44px; }
.picker-order button { background: white; border: 1px solid var(--line); padding: 5px 9px; font-size: 11px; }
.calendar-library-heading h2 { color: var(--tool-purple); }
.calendar-toolbar-panel { padding: 0; margin-bottom: 22px; }
.calendar-toolbar-panel .library-toolbar { border-bottom: 1px solid var(--line); }
.calendar-toolbar-panel .library-results { border-bottom: 0; }
.calendar-library-panel > h2 { margin: 0; padding: 22px 22px 8px; font-size: 20px; color: var(--tool-purple); }
.calendar-library-panel > .section-intro { padding: 0 22px; margin: 0 0 14px; font-size: 12px; }
.calendar-library-panel > .library-results { margin: 0; border-top: 1px solid var(--line); }
.calendar-library-panel .record-group-heading { margin: 0; padding: 12px 22px; background: #faf9fd; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.calendar-library-panel .record-preview-content { margin-top: 14px; }
.calendar-library-panel .record-title-preview > summary { align-items: start; }
.calendar-library-panel .record-title-heading { overflow-wrap: anywhere; }
.calendar-library-panel .record-actions > button { min-height: 40px; }
.calendar-unsaved-note { color: var(--tool-purple); font-size: 12px; }
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .library-toolbar { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .library-search { grid-column: 1/-1; }
  .library-heading { align-items: start; }
  .library-heading .actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 760px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  main { width: calc(100% - 28px); padding-top: 24px; }
  .topbar { padding: 12px 14px; }
  .intro { display: block; margin-bottom: 20px; }
  .intro > p { margin-top: 14px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; gap: 2px; }
  .tabs button { white-space: nowrap; padding: 9px 13px; }
  .library-heading { display: block; margin-top: 24px; }
  .library-heading h2 { font-size: 26px; }
  .library-heading .actions { flex-direction: row; margin-top: 16px; }
  .library-toolbar { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 15px; gap: 10px; }
  .library-panel .record { grid-template-columns: minmax(0,1fr); padding: 17px 15px; gap: 12px; }
  .library-panel .record-actions { justify-content: start; max-width: none; }
  .record-menu > div { right: auto; left: 0; }
  .library-results { padding: 12px 15px; flex-wrap: wrap; gap: 8px; }
  .story-workflow-views { padding: 12px 15px; }
  .library-panel .story-group-heading { padding-inline: 15px; }
  .library-selection { padding: 12px 15px; }
  #desk-spotlight-list { grid-template-columns: 1fr; }
  dialog { padding: 20px; }
  .calendar-library-toolbar label { min-width: 0; }
  .calendar-library-toolbar input, .calendar-library-toolbar select { width: 100%; min-width: 0; }
  .calendar-library-panel > h2 { padding-inline: 15px; }
  .calendar-library-panel > .section-intro { padding-inline: 15px; }
  .calendar-library-panel .record-group-heading { padding-inline: 15px; }
  .calendar-library-panel .library-pagination { gap: 12px; padding-inline: 12px; }
  .calendar-library-panel .library-pagination button { min-height: 40px; padding-inline: 10px; }
}
