:root {
    --ink: #16181d;
    --ink-soft: #343943;
    --muted: #6d7480;
    --line: #dfe3e8;
    --line-soft: #e5e8eb;
    --line-strong: #cfd7df;
    --page: #f8fafb;
    --page-accent-a: rgba(8, 127, 131, 0.08);
    --page-accent-b: rgba(47, 91, 234, 0.08);
    --page-grid-x: rgba(22, 24, 29, 0.035);
    --page-grid-y: rgba(22, 24, 29, 0.045);
    --rail-surface: rgba(247, 249, 250, 0.78);
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-soft: rgba(255, 255, 255, 0.74);
    --surface-muted: #f5f7f9;
    --surface-control: rgba(246, 248, 250, 0.78);
    --surface-hover: #eaf6f5;
    --field: #f5f7f9;
    --teal: #087f83;
    --blue: #2f5bea;
    --amber: #b7791f;
    --red: #bd3d2a;
    --green: #207a4a;
    --shadow: 0 18px 50px rgba(19, 26, 36, 0.12);
    --shadow-soft: 0 10px 28px rgba(24, 31, 42, 0.07);
    --quote-ink: #2d4d50;
    --quote-surface: #edf6f5;
    --link: #1f56c2;
    --inline-code-ink: #93411f;
    --inline-code-line: #ead8cf;
    --inline-code-surface: #fff7f2;
    --code-ink: #f4f7fb;
    --code-surface: #17191e;
    --scrollbar: #c7cfd5;
    --high-ink: #8c1f10;
    --high-surface: #fde8e2;
    --medium-ink: #7a4d09;
    --medium-surface: #fff1cf;
    --low-ink: #1d5f42;
    --low-surface: #ddf4e8;
    --scanline: rgba(8, 127, 131, 0.025);
    --accent-glow: rgba(8, 127, 131, 0.18);
    --panel-highlight: rgba(255, 255, 255, 0.72);
    --beam: rgba(8, 127, 131, 0.07);
    --hud-corner: rgba(8, 127, 131, 0.72);
    --glow-intense: rgba(8, 127, 131, 0.3);
}

:root[data-theme="dark"] {
    --ink: #f3f5f6;
    --ink-soft: #d3d7db;
    --muted: #9ca3ab;
    --line: #34383d;
    --line-soft: #2b2f33;
    --line-strong: #484e55;
    --page: #0c0d0f;
    --page-accent-a: rgba(56, 184, 178, 0.08);
    --page-accent-b: rgba(125, 156, 255, 0.06);
    --page-grid-x: rgba(255, 255, 255, 0.025);
    --page-grid-y: rgba(255, 255, 255, 0.035);
    --rail-surface: rgba(14, 16, 18, 0.9);
    --surface: rgba(22, 24, 27, 0.94);
    --surface-strong: #191b1e;
    --surface-soft: #17191c;
    --surface-muted: #1c1f23;
    --surface-control: rgba(28, 31, 35, 0.92);
    --surface-hover: #163335;
    --field: #1c1f23;
    --teal: #45c2bc;
    --blue: #8ba5ff;
    --amber: #e4a84d;
    --red: #ef7664;
    --green: #67c58f;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.24);
    --quote-ink: #c0dedd;
    --quote-surface: #173032;
    --link: #8eacff;
    --inline-code-ink: #f1b18e;
    --inline-code-line: #5d4337;
    --inline-code-surface: #2b211d;
    --code-ink: #f4f7fb;
    --code-surface: #0d0f12;
    --scrollbar: #4b5158;
    --high-ink: #ffb4a8;
    --high-surface: #4a211b;
    --medium-ink: #f4cc81;
    --medium-surface: #493819;
    --low-ink: #a4dfbc;
    --low-surface: #193a29;
    --scanline: rgba(69, 194, 188, 0.03);
    --accent-glow: rgba(69, 194, 188, 0.22);
    --panel-highlight: rgba(255, 255, 255, 0.05);
    --beam: rgba(69, 194, 188, 0.11);
    --hud-corner: rgba(91, 238, 228, 0.82);
    --glow-intense: rgba(69, 194, 188, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: "Aptos", "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    background:
        linear-gradient(135deg, var(--page-accent-a), transparent 28%),
        linear-gradient(315deg, var(--page-accent-b), transparent 26%),
        repeating-linear-gradient(0deg, var(--page-grid-y) 0 1px, transparent 1px 32px),
        repeating-linear-gradient(90deg, var(--page-grid-x) 0 1px, transparent 1px 32px),
        var(--page);
    transition: color 180ms ease, background-color 180ms ease;
}

body::before {
    position: fixed;
    inset: -35% -20%;
    z-index: 0;
    pointer-events: none;
    content: "";
    background: linear-gradient(108deg, transparent 40%, var(--beam) 49%, transparent 58%);
    transform: translateX(-52%);
    animation: atmosphere-sweep 14s ease-in-out infinite;
}

body::after {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
    content: "";
    background: repeating-linear-gradient(180deg, transparent 0 3px, var(--scanline) 3px 4px);
}

.tech-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.72;
}

