:root {
    color-scheme: light;
    --ink: #18201e;
    --muted: #64706d;
    --paper: #f4f1e9;
    --panel: #fffdf8;
    --line: #d8d2c4;
    --accent: #155e52;
    --accent-light: #d9eee9;
    --danger: #8b1d24;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
.site-header { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; gap: 1.5rem; padding: .85rem 2rem; border-bottom: 1px solid var(--line); background: rgb(255 253 248 / 96%); backdrop-filter: blur(12px); }
.site-header a { color: var(--ink); font-weight: 750; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: .65rem; white-space: nowrap; }
.brand img { width: 36px; height: 36px; filter: drop-shadow(0 4px 8px rgb(18 63 57 / 16%)); }
.brand span { color: var(--ink); font-size: 1.05rem; letter-spacing: -.02em; }
.language-note { color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: .25rem; flex: 1; }
.main-nav a { padding: .5rem .65rem; border-radius: 7px; color: var(--muted); font-size: .9rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-light); }
.account-nav { display: flex; align-items: center; gap: .7rem; white-space: nowrap; }
.account-nav form { margin: 0; }
.link-button { padding: 0; color: var(--muted); background: transparent; font-size: .9rem; }
main { width: min(960px, calc(100% - 2rem)); margin: 3rem auto 6rem; }
.hero { margin-bottom: 2rem; }
.hero.compact { margin-bottom: 1rem; }
.hero h1 { margin: .2rem 0 .6rem; font-family: Georgia, serif; font-size: clamp(2.2rem, 6vw, 4.5rem); line-height: .98; }
.hero.compact h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.hero p { max-width: 720px; color: var(--muted); }
.eyebrow { color: var(--accent) !important; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.panel { margin: 1rem 0; padding: 1.5rem; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 8px 30px rgb(39 51 48 / 5%); }
.panel h2 { margin-top: 0; }
.model-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.model-title-row h2 { margin-bottom: 0; }
.model-status-badge { text-transform: capitalize; }
.model-ready .model-status-badge { color: #0d5f42; background: #d9f3e6; }
.model-error .model-status-badge, .model-missing .model-status-badge { color: #8b1d24; background: #f9dfe1; }
.model-downloading .model-status-badge, .model-runtime_downloading .model-status-badge, .model-runtime_starting .model-status-badge, .model-checking .model-status-badge { color: #79520a; background: #f7ebca; }
.model-progress { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .75rem; }
.model-progress[hidden] { display: none; }
.model-progress span { min-width: 3rem; color: var(--muted); font-size: .85rem; text-align: right; }
.live-status::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .4rem; border-radius: 50%; background: #2c9b70; }
.live-status.error::before { background: #b33b43; }
.job-running { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; padding: 1rem; border-radius: 10px; background: var(--accent-light); }
.job-running[hidden] { display: none; }
.job-running p { margin: .15rem 0; }
.activity-spinner { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; border: 3px solid rgb(21 94 82 / 20%); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
label { display: block; font-weight: 700; }
input[type="file"], select { width: 100%; margin-top: .5rem; padding: .8rem; border: 1px solid var(--line); border-radius: 8px; background: white; }
input[type="text"], input[type="password"], input[type="number"], input[type="email"], textarea { width: 100%; margin-top: .5rem; padding: .8rem; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgb(21 94 82 / 15%); border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.stack-form { display: grid; gap: 1rem; }
.stack-form button { justify-self: start; }
.check { align-self: end; padding: .8rem 0; font-weight: 500; }
button, .button { display: inline-block; padding: .75rem 1.1rem; border: 0; border-radius: 8px; color: white; background: var(--accent); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
button.danger { background: #8b1d24; }
.button.secondary, button.secondary { color: var(--accent); background: var(--accent-light); }
.compact-button { padding: .45rem .7rem; font-size: .85rem; }
.hint { color: var(--muted); font-size: .9rem; }
.terms-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.model-list { display: grid; gap: 1rem; }
.model-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.model-item p { margin: .35rem 0; }
.model-item form { min-width: 190px; text-align: right; }
.catalog-item { align-items: flex-start; }
.catalog-item > div:first-child { min-width: 0; }
.catalog-item code { overflow-wrap: anywhere; }
.catalog-item > div:last-child { width: min(310px, 42%); }
.model-download-form { text-align: left !important; }
.runtime-download-pending { margin-top: 1rem; padding: .8rem; border-radius: 8px; color: #79520a; background: #f7ebca; }
.success { color: #0d5f42; }
.model-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; }
.model-actions form { min-width: 0; }
.model-actions .check { padding-top: 0; }
.notice { border-color: #75b997; background: #edf9f3; }
.notice-inline { padding: .75rem; border-radius: 8px; color: #0d5f42; background: #edf9f3; }
.warning { border-color: #d8b85f; background: #fff9e7; }
.warning-inline { padding: .7rem; border-left: 4px solid #d8b85f; background: #fff9e7; }
table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; }
.model-cell { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
th, td { padding: .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.status { display: inline-block; padding: .2rem .55rem; border-radius: 999px; background: #ece9df; font-size: .8rem; font-weight: 800; }
.status-completed { color: #0d5f42; background: #d9f3e6; }
.status-failed { color: #8b1d24; background: #f9dfe1; }
.status-processing { color: #79520a; background: #f7ebca; }
.status-queued, .status-in_progress, .status-running { color: #79520a; background: #f7ebca; }
.status-cancelled { color: var(--muted); background: #ece9df; }
dl { display: grid; grid-template-columns: 130px 1fr; gap: .55rem; }
dt { color: var(--muted); }
dd { margin: 0; }
pre { max-height: 500px; padding: 1rem; overflow: auto; border-radius: 8px; background: #202725; color: #e7f0ed; white-space: pre-wrap; }
.error { color: #8b1d24; }
progress { width: 100%; }
.auth-card { width: min(480px, 100%); margin: 6vh auto; }
.auth-card h1 { margin-top: 0; font-family: Georgia, serif; font-size: 2.6rem; }
.narrow-panel { max-width: 620px; }
.dashboard-hero { padding-top: .25rem; }
.workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.workflow-card { display: flex; min-width: 0; min-height: 235px; flex-direction: column; padding: 1.4rem; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: linear-gradient(145deg, #fffdf8 60%, #f5faf7); text-decoration: none; box-shadow: 0 8px 30px rgb(39 51 48 / 5%); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.workflow-card:hover { transform: translateY(-3px); border-color: #75b997; box-shadow: 0 14px 36px rgb(39 51 48 / 10%); }
.workflow-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--accent); font-weight: 850; letter-spacing: .12em; }
.workflow-card-top span:last-child { display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-light); font-size: 1rem; letter-spacing: 0; transition: transform .15s ease; }
.workflow-card:hover .workflow-card-top span:last-child { transform: translate(2px, -2px); }
.workflow-card h2 { margin: 1rem 0 .55rem; font-family: Georgia, serif; font-size: 1.55rem; line-height: 1.05; }
.workflow-card p { margin: 0; color: var(--muted); line-height: 1.42; }
.workflow-action { margin-top: auto; padding-top: 1.2rem; color: var(--accent); font-size: .82rem; font-weight: 800; }
.runtime-panel { margin-top: 0; }
.runtime-panel .eyebrow { margin: 0 0 .2rem; }
.activity-section { margin-top: 2.7rem; }
.activity-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; }
.activity-heading h2 { margin: .15rem 0 0; font-family: Georgia, serif; font-size: 2rem; }
.activity-heading > p { max-width: 470px; margin: 0; color: var(--muted); text-align: right; }
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.activity-panel { min-width: 0; margin: 0; padding: 1.25rem; }
.activity-panel .section-heading { align-items: start; padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.activity-panel .section-heading h3 { margin: .15rem 0 0; font-family: Georgia, serif; font-size: 1.35rem; }
.activity-panel .section-heading > a { color: var(--accent); font-size: .85rem; font-weight: 750; }
.activity-kicker { color: var(--muted); font-size: .68rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-list li { border-bottom: 1px solid var(--line); }
.activity-list li:last-child { border-bottom: 0; }
.activity-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .9rem 0; color: var(--ink); text-decoration: none; }
.activity-list a:hover strong { color: var(--accent); }
.activity-copy, .activity-copy strong, .activity-copy > span, .activity-meta { display: block; min-width: 0; }
.activity-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy > span { margin-top: .28rem; overflow: hidden; color: var(--muted); font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { text-align: right; }
.activity-meta time { display: block; margin-top: .35rem; color: var(--muted); font-size: .67rem; white-space: nowrap; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-heading h2, .section-heading p { margin: 0; }
.clean-list { padding: 0; list-style: none; }
.clean-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.clean-list li:last-child { border-bottom: 0; }
.empty-state { padding: 1.5rem; border-radius: 9px; color: var(--muted); background: #f5f2ea; text-align: center; }
.users-create-form { align-items: end; }
.user-list { display: grid; gap: 1rem; }
.user-card { display: grid; grid-template-columns: minmax(180px, .8fr) 1.4fr 1fr; align-items: end; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.user-card h3, .user-card p { margin: .2rem 0; }
.inline-form { display: flex; align-items: end; gap: .6rem; }
.inline-form label:first-of-type { flex: 1; }
.secret-panel { border-color: #d8b85f; background: #fff9e7; }
.secret-value { display: block; padding: 1rem; overflow-wrap: anywhere; border-radius: 8px; background: #202725; color: #e7f0ed; font-size: 1rem; }
.scope-editor { margin-top: .45rem; }
.scope-editor summary { color: var(--accent); cursor: pointer; font-weight: 700; }
.scope-editor form { min-width: 230px; padding: .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.scope-editor .check { padding: .25rem 0; white-space: nowrap; }
fieldset { padding: 1rem; border: 1px solid var(--line); border-radius: 8px; }
legend { padding: 0 .4rem; font-weight: 750; }
.form-action { display: flex; align-items: end; }
.profile-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1rem; }
.profile-list article { padding: 1rem; border: 1px solid var(--line); border-radius: 9px; }
.profile-list h3, .profile-list p { margin: .25rem 0; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1rem 0; }
.metric-grid article { padding: 1.25rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.metric-grid span { display: block; color: var(--muted); }
.metric-grid strong { display: block; margin-top: .3rem; font-family: Georgia, serif; font-size: 2rem; }
.workspace-tabs { display: flex; gap: .35rem; margin-bottom: 1rem; padding: .35rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.workspace-tabs a { padding: .65rem .95rem; border-radius: 8px; color: var(--muted); font-weight: 750; text-decoration: none; white-space: nowrap; }
.workspace-tabs a:hover, .workspace-tabs a[aria-current="page"] { color: var(--accent); background: var(--accent-light); }
.runtime-strip { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: .9rem; }
.runtime-ready { border-color: #75b997; }
.runtime-error, .runtime-not_installed { border-color: #d8b85f; }
.image-form-panel { padding: clamp(1.25rem, 3vw, 2rem); }
.image-control-grid { grid-template-columns: repeat(3, 1fr); }
.field-help { color: var(--muted); font-size: .75rem; font-weight: 500; }
input[type="range"] { width: calc(100% - 3.5rem); margin-top: 1rem; accent-color: var(--accent); }
output { display: inline-block; width: 3rem; color: var(--muted); text-align: right; }
.upload-preview { max-width: 420px; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: white; }
.upload-preview img { display: block; width: 100%; max-height: 320px; object-fit: contain; }
.image-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.image-result-grid img { display: block; width: 100%; border-radius: 10px; background: #ece9df; object-fit: cover; }
.image-result-large figure { margin: 0; }
.image-result-large figcaption { padding: .5rem 0; color: var(--muted); font-size: .85rem; }
.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.library-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: white; }
.library-card > a { display: block; aspect-ratio: 1; background: #ece9df; }
.library-card img { width: 100%; height: 100%; object-fit: cover; }
.library-card > div { padding: .9rem; }
.library-card h3 { margin: 0 0 .35rem; font-size: 1rem; }
.library-card h3 a { color: var(--ink); text-decoration: none; }
.library-placeholder { display: grid; height: 100%; place-items: center; }
.chat-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1rem; align-items: start; }
.conversation-sidebar { position: sticky; top: 5rem; margin-top: 0; }
.conversation-list { padding: 0; list-style: none; }
.conversation-list a { display: block; padding: .65rem; overflow: hidden; border-radius: 7px; color: var(--ink); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.conversation-list a:hover, .conversation-list a[aria-current="page"] { color: var(--accent); background: var(--accent-light); }
.conversation-list strong, .conversation-list span { display: block; overflow: hidden; text-overflow: ellipsis; }
.conversation-list span { margin-top: .2rem; color: var(--muted); font-size: .72rem; font-weight: 500; }
.chat-column .panel { margin-top: 0; }
.chat-thread { max-height: 68vh; min-height: 360px; overflow-y: auto; }
.chat-thread-heading { padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.chat-welcome { max-width: 560px; margin: 8vh auto; text-align: center; }
.chat-welcome h2 { font-family: Georgia, serif; font-size: 2rem; }
.chat-message { max-width: 84%; margin: 1rem 0; padding: 1rem; border-radius: 12px; }
.chat-user { margin-left: auto; background: var(--accent-light); }
.chat-assistant { border: 1px solid var(--line); background: white; }
.chat-content { margin: .4rem 0; overflow-wrap: anywhere; line-height: 1.55; white-space: pre-wrap; }
.chat-role { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.chat-generating { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; color: var(--muted); font-size: .85rem; }
.chat-options { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .75rem; }
.text-chat-options { grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); }
.chat-composer details { padding: .75rem; border: 1px solid var(--line); border-radius: 8px; }
.chat-composer summary { cursor: pointer; font-weight: 750; }
.chat-advanced { padding-top: 1rem; }
.chat-attachments { display: flex; gap: .45rem; flex-wrap: wrap; margin: .75rem 0 0; padding: 0; list-style: none; }
.chat-attachments li { display: flex; gap: .4rem; padding: .35rem .55rem; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font-size: .8rem; }
.chat-attachments span { color: var(--muted); }
.chat-metrics { margin-top: .75rem; color: var(--muted); font-size: .8rem; }
.chat-metrics summary { cursor: pointer; }
.chat-metrics dl { grid-template-columns: 120px 1fr; margin-bottom: 0; }
.media-translation-settings { background: #f8f6ef; }
.media-player { margin: 1rem 0; padding: .75rem; border-radius: 12px; background: #202725; }
.media-player video { display: block; width: 100%; max-height: 520px; border-radius: 7px; }
.media-player audio { display: block; width: 100%; }
.artifact-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.job-list { display: grid; }
.job-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem .25rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.job-row:hover strong { color: var(--accent); }
.job-row strong, .job-row span { display: block; }
.job-row div > span { margin-top: .25rem; color: var(--muted); font-size: .82rem; }
.transcript-segments { display: grid; margin-top: 1rem; }
.transcript-segments article { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.transcript-segments time { color: var(--muted); font: .78rem ui-monospace, SFMono-Regular, Consolas, monospace; }
.transcript-segments p { margin: 0 0 .4rem; line-height: 1.5; }
.transcript-segments .translation { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button:disabled { cursor: not-allowed; opacity: .55; }
@media (max-width: 900px) { .site-header { align-items: flex-start; flex-wrap: wrap; } .main-nav { order: 3; width: 100%; overflow-x: auto; } .account-nav { margin-left: auto; } .workflow-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .workflow-card { min-height: 215px; } .user-card { grid-template-columns: 1fr; align-items: stretch; } }
@media (max-width: 900px) { .library-grid { grid-template-columns: repeat(2, 1fr); } .chat-layout { grid-template-columns: 1fr; } .conversation-sidebar { position: static; } .chat-options, .image-control-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .form-grid, .split-grid, .profile-list, .metric-grid, .library-grid, .chat-options, .image-control-grid, .workflow-grid, .activity-grid { grid-template-columns: 1fr; } .site-header { padding: .8rem 1rem; } .main-nav { gap: 0; } .main-nav a { padding: .45rem .5rem; } .account-nav > a { display: none; } .workflow-card { min-height: 0; } .activity-heading { align-items: start; flex-direction: column; gap: .4rem; } .activity-heading > p { text-align: left; } .activity-list a { grid-template-columns: 1fr; gap: .5rem; } .activity-meta { display: flex; align-items: center; justify-content: space-between; text-align: left; } .activity-meta time { margin: 0; } .model-item { align-items: stretch; flex-direction: column; } .model-item form { text-align: left; } .catalog-item > div:last-child { width: 100%; } .inline-form { align-items: stretch; flex-direction: column; } .chat-message { max-width: 96%; } .transcript-segments article { grid-template-columns: 1fr; gap: .35rem; } }
