:root {
    --bg: #0a0e17;
    --bg-soft: #0f1521;
    --panel: rgba(17, 24, 38, 0.92);
    --panel-strong: #141d2e;
    --line: rgba(159, 177, 211, 0.16);
    --line-strong: rgba(159, 177, 211, 0.28);
    --text: #f4f7fc;
    --muted: #8e9bb1;
    --muted-strong: #b9c3d4;
    --cyan: #54d6d0;
    --cyan-deep: #1ca9aa;
    --blue: #7899ff;
    --purple: #ae8bff;
    --yellow: #e7b967;
    --green: #67d89a;
    --red: #ff7c91;
    --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
    --radius: 20px;
    --radius-small: 12px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% -10%, rgba(64, 122, 175, 0.14), transparent 34rem),
        radial-gradient(circle at 100% 20%, rgba(89, 60, 157, 0.13), transparent 34rem),
        var(--bg);
    font-size: 14px;
    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.background-glow {
    position: fixed;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(90px);
    opacity: 0.1;
}

.background-glow-one {
    top: 22rem;
    left: -15rem;
    background: var(--cyan);
}

.background-glow-two {
    top: 54rem;
    right: -15rem;
    background: var(--purple);
}

.shell {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 34px;
    position: relative;
    z-index: 1;
}

.topbar,
.brand,
.topbar-meta,
.hero,
.card-heading,
.results-header,
.form-actions,
.footer,
.notice,
.check-field {
    display: flex;
    align-items: center;
}

.topbar {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 64px;
}

.brand {
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(84, 214, 208, 0.55);
    border-radius: 12px;
    color: var(--cyan);
    background: linear-gradient(145deg, rgba(84, 214, 208, 0.18), rgba(120, 153, 255, 0.08));
    box-shadow: 0 0 28px rgba(84, 214, 208, 0.12);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 15px;
    letter-spacing: 0.01em;
}

.brand small {
    color: var(--muted);
    font-size: 11px;
    margin-top: 1px;
}

.topbar-meta {
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.availability-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgba(103, 216, 154, 0.09), 0 0 16px rgba(103, 216, 154, 0.7);
}

.hero {
    justify-content: space-between;
    align-items: flex-end;
    gap: 44px;
    margin-bottom: 36px;
}

.hero-copy {
    max-width: 750px;
}

.eyebrow,
.card-kicker {
    margin: 0 0 10px;
    color: var(--cyan);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 700px;
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4.35rem);
    line-height: 1.02;
    letter-spacing: -0.065em;
    font-weight: 730;
}

.hero-text {
    max-width: 640px;
    margin: 22px 0 0;
    color: var(--muted-strong);
    font-size: 16px;
    line-height: 1.65;
}

.hero-stat {
    flex: 0 0 200px;
    padding: 21px 22px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: rgba(18, 27, 43, 0.65);
    box-shadow: var(--shadow);
}

.stat-label,
.stat-caption {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.hero-stat strong {
    display: block;
    margin: 4px 0 0;
    color: var(--cyan);
    font-size: 42px;
    letter-spacing: -0.07em;
    line-height: 1;
}

.stat-caption {
    margin-top: 6px;
}

.notice {
    align-items: flex-start;
    gap: 13px;
    margin: 0 0 24px;
    padding: 15px 17px;
    border: 1px solid rgba(231, 185, 103, 0.25);
    border-radius: var(--radius-small);
    background: rgba(78, 60, 32, 0.2);
}

.notice-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    margin-top: 2px;
    border: 1px solid rgba(231, 185, 103, 0.55);
    border-radius: 50%;
    color: var(--yellow);
    font-size: 12px;
    font-weight: 800;
}

.notice strong {
    display: block;
    color: #f0d29b;
    font-size: 12px;
}

.notice p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    align-items: start;
    gap: 24px;
}

.forms-column {
    display: grid;
    gap: 24px;
}