:root[data-theme="light"] .tech-background {
    opacity: 0.42;
}

::selection {
    color: var(--surface-strong);
    background: var(--teal);
}

button {
    font: inherit;
}

.icon-sprite {
    display: none;
}

.app-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
    isolation: isolate;
}

.rail {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 28px 18px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    background: var(--rail-surface);
    backdrop-filter: blur(18px);
    box-shadow: inset -1px 0 var(--panel-highlight), 14px 0 48px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] .rail {
    box-shadow: inset -1px 0 var(--panel-highlight), 18px 0 70px rgba(0, 0, 0, 0.48), 1px 0 18px var(--accent-glow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
}

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: linear-gradient(135deg, var(--ink), var(--teal));
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--teal) 48%, transparent);
    box-shadow: 0 0 0 1px var(--surface-strong), 0 12px 28px var(--accent-glow);
    overflow: hidden;
}

.brand-mark::before {
    position: absolute;
    inset: -35%;
    content: "";
    background: conic-gradient(from 0deg, transparent 0 70%, rgba(178, 255, 249, 0.8) 88%, transparent 100%);
    animation: radar-sweep 4.2s linear infinite;
}

.brand-mark::after {
    position: absolute;
    inset: 5px;
    content: "";
    border: 1px solid rgba(222, 255, 252, 0.24);
    border-radius: 5px;
}

.brand svg,
.nav-tab svg,
.theme-switch svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.brand-mark svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 5px rgba(208, 255, 251, 0.7));
}

.brand strong {
    display: block;
    font-size: 15px;
    letter-spacing: 0;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.nav-tabs {
    display: grid;
    gap: 8px;
    margin-top: 36px;
}

.nav-tab {
    position: relative;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    color: var(--ink-soft);
    text-align: left;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.nav-tab:hover,
.nav-tab.active {
    color: var(--ink);
    border-color: var(--line-strong);
    background: var(--surface-strong);
}

.nav-tab.active {
    box-shadow: inset 0 0 24px var(--accent-glow), 0 0 20px rgba(0, 0, 0, 0.08);
}

.nav-tab.active::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: -1px;
    width: 2px;
    content: "";
    background: var(--teal);
    box-shadow: 0 0 12px var(--teal);
    animation: signal-pulse 2.2s ease-in-out infinite;
}

.theme-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 12px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
}

.theme-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, 32px);
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
}

.theme-switch button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 30px;
    padding: 0;
    color: var(--muted);
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.theme-switch button:hover {
    color: var(--ink);
}

.theme-switch button.active {
    color: var(--teal);
    background: var(--surface-strong);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.theme-switch button:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 24px;
    width: 100%;
    padding: 34px clamp(20px, 4vw, 56px) 56px;
    perspective: 1200px;
}

.workspace-main {
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 24px;
    min-height: 38px;
    margin-bottom: 18px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    font-family: "SFMono-Regular", Consolas, monospace;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-family: "Arial Black", "Aptos Display", "PingFang SC", sans-serif;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.02;
}

