:root {
    --ink: #182333;
    --muted: #5c6878;
    --navy: #102a43;
    --blue: #0a66c2;
    --blue-dark: #074b91;
    --line: #dce4ec;
    --surface: #ffffff;
    --wash: #f4f7fa;
    --pass: #157347;
    --pass-bg: #dff4e9;
    --fail: #a61b1b;
    --fail-bg: #fbe4e4;
    --warn: #835b00;
    --warn-bg: #fff1c7;
}

* { box-sizing: border-box; }
html { background: var(--wash); color: var(--ink); font-family: "Segoe UI", Arial, sans-serif; }
body { margin: 0; min-height: 100vh; }
.shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }
.site-header { background: linear-gradient(130deg, #0d2237, #133d64); color: #fff; border-bottom: 4px solid #2f8ddd; }
.header-row { min-height: 178px; padding: 34px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.company { color: #a9d4fa; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 8px 0; font-size: clamp(1.8rem, 3.2vw, 2.75rem); line-height: 1.1; }
.site-header p { margin: 0; color: #dbeafa; }
.main-content { padding: 38px 0 26px; }
.intro { max-width: 780px; margin-bottom: 26px; }
.intro h2, .panel h2, .result-panel h2 { margin: 5px 0 10px; font-size: 1.55rem; }
.intro p, .test-card p, .panel p { color: var(--muted); line-height: 1.55; }
.eyebrow { margin: 0; color: var(--blue) !important; font-size: .77rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.test-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.test-card, .panel, .result-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 7px 24px rgba(29, 53, 75, .07); }
.test-card { padding: 24px; display: flex; flex-direction: column; align-items: flex-start; min-height: 255px; }
.test-card h3 { margin: 10px 0 3px; font-size: 1.22rem; }
.test-card p { flex: 1; }
.test-number { color: #6a7a8c; font-size: .74rem; font-weight: 800; letter-spacing: .12em; }
.featured-card { grid-column: 1 / -1; border-color: #83b9ea; background: linear-gradient(100deg, #fff, #f3f9ff); min-height: 210px; }
.button { display: inline-block; border: 0; border-radius: 5px; background: var(--blue); color: #fff; cursor: pointer; font: inherit; font-weight: 700; line-height: 1.2; padding: 11px 16px; text-decoration: none; }
.button:hover { background: var(--blue-dark); }
.button:focus { outline: 3px solid rgba(10, 102, 194, .25); outline-offset: 2px; }
.button[disabled] { background: #8291a0; cursor: not-allowed; }
.button-secondary { background: transparent; color: #dcecff; border: 1px solid #76a9d7; }
.test-card .button-secondary { color: var(--blue); border-color: #8bb8df; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.button-row form { margin: 0; }
.logout-form { margin: 0; }
.panel { padding: 28px; }
.narrow-panel { max-width: 620px; margin: 20px auto; }
.field { margin: 22px 0 16px; }
.field label { display: block; margin-bottom: 7px; font-weight: 700; }
.field input { width: 100%; padding: 12px; border: 1px solid #aebcca; border-radius: 5px; font: inherit; }
.alert, .validation-summary { border-radius: 5px; margin: 18px 0; padding: 14px; line-height: 1.45; }
.alert-warning { background: var(--warn-bg); border: 1px solid #e3c368; color: #624500; }
.validation-summary { background: var(--fail-bg); border: 1px solid #e8aaaa; color: var(--fail); }
.validation-summary ul { margin: 0; padding-left: 18px; }
.result-panel { margin-top: 26px; padding: 26px; scroll-margin-top: 15px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.status-badge { border-radius: 999px; display: inline-block; font-size: .76rem; font-weight: 900; letter-spacing: .07em; padding: 8px 12px; white-space: nowrap; }
.status-pass { background: var(--pass-bg); color: var(--pass); }
.status-fail { background: var(--fail-bg); color: var(--fail); }
.status-not-configured { background: var(--warn-bg); color: var(--warn); }
.result-message { font-size: 1.06rem; line-height: 1.5; }
.result-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.result-meta div { background: var(--wash); border-radius: 5px; padding: 11px; }
.result-meta dt, .exception-list dt { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.result-meta dd, .exception-list dd { margin: 4px 0 0; overflow-wrap: anywhere; }
details { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
summary { cursor: pointer; font-weight: 700; }
pre { overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #102030; color: #e6edf3; border-radius: 5px; padding: 15px; font: .82rem/1.55 Consolas, monospace; }
code { overflow-wrap: anywhere; }
.exception-list dd { margin-bottom: 12px; }
.footer { color: #6b7785; font-size: .78rem; padding: 12px 0 34px; text-align: center; }

@media (max-width: 760px) {
    .header-row { align-items: flex-start; flex-direction: column; }
    .test-grid { grid-template-columns: 1fr; }
    .featured-card { grid-column: auto; }
    .result-meta { grid-template-columns: 1fr; }
    .result-heading { align-items: flex-start; flex-direction: column; }
}
