:root {
    --ow-bg: #f4f6f8;
    --ow-surface: #ffffff;
    --ow-surface-soft: #e9eef3;
    --ow-panel: #111827;
    --ow-panel-2: #182234;
    --ow-text: #172033;
    --ow-muted: #5d6978;
    --ow-line: rgba(23, 32, 51, 0.14);
    --ow-line-strong: rgba(23, 32, 51, 0.22);
    --ow-accent: #0f766e;
    --ow-accent-strong: #0b5f59;
    --ow-blue: #1d4ed8;
    --ow-amber: #b45309;
    --ow-slate: #334155;
    --ow-shadow: 0 14px 34px rgba(23, 32, 51, 0.09);
    --ow-shadow-soft: 0 6px 18px rgba(23, 32, 51, 0.07);
}

body {
    background:
        linear-gradient(rgba(23, 32, 51, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px),
        var(--ow-bg);
    background-size: 32px 32px;
    color: var(--ow-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", Arial, sans-serif;
    line-height: 1.7;
}

.navbar {
    background: rgba(17, 24, 39, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.navbar-brand,
.nav-link {
    color: #f8fafc !important;
}

.nav-link {
    opacity: 0.72;
    font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
    opacity: 1;
}

.case-hero {
    position: relative;
    overflow: hidden;
    padding: 6.5rem 0 3.5rem;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(135deg, #111827 0%, #1e293b 58%, #0f766e 140%);
    background-size: 44px 44px, 44px 44px, auto;
    color: #f8fafc;
}

.case-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 46%;
    height: 4px;
    background: linear-gradient(90deg, var(--ow-accent), var(--ow-amber), var(--ow-blue));
}

.case-hero .container {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 8px;
    color: #ccfbf1;
    background: rgba(15, 23, 42, 0.5);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-title {
    max-width: 960px;
    margin: 1.2rem 0;
    font-size: 4.5rem;
    font-weight: 850;
    line-height: 1.05;
    letter-spacing: 0;
}

.hero-lead {
    max-width: 820px;
    color: #cbd5e1;
    font-size: 1.2rem;
}

.hero-actions,
.case-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.8rem;
}

.btn-case {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn-case:hover {
    transform: translateY(-1px);
}

.btn-case-primary {
    color: #ffffff;
    background: var(--ow-accent);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
}

.btn-case-secondary {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.section-pad {
    padding: 4.5rem 0;
}

.section-pad > .container {
    position: relative;
    display: flex;
    flex-direction: column;
}

.section-title {
    max-width: 760px;
    margin-bottom: 1rem;
    padding-top: 0.85rem;
    border-top: 3px solid var(--ow-text);
    font-size: 2.75rem;
    font-weight: 820;
    line-height: 1.14;
    letter-spacing: 0;
}

.section-lead {
    max-width: 760px;
    color: var(--ow-muted);
    font-size: 1.08rem;
}

.case-card {
    height: 100%;
    padding: 1.55rem;
    border: 1px solid var(--ow-line);
    border-radius: 8px;
    background: var(--ow-surface);
    box-shadow: var(--ow-shadow-soft);
    position: relative;
}

.case-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 8px 0 0 8px;
    background: var(--ow-accent);
}

.case-card h3 {
    margin-bottom: 0.7rem;
    font-size: 1.28rem;
    font-weight: 800;
}

.case-card p,
.case-card li {
    color: var(--ow-muted);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.2rem;
}

.evidence-card {
    padding: 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.evidence-card strong {
    display: block;
    color: #e2e8f0;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.evidence-value {
    display: block;
    margin: 0.35rem 0;
    color: #5eead4;
    font-size: 2.15rem;
    font-weight: 850;
    line-height: 1;
}

.evidence-card span:last-child {
    color: #cbd5e1;
    font-size: 0.92rem;
}

.metric {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--ow-accent-strong);
    font-size: 2rem;
    font-weight: 850;
    line-height: 1;
}

.system-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.flow-step {
    position: relative;
    min-height: 150px;
    padding: 1.25rem;
    border: 1px solid var(--ow-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ow-shadow-soft);
}

.flow-step::after {
    content: "";
    position: absolute;
    top: 1.15rem;
    right: 1.15rem;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(15, 118, 110, 0.28);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(15, 118, 110, 0.24) 0 35%, transparent 38%);
}

.flow-step span {
    color: var(--ow-accent-strong);
    font-weight: 850;
}

.flow-step h3 {
    margin: 0.7rem 0 0.5rem;
    font-size: 1.1rem;
}

.dashboard-band {
    background:
        linear-gradient(90deg, rgba(23, 32, 51, 0.04) 1px, transparent 1px),
        var(--ow-surface-soft);
    background-size: 32px 32px;
    border-top: 1px solid var(--ow-line);
    border-bottom: 1px solid var(--ow-line);
}

.feature-list {
    margin: 0;
    padding-left: 1.1rem;
}

.feature-list li {
    margin-bottom: 0.55rem;
}

.analysis-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.analysis-item {
    padding: 1.2rem;
    border: 1px solid var(--ow-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ow-shadow-soft);
}

.analysis-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--ow-text);
}

.analysis-item span {
    color: var(--ow-muted);
}

.callout {
    margin-top: 2rem;
    padding: 1.4rem;
    border: 1px solid rgba(15, 118, 110, 0.22);
    border-left: 4px solid var(--ow-accent);
    border-radius: 8px;
    background: #eefaf7;
}

.callout strong {
    display: block;
    margin-bottom: 0.35rem;
}

.callout p {
    margin: 0;
    color: var(--ow-muted);
}

.two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.insight-table {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--ow-line-strong);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ow-shadow-soft);
}