:root[data-theme="dark"] h1 {
    text-shadow: 0 0 28px rgba(69, 194, 188, 0.12);
}

h2 {
    font-size: 24px;
}

.run-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 0 14px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: inset 0 1px var(--panel-highlight);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 0 22px var(--accent-glow), 0 0 22px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.run-chip::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -42%;
    width: 34%;
    content: "";
    background: linear-gradient(90deg, transparent, var(--beam), transparent);
    animation: chip-scan 5.5s ease-in-out infinite;
}

.pulse {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--amber);
    box-shadow: 0 0 0 6px rgba(183, 121, 31, 0.14);
}

.pulse.ok {
    background: var(--green);
    box-shadow: 0 0 0 6px rgba(32, 122, 74, 0.14);
}

.pulse.ok,
.pulse.fail {
    animation: status-pulse 2s ease-in-out infinite;
}

.pulse.fail {
    background: var(--red);
    box-shadow: 0 0 0 6px rgba(189, 61, 42, 0.14);
}

.metric-strip {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    margin-bottom: 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.metric-strip::before,
.panel::before,
.context-rail::before {
    position: absolute;
    top: -1px;
    left: 18px;
    width: 92px;
    height: 2px;
    content: "";
    background: var(--teal);
    box-shadow: 0 0 18px var(--teal), 0 0 34px var(--accent-glow);
    animation: energy-line 3.8s ease-in-out infinite;
}

.panel::after,
.context-rail::after,
.report-entry::after {
    position: absolute;
    inset: 8px;
    z-index: 2;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(var(--hud-corner), var(--hud-corner)) top left / 24px 1px no-repeat,
        linear-gradient(var(--hud-corner), var(--hud-corner)) top left / 1px 24px no-repeat,
        linear-gradient(var(--hud-corner), var(--hud-corner)) top right / 24px 1px no-repeat,
        linear-gradient(var(--hud-corner), var(--hud-corner)) top right / 1px 24px no-repeat,
        linear-gradient(var(--hud-corner), var(--hud-corner)) bottom left / 24px 1px no-repeat,
        linear-gradient(var(--hud-corner), var(--hud-corner)) bottom left / 1px 24px no-repeat,
        linear-gradient(var(--hud-corner), var(--hud-corner)) bottom right / 24px 1px no-repeat,
        linear-gradient(var(--hud-corner), var(--hud-corner)) bottom right / 1px 24px no-repeat;
    opacity: 0.45;
}

.metric {
    position: relative;
    min-height: 96px;
    padding: 18px 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, var(--surface-strong), var(--surface-soft)),
        var(--surface-strong);
    box-shadow: inset 0 1px var(--panel-highlight), 0 14px 34px rgba(0, 0, 0, 0.08);
    clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 0 100%);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.metric::before {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--teal), transparent);
    transform: scaleX(0.38);
    transition: transform 180ms ease;
}

.metric::after {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 5px;
    height: 5px;
    content: "";
    border: 1px solid var(--teal);
    box-shadow: 0 0 9px var(--teal);
    transform: rotate(45deg);
}

.metric:hover {
    z-index: 1;
    border-color: var(--teal);
    box-shadow: inset 0 1px var(--panel-highlight), 0 18px 42px rgba(0, 0, 0, 0.12), 0 0 22px var(--accent-glow);
    transform: translateY(-3px);
}

.metric:hover::before {
    transform: scaleX(1);
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.metric strong {
    display: block;
    margin-top: 9px;
    font-size: 34px;
    line-height: 1;
    font-family: "DIN Alternate", "SFMono-Regular", Consolas, monospace;
    text-shadow: 0 0 18px var(--accent-glow);
}

.panel {
    position: relative;
    display: none;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow), inset 0 1px var(--panel-highlight), inset 0 0 48px rgba(8, 127, 131, 0.025);
    backdrop-filter: blur(16px);
    animation: rise 240ms ease-out;
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .context-rail {
    box-shadow: var(--shadow), inset 0 1px var(--panel-highlight), inset 0 0 70px rgba(69, 194, 188, 0.045), 0 0 30px rgba(69, 194, 188, 0.06);
}

.panel.active {
    display: block;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.filter-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-control);
    box-shadow: inset 0 1px var(--panel-highlight), inset 0 0 28px var(--accent-glow);
    overflow: hidden;
}

