
/* base */

:root {
    --bg: #f9f9f8;
    --surface: #ffffff;
    --surface-sunken: #f4f4f2;
    --text: #18181a;
    --muted: #6b6b6f;
    --faint: #9a9a9e;
    --line: #e7e7e4;
    --line-strong: #8a8a8e;
    --accent: #1fa194;
    --accent-text: #137e73;
    --pass: #23804a;
    --fail: #c23631;
    --softfail: #a3600a;
    --neutral: #68686e;

    --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --gutter: clamp(16px, 4.5vw, 88px);
    --radius: 12px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font: 16px/1.55 var(--sans);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
    width: 100%;
    max-width: calc(1440px + 2 * var(--gutter));
    margin: 0 auto;
    padding: clamp(40px, 6vw, 72px) var(--gutter) 64px;
}

a {
    color: inherit;
}

h1, h2, p {
    margin: 0;
}

code {
    font-family: var(--mono);
    font-size: .95em;
    overflow-wrap: anywhere;
}

kbd {
    display: inline-block;
    padding: 2px 7px;
    font: 12px/1.4 var(--sans);
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* layout */

.site-header {
    border-bottom: 1px solid var(--line);
}
.site-header > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: calc(1440px + 2 * var(--gutter));
    margin: 0 auto;
    padding: 22px var(--gutter);
}
.site-nav {
    display: flex;
    gap: clamp(16px, 2.5vw, 48px);
}
.site-nav a {
    color: var(--muted);
    text-decoration: none;
}
.site-nav a:hover {
    color: var(--text);
}
.site-header > div > a:last-child:hover kbd {
    color: var(--text);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -.01em;
    text-decoration: none;
}
.brand::before {
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: var(--accent);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    min-width: 0;
    font-size: 1.1rem;
}
.breadcrumb > * + *::before {
    content: "/";
    margin-right: 16px;
    color: var(--faint);
    opacity: .7;
}
.breadcrumb span {
    color: var(--muted);
}
.breadcrumb [aria-current] {
    color: var(--text);
}

.site-footer {
    border-top: 1px solid var(--line);
}
.site-footer > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    max-width: calc(1440px + 2 * var(--gutter));
    margin: 0 auto;
    padding: 24px var(--gutter);
    color: var(--muted);
}
.site-footer a {
    color: var(--accent-text);
    text-decoration: none;
}
.site-footer a:hover {
    text-decoration: underline;
}
.site-footer .version {
    font-family: var(--mono);
}

/* pages */

