/* ============================================================
   Intellic Labs — Image Intelligence Demo
   Palette derived from the brand logo:
     crimson #B52332 · charcoal #2F3032
   ============================================================ */

:root {
    --brand: #B52332;
    --brand-dark: #8E1926;
    --brand-tint: rgba(181, 35, 50, 0.08);
    --brand-tint-strong: rgba(181, 35, 50, 0.14);

    --ink: #21242a;
    --ink-soft: #4a515b;
    --ink-muted: #79808b;

    --bg: #f6f7f9;
    --bg-panel: #ffffff;
    --line: #e6e8ec;
    --line-strong: #d7dae0;

    --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.04), 0 1px 3px rgba(20, 24, 31, 0.06);
    --shadow-md: 0 4px 14px rgba(20, 24, 31, 0.06), 0 2px 6px rgba(20, 24, 31, 0.05);
    --shadow-lg: 0 18px 48px rgba(20, 24, 31, 0.12);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;

    --wrap: 1240px;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    /* category colors (restrained, accessible) */
    --c-person: #B52332;
    --c-animal: #B7791F;
    --c-vehicle: #2563a8;
    --c-object: #3f7d58;
    --c-text: #6d4bb0;
    --c-document: #8a6d3b;
    --c-screen: #0f8a8a;
    --c-building: #55607a;
    --c-environment: #4b8b3b;
    --c-hazard: #c2410c;
    --c-other: #616873;
}

* { box-sizing: border-box; }

/* The `hidden` attribute must always win, even over flex/grid display rules
   below (equal-specificity class selectors would otherwise override it). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

button { font-family: inherit; cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------------- Header ---------------- */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 34px; width: auto; display: block; }
.header-inner-right { display: flex; align-items: center; gap: 10px; }
.header-tag {
    font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--ink-muted);
    padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px;
}

/* ---------------- Hero ---------------- */
.hero { text-align: center; padding: 72px 24px 40px; }
.eyebrow {
    display: inline-block; margin: 0 0 16px;
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-tint); padding: 6px 14px; border-radius: 999px;
}
.hero-title {
    margin: 0 auto 18px; max-width: 15ch;
    font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.08;
    letter-spacing: -0.02em; color: var(--ink);
}
.hero-sub {
    margin: 0 auto; max-width: 62ch;
    font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--ink-soft);
}

/* ---------------- Uploader ---------------- */
.uploader { max-width: 760px; margin: 8px auto 90px; }

.dropzone {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 300px; padding: 40px;
    background: var(--bg-panel);
    border: 2px dashed var(--line-strong); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
    text-align: center;
}
.dropzone.is-dragover {
    border-color: var(--brand); background: var(--brand-tint); box-shadow: var(--shadow-md);
}
.dz-icon {
    width: 76px; height: 76px; display: grid; place-items: center; margin-bottom: 20px;
    color: var(--brand); background: var(--brand-tint); border-radius: 999px;
}
.dz-title { margin: 0 0 6px; font-size: 1.15rem; font-weight: 700; }
.dz-or { margin: 0 0 14px; color: var(--ink-soft); }
.dz-hint { margin: 0; font-size: 0.86rem; color: var(--ink-muted); }
.link-btn {
    background: none; border: none; padding: 0; color: var(--brand); font-weight: 600;
    text-decoration: underline; text-underline-offset: 2px; font-size: inherit;
}

/* preview */
.dz-preview { display: flex; gap: 20px; align-items: center; width: 100%; text-align: left; }
.dz-preview img {
    width: 150px; height: 150px; object-fit: cover; border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm); flex-shrink: 0;
}
.dz-meta { min-width: 0; }
.dz-filename { margin: 0 0 4px; font-weight: 600; word-break: break-word; }
.dz-filesize { margin: 0 0 14px; color: var(--ink-muted); font-size: 0.9rem; }

.dz-error {
    margin: 16px auto 0; max-width: 760px; text-align: center;
    color: var(--brand-dark); font-size: 0.92rem; font-weight: 500;
}

.uploader-actions { margin-top: 26px; text-align: center; }
.disclaimer { margin: 14px 0 0; font-size: 0.82rem; color: var(--ink-muted); }