.filter-bar::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -20%;
    width: 12%;
    pointer-events: none;
    content: "";
    background: linear-gradient(90deg, transparent, var(--beam), transparent);
    animation: filter-scan 9s linear infinite;
}

.date-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.date-group label,
.size-select {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.date-group input,
.size-select select {
    min-height: 34px;
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-strong);
}

.date-group input:focus,
.size-select select:focus {
    border-color: var(--teal);
    outline: 2px solid var(--accent-glow);
    outline-offset: 1px;
}

.date-group input {
    width: 144px;
    padding: 0 8px;
}

.size-select select {
    width: 78px;
    padding: 0 8px;
}

.tool-button,
.pager-button {
    min-height: 34px;
    padding: 0 12px;
    color: var(--ink-soft);
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface-strong);
    cursor: pointer;
}

.tool-button:hover,
.tool-button.active,
.pager-button:hover:not(:disabled) {
    color: var(--ink);
    border-color: rgba(8, 127, 131, 0.38);
    background: var(--surface-hover);
    box-shadow: 0 0 14px var(--accent-glow);
}

.tool-button.active {
    box-shadow: inset 0 -2px var(--teal);
}

.pager-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.summary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 18px;
}

.summary-block {
    position: relative;
    min-height: 220px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    box-shadow: inset 0 1px var(--panel-highlight), inset 0 0 34px rgba(8, 127, 131, 0.025);
    overflow: hidden;
}

.summary-block::after {
    position: absolute;
    right: -18px;
    bottom: -18px;
    width: 54px;
    height: 54px;
    content: "";
    border: 1px solid var(--line);
    box-shadow: 0 0 18px var(--accent-glow);
    transform: rotate(45deg);
}

.block-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    font-family: "SFMono-Regular", Consolas, monospace;
    text-transform: uppercase;
}

#summary-text {
    margin: 0;
    color: var(--ink-soft);
    font-size: 17px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.overview-brief {
    position: relative;
    margin-bottom: 24px;
    padding: 18px 20px;
    overflow: hidden;
    border-left: 3px solid var(--teal);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, var(--quote-surface), transparent 72%);
}

.overview-brief::after {
    position: absolute;
    top: 0;
    right: -20%;
    width: 28%;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--teal), transparent);
    animation: filter-scan 8s linear infinite;
}

.project-activity-section {
    margin-top: 4px;
}

.project-activity-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.project-activity-heading .block-label {
    margin-bottom: 6px;
}

.project-activity-heading h3 {
    margin: 0;
    font-size: 19px;
}

.project-activity-count {
    color: var(--teal);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 12px;
    font-weight: 800;
    text-shadow: 0 0 12px var(--accent-glow);
}

.project-table-wrap {
    max-height: 680px;
    overflow: auto;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    box-shadow: inset 0 0 38px rgba(8, 127, 131, 0.025);
}

.project-table-wrap::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.project-table-wrap::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border: 2px solid transparent;
    border-radius: 8px;
    background-clip: padding-box;
}

.project-activity-table {
    width: 100%;
    min-width: 940px;
    border-spacing: 0;
    table-layout: fixed;
}

.project-activity-table th,
.project-activity-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: top;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.project-activity-table th:last-child,
.project-activity-table td:last-child {
    border-right: 0;
}

.project-activity-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    color: var(--muted);
    background: var(--surface-muted);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.project-activity-table th:nth-child(1) {
    width: 25%;
}

.project-activity-table th:nth-child(2) {
    width: 15%;
}

.project-activity-table th:nth-child(3),
.project-activity-table th:nth-child(4) {
    width: 8%;
    text-align: center;
}

.project-activity-table th:nth-child(5) {
    width: 44%;
}

