* { box-sizing: border-box; }
:root {
    --bg: #070807;
    --panel: rgba(16, 18, 20, 0.72);
    --panel-strong: rgba(18, 21, 23, 0.95);
    --line: rgba(160, 232, 78, 0.18);
    --line-soft: rgba(255, 255, 255, 0.08);
    --text: #f5f7f1;
    --muted: #aeb6ad;
    --green: #9fe84e;
    --gold: #f6c24b;
    --blue: #8db4ff;
    --red: #ff6b6b;
    --purple: #c49cff;
}
body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #0a0b0a 0%, var(--bg) 58%, #050505 100%);
    color: var(--text);
    letter-spacing: 0;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(160, 232, 78, 0.12) 1px, transparent 0);
    background-size: 24px 24px;
    opacity: 0.1;
    pointer-events: none;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.shell {
    position: relative;
    width: min(1480px, calc(100vw - 56px));
    margin: 0 auto;
    padding: 22px 0 48px;
}
.topbar {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 850;
}
.mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(159, 232, 78, 0.16), rgba(255, 255, 255, 0.04));
    color: var(--green);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}
.meta-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 13px;
}
.meta-links a { text-decoration: none; }
.meta-links a:hover, .meta-links .active { color: var(--green); }
.kai-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 18px;
}
.kai-nav-links a {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.kai-nav-links a:hover, .kai-nav-links a.active { color: var(--green); }
.hero {
    padding: 42px 0 18px;
    display: grid;
    gap: 10px;
}
.eyebrow {
    margin: 0;
    color: var(--green);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}
h1 {
    margin: 0;
    font-size: clamp(40px, 4.8vw, 60px);
    line-height: 1;
    font-weight: 920;
    letter-spacing: 0;
}
.hero-copy {
    max-width: 620px;
    margin: 0;
    color: #c9d0c7;
    font-size: 17px;
    line-height: 1.5;
}
.password-card {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}
.password-card {
    width: min(480px, 100%);
    margin: 34px auto 0;
    padding: 28px;
    background: var(--panel-strong);
}
.password-card h2 { margin: 8px 0 12px; font-size: 28px; line-height: 1.05; }
.password-card p { color: var(--muted); line-height: 1.5; }
form { display: grid; gap: 12px; }
input, textarea, select {
    width: 100%;
    border: 1px solid #30343b;
    border-radius: 8px;
    background: #0b0c0f;
    color: var(--text);
    outline: none;
}
input, select { height: 40px; padding: 0 12px; }
textarea { min-height: 58px; padding: 11px 12px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(159, 232, 78, 0.14);
}
button, .button-link {
    min-height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: #071004;
    font-weight: 850;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-grid;
    place-items: center;
    padding: 0 14px;
}
button.secondary, .button-link.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid var(--line-soft);
}
button:disabled { opacity: 0.56; cursor: wait; }
.error { color: var(--red); font-size: 14px; }
.metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: baseline;
    margin: 0 0 18px;
    padding: 0;
    color: var(--muted);
}
.metric {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    padding: 0;
}
.metric[hidden] { display: none; }
.metric strong {
    display: inline;
    color: var(--text);
    font-size: 17px;
    line-height: 1;
    font-weight: 850;
}
.metric span {
    display: inline;
    margin-top: 0;
    color: var(--muted);
    font-size: 13px;
    text-transform: none;
    font-weight: 650;
    letter-spacing: 0;
}
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 0 0 24px;
    align-items: center;
}
.filter-bar input {
    flex: 1 1 280px;
    min-width: min(100%, 240px);
}
.filter-bar select {
    flex: 0 1 138px;
    min-width: 128px;
}
.filter-bar .survey-answer-filter {
    flex-basis: 190px;
}
.filter-bar button {
    flex: 0 0 auto;
}
.workspace {
    display: grid;
    grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
    gap: clamp(28px, 3.4vw, 48px);
    align-items: start;
}
.list-panel, .detail-panel {
    min-width: 0;
    overflow: hidden;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 8px;
    border-bottom: 0;
}
.panel-head h2 {
    margin: 0;
    font-size: 14px;
    line-height: 1.2;
}
.review-list {
    max-height: calc(100vh - 340px);
    min-height: 480px;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 4px;
}
.review-row {
    width: 100%;
    min-height: 74px;
    padding: 10px 12px;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    display: grid;
    gap: 8px;
    justify-items: start;
    align-items: center;
    text-align: left;
    cursor: pointer;
}
.review-row:hover, .review-row.selected {
    background: rgba(159, 232, 78, 0.07);
    border-left-color: rgba(159, 232, 78, 0.7);
}
.review-row strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.28;
    font-weight: 820;
}
.review-row small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pill {
    border-radius: 0;
    padding: 2px 0;
    background: transparent;
    color: #dce5d8;
    font-size: 11px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}