.insight-row {
    display: grid;
    grid-template-columns: 0.9fr 1.5fr;
    border-bottom: 1px solid var(--ow-line);
}

.insight-row:last-child {
    border-bottom: 0;
}

.insight-row strong,
.insight-row span {
    padding: 1rem;
}

.insight-row strong {
    background: #f1f5f9;
    color: var(--ow-text);
}

.insight-row span {
    color: var(--ow-muted);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.2rem;
}

.tag {
    display: inline-flex;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 8px;
    color: var(--ow-text);
    background: #ffffff;
    font-size: 0.86rem;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(23, 32, 51, 0.04);
}

.section-image-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

main > .section-pad:nth-of-type(even) .section-image-pair {
    order: -1;
    margin-top: 0;
    margin-bottom: 2rem;
}

.evidence-image-link {
    display: block;
    overflow: hidden;
    border: 1px solid var(--ow-line-strong);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ow-shadow-soft);
    text-decoration: none;
    padding: 0.55rem;
}

.evidence-image-link img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    max-height: 420px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.evidence-image-link:hover img {
    transform: scale(1.015);
}

.case-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(8, 13, 24, 0.86);
}

.case-lightbox.is-open {
    display: flex;
}

.case-lightbox img {
    max-width: min(1120px, 92vw);
    max-height: 86vh;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.case-lightbox button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1.5rem;
    line-height: 1;
}

.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--ow-line);
    background: #111827;
    color: #cbd5e1;
}