.project-activity-table td:nth-child(3),
.project-activity-table td:nth-child(4) {
    text-align: center;
}

.project-activity-table tbody tr {
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.project-activity-table tbody tr:hover,
.project-activity-table tbody tr.active-project {
    background: color-mix(in srgb, var(--surface-hover) 58%, transparent);
}

.project-activity-table tbody tr.active-project {
    box-shadow: inset 2px 0 var(--teal);
}

.project-name,
.project-path,
.branch-name {
    display: block;
    overflow-wrap: anywhere;
}

.project-name {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.45;
}

.project-path {
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.branch-name {
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.55;
}

.activity-number {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 28px;
    color: var(--muted);
    border: 1px solid var(--line);
    background: var(--surface-strong);
    font-family: "DIN Alternate", "SFMono-Regular", Consolas, monospace;
    font-size: 15px;
    font-weight: 800;
}

.commit-number.has-commit,
.finding-number.has-finding {
    color: var(--teal);
    border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
    box-shadow: 0 0 12px var(--accent-glow);
}

.finding-number.has-finding {
    color: var(--red);
    border-color: color-mix(in srgb, var(--red) 48%, var(--line));
}

.change-point-list {
    margin: 0;
    padding-left: 22px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.65;
}

.change-point-list li + li {
    margin-top: 6px;
}

.no-change,
.project-table-empty {
    color: var(--muted);
    font-size: 12px;
}

.project-table-empty {
    height: 120px;
    text-align: center !important;
    vertical-align: middle !important;
}

.run-history-block {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.timeline {
    display: grid;
    gap: 10px;
}

.timeline-row {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.timeline-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.row-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.row-title strong {
    font-size: 15px;
}

.meta-line {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.run-summary {
    margin: 8px 0 0;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-muted);
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.08);
}

.segment {
    min-width: 64px;
    min-height: 32px;
    padding: 0 12px;
    color: var(--muted);
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}

.segment.active {
    color: var(--ink);
    background: var(--surface-strong);
    box-shadow: 0 4px 12px rgba(28, 35, 45, 0.08), inset 0 -2px var(--teal), 0 0 12px var(--accent-glow);
}

.data-list,
.learning-board {
    display: grid;
    gap: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 38px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

.pagination strong {
    color: var(--ink-soft);
    font-size: 13px;
}

.severity {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.severity.HIGH {
    color: var(--high-ink);
    background: var(--high-surface);
}

.severity.MEDIUM {
    color: var(--medium-ink);
    background: var(--medium-surface);
}

.severity.LOW,
.severity.INFO {
    color: var(--low-ink);
    background: var(--low-surface);
}

.category {
    color: var(--blue);
    font-size: 13px;
    font-weight: 700;
}

.report-entry {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow-soft), inset 0 0 36px rgba(8, 127, 131, 0.025);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.report-entry:hover {
    border-color: color-mix(in srgb, var(--teal) 48%, var(--line));
    box-shadow: var(--shadow-soft), 0 0 0 1px var(--accent-glow), 0 0 34px rgba(69, 194, 188, 0.08);
    transform: translateY(-1px);
}

.entry-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, var(--surface-strong), var(--surface-soft)),
        var(--surface-strong);
}

.entry-header::after {
    position: absolute;
    right: 24px;
    bottom: -1px;
    width: 84px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--teal));
    box-shadow: 0 0 12px var(--teal);
}

.entry-header h3 {
    max-width: 920px;
    margin: 5px 0 0;
    font-size: 21px;
    line-height: 1.38;
    overflow-wrap: anywhere;
}

.entry-kicker,
.entry-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.entry-kicker {
    color: var(--teal);
    font-weight: 800;
    font-family: "SFMono-Regular", Consolas, monospace;
}

.entry-meta {
    margin-top: 7px;
}

.entry-layout {
    display: grid;
    align-items: stretch;
}

.review-layout,
.foresight-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
}

.learning-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.9fr);
}

.entry-main,
.entry-aside {
    min-width: 0;
    padding: 24px;
}

