.ml-page { max-width: 1500px; margin: 0 auto; color: var(--ink); }
.ml-page * { box-sizing: border-box; }
.ml-page [hidden] { display: none !important; }
.ml-local { color: var(--ok); background: var(--ok-tint); border: 1px solid var(--line); border-radius: 20px; padding: 7px 12px; white-space: nowrap; font-size: 12px; }
.ml-layout { display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); gap: 28px; align-items: start; }
.ml-workbench { padding: 20px; }
.ml-section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; }
.ml-section-title h2, .ml-history-head h2 { font-size: 17px; margin: 0; letter-spacing: -.3px; }
.ml-step { background: var(--reply-tint); color: var(--reply); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 12px; font-weight: 600; }
.ml-drop { border: 1px dashed var(--edge-field); border-radius: 10px; background: var(--fill); padding: 20px 12px; text-align: center; }
.ml-drop label { cursor: pointer; display: grid; gap: 8px; font-size: 13px; }
.ml-drop span { color: var(--ink-2); font-size: 11px; }
.ml-drop input { max-width: 100%; margin-top: 16px; font-size: 12px; color: var(--ink-2); }
.ml-drop input::file-selector-button { background: var(--pop); color: var(--ink); border: 1px solid var(--line); padding: 6px 9px; border-radius: 6px; margin-right: 8px; cursor: pointer; }
.ml-drop.ml-drag { border-color: var(--reply); background: var(--reply-tint); }
.ml-sample { margin: 12px 0 26px; }
.ml-page fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
.ml-page fieldset:disabled { opacity: .65; }
.ml-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 500; margin-bottom: 14px; }
.ml-field .input { width: 100%; min-width: 0; height: 38px; }
.ml-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.ml-hint { font-size: 12px; line-height: 1.55; color: var(--ink-2); margin: 8px 0 16px; }
.ml-options { border-top: 1px solid var(--line); padding: 14px 0 0; margin: 14px 0; }
.ml-options summary, .ml-report summary { cursor: pointer; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.ml-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.ml-status { min-height: 34px; margin: 14px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; }
.ml-error { color: var(--alert) !important; }
.ml-filename { color: var(--ink-2); font-size: 13px; margin: 0 0 14px; overflow-wrap: anywhere; }
.ml-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ml-pair figure { margin: 0; min-width: 0; border-radius: var(--radius-card); border: 1px solid var(--line); overflow: hidden; background: var(--pop); }
.ml-pair figcaption { font-size: 12px; font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ml-screen { display: flex; align-items: center; justify-content: center; min-height: 220px; aspect-ratio: 4/3; background: var(--fill); overflow: hidden; }
.ml-screen img, .ml-screen video, .ml-screen canvas { display: block; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }
.ml-screen p { padding: 20px; text-align: center; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.ml-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0; }
.ml-metrics > div { background: var(--pop); border: 1px solid var(--line); border-radius: 10px; padding: 13px; display: grid; gap: 6px; }
.ml-metrics span, .ml-metrics small { color: var(--ink-2); font-size: 11px; }
.ml-metrics strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ml-report { padding: 18px; margin: 18px 0; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.ml-report h3, .ml-batch h3 { font-size: 14px; margin: 0 0 12px; }
.ml-report ul { padding-left: 18px; color: var(--ink-2); }
.ml-report pre { white-space: pre-wrap; background: var(--fill); border-radius: 8px; padding: 12px; font-size: 11px; }
.ml-batch { margin-top: 22px; overflow: hidden; }
.ml-batch h3 { padding: 16px 16px 0; }
.ml-queue-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.ml-queue-row:first-child { border-top: 0; }
.ml-selected { background: var(--reply-tint); }
.ml-file-name { background: transparent; border: 0; padding: 4px 0; color: var(--ink); cursor: pointer; flex: 1 1 150px; text-align: left; font-size: 12px; overflow-wrap: anywhere; min-width: 0; }
.ml-file-name small { display: block; font-size: 11px; color: var(--ink-2); margin-top: 5px; }
.ml-state { font-size: 11px; color: var(--ink-2); }
.ml-row-error { flex: 1 1 100%; margin: 0; color: var(--alert); font-size: 12px; overflow-wrap: anywhere; }
.ml-empty { padding: 20px; margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.ml-history-section { margin-top: 36px; }
.ml-history-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.ml-page button:disabled { cursor: not-allowed; opacity: .55; }
.ml-page :focus-visible { outline: 2px solid var(--reply); outline-offset: 3px; }
@media (max-width: 1100px) { .ml-layout { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; } .ml-screen { min-height: 150px; } .ml-metrics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .ml-layout { grid-template-columns: 1fr; } .ml-workbench { padding: 16px; } .ml-history-head { flex-direction: column; gap: 0; margin-bottom: 12px; } .ml-screen { min-height: 130px; } .ml-pair { gap: 8px; } }

/* Durable job reports */
.ml-service-result { margin-top:16px; padding:20px; overflow-wrap:anywhere; }
.ml-saved-file { padding:16px 0; border-top:1px solid var(--border, #34394b); }
.ml-saved-file pre { white-space:pre-wrap; max-height:400px; overflow:auto; font-size:12px; }
.ml-ai-summary { white-space:pre-wrap; line-height:1.6; }
.ml-ai-finding { margin:12px 0; padding:12px; background:rgba(128,128,128,.08); border-radius:8px; }
.ml-ai-frames { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:16px; padding:16px 0; }
.ml-ai-frames figure { margin:0; } .ml-ai-frames img { width:100%; max-height:250px; object-fit:contain; }
.ml-ai-frames figcaption { font-size:13px; line-height:1.5; }
.ml-screen audio { max-width:100%; }
.ml-platform-reviews { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px;margin:20px 0; }
.ml-ai-risk { font-weight:600;font-size:14px; }

/* Shared-cover workflow: one batch, one cover, one preset. */
.ml-tools { display:flex; flex-wrap:wrap; gap:8px; margin:8px 0 30px; }
.ml-tools [aria-pressed=true] { color:var(--reply); background:var(--reply-tint); border-color:var(--reply); }
#ml-video, .ml-page:has(#ml-video:not([hidden])) #ml-service { max-width:1040px; margin-left:auto; margin-right:auto; }
.ml-video-intro { padding:26px 0 24px; }
.ml-video-intro h2 { font-size:32px; letter-spacing:-.8px; margin:0 0 10px; }
.ml-video-intro p { margin:0; color:var(--ink-2); line-height:1.6; }
.ml-video-form { padding:30px; border-top:2px solid var(--reply); }
.ml-video-inputs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.ml-upload-card { border:1px solid var(--line); border-radius:12px; padding:22px; min-width:0; background:var(--canvas); }
.ml-upload-card h3, .ml-video-level h3 { margin:0; font-size:13px; font-weight:600; }
.ml-upload-card > p { color:var(--ink-2); font-size:12px; line-height:1.5; margin:8px 0 18px; }
.ml-video-drop { border:1px dashed var(--edge-field); border-radius:9px; transition:background .15s,border-color .15s; }
.ml-video-drop label { display:flex; position:relative; min-height:175px; align-items:center; justify-content:center; flex-direction:column; gap:8px; text-align:center; padding:20px 12px; cursor:pointer; }
.ml-video-drop input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
.ml-video-drop:focus-within { outline:2px solid var(--reply); outline-offset:3px; }
.ml-video-drop strong { font-size:13px; font-weight:500; }
.ml-video-drop span:not(.ml-upload-symbol), .ml-video-drop small { color:var(--ink-2); font-size:11px; }
.ml-video-drop small { margin-top:5px; }
.ml-upload-symbol { color:var(--reply); font-size:26px; margin-bottom:4px; }
.ml-video-drop.ml-drag { background:var(--reply-tint); border-color:var(--reply); }
.ml-video-file { display:flex; align-items:center; gap:8px; padding-top:12px; font-size:12px; }
.ml-video-file > span { flex:1; overflow-wrap:anywhere; min-width:0; }
.ml-video-file small { display:block; margin-top:4px; color:var(--ink-2); }
.ml-video-level { border-top:1px solid var(--line); margin-top:24px; padding-top:24px; }
.ml-levels { display:flex; flex-wrap:wrap; gap:10px; margin:15px 0; }
.ml-level { font:inherit; font-size:12px; color:var(--ink-2); background:transparent; border:1px solid transparent; border-radius:24px; padding:9px 18px; cursor:pointer; }
.ml-level[aria-pressed=true] { color:var(--reply); background:var(--reply-tint); border-color:var(--reply); }
.ml-video-footer { border-top:1px solid var(--line); margin-top:22px; padding-top:22px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.ml-video-footer p { margin:0; color:var(--ink-2); font-size:12px; line-height:1.5; }
.ml-video-footer .btn-primary { padding:12px 26px; white-space:nowrap; }
.ml-video-form .ml-status:empty { display:none; }
.ml-result-video { display:block; width:100%; max-width:500px; max-height:450px; border-radius:10px; background:#080808; }
.ml-video-results { padding:0 24px; }
.ml-video-batch { padding:22px 0; border-bottom:1px solid var(--line); }
.ml-video-batch:last-child { border-bottom:0; }
.ml-video-batch-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; font-size:12px; color:var(--ink-2); }
.ml-video-batch-head .ml-actions { margin:0; }
.ml-video-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; margin-top:16px; }
.ml-video-result { padding:20px; border:1px solid var(--line); border-radius:10px; min-width:0; }
.ml-video-result-title { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:20px; }
.ml-video-result-title strong { font-size:13px; overflow-wrap:anywhere; flex:1 1 140px; }
.ml-video-badge { border-radius:16px; background:var(--fill); color:var(--ink-2); padding:5px 10px; font-size:11px; }
.ml-video-badge.ml-complete { background:var(--reply-tint); color:var(--reply); }
.ml-video-result > .btn { width:100%; justify-content:center; }
.ml-video-result details { margin-top:18px; font-size:12px; }
.ml-video-result summary { cursor:pointer; color:var(--ink-2); }
#ml-cover-label { max-width:100%; overflow-wrap:anywhere; }
#ml-cover-remove { margin-top:12px; }
@media(max-width:800px) { .ml-video-inputs { grid-template-columns:1fr; gap:16px; } .ml-video-form { padding:18px; } .ml-upload-card { padding:18px; } .ml-video-intro h2 { font-size:26px; } .ml-video-footer { align-items:stretch; flex-direction:column; } }

/* One tab per feature, with a shared form and results rhythm. */
.ml-tools { border-bottom:1px solid var(--line); gap:4px; padding-bottom:8px; }
.ml-tools [role=tab] { background:transparent; border-color:transparent; color:var(--ink-2); }
.ml-tools [aria-selected=true] { background:var(--reply-tint); color:var(--reply); border-color:var(--reply); }
#ml-overview, #ml-image, #ml-ai, #ml-clean, #ml-history-intro, #ml-service { max-width:1040px; margin-left:auto; margin-right:auto; }
.ml-single-input .ml-video-drop label { min-height:215px; }
.ml-tool-consent { margin:24px 0 0; font-size:12px; color:var(--ink-2); line-height:1.6; align-items:flex-start; }
.ml-tool-consent input { margin-top:3px; flex-shrink:0; }
.ml-noise-head { display:flex; justify-content:space-between; align-items:center; font-size:13px; font-weight:600; }
.ml-noise-head output { font-size:24px; font-variant-numeric:tabular-nums; }
.ml-noise { width:100%; accent-color:var(--reply); cursor:pointer; }
.ml-range-labels { display:flex; justify-content:space-between; color:var(--ink-2); font-size:11px; margin-top:8px; }
.ml-image-compare { position:relative; background:var(--fill); border-radius:8px; overflow:hidden; margin-bottom:12px; aspect-ratio:1; }
.ml-image-compare img { width:100%; height:100%; object-fit:contain; display:block; }
.ml-image-original { position:absolute; inset:0; opacity:0; background:var(--fill); transition:opacity .15s; }
.ml-image-compare:hover .ml-image-original, .ml-image-compare.ml-show-original .ml-image-original { opacity:1; }
.ml-image-caption { position:absolute; top:10px; left:10px; padding:5px 8px; border-radius:12px; color:white; background:rgba(0,0,0,.72); font-size:11px; }
.ml-image-caption span:last-child { display:none; }
.ml-image-compare:hover .ml-image-caption span:first-child, .ml-image-compare.ml-show-original .ml-image-caption span:first-child { display:none; }
.ml-image-compare:hover .ml-image-caption span:last-child, .ml-image-compare.ml-show-original .ml-image-caption span:last-child { display:inline; }
.ml-compare-toggle { margin-bottom:8px; }
.ml-result-image { width:100%; max-width:500px; max-height:500px; object-fit:contain; border-radius:8px; display:block; }
.ml-overview-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.ml-overview-metrics .card { padding:20px; display:grid; gap:12px; }
.ml-overview-metrics span { font-size:12px; color:var(--ink-2); }
.ml-overview-metrics strong { font-size:28px; font-variant-numeric:tabular-nums; }
.ml-activity { padding:24px; margin-top:24px; }
.ml-activity h3 { margin:0; font-size:15px; }
.ml-activity-bars { display:grid; grid-template-columns:repeat(7,1fr); gap:20px; margin:24px 0 14px; }
.ml-activity-day { text-align:center; font-size:12px; color:var(--ink-2); }
.ml-activity-day strong { color:var(--ink); font-size:13px; }
.ml-bar-track { height:120px; display:flex; align-items:flex-end; margin:10px auto; max-width:66px; background:var(--fill); border-radius:6px; overflow:hidden; }
.ml-bar-track div { width:100%; background:var(--reply); border-radius:6px 6px 0 0; }
.ml-shortcuts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:24px; }
.ml-shortcut { color:var(--ink); padding:24px; text-align:left; cursor:pointer; display:flex; flex-direction:column; gap:16px; }
.ml-shortcut span { color:var(--reply); font-size:12px; }
@media(max-width:800px) { .ml-overview-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } .ml-activity-bars { gap:8px; } .ml-tools { gap:5px; } .ml-tools .btn { padding:9px 10px; font-size:12px; } }
@media(max-width:480px) { .ml-shortcuts { grid-template-columns:1fr; } .ml-overview-metrics .card { padding:14px; } }

/* Additional reference workflows keep their own inputs and one primary action. */
#ml-text { max-width:800px; margin:0 auto; }
#ml-tiktok, #ml-audio { max-width:1040px; margin:0 auto; }
.ml-eyebrow { color:var(--reply); font-size:11px; letter-spacing:.13em; text-transform:uppercase; margin:0 0 18px; }
.ml-audio-inputs { display:grid; grid-template-columns:2fr 1fr; gap:24px; }
.ml-tiktok-inputs { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ml-audio-inputs > * { min-width:0; }
.ml-tool-guide { margin:0 0 24px; padding:20px 24px; }
.ml-tool-guide summary { cursor:pointer; text-align:center; font-size:12px; font-weight:600; text-transform:uppercase; }
.ml-tool-guide p { font-size:13px; color:var(--ink-2); line-height:1.7; margin-bottom:0; }
.ml-audio-footer { border-top:1px solid var(--line); padding-top:24px; margin-top:24px; }
.ml-result-audio { width:100%; margin:16px 0; }
.ml-text-chat { min-height:540px; height:calc(100vh - 375px); max-height:850px; display:flex; flex-direction:column; padding:24px; border-top:2px solid var(--reply); }
.ml-text-messages { flex:1; overflow:auto; overscroll-behavior:contain; min-height:150px; padding:0 4px 20px; }
.ml-text-welcome { color:var(--ink-2); font-size:13px; margin:0 0 22px; }
.ml-text-user { margin:20px 0 20px auto; max-width:85%; width:fit-content; padding:14px 18px; background:var(--reply-tint); border:1px solid var(--line); border-radius:10px; font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
.ml-text-result { border:1px solid var(--line); background:var(--surface); border-radius:9px; overflow:hidden; margin:0 25px 20px 0; }
.ml-text-result header { display:flex; align-items:center; justify-content:space-between; padding:10px 15px; border-bottom:1px solid var(--line); gap:12px; }
.ml-text-result header span, .ml-text-result footer { font-size:10px; text-transform:uppercase; letter-spacing:.12em; color:var(--ink-2); }
.ml-text-result .btn { padding:5px 14px; font-size:12px; }
.ml-text-output { white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; line-height:1.7; padding:14px 16px; margin:0; user-select:text; }
.ml-text-result footer { border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:10px 20px; padding:12px 16px; }
.ml-text-composer { border-top:1px solid var(--line); padding-top:16px; }
.ml-text-composer .ml-levels { justify-content:center; margin-bottom:12px; }
.ml-text-entry { display:flex; align-items:center; border:1px solid var(--line); border-radius:9px; padding:8px 12px; gap:12px; }
.ml-text-entry textarea { font:inherit; font-size:13px; line-height:1.6; width:100%; min-width:0; max-height:200px; resize:vertical; border:0; background:transparent; color:var(--ink); padding:5px 0; outline-offset:3px; }
.ml-text-entry button { flex-shrink:0; border-radius:50%; height:36px; width:36px; padding:0; justify-content:center; font-size:20px; }
.ml-text-footer { display:flex; justify-content:space-between; gap:10px; color:var(--ink-2); font-size:10px; margin-top:8px; }
.ml-text-composer .ml-status { margin:10px 0 0; font-size:11px; }
@media(max-width:800px) { .ml-audio-inputs, .ml-tiktok-inputs { grid-template-columns:1fr; gap:16px; } .ml-text-chat { padding:16px; min-height:530px; } .ml-text-result { margin-right:0; } .ml-text-user { max-width:95%; } }