/* ---------------- Buttons ---------------- */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 30px; border: none; border-radius: var(--radius);
    background: var(--brand); color: #fff; font-size: 1rem; font-weight: 600;
    box-shadow: 0 4px 12px rgba(181, 35, 50, 0.24);
    transition: background 0.16s var(--ease), transform 0.12s var(--ease), box-shadow 0.16s var(--ease), opacity 0.16s;
}
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 12px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg-panel); color: var(--ink); font-weight: 600; font-size: 0.95rem;
    transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.btn-ghost:hover { border-color: var(--ink-muted); background: #fbfbfc; }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

/* ---------------- Analyzing ---------------- */
.analyzing { padding: 40px 24px 100px; display: flex; justify-content: center; }
.analyzing-card {
    width: 100%; max-width: 560px; text-align: center;
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 48px 40px; box-shadow: var(--shadow-md);
}
.spinner {
    width: 46px; height: 46px; margin: 0 auto 26px;
    border: 3px solid var(--brand-tint-strong); border-top-color: var(--brand);
    border-radius: 50%; animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing-status { margin: 0 0 22px; font-size: 1.12rem; font-weight: 600; min-height: 1.4em; }
.analyzing-track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.analyzing-fill {
    height: 100%; width: 30%; border-radius: 999px;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
    animation: indeterminate 1.5s var(--ease) infinite;
}
@keyframes indeterminate {
    0% { margin-left: -32%; width: 32%; }
    50% { width: 55%; }
    100% { margin-left: 100%; width: 32%; }
}
.analyzing-note { margin: 22px 0 0; color: var(--ink-muted); font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 2s; }
    .analyzing-fill { animation: none; width: 60%; }
}

/* ---------------- Results shell ---------------- */
.results { padding: 24px 24px 90px; }
.results-toolbar {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
    flex-wrap: wrap; margin-bottom: 22px;
}
.results-title { margin: 0; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.01em; }
.results-scene { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.98rem; }
.results-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 26px; align-items: start; }

/* ---------------- Image stage + overlay ---------------- */
.workspace-image { position: sticky; top: 88px; }
.canvas-controls {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
    background: var(--bg-panel); color: var(--ink-soft); font-size: 0.85rem; font-weight: 600;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--ink-muted); }
.chip-toggle.is-on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip-range { cursor: default; }
.chip-range input[type="range"] { width: 90px; accent-color: var(--brand); }
.chip-range-val { min-width: 34px; text-align: right; color: var(--ink); }

.stage-outer {
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px; box-shadow: var(--shadow-md);
}
.stage {
    position: relative; display: inline-block; line-height: 0;
    max-width: 100%; border-radius: var(--radius-sm); overflow: hidden;
}
.stage-img, #stage-img { display: block; max-width: 100%; height: auto; user-select: none; }
.overlay { position: absolute; inset: 0; pointer-events: none; }

.bbox {
    position: absolute;
    border: 2px solid var(--box-color, var(--brand));
    border-radius: 3px;
    pointer-events: auto; cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55) inset;
    transition: background 0.14s, box-shadow 0.14s, border-width 0.14s;
    background: transparent;
}
.bbox:hover, .bbox.is-hover { background: color-mix(in srgb, var(--box-color) 14%, transparent); }
.bbox.is-selected {
    border-width: 3px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85) inset, 0 0 0 3px var(--box-color);
    background: color-mix(in srgb, var(--box-color) 12%, transparent);
    z-index: 5;
}
.bbox-num {
    position: absolute; top: 0; left: 0;
    min-width: 20px; height: 20px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--box-color, var(--brand)); color: #fff;
    font-size: 11.5px; font-weight: 700; line-height: 1;
    border-radius: 3px 0 6px 0; white-space: nowrap;
    box-shadow: var(--shadow-sm);
}
.bbox.dim { opacity: 0.28; }
.overlay.hidden { display: none; }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.legend-item {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    font-size: 0.82rem; font-weight: 600; color: var(--ink-soft);
    padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--bg-panel); transition: opacity 0.15s, border-color 0.15s;
    user-select: none;
}
.legend-item.is-off { opacity: 0.4; text-decoration: line-through; }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; background: var(--dot); flex-shrink: 0; }
.legend-count { color: var(--ink-muted); font-weight: 600; }