.card,
.results-card,
.side-note {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.card {
    padding: 27px 28px 28px;
}

.matrix-card {
    border-color: rgba(84, 214, 208, 0.28);
    background: linear-gradient(145deg, rgba(21, 43, 52, 0.75), rgba(17, 24, 38, 0.95) 43%);
}

.card-heading,
.results-header {
    justify-content: space-between;
    gap: 16px;
}

.card-kicker {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 9px;
}

.matrix-card .card-kicker {
    color: var(--cyan);
}

.card h2,
.results-header h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.card-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--cyan);
    background: rgba(84, 214, 208, 0.07);
    font-size: 22px;
}

.card-intro {
    max-width: 720px;
    margin: 12px 0 24px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.field-wide {
    grid-column: 1 / -1;
}

.field > span,
.check-field > span {
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 650;
}

.field em {
    color: var(--muted);
    font-style: normal;
    font-weight: 400;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: rgba(7, 12, 21, 0.72);
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input,
select {
    min-height: 43px;
    padding: 0 13px;
}

textarea {
    min-height: 125px;
    padding: 12px 13px;
    resize: vertical;
    line-height: 1.55;
}

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 32px;
}

input::placeholder,
textarea::placeholder {
    color: #5d6a7d;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(84, 214, 208, 0.75);
    background-color: rgba(11, 22, 31, 0.92);
    box-shadow: 0 0 0 3px rgba(84, 214, 208, 0.09);
}

.check-field {
    gap: 10px;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(7, 12, 21, 0.38);
}

.check-field input {
    width: 17px;
    height: 17px;
    min-height: 17px;
    accent-color: var(--cyan);
}

.check-field span {
    display: grid;
    gap: 1px;
}

.check-field small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 400;
}

.compact-check {
    align-self: end;
}

.form-actions {
    gap: 10px;
    padding-top: 3px;
}

.split-actions {
    flex-wrap: wrap;
}

.button {
    position: relative;
    min-height: 43px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text);
    font-size: 12px;
    font-weight: 720;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.66;
}

.button-primary {
    border-color: rgba(84, 214, 208, 0.35);
    background: linear-gradient(135deg, var(--cyan-deep), #2478a2);
    box-shadow: 0 10px 24px rgba(28, 169, 170, 0.18);
}

.button-secondary {
    border-color: var(--line-strong);
    background: rgba(144, 162, 196, 0.08);
}

.button-spinner {
    display: none;
    width: 13px;
    height: 13px;
    margin-left: 7px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -2px;
    animation: spin 700ms linear infinite;
}

.button.is-loading .button-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.results-column {
    position: sticky;
    top: 20px;
    display: grid;
    gap: 16px;
}

.results-card {
    min-height: 420px;
    overflow: hidden;
}

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

.results-header h2 {
    max-width: 310px;
    font-size: 17px;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    font-size: 19px;
    line-height: 1;
}

.icon-button:hover {
    border-color: var(--line-strong);
    color: var(--text);
}

.results-body {
    padding: 18px 22px 22px;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 330px;
    padding: 30px;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    margin-top: 25px;
    color: var(--muted-strong);
    font-size: 13px;
}

.empty-state p {
    max-width: 220px;
    margin: 7px 0 0;
    font-size: 11px;
    line-height: 1.6;
}

.empty-orbit {
    display: block;
    width: 78px;
    height: 78px;
    border: 1px solid rgba(84, 214, 208, 0.35);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 12px rgba(84, 214, 208, 0.035), 0 0 0 25px rgba(84, 214, 208, 0.018);
}

.empty-orbit::after,
.empty-orbit::before {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.empty-orbit::before {
    width: 8px;
    height: 8px;
    top: 10px;
    right: 7px;
    background: var(--cyan);
    box-shadow: 0 0 17px var(--cyan);
}

.empty-orbit::after {
    width: 5px;
    height: 5px;
    bottom: 15px;
    left: 13px;
    background: var(--purple);
    box-shadow: 0 0 14px var(--purple);
}

.side-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 16px;
    border-color: rgba(120, 153, 255, 0.2);
    background: rgba(43, 51, 91, 0.18);
}

.side-note-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(120, 153, 255, 0.45);
    border-radius: 50%;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.side-note strong {
    display: block;
    font-size: 11px;
}

.side-note p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.result-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(7, 12, 21, 0.36);
}

