#autopilot-panel { font-size: 13px; }
.autopilot-intro { display:flex; justify-content:space-between; align-items:center; gap:24px; padding:12px 0 26px; }
.autopilot-intro h3 { font-size:clamp(24px,3vw,36px); margin:10px 0; letter-spacing:-.035em; }
.autopilot-intro p,.autopilot-list-head p,.autopilot-action p { color:var(--muted); line-height:1.75; margin:6px 0 0; }
.autopilot-mark { font-size:30px; color:var(--muted); white-space:nowrap; font-variant-numeric:tabular-nums; }
.autopilot-settings { display:grid; grid-template-columns:1fr 1fr 1.3fr auto; gap:18px; align-items:end; border:1px solid var(--line); border-radius:14px; padding:22px; background:var(--surface); }
.autopilot-settings label { display:grid; gap:9px; color:var(--ink); font-size:12px; }
.autopilot-settings select { width:100%; min-height:42px; font-size:13px; background:var(--surface); color:var(--ink); padding:8px 12px; border:1px solid var(--line); border-radius:8px; }
.autopilot-settings .autopilot-toggle { display:flex; align-items:center; gap:10px; min-height:42px; }
#autopilot-panel input[type=checkbox] { width:17px; height:17px; accent-color:var(--cyan); margin:0; flex-shrink:0; }
.autopilot-toggle small { display:block; color:var(--muted); margin-top:6px; font-size:11px; }
.autopilot-action { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:24px 0 12px; }
#autopilot-panel .primary,#autopilot-panel .secondary { font-size:12px; min-height:40px; white-space:nowrap; }
.autopilot-warnings { display:grid; gap:8px; }
.autopilot-warnings p { margin:0; padding:12px 16px; border-left:3px solid var(--line); background:var(--yellow-soft); color:var(--muted); font-size:12px; line-height:1.65; overflow-wrap:anywhere; }
.autopilot-list-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin:30px 0 16px; }
.autopilot-list-head h4 { margin:0; font-size:18px; }
.autopilot-list-head h4 span { color:var(--muted); font-size:14px; margin-left:6px; }
.autopilot-list-head p { font-size:12px; }
.autopilot-selection { display:flex; align-items:center; gap:16px; padding:14px 0; border-top:1px solid var(--line); }
.autopilot-selection label { display:flex; align-items:center; gap:9px; }
.autopilot-selection > span { color:var(--muted); margin-right:auto; }
.autopilot-topics { display:grid; gap:10px; }
.autopilot-topic { display:grid; grid-template-columns:22px minmax(0,1fr) minmax(180px,.5fr); gap:14px; padding:20px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.autopilot-topic > input { margin-top:4px !important; }
.autopilot-topic h5 { font-size:16px; margin:0 0 10px; color:var(--ink); overflow-wrap:anywhere; }
.autopilot-topic p { font-size:12px; line-height:1.65; color:var(--muted); margin:9px 0 0; overflow-wrap:anywhere; }
.autopilot-badges { display:flex; flex-wrap:wrap; gap:6px; }
.autopilot-badges span { font-size:10px; padding:4px 8px; color:var(--muted); border:1px solid var(--line); border-radius:5px; background:var(--surface); }
.autopilot-metrics { display:grid; gap:7px; font-size:11px; align-content:start; color:var(--muted); padding-left:20px; border-left:1px solid var(--line); }
.autopilot-metrics strong { font-size:19px; color:var(--ink); }
.autopilot-topic details { margin-top:12px; font-size:11px; color:var(--muted); }
.autopilot-topic details a { display:block; margin-top:7px; color:var(--muted); overflow-wrap:anywhere; }
.autopilot-empty { padding:34px 20px; text-align:center; color:var(--muted); border:1px dashed var(--line); border-radius:12px; line-height:1.8; }
.autopilot-jobs { display:grid; gap:8px; }
.autopilot-job { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; padding:15px 18px; border:1px solid var(--line); border-radius:9px; color:var(--ink); }
.autopilot-job small { grid-column:1/-1; color:var(--muted); line-height:1.6; overflow-wrap:anywhere; }
.autopilot-job[data-status=failed] { border-color:var(--line); }
#autopilot-panel button:disabled { opacity:.5; cursor:not-allowed; }
#autopilot-panel :focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
.autopilot-extra { margin-top:20px; border:1px solid var(--line); border-radius:12px; padding:20px; }
.autopilot-extra > summary { cursor:pointer; font-size:15px; font-weight:700; color:var(--ink); }
.autopilot-extra > summary span { font-size:12px; font-weight:400; color:var(--muted); margin-left:14px; }
.autopilot-extra p { color:var(--muted); line-height:1.75; font-size:12px; }
.autopilot-upload { display:flex; flex-wrap:wrap; align-items:end; gap:16px; margin:18px 0; }
.autopilot-upload label { flex:1 1 220px; }
.autopilot-extra label { display:grid; gap:8px; font-size:12px; color:var(--ink); }
.autopilot-extra input,.autopilot-extra select { width:100%; font-size:12px; min-height:40px; padding:9px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
.autopilot-certificate { padding:18px 0; border-top:1px solid var(--line); }
.autopilot-certificate h5 { margin:0 0 14px; font-size:14px; }
.autopilot-certificate-fields { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.autopilot-certificate-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:16px; }
.autopilot-job button { justify-self:end; font-size:11px !important; }
@media(max-width:1000px) { .autopilot-settings { grid-template-columns:1fr 1fr; } .autopilot-topic { grid-template-columns:22px 1fr; } .autopilot-metrics { grid-column:2; border:0; padding:8px 0 0; } }
@media(max-width:620px) { .autopilot-settings,.autopilot-certificate-fields { grid-template-columns:1fr; } .autopilot-action,.autopilot-list-head { align-items:flex-start; flex-direction:column; } .autopilot-selection { flex-wrap:wrap; } .autopilot-mark { display:none; } .autopilot-topic { padding:15px; } .autopilot-extra > summary span { display:block; margin:6px 0 0; } }

.autopilot-filters{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.autopilot-filters button[aria-pressed="true"]{border-color:var(--line);background:var(--surface);color:var(--ink)}#autopilot-filter-help{color:var(--muted);line-height:1.7;font-size:13px}.autopilot-topic[hidden]{display:none}

.topic-library-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) 190px 145px auto; gap:14px; align-items:end; margin:22px 0; }
.topic-library-toolbar label { display:grid; gap:8px; color:var(--muted); font-size:12px; }
.topic-library-toolbar input,.topic-library-toolbar select { min-height:42px; width:100%; background:var(--surface); color:var(--ink); padding:9px 12px; border:1px solid var(--line); border-radius:8px; }
.topic-writing-actions { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0 8px; }
.topic-pagination { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin:12px 0; color:var(--muted); font-size:12px; }
.topic-pagination span { margin-right:auto; }
.topic-discovery-settings { margin-top:0; padding:12px 16px; }
.topic-discovery-settings .autopilot-settings { margin-top:16px; }
.autopilot-settings-actions { display:grid; gap:8px; max-width:280px; }
.autopilot-settings-actions .message { margin:0; white-space:normal; }
.topic-writing-actions .primary { background:var(--surface); box-shadow:none; }
.autopilot-badges .topic-status { border-color:var(--line); color:var(--muted); background:var(--surface); }
.autopilot-badges .topic-status-failed,.autopilot-badges .topic-status-needs_attention { border-color:var(--line); background:var(--yellow-soft); color:var(--warning); }
.autopilot-badges .topic-status-published { color:var(--green); background:var(--success-soft); }
.topic-attention { color:var(--warning) !important; }
.production-intro { display:flex; justify-content:space-between; align-items:center; gap:28px; margin:6px 0 28px; }
.production-intro h3 { margin:12px 0; font-size:30px; letter-spacing:-.03em; }
.production-intro p { color:var(--muted); line-height:1.7; }
.production-intro button { flex-shrink:0; }
.production-task-section { padding:0 22px 22px; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.production-job-keyword { grid-column:1/-1; color:var(--ink); font-size:14px; }
#content-studio-panel textarea { width:100%; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); font:inherit; line-height:1.65; }
#production-jobs { max-height:400px; overflow:auto; }
.topic-dialog { width:min(760px,calc(100vw - 32px)); max-height:90vh; overflow:auto; padding:28px; background:var(--surface); border:1px solid var(--line); border-radius:18px; color:var(--ink); box-shadow:0 28px 90px rgba(75,53,25,.10); }
.topic-dialog::backdrop { background:var(--surface); backdrop-filter:blur(4px); }
.topic-dialog-small { width:min(620px,calc(100vw - 32px)); }
.topic-dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:22px; }
.topic-dialog-head h3 { font-size:24px; margin:10px 0; }
.topic-dialog-head p { color:var(--muted); line-height:1.7; margin:0; }
.topic-dialog .article-generation-form { margin:0; padding:0; border:0; background:none; }
.topic-dialog input[readonly] { background:var(--surface); color:var(--ink); }
.topic-dialog :focus-visible { outline:2px solid var(--focus); outline-offset:3px; }
@media(max-width:800px) { .topic-library-toolbar { grid-template-columns:1fr 1fr; } .topic-library-toolbar label:first-child { grid-column:1/-1; } .production-intro { align-items:flex-start; flex-direction:column; } }
@media(max-width:520px) { .topic-library-toolbar { grid-template-columns:1fr; } .topic-dialog { padding:20px; } .production-intro h3 { font-size:24px; } }

.autopilot-filters button[aria-pressed="true"]{background:var(--yellow-soft);border-color:var(--yellow);color:var(--yellow-ink)}
.topic-writing-actions .primary{background:var(--red);color:#fff}
.topic-writing-actions .primary:hover{background:var(--red-hover)}
.autopilot-badges span,.autopilot-badges .topic-status{background:var(--panel-2);color:var(--muted);border-color:var(--line)}
.autopilot-badges .topic-status-failed,.autopilot-badges .topic-status-needs_attention{background:var(--yellow-soft);color:var(--warning)}
.autopilot-badges .topic-status-published{background:var(--success-soft);color:var(--green)}
.autopilot-warnings p{background:var(--yellow-soft);color:var(--warning);border-left-color:var(--yellow)}
.topic-dialog input[readonly]{background:var(--panel-2);color:var(--muted)}

.autopilot-job[data-status=failed]{border-color:var(--danger);background:var(--danger-soft)}

.topic-dialog::backdrop{background:rgba(42,35,29,.45)}
.topic-dialog .article-generation-form{box-shadow:none}