.pill.success, .pill.stable { color: var(--green); background: transparent; }
.pill.failed { color: #ffd4d4; background: transparent; }
.pill.aborted, .pill.ended { color: var(--muted); background: transparent; }
.pill.issue { color: var(--gold); background: transparent; }
.pill.survey { color: var(--blue); background: transparent; }
.pill.screenconnect-index { display: none; }
.survey-hint {
    color: #b9c8d7;
}
.detail-body {
    padding: 8px 0 0;
    display: grid;
    gap: 18px;
}
.detail-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.detail-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 0 0 auto;
}
.detail-title h2 {
    margin: 0;
    max-width: 980px;
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.08;
    overflow-wrap: anywhere;
}
.status-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}
.meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 22px;
    margin: 0;
}
.meta-item {
    padding: 0;
    border-top: 0;
    background: transparent;
    min-width: 0;
}
.meta-item dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: none;
    letter-spacing: 0;
}
.meta-item dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    color: #e8eee4;
}
.section {
    border-top: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    display: grid;
    gap: 8px;
}
.section h3 {
    margin: 0;
    font-size: 14px;
}
.detail-copy {
    max-width: 920px;
    color: #d3dacd;
    font-size: 15px;
    line-height: 1.5;
}
.section.compact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}
.compact-note {
    font-size: 13px;
}
.link-row, .artifact-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.artifact {
    border: 0;
    border-left: 0;
    border-radius: 0;
    padding: 0;
    color: #dce5d8;
    font-size: 12px;
    background: transparent;
    max-width: 320px;
    overflow-wrap: anywhere;
}
.survey-section {
    max-width: 980px;
}
.survey-results {
    display: grid;
    gap: 14px;
}
.survey-response {
    display: grid;
    gap: 8px;
    min-width: 0;
}
.survey-meta {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}
.survey-answer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 6px 22px;
}
.survey-answer {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #e7eee3;
    font-size: 13px;
}
.survey-answer span {
    min-width: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}
.survey-answer strong {
    white-space: nowrap;
    font-size: 13px;
}
.survey-answer strong.yes { color: var(--green); }
.survey-answer strong.no { color: var(--gold); }
.survey-notes {
    display: grid;
    gap: 4px;
    color: #dce5d8;
    font-size: 13px;
    line-height: 1.45;
}
.survey-notes p {
    margin: 0;
    overflow-wrap: anywhere;
}
.survey-notes strong {
    color: var(--muted);
}
.survey-notes.issue-notes strong {
    color: var(--gold);
}
.muted {
    color: var(--muted);
    margin: 0;
    line-height: 1.45;
}
details {
    border: 0;
    border-top: 0;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
}
summary {
    padding: 4px 0;
    cursor: pointer;
    color: #dfe7dc;
    font-weight: 850;
}
details.section summary {
    width: fit-content;
}
.technical .meta-grid {
    margin-top: 8px;
}
pre {
    margin: 0;
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e6eee1;
    background: rgba(0, 0, 0, 0.26);
    font: 12px/1.45 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.attach-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px auto;
    gap: 8px;
    align-items: start;
}
.toast {
    min-height: 20px;
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 980px) {
    .shell { width: min(100% - 28px, 1480px); }
    .workspace, .attach-box { grid-template-columns: 1fr; }
    .review-list { max-height: none; min-height: 0; }
    .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { align-items: flex-start; }
    .meta-links { flex-wrap: wrap; justify-content: flex-end; }
}
@media (max-width: 640px) {
    .shell { width: min(100% - 20px, 1480px); padding-bottom: 28px; }
    .hero { padding-top: 34px; }
    h1 { font-size: clamp(38px, 14vw, 54px); }
    .meta-grid { grid-template-columns: 1fr; }
    .metrics { gap: 7px 14px; }
    .filter-bar input, .filter-bar select, .filter-bar button { flex: 1 1 100%; }
}
