:root { color-scheme: light; font-family: Inter, ui-sans-serif, system-ui, sans-serif; background: #f4f7fb; color: #132238; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.shell { width: min(860px, 100%); }
header { margin: 0 0 24px; }
.eyebrow { color: #4773ff; font-size: 12px; font-weight: 800; letter-spacing: .16em; margin: 0 0 10px; }
h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.05; margin: 0 0 12px; }
.muted { color: #69778c; }
.card { background: white; border: 1px solid #e2e8f2; border-radius: 18px; box-shadow: 0 18px 50px #263d6212; padding: clamp(18px, 4vw, 32px); }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; margin-bottom: 18px; }
textarea, input, select { width: 100%; border: 1px solid #d6deea; border-radius: 10px; background: #fbfcfe; color: inherit; font: inherit; padding: 12px 14px; outline: none; }
textarea { min-height: 240px; resize: vertical; line-height: 1.55; }
textarea:focus, input:focus, select:focus { border-color: #4773ff; box-shadow: 0 0 0 3px #4773ff1c; }
.tag-toolbar { display: grid; gap: 8px; margin: -6px 0 18px; color: #69778c; font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; max-height: 116px; overflow: auto; }
.tag { border: 1px solid #d6deea; border-radius: 999px; background: #f8faff; color: #315be5; cursor: pointer; font-size: 12px; padding: 5px 9px; }
.tag:hover { background: #edf2ff; border-color: #9eb4ff; }
.clone-voice { border: 1px dashed #b8c6dc; border-radius: 10px; padding: 14px; margin: -4px 0 18px; }
.clone-voice .grid { margin-top: 12px; }
.clone-voice .secondary-button { display: inline-block; width: auto; margin-right: 8px; }
.clone-voice .segment { overflow-wrap: anywhere; }
.clone-voice .history-actions { flex-wrap: wrap; }
.counter { color: #69778c; font-size: 12px; text-align: right; margin-top: -12px; margin-bottom: 18px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.audio-options { grid-template-columns: repeat(3, 1fr); }
button { width: 100%; border: 0; border-radius: 10px; background: #4773ff; color: white; cursor: pointer; font: inherit; font-weight: 800; padding: 13px 16px; }
button:hover { background: #315be5; }
button:disabled { cursor: wait; opacity: .6; }
.status { min-height: 24px; color: #52627a; font-size: 14px; margin-top: 14px; }
.progress { height: 8px; overflow: hidden; border-radius: 99px; background: #e9eef6; }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: #4773ff; transition: width .2s ease; }
.task-info, .segments { color: #52627a; font-size: 13px; margin-top: 14px; }
.segments { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.segment { display: grid; gap: 4px; border: 1px solid #e2e8f2; border-radius: 9px; padding: 9px; }
.segment audio { margin-top: 0; width: 100%; }
.chunk-text { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.5; }
.segment a { color: #315be5; font-size: 12px; overflow-wrap: anywhere; }
audio { width: 100%; margin-top: 18px; }
.download { display: inline-block; margin-top: 14px; color: #315be5; font-weight: 800; }
.api-docs { margin-top: 20px; }
.api-docs h2 { margin-top: 0; }
.api-docs h3, .api-docs summary { font-size: 14px; }
.api-docs a { color: #315be5; }
.api-url, .api-endpoints { overflow-wrap: anywhere; }
.api-endpoints dt { font-weight: 700; margin-top: 14px; }
.api-endpoints dd { margin: 4px 0 0; color: #52627a; font-size: 14px; }
.api-docs pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; background: #f4f7fb; border-radius: 9px; padding: 14px; font-size: 12px; }
.api-docs summary { cursor: pointer; font-weight: 700; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.task-history { margin-top: 20px; }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.history-heading h2 { margin: 0; }
.history-heading p { font-size: 13px; }
.secondary-button { width: auto; white-space: nowrap; padding: 8px 12px; }
.history-scroll { overflow-x: auto; }
.task-history table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.task-history th, .task-history td { padding: 12px 8px; border-bottom: 1px solid #e2e8f2; vertical-align: top; }
.history-id { display: block; max-width: 220px; overflow-wrap: anywhere; margin-top: 4px; color: #69778c; }
.history-actions { display: flex; gap: 6px; }
.history-empty { text-align: center; color: #69778c; }
#history-detail { margin-top: 20px; border-top: 1px solid #e2e8f2; padding-top: 16px; }
#history-detail-title, #history-detail-url { overflow-wrap: anywhere; }
.task-history pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 360px; overflow: auto; background: #f4f7fb; border-radius: 9px; padding: 14px; font-size: 12px; }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; gap: 0; } }