.entry-aside {
    border-left: 1px solid var(--line);
    background:
        linear-gradient(160deg, var(--surface-muted), color-mix(in srgb, var(--surface-muted) 84%, var(--teal))),
        var(--surface-muted);
}

.content-label {
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    font-family: "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.section-gap {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.markdown-body {
    min-width: 0;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.82;
    overflow-wrap: anywhere;
}

.markdown-body > :first-child {
    margin-top: 0;
}

.markdown-body > :last-child {
    margin-bottom: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
    margin: 24px 0 10px;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.45;
}

.markdown-body h2 {
    position: relative;
    padding-left: 14px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--line-soft);
}

.markdown-body h2::before {
    position: absolute;
    top: 7px;
    left: 0;
    width: 5px;
    height: 5px;
    content: "";
    background: var(--teal);
    box-shadow: 0 0 9px var(--teal);
    transform: rotate(45deg);
}

.markdown-body p {
    margin: 0 0 13px;
}

.markdown-body ul,
.markdown-body ol {
    margin: 0 0 15px;
    padding-left: 22px;
}

.markdown-body li {
    margin: 6px 0;
    padding-left: 3px;
}

.markdown-body blockquote {
    margin: 18px 0;
    padding: 10px 16px;
    color: var(--quote-ink);
    border-left: 3px solid var(--teal);
    background: var(--quote-surface);
}

.markdown-body a {
    color: var(--link);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.markdown-body code,
.fact-list code,
.source-block code {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.88em;
    overflow-wrap: anywhere;
}

.markdown-body :not(pre) > code {
    padding: 2px 5px;
    color: var(--inline-code-ink);
    border: 1px solid var(--inline-code-line);
    border-radius: 4px;
    background: var(--inline-code-surface);
}

.markdown-body pre,
.code-sample {
    margin: 16px 0;
    padding: 16px;
    overflow: auto;
    color: var(--code-ink);
    border-radius: 6px;
    background: var(--code-surface);
    border: 1px solid color-mix(in srgb, var(--teal) 22%, var(--line));
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), inset 0 0 34px rgba(69, 194, 188, 0.035), 0 12px 34px rgba(0, 0, 0, 0.14);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 12px;
    line-height: 1.65;
    white-space: pre;
}

.highlighted-code {
    position: relative;
    padding-top: 42px;
}

.highlighted-code::before {
    position: absolute;
    top: 13px;
    right: 16px;
    content: attr(data-language);
    color: #77d8d1;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(69, 194, 188, 0.48);
}