.hero {
    max-width: 12em;
    font-size: clamp(2.5rem, 5.6vw, 5.25rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -.035em;
}

.page-title {
    font-size: clamp(2.25rem, 3.6vw, 3.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.lede {
    margin-top: 16px;
    font-size: clamp(1.05rem, 1.4vw, 1.3rem);
    color: var(--muted);
}

/* modules */

.search {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 940px;
    margin: clamp(32px, 4vw, 48px) 0 clamp(40px, 5vw, 56px);
    padding: 0 16px 0 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.search::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--faint);
    border-radius: 50%;
}
.search input {
    flex: 1;
    min-width: 0;
    padding: 20px 0;
    font: inherit;
    font-size: 1.15rem;
    color: inherit;
    background: none;
    border: 0;
    outline: 0;
}
.search input::placeholder {
    color: var(--faint);
}
.search input::-webkit-search-cancel-button {
    display: none;
}

.tool-groups {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 48px clamp(24px, 2.8vw, 54px);
}

.group-label {
    padding-bottom: 18px;
    font: 500 .85rem/1 var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--line-strong);
}

.tools {
    margin: 0;
    padding: 0;
    list-style: none;
}
.tools li {
    border-bottom: 1px solid var(--line);
}
.tools a {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 16px;
    padding: 22px 0 24px;
    text-decoration: none;
}
.tools strong {
    font-size: 1.15rem;
    font-weight: 500;
}
.tools a::after {
    content: "→";
    grid-row: 1;
    grid-column: 2;
    color: var(--faint);
    transition: transform .15s, color .15s;
}
.tools small {
    grid-column: 1 / -1;
    font-size: 1rem;
    color: var(--muted);
}
.tools a:hover strong {
    color: var(--accent-text);
}
.tools a:hover::after {
    color: var(--accent-text);
    transform: translateX(3px);
}

.no-results {
    color: var(--muted);
}

.check-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
    margin: 40px 0 48px;
}
.check-form label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
}
.check-form .ip {
    flex: 0 1 500px;
}
.check-form .email {
    flex: 0 1 570px;
}
.check-form input {
    width: 100%;
    padding: 20px 22px;
    font: 1.1rem var(--mono);
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.check-form input::placeholder {
    color: var(--faint);
}
.check-form input:focus {
    outline: 0;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.check-form button {
    padding: 20px 34px;
    font: 500 1.1rem var(--sans);
    color: #fff;
    background: var(--text);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
}
.check-form button:hover {
    background: #000;
}
.check-form button:disabled {
    opacity: .6;
    cursor: progress;
}

.result {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.result + .result {
    margin-top: 16px;
}
.result > * {
    padding: 22px clamp(16px, 2vw, 36px);
}
.result > * + * {
    border-top: 1px solid var(--line);
}

.result-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}
.result-head h2 {
    flex: 1;
    min-width: 16ch;
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.35;
}
.result-meta {
    font: .95rem var(--mono);
    color: var(--muted);
}

.badge {
    flex: none;
    padding: 4px 16px;
    font: 500 1rem/1.5 var(--sans);
    letter-spacing: .02em;
    color: #fff;
    background: var(--neutral);
    border-radius: 6px;
}
[data-status="PASS"] .badge {
    background: var(--pass);
}
[data-status="FAIL"] .badge,
[data-status="PERMERROR"] .badge {
    background: var(--fail);
}
[data-status="SOFTFAIL"] .badge,
[data-status="TEMPERROR"] .badge {
    background: var(--softfail);
}

.record {
    font: 1.05rem/1.6 var(--mono);
    background: var(--surface-sunken);
}

.result p + p {
    margin-top: 8px;
}
.result .record-label {
    margin-bottom: 8px;
    font-size: .95rem;
    color: var(--muted);
}

.trace {
    margin: 0;
    padding: 0 !important;
    list-style: none;
}
.trace li {
    display: grid;
    grid-template-columns: 2.5em minmax(0, 1fr) minmax(0, 1.8fr) auto;
    gap: 4px 24px;
    padding: 18px clamp(16px, 2vw, 36px);
}
.trace li + li {
    border-top: 1px solid var(--line);
}
.trace .step {
    font-family: var(--mono);
    color: var(--faint);
}
.trace code {
    font-size: 1.05rem;
}
.trace .detail {
    color: var(--muted);
}
.trace .outcome {
    font-family: var(--mono);
    text-align: right;
    color: var(--muted);
}
.trace [data-outcome="pass"] {
    color: var(--pass);
}
.trace [data-outcome="fail"],
.trace [data-outcome="error"] {
    color: var(--fail);
}
.trace [data-outcome="softfail"] {
    color: var(--softfail);
}
.trace [data-outcome="neutral"] {
    color: var(--muted);
}

.fix {
    background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.fix code {
    font-size: 1.05rem;
}

/* small screens */

@media (max-width: 1100px) {
    .tool-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tool-groups {
        grid-template-columns: minmax(0, 1fr);
    }
    .check-form > * {
        flex: 1 1 100%;
    }
    .trace li {
        grid-template-columns: 2.5em minmax(0, 1fr) auto;
    }
    .trace code {
        grid-column: 2 / -1;
    }
    .trace .detail {
        grid-column: 2;
        grid-row: 2;
    }
    .trace .outcome {
        grid-column: 3;
        grid-row: 2;
    }
    .breadcrumb span:not([aria-current]) {
        display: none;
    }
    .site-nav a:first-child {
        display: none;
    }
}