.footer .btn-case-secondary {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.case-file-shell {
    margin-top: 2rem;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.case-file-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.case-file-title {
    color: #e2e8f0;
    font-family: "Segoe UI Mono", Consolas, monospace;
    font-size: 0.92rem;
    font-weight: 700;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.28rem 0.55rem;
    border: 1px solid rgba(94, 234, 212, 0.38);
    border-radius: 8px;
    color: #ccfbf1;
    background: rgba(15, 118, 110, 0.18);
    font-size: 0.82rem;
    font-weight: 800;
}

.status-pill::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #5eead4;
}

.run-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.run-summary-item {
    min-height: 112px;
    padding: 1rem;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
}

.run-summary-item:last-child {
    border-right: 0;
}

.run-summary-item small {
    display: block;
    color: #94a3b8;
    font-family: "Segoe UI Mono", Consolas, monospace;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.run-summary-item strong {
    display: block;
    margin: 0.4rem 0 0.2rem;
    color: #f8fafc;
    font-size: 1.85rem;
    line-height: 1;
}

.run-summary-item span {
    color: #cbd5e1;
    font-size: 0.88rem;
}

.ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.5rem;
    margin-top: 1.75rem;
}

.ops-panel {
    border: 1px solid var(--ow-line-strong);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ow-shadow-soft);
}

.ops-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--ow-line);
    background: #f8fafc;
}

.ops-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 850;
}

.ops-panel-header span {
    color: var(--ow-muted);
    font-family: "Segoe UI Mono", Consolas, monospace;
    font-size: 0.78rem;
}

.ops-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ops-list li {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--ow-line);
}

.ops-list li:last-child {
    border-bottom: 0;
}

.ops-list strong {
    color: var(--ow-text);
}

.ops-list span {
    color: var(--ow-muted);
}

.risk-register {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.risk-item {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr) 7rem;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border: 1px solid var(--ow-line);
    border-radius: 8px;
    background: #ffffff;
}

.risk-item strong {
    color: var(--ow-text);
}

.risk-item span {
    color: var(--ow-muted);
}

.risk-level {
    display: inline-flex;
    justify-content: center;
    padding: 0.28rem 0.45rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 850;
}

.risk-level.high {
    color: #7f1d1d;
    background: #fee2e2;
}

.risk-level.medium {
    color: #7c2d12;
    background: #ffedd5;
}

.risk-level.low {
    color: #14532d;
    background: #dcfce7;
}

.decision-log {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.decision-item {
    padding: 1.1rem;
    border: 1px solid var(--ow-line);
    border-radius: 8px;
    background: #ffffff;
}

.decision-item small {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--ow-accent-strong);
    font-family: "Segoe UI Mono", Consolas, monospace;
    font-weight: 850;
}

.decision-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--ow-text);
}

.decision-item span {
    color: var(--ow-muted);
}

.timeline {
    display: grid;
    gap: 0;
    margin-top: 1.5rem;
    border: 1px solid var(--ow-line-strong);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.timeline-item {
    display: grid;
    grid-template-columns: 7rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--ow-line);
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-item time {
    color: var(--ow-accent-strong);
    font-family: "Segoe UI Mono", Consolas, monospace;
    font-weight: 850;
}

.timeline-item strong {
    display: block;
    color: var(--ow-text);
}

.timeline-item span {
    color: var(--ow-muted);
}

.module-matrix {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.module-card {
    padding: 1.15rem;
    border: 1px solid var(--ow-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ow-shadow-soft);
}

.module-card small {
    color: var(--ow-accent-strong);
    font-family: "Segoe UI Mono", Consolas, monospace;
    font-weight: 850;
}

.module-card h3 {
    margin: 0.55rem 0;
    font-size: 1.12rem;
}

.module-card p {
    margin: 0;
    color: var(--ow-muted);
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3.2rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .system-flow,
    .metric-grid,
    .run-summary-grid,
    .ops-grid,
    .module-matrix,
    .section-image-pair,
    .two-col {
        grid-template-columns: 1fr;
    }

    .run-summary-item {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    }

    .run-summary-item:last-child {
        border-bottom: 0;
    }

    .risk-item,
    .ops-list li,
    .timeline-item {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .case-hero {
        padding-top: 4rem;
    }

    .hero-title {
        font-size: 2.45rem;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .hero-actions,
    .case-actions {
        flex-direction: column;
    }

    .btn-case {
        justify-content: center;
    }

    .insight-row {
        grid-template-columns: 1fr;
    }
}