.highlighted-code::after {
    position: absolute;
    top: 18px;
    left: 16px;
    width: 44px;
    height: 1px;
    content: "";
    background: linear-gradient(90deg, #45c2bc, transparent);
    box-shadow: 0 0 9px rgba(69, 194, 188, 0.5);
}

.hljs {
    display: block;
    color: #a9b7c6;
    background: transparent;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal {
    color: #cc7832;
    font-weight: 700;
}

.hljs-type,
.hljs-built_in,
.hljs-title.class_,
.hljs-class .hljs-title {
    color: #78d7ff;
}

.hljs-title.function_,
.hljs-title.function_.invoke_ {
    color: #ffc66d;
}

.hljs-string,
.hljs-regexp,
.hljs-addition {
    color: #6aab73;
}

.hljs-number,
.hljs-symbol,
.hljs-bullet {
    color: #6897bb;
}

.hljs-comment,
.hljs-quote {
    color: #7f848e;
    font-style: italic;
}

.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-annotation {
    color: #bbb529;
}

.hljs-variable.constant_ {
    color: #c77dff;
    font-weight: 700;
}

.hljs-attr,
.hljs-attribute,
.hljs-property {
    color: #bababa;
}

.hljs-tag,
.hljs-name,
.hljs-selector-class,
.hljs-selector-id {
    color: #e8bf6a;
}

.hljs-deletion {
    color: #ff6b68;
}

.hljs-emphasis {
    font-style: italic;
}

.hljs-strong {
    font-weight: 800;
}

.markdown-body pre code,
.code-sample code {
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
    font: inherit;
}

.markdown-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid var(--line);
}

.recommendation-markdown {
    color: var(--quote-ink);
}

.fact-list {
    display: grid;
    gap: 0;
    margin: 24px 0 0;
    border-top: 1px solid var(--line);
}

.fact-list > div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.fact-list dt,
.fact-list dd {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.fact-list dt {
    color: var(--muted);
    font-weight: 700;
}

.fact-list dd {
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.code-aside {
    display: flex;
    flex-direction: column;
}

.code-aside .code-sample {
    flex: 1;
    min-height: 240px;
    margin: 0;
}

.code-empty {
    display: grid;
    place-items: center;
    min-height: 180px;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    font-size: 13px;
}

.source-block {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.source-block span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.source-block code {
    display: block;
    color: var(--ink-soft);
    line-height: 1.55;
}

.version-flow {
    margin-top: 2px;
}

.version-point {
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.version-point span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.version-point strong {
    display: block;
    margin-top: 7px;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.version-point.latest strong {
    color: var(--teal);
}

.version-arrow {
    padding: 7px 0;
    color: var(--muted);
    font-size: 18px;
}

.context-rail {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transform-style: preserve-3d;
}

.reading-progress {
    width: 100%;
    height: 3px;
    overflow: hidden;
    background: var(--line-soft);
}

.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--teal);
    box-shadow: 0 0 14px var(--teal);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 120ms ease-out;
}

.context-header {
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--line);
}

.context-header h2 {
    font-size: 22px;
    line-height: 1.25;
}

.context-header p:last-child {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.context-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.context-content::-webkit-scrollbar {
    width: 8px;
}

.context-content::-webkit-scrollbar-thumb {
    background: var(--scrollbar);
    border: 2px solid transparent;
    border-radius: 8px;
    background-clip: padding-box;
}

.context-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
}

.context-stat-grid > div {
    min-width: 0;
    padding: 16px 20px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.context-stat-grid > div:nth-child(2n) {
    border-right: 0;
}

.context-stat-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.context-stat-grid span,
.context-version-pair span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.context-stat-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-shadow: 0 0 16px var(--accent-glow);
}

.context-section {
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.context-section:last-child {
    border-bottom: 0;
}

.context-section h3 {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    font-family: "SFMono-Regular", Consolas, monospace;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.context-focus {
    min-width: 0;
}

.context-focus > strong {
    display: block;
    margin: 8px 0 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.context-focus > .severity + strong {
    margin-top: 10px;
}

.context-focus p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.context-focus code {
    display: block;
    margin-top: 10px;
    color: var(--ink-soft);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.context-nav-list,
.context-outline {
    display: grid;
}

.context-nav-item,
.context-outline-item {
    width: 100%;
    color: var(--ink-soft);
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
    cursor: pointer;
}

.context-nav-item:last-child,
.context-outline-item:last-child {
    border-bottom: 0;
}

.context-nav-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 11px 0;
}

.context-nav-item:hover,
.context-nav-item.active,
.context-outline-item:hover,
.context-outline-item.active {
    color: var(--teal);
    text-shadow: 0 0 12px var(--accent-glow);
}

.context-index {
    color: var(--muted);
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
}

.context-nav-item strong,
.context-nav-item small {
    display: block;
    overflow-wrap: anywhere;
}

.context-nav-item strong {
    font-size: 12px;
    line-height: 1.5;
}

.context-nav-item small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.context-outline-item {
    position: relative;
    padding: 9px 0 9px 18px;
    font-size: 12px;
    line-height: 1.5;
}

.context-outline-item > span {
    position: absolute;
    top: 15px;
    left: 2px;
    width: 6px;
    height: 6px;
    border: 1px solid var(--muted);
    border-radius: 999px;
}

.context-outline-item.level-3 {
    padding-left: 30px;
    color: var(--muted);
}

.context-outline-item.level-3 > span {
    left: 14px;
}

.context-distribution {
    display: grid;
    gap: 13px;
}

.distribution-row > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
}

.distribution-row strong {
    color: var(--ink-soft);
}

.distribution-track {
    display: block;
    height: 5px;
    overflow: hidden;
    background: var(--line-soft);
    box-shadow: inset 0 0 0 1px var(--line);
}

.distribution-track i {
    display: block;
    height: 100%;
    background: var(--teal);
    box-shadow: 0 0 10px currentColor;
}

.distribution-track i.high {
    background: var(--red);
}

.distribution-track i.medium {
    background: var(--amber);
}

.distribution-track i.low {
    background: var(--green);
}

.context-version-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}

.context-version-pair strong {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.context-version-pair > div:last-child strong {
    color: var(--teal);
}

.context-version-line {
    position: relative;
    height: 1px;
    background: var(--muted);
}

.context-version-line::after {
    position: absolute;
    top: -3px;
    right: 0;
    width: 7px;
    height: 7px;
    content: "";
    border-top: 1px solid var(--muted);
    border-right: 1px solid var(--muted);
    transform: rotate(45deg);
}

.context-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 12px;
    color: var(--muted);
    border-top: 1px solid var(--line-soft);
    font-size: 11px;
    font-weight: 700;
}

.context-muted,
.context-empty {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.context-empty {
    min-height: 260px;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
}

.empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 1px dashed var(--line-strong);
    border-radius: 8px;
    background: var(--surface-soft);
}

@keyframes rise {
    from {
        transform: translateY(8px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes atmosphere-sweep {
    0%, 18% {
        transform: translateX(-52%);
        opacity: 0;
    }
    42%, 58% {
        opacity: 1;
    }
    82%, 100% {
        transform: translateX(52%);
        opacity: 0;
    }
}

@keyframes radar-sweep {
    to {
        transform: rotate(360deg);
    }
}

@keyframes signal-pulse {
    0%, 100% {
        opacity: 0.55;
        box-shadow: 0 0 8px var(--teal);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 20px var(--teal);
    }
}

@keyframes status-pulse {
    0%, 100% {
        transform: scale(0.88);
    }
    50% {
        transform: scale(1.12);
    }
}

@keyframes chip-scan {
    0%, 20% {
        left: -42%;
    }
    62%, 100% {
        left: 118%;
    }
}

@keyframes energy-line {
    0%, 100% {
        opacity: 0.55;
        transform: scaleX(0.72);
        transform-origin: left center;
    }
    50% {
        opacity: 1;
        transform: scaleX(1.18);
        transform-origin: left center;
    }
}

@keyframes filter-scan {
    0%, 12% {
        left: -20%;
    }
    48%, 100% {
        left: 115%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media (max-width: 1700px) {
    .workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .context-rail {
        display: none;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .rail {
        position: static;
        height: auto;
        padding: 16px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .theme-control {
        margin-top: 16px;
    }

    .nav-tabs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin-top: 18px;
    }

    .nav-tab {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 58px;
        padding: 8px;
        text-align: center;
    }

    .workspace {
        padding: 24px 16px 38px;
    }

    .topbar,
    .panel-heading,
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .metric-strip,
    .summary-grid,
    .entry-layout {
        grid-template-columns: 1fr;
    }

    .entry-aside {
        border-top: 1px solid var(--line);
        border-left: 0;
    }
}

@media (max-width: 560px) {
    .tech-background {
        opacity: 0.5;
    }

    :root[data-theme="light"] .tech-background {
        opacity: 0.26;
    }

    .nav-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .segmented {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .date-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .date-group .tool-button {
        width: 100%;
    }

    .date-group label {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
        min-width: 0;
        white-space: nowrap;
    }

    .date-group input {
        width: 100%;
        min-width: 0;
    }

    .size-select {
        align-self: flex-start;
    }

    .pagination {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .panel {
        padding: 16px;
    }

    .entry-header,
    .entry-main,
    .entry-aside {
        padding: 18px;
    }

    .entry-header h3 {
        font-size: 18px;
    }

    .fact-list > div {
        grid-template-columns: 74px minmax(0, 1fr);
    }
}