/* box tooltip */
.box-tip {
    position: fixed; z-index: 80; max-width: 240px;
    background: var(--ink); color: #fff; padding: 8px 11px; border-radius: 8px;
    font-size: 0.8rem; line-height: 1.4; box-shadow: var(--shadow-lg);
    pointer-events: none; transform: translate(-50%, -100%);
}
.box-tip strong { display: block; font-size: 0.85rem; margin-bottom: 2px; }
.box-tip .tip-conf { color: #d9dbe0; font-size: 0.74rem; }

/* ---------------- Analysis panel ---------------- */
.workspace-panel { min-width: 0; }
.panel-nav {
    position: sticky; top: 88px; z-index: 2;
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px;
    padding-bottom: 14px; border-bottom: 1px solid var(--line);
    background: linear-gradient(var(--bg) 70%, transparent);
}
.panel-nav button {
    padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
    background: var(--bg-panel); color: var(--ink-soft); font-size: 0.82rem; font-weight: 600;
    transition: all 0.15s;
}
.panel-nav button:hover { border-color: var(--ink-muted); color: var(--ink); }
.panel-nav button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.panel-scroll { display: flex; flex-direction: column; gap: 14px; }

/* generic card */
.card {
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 18px; font-weight: 700; font-size: 0.95rem;
}
.card-head .count-pill {
    font-size: 0.75rem; font-weight: 600; color: var(--ink-muted);
    background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px;
}
.card-body { padding: 0 18px 18px; }

/* overview stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 14px 16px;
}
.stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1; color: var(--brand); }
.stat-label { margin-top: 6px; font-size: 0.78rem; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.overview-summary { margin: 0 0 16px; color: var(--ink-soft); }
.setting-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.setting-tag {
    font-size: 0.8rem; color: var(--ink-soft); background: var(--bg);
    border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}
.setting-tag b { color: var(--ink); font-weight: 600; }

/* significant item cards */
.item-list { display: flex; flex-direction: column; gap: 10px; }
.item-card {
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-panel);
    padding: 14px 16px; cursor: pointer; transition: border-color 0.14s, box-shadow 0.14s, background 0.14s;
    border-left: 3px solid var(--cat-color, var(--brand));
}
.item-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.item-card.is-selected {
    border-color: var(--cat-color); background: color-mix(in srgb, var(--cat-color) 5%, #fff);
    box-shadow: 0 0 0 1px var(--cat-color);
}
.item-top { display: flex; align-items: center; gap: 10px; }
.item-badge {
    width: 24px; height: 24px; flex-shrink: 0; border-radius: 6px;
    background: var(--cat-color); color: #fff; font-size: 12px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.item-label { font-weight: 700; font-size: 0.98rem; flex: 1; min-width: 0; }
.item-cat {
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    color: var(--cat-color); background: color-mix(in srgb, var(--cat-color) 10%, #fff);
    padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.item-scores { display: flex; gap: 16px; margin: 10px 0 0; }
.score { flex: 1; }
.score-top { display: flex; justify-content: space-between; font-size: 0.74rem; color: var(--ink-muted); font-weight: 600; margin-bottom: 4px; }
.score-bar { height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; }
.score-fill { height: 100%; border-radius: 999px; background: var(--cat-color); }
.item-detail { margin-top: 12px; font-size: 0.9rem; color: var(--ink-soft); display: none; }
.item-card.is-selected .item-detail { display: block; }
.item-detail p { margin: 0 0 10px; }
.item-detail .detail-label { font-weight: 700; color: var(--ink); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.attr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.attr-tag { font-size: 0.78rem; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; color: var(--ink-soft); }
.rel-list { margin: 4px 0 10px; padding-left: 18px; }
.rel-list li { margin-bottom: 3px; }
.uncertain-note {
    background: rgba(217, 119, 6, 0.08);
    border-left: 3px solid #d97706; padding: 8px 12px; border-radius: 6px;
    font-size: 0.85rem; color: #92600b; margin-top: 4px;
}

/* narrative + generic text lists */
.narrative { font-size: 0.98rem; color: var(--ink-soft); white-space: pre-wrap; }
.text-list { margin: 0; padding-left: 20px; }
.text-list li { margin-bottom: 7px; color: var(--ink-soft); }

/* tabbed layers */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tab-btn {
    padding: 8px 14px; border: none; background: none; color: var(--ink-muted);
    font-weight: 600; font-size: 0.88rem; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* people/objects mini-cards */
.mini-grid { display: grid; gap: 10px; }
.mini {
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--bg-panel);
}
.mini-title { font-weight: 700; font-size: 0.9rem; margin: 0 0 4px; }
.mini-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-kv { font-size: 0.78rem; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }

/* visible text rows */
.vt-row { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vt-row:last-child { border-bottom: none; }
.vt-quote { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 0.9rem; color: var(--ink); background: var(--bg); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); }
.vt-loc { font-size: 0.82rem; color: var(--ink-muted); flex: 1; }
.vt-conf { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }

/* certainty grid */
.certainty-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.certainty-col h4 {
    margin: 0 0 8px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em;
    display: flex; align-items: center; gap: 7px;
}
.certainty-col .dotc { width: 9px; height: 9px; border-radius: 50%; }
.cert-facts .dotc { background: #16a34a; }
.cert-interp .dotc { background: #2563a8; }
.cert-uncertain .dotc { background: #d97706; }
.cert-unknown .dotc { background: #79808b; }

/* photographic key/value list */
.kv-list { display: grid; grid-template-columns: 1fr; gap: 8px; }
.kv { display: flex; gap: 10px; font-size: 0.9rem; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: none; }
.kv-key { width: 40%; flex-shrink: 0; color: var(--ink-muted); font-weight: 600; }
.kv-val { color: var(--ink-soft); }

.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--ink-soft); }
.swatch-dot { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.12); }

.hazard-row { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hazard-row:last-child { border-bottom: none; }
.sev { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sev-high { background: #fde7e1; color: #b3350c; }
.sev-medium { background: #fef1dc; color: #a15c0a; }
.sev-low { background: #e7f3ea; color: #2f7d46; }
.sev-uncertain { background: var(--bg); color: var(--ink-muted); border: 1px solid var(--line); }

.empty-note { color: var(--ink-muted); font-size: 0.9rem; font-style: italic; }

/* ---------------- Error ---------------- */
#error-state { padding: 40px 24px 100px; display: flex; justify-content: center; }
.error-card {
    max-width: 520px; text-align: center; background: var(--bg-panel);
    border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 44px 40px; box-shadow: var(--shadow-md);
}
.error-icon {
    width: 60px; height: 60px; margin: 0 auto 20px; display: grid; place-items: center;
    color: var(--brand); background: var(--brand-tint); border-radius: 999px;
}
.error-message { margin: 0 0 24px; font-size: 1.05rem; font-weight: 500; color: var(--ink); white-space: pre-line; word-break: break-word; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-panel); margin-top: 20px; }
.footer-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; padding: 26px 24px; }
.footer-logo { height: 26px; width: auto; opacity: 0.9; }
.footer-note { margin: 0; font-size: 0.82rem; color: var(--ink-muted); }

/* ---------------- Login gate ---------------- */
.login-main {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 22px; padding: 32px 20px;
}
.login-card {
    width: 100%; max-width: 400px; text-align: center;
    background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 40px 34px; box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column;
}
.login-logo { height: 40px; width: auto; margin: 0 auto 22px; }
.login-title { margin: 0 0 8px; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.01em; }
.login-sub { margin: 0 0 24px; color: var(--ink-soft); font-size: 0.92rem; }
.login-label {
    text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--ink-soft);
    text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 7px;
}
.login-input {
    width: 100%; padding: 12px 14px; font-size: 1rem; color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--bg); transition: border-color 0.15s, box-shadow 0.15s;
}
.login-input:focus {
    outline: none; border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
.login-error { margin: 14px 0 0; color: var(--brand-dark); font-size: 0.9rem; font-weight: 500; }
.login-btn { margin-top: 22px; width: 100%; }
.login-foot { margin: 0; font-size: 0.8rem; color: var(--ink-muted); }
.header-signout {
    font-size: 0.82rem; font-weight: 600; color: var(--ink-muted); text-decoration: none;
    padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
    transition: border-color 0.15s, color 0.15s;
}
.header-signout:hover { color: var(--ink); border-color: var(--ink-muted); }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
    .workspace { grid-template-columns: 1fr; }
    .workspace-image { position: static; }
    .panel-nav { position: static; }
    .certainty-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .wrap { padding: 0 16px; }
    .hero { padding: 48px 16px 30px; }
    .dropzone { min-height: 250px; padding: 28px 20px; }
    .dz-preview { flex-direction: column; align-items: flex-start; }
    .dz-preview img { width: 100%; height: 190px; }
    .results-toolbar { flex-direction: column; align-items: stretch; }
    .results-actions { justify-content: stretch; }
    .results-actions button { flex: 1; }
    .analyzing-card, .error-card { padding: 34px 22px; }
}