.result-status {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 27px;
    height: 27px;
    border-radius: 9px;
    font-weight: 800;
}

.result-status.pass {
    color: var(--green);
    background: rgba(103, 216, 154, 0.12);
}

.result-status.fail {
    color: var(--red);
    background: rgba(255, 124, 145, 0.12);
}

.result-status.warn {
    color: var(--yellow);
    background: rgba(231, 185, 103, 0.12);
}

.result-summary strong,
.result-summary small {
    display: block;
}

.result-summary strong {
    font-size: 12px;
}

.result-summary small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.step-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step-item {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr);
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(159, 177, 211, 0.08);
}

.step-bullet {
    width: 7px;
    height: 7px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--muted);
}

.step-item.pass .step-bullet { background: var(--green); box-shadow: 0 0 8px rgba(103, 216, 154, 0.5); }
.step-item.warn .step-bullet { background: var(--yellow); }
.step-item.fail .step-bullet { background: var(--red); box-shadow: 0 0 8px rgba(255, 124, 145, 0.5); }
.step-item.skip .step-bullet { background: var(--muted); }

.step-name {
    display: block;
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 680;
}

.step-detail {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
    word-break: break-word;
}

.result-block {
    margin-top: 17px;
}

.result-block-title {
    display: block;
    margin-bottom: 7px;
    color: var(--muted-strong);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.result-pre,
.trace-list {
    overflow: auto;
    max-height: 260px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #b8c9e5;
    background: rgba(3, 7, 13, 0.7);
    font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.trace-list {
    display: grid;
    gap: 5px;
    max-height: 220px;
    list-style: none;
}

.trace-list li {
    color: var(--muted);
}

.trace-list .trace-direction {
    display: inline-block;
    width: 38px;
    color: var(--cyan);
}

.matrix-table-wrap {
    overflow-x: auto;
    margin: 0 -4px;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.matrix-table th {
    padding: 0 7px 9px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
}

.matrix-table td {
    padding: 9px 7px;
    border-top: 1px solid rgba(159, 177, 211, 0.09);
    color: var(--muted-strong);
    white-space: nowrap;
}

.matrix-table .status-cell {
    font-weight: 750;
}

.status-cell.pass { color: var(--green); }
.status-cell.fail { color: var(--red); }

.matrix-detail {
    margin-top: 10px;
}

.matrix-detail summary {
    color: var(--muted);
    cursor: pointer;
    font-size: 10px;
}

.dns-records {
    display: grid;
    gap: 8px;
}

.dns-record {
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: rgba(3, 7, 13, 0.45);
    font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    word-break: break-word;
}

.error-box {
    padding: 12px;
    border: 1px solid rgba(255, 124, 145, 0.25);
    border-radius: 10px;
    color: #ffc3cc;
    background: rgba(93, 27, 44, 0.28);
    font-size: 11px;
}

.footer {
    justify-content: space-between;
    gap: 15px;
    padding: 24px 3px 0;
    color: #68758b;
    font-size: 10px;
}

@media (max-width: 1050px) {
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .results-column {
        position: static;
    }

    .results-card {
        min-height: 0;
    }

    .empty-state {
        min-height: 220px;
    }
}

@media (max-width: 680px) {
    .shell {
        width: min(100% - 28px, 600px);
        padding-top: 18px;
    }

    .topbar {
        align-items: flex-start;
        margin-bottom: 45px;
    }

    .topbar-meta {
        max-width: 120px;
        align-items: flex-start;
        font-size: 10px;
        line-height: 1.35;
        text-align: right;
    }

    .hero {
        display: block;
    }

    .hero h1 {
        font-size: clamp(2.3rem, 13vw, 3.6rem);
    }

    .hero-text {
        font-size: 14px;
    }

    .hero-stat {
        display: inline-block;
        margin-top: 26px;
    }

    .card {
        padding: 21px 17px 20px;
        border-radius: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: auto;
    }

    .split-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .button {
        width: 100%;
    }

    .footer {
        display: grid;
        gap: 3px;
    }
}
