/* IP Yellow design system — tokens and components.
   Source of truth: design/ip-yellow-design-system (dark mode first). */

/* ---------- fonts (self-hosted, variable) ---------- */

@font-face {
    font-family: "Geist";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/geist-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Geist Mono";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/geist-mono-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */

:root {
    color-scheme: dark;

    /* neutrals — dark first */
    --bg-0: #09090B;
    --bg-1: #0E0E11;
    --bg-2: #141418;
    --bg-3: #1A1A20;
    --surface-card: #111114;
    --surface-raised: #17171C;
    --surface-overlay: rgba(19, 19, 23, 0.88);
    --border-1: rgba(255, 255, 255, 0.07);
    --border-2: rgba(255, 255, 255, 0.13);
    --text-1: #F7F7F8;
    --text-2: #9E9EA8;
    --text-3: #62626C;
    --text-inverse: #0B0B0D;

    /* yellow — accent only, never a surface */
    --yellow-300: #FFE14D;
    --yellow-400: #FFD60A;
    --yellow-500: #F0C400;
    --yellow-600: #CBA400;
    --yellow-tint: rgba(255, 214, 10, 0.10);
    --yellow-tint-strong: rgba(255, 214, 10, 0.16);

    /* semantic status (warning is orange, never brand yellow) */
    --green-400: #3DD68C;
    --green-tint: rgba(61, 214, 140, 0.11);
    --orange-400: #FF9F45;
    --orange-tint: rgba(255, 159, 69, 0.11);
    --red-400: #FF5C5C;
    --red-tint: rgba(255, 92, 92, 0.11);
    --blue-400: #5CA8FF;
    --blue-tint: rgba(92, 168, 255, 0.11);

    /* aliases */
    --accent: var(--yellow-400);
    --accent-hover: var(--yellow-300);
    --accent-down: var(--yellow-500);
    --on-accent: var(--text-inverse);
    --focus-ring: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--yellow-500);

    /* type */
    --font-sans: "Geist", "SF Pro Text", -apple-system, "Segoe UI", sans-serif;
    --font-mono: "Geist Mono", "SF Mono", "JetBrains Mono", Menlo, monospace;
    --tracking-wide: 0.06em;
    --data-md: 16px;
    --data-xl: 40px;

    /* spacing / radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 999px;

    /* effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    --card-edge: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    --glow-accent: 0 0 24px rgba(255, 214, 10, 0.12);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 120ms;
    --dur-base: 180ms;
    --dur-slow: 300ms;
}

/* ---------- base ---------- */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg-1);
}

body {
    margin: 0;
    background: var(--bg-1);
    color: var(--text-1);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--text-1);
}

.mono {
    font-family: var(--font-mono);
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- app frame ---------- */

.app {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100dvh;
    margin: 0 auto;
    background: var(--bg-0);
}

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 16px;
    background: var(--surface-overlay);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-1);
}

.site-header__actions {
    display: flex;
    gap: 4px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.icon-btn:hover {
    background: var(--bg-2);
    color: var(--text-1);
}

/* ---------- wordmark ---------- */

.wordmark {
    display: inline-flex;
    align-items: baseline;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.wordmark__ip {
    color: var(--text-1);
}

.wordmark__yellow {
    color: var(--text-2);
}

.wordmark__dot {
    align-self: center;
    width: 0.24em;
    height: 0.24em;
    margin-top: 0.2em;
    margin-left: 0.15em;
    border-radius: var(--radius-full);
    background: var(--yellow-400);
}

/* ---------- page ---------- */

.page {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 20px 16px 0;
}

.page--center {
    align-items: center;
    justify-content: center;
    padding-bottom: 48px;
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.status-row__ms {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.page-head__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-1);
}

.page-head__sub {
    margin: 0;
    font-size: 13px;
    color: var(--text-2);
}

.page-actions {
    padding: 8px 0 24px;
}

/* ---------- privacy ---------- */

.privacy-page {
    gap: 24px;
    max-width: 1040px;
}

.privacy-hero {
    position: relative;
    display: grid;
    gap: 28px;
    overflow: hidden;
    padding: clamp(28px, 6vw, 56px);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 214, 10, 0.15), transparent 28%),
        linear-gradient(145deg, var(--surface-raised), var(--surface-card));
    box-shadow: var(--card-edge), var(--shadow-lg);
}

.privacy-hero::after {
    position: absolute;
    right: -70px;
    bottom: -110px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 214, 10, 0.12);
    border-radius: 50%;
    content: "";
}

.privacy-hero__copy {
    position: relative;
    z-index: 1;
}

.privacy-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.privacy-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid rgba(61, 214, 140, 0.22);
    border-radius: var(--radius-full);
    background: var(--green-tint);
    color: var(--green-400);
}

.privacy-status > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.privacy-hero h1 {
    max-width: 700px;
    margin: 0 0 18px;
    font-size: clamp(36px, 7vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.privacy-hero h1:focus-visible {
    box-shadow: none;
}

.privacy-hero__copy > p:last-child {
    max-width: 640px;
    margin: 0;
    font-size: 16px;
    color: var(--text-2);
}

.privacy-hero__mark {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: end;
    color: var(--yellow-400);
}

.privacy-hero__mark span {
    max-width: 90px;
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.35;
    text-transform: uppercase;
}

.privacy-summary {
    display: grid;
    gap: 10px;
}

.privacy-summary__item {
    display: flex;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    box-shadow: var(--card-edge);
}

.privacy-summary__item > svg {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--yellow-400);
}

.privacy-summary__item strong,
.privacy-summary__item span {
    display: block;
}

.privacy-summary__item strong {
    font-size: 14px;
}

.privacy-summary__item span {
    margin-top: 2px;
    font-size: 13px;
    color: var(--text-2);
}

.privacy-content {
    display: grid;
    gap: 14px;
}

.privacy-section {
    padding: clamp(20px, 3vw, 28px);
}

.privacy-section--wide {
    grid-column: 1 / -1;
}

.privacy-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.privacy-section__icon {
    display: grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(255, 214, 10, 0.2);
    border-radius: var(--radius-md);
    background: var(--yellow-tint);
    color: var(--yellow-400);
}

.privacy-section__head > div > span {
    display: block;
    margin-bottom: 1px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: var(--tracking-wide);
    color: var(--text-3);
}

.privacy-section h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.015em;
}

.privacy-section p,
.privacy-section ul {
    margin: 0;
    color: var(--text-2);
}

.privacy-section p + p,
.privacy-section p + ul,
.privacy-section ul + p {
    margin-top: 12px;
}

.privacy-section__intro {
    max-width: 680px;
    margin-bottom: 18px !important;
}

.privacy-section--wide ul {
    display: grid;
    gap: 0 28px;
    padding-left: 20px;
}

.privacy-section li + li {
    margin-top: 8px;
}

.privacy-section strong,
.privacy-section a {
    color: var(--text-1);
}

.privacy-section code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--yellow-300);
}

.privacy-contact {
    background: linear-gradient(145deg, var(--surface-card), rgba(255, 214, 10, 0.06));
}

.privacy-contact__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 214, 10, 0.22);
    border-radius: var(--radius-md);
    background: var(--yellow-tint);
    text-decoration: none;
    transition: border-color var(--dur-base), background var(--dur-base), transform var(--dur-base);
}

.privacy-contact__link:hover {
    border-color: var(--yellow-400);
    background: var(--yellow-tint-strong);
    transform: translateY(-1px);
}

.privacy-contact__link small,
.privacy-contact__link strong {
    display: block;
}

.privacy-contact__link small {
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.privacy-contact__link strong {
    font-size: 13px;
}

/* ---------- home ---------- */

.home-page {
    width: min(100%, 920px);
}

.home-eyebrow {
    margin: 0 0 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.home-grid {
    display: grid;
    gap: 12px;
    grid-template-areas:
        "ip"
        "details"
        "health";
}

.ip-card {
    grid-area: ip;
}

.details-card {
    grid-area: details;
}

.health-card {
    grid-area: health;
}

.health-head__summary {
    display: none;
}

/* ---------- available cards ---------- */

.available {
    padding: 4px 0 24px;
}

.available__title {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-1);
}

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

.quick-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--surface-card);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-edge);
    color: var(--text-1);
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.quick-link:hover {
    background: var(--surface-raised);
    border-color: var(--border-2);
}

.quick-link__icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--yellow-400);
}

.quick-link__title,
.quick-link__text {
    display: block;
}

.quick-link__title {
    font-size: 14px;
    font-weight: 600;
}

.quick-link__text {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-2);
}

/* ---------- badge ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.badge__dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: currentColor;
}

.badge--green {
    background: var(--green-tint);
    color: var(--green-400);
}

.badge--blue {
    background: var(--blue-tint);
    color: var(--blue-400);
}

/* ---------- card ---------- */

.card {
    padding: 20px;
    background: var(--surface-card);
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-edge);
}

.card--flush {
    padding: 4px 20px;
}

/* ---------- copy field ---------- */

.copyfield {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

.copyfield--lg {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
}

.copyfield__text {
    flex: 1;
    min-width: 0;
}

.copyfield__label {
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.copyfield--lg .copyfield__label {
    margin-bottom: 8px;
}

.copyfield__value {
    font-family: var(--font-mono);
    font-size: var(--data-md);
    font-weight: 600;
    line-height: 1.15;
    word-break: normal;
    overflow-wrap: anywhere;
    color: var(--text-1);
}

.copyfield--lg .copyfield__value {
    font-size: 34px;
    line-height: 1;
    white-space: nowrap;
    overflow-wrap: normal;
}

.copyfield__value--accent {
    color: var(--yellow-400);
    text-shadow: 0 0 24px rgba(255, 214, 10, 0.25);
}

.copyfield__value--empty {
    color: var(--text-3);
    text-shadow: none;
}

.copy-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-2);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.copyfield--lg .copy-btn {
    margin-top: 10px;
}

.copy-btn:hover {
    background: var(--bg-2);
}

.copy-btn__idle,
.copy-btn__done {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.copy-btn__done {
    display: none;
}

.copy-btn.copied {
    background: var(--green-tint);
    border-color: transparent;
    color: var(--green-400);
}

.copy-btn.copied .copy-btn__idle {
    display: none;
}

.copy-btn.copied .copy-btn__done {
    display: inline-flex;
}

/* ---------- stat grid ---------- */

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat {
    min-width: 0;
}

.stat__label {
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.stat__value {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;
    word-break: normal;
    overflow-wrap: anywhere;
    color: var(--text-1);
}

.stat__value--mono {
    font-family: var(--font-mono);
}

.stat__value--empty {
    color: var(--text-3);
}

.stat__sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-3);
}

/* ---------- health card ---------- */

.health-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0 6px;
}

.health-head__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}

.health-head__grade {
    font-family: var(--font-mono);
    font-size: 12px;
}

.health-head__grade--good {
    color: var(--green-400);
}

.health-head__grade--warn {
    color: var(--orange-400);
}

.health-head__grade--bad {
    color: var(--red-400);
}

.health-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
}

.health-row--compact {
    padding: 8px 0;
}

.health-row__glyph {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    border-radius: var(--radius-full);
}

.health-row__glyph--pass {
    background: var(--green-tint);
    color: var(--green-400);
}

.health-row__glyph--warn {
    background: var(--orange-tint);
    color: var(--orange-400);
}

.health-row__glyph--fail {
    background: var(--red-tint);
    color: var(--red-400);
}

.health-row__glyph--info {
    background: var(--blue-tint);
    color: var(--blue-400);
}

.health-row__body {
    flex: 1;
    min-width: 0;
}

.health-row__title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-1);
}

.health-row__detail {
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
}

.health-row__detail--rec {
    color: var(--text-3);
}

.health-cta {
    padding: 8px 0 14px;
}

/* ---------- WAN map ---------- */

.wan-map-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wan-map-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.wan-map-card__title {
    margin: 0;
    font-size: 17px;
    font-weight: 650;
    line-height: 1.25;
    color: var(--text-1);
}

.wan-map {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(92, 168, 255, 0.08), rgba(255, 214, 10, 0.03)),
        var(--bg-1);
}

.wan-map::after {
    position: absolute;
    inset: 0;
    z-index: 2;
    content: "";
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(9, 9, 11, 0.4) 1px, transparent 1px),
        linear-gradient(0deg, rgba(9, 9, 11, 0.4) 1px, transparent 1px);
    background-size: 56px 56px;
    mix-blend-mode: multiply;
}

.wan-map__tiles {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--dur-slow) var(--ease-out);
}

.wan-map--loaded .wan-map__tiles {
    opacity: 0.72;
}

.wan-map__tile-plane {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1280px;
    height: 768px;
    filter: invert(1) hue-rotate(180deg) brightness(0.55) contrast(1.18) saturate(0.7);
}

.wan-map__tile {
    position: absolute;
    width: 256px;
    height: 256px;
}

.wan-map__marker {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 16px;
    height: 16px;
    border: 3px solid var(--bg-0);
    border-radius: var(--radius-full);
    background: var(--yellow-400);
    box-shadow: 0 0 0 8px rgba(255, 214, 10, 0.14), 0 0 28px rgba(255, 214, 10, 0.4);
    transform: translate(-50%, -50%);
}

.wan-map__attribution {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 5;
    padding: 3px 6px;
    border-radius: var(--radius-sm);
    background: rgba(9, 9, 11, 0.78);
    color: var(--text-2);
    font-size: 11px;
    text-decoration: none;
}

.wan-map-meta {
    grid-template-columns: 1fr;
}

.wan-map-note {
    margin: -4px 0 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-3);
}

/* ---------- speed test ---------- */

.speed-test {
    padding: 0;
    overflow: hidden;
}

.speed-test__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--border-1);
}

.speed-metric {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "icon reading";
    align-items: center;
    column-gap: 7px;
    min-width: 0;
    padding: 14px 8px;
}

.speed-metric + .speed-metric {
    border-left: 1px solid var(--border-1);
}

.speed-metric__icon {
    grid-area: icon;
    color: var(--yellow-400);
}

.speed-metric__label {
    grid-area: label;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.speed-metric__reading {
    grid-area: reading;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: 10px;
    white-space: nowrap;
    color: var(--text-2);
}

.speed-metric__reading strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.speed-test__dial-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 310px;
    padding: 28px 16px 22px;
    text-align: center;
}

.speed-test__stage {
    min-height: 18px;
    margin-bottom: 13px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.speed-test__dial {
    position: relative;
    width: 260px;
    aspect-ratio: 1;
    --speed-gauge-color: var(--yellow-400);
}

.speed-test__gauge,
.speed-test__gauge-arc {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.speed-test__gauge {
    --speed-gauge-angle: 0deg;
    --speed-needle-angle: -135deg;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-base) var(--ease-out), visibility var(--dur-base) var(--ease-out);
}

.speed-test--running .speed-test__gauge,
.speed-test--complete .speed-test__gauge {
    opacity: 1;
    visibility: visible;
}

.speed-test--complete .speed-test__dial-wrap,
.speed-test--complete .speed-test__phases {
    display: none;
}

.speed-test__gauge-arc {
    background: conic-gradient(
        from 225deg,
        var(--speed-gauge-color) 0deg var(--speed-gauge-angle),
        var(--bg-3) var(--speed-gauge-angle) 270deg,
        transparent 270deg 360deg);
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--speed-gauge-color) 24%, transparent));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 13px), #000 calc(100% - 12px));
    transition: filter var(--dur-base) var(--ease-out);
}

.speed-test__needle {
    position: absolute;
    z-index: 2;
    top: 54%;
    left: 50%;
    width: 4px;
    height: 35%;
    border-radius: 999px 999px 3px 3px;
    background: linear-gradient(to top, var(--text-3), var(--text-1));
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.16);
    transform: translate(-50%, -100%) rotate(var(--speed-needle-angle));
    transform-origin: 50% 100%;
}

.speed-test__needle-hub {
    position: absolute;
    z-index: 3;
    top: 54%;
    left: 50%;
    width: 15px;
    height: 15px;
    border: 3px solid var(--bg-2);
    border-radius: 50%;
    background: var(--speed-gauge-color);
    box-shadow: 0 0 10px color-mix(in srgb, var(--speed-gauge-color) 35%, transparent);
    transform: translate(-50%, -50%);
}

.speed-test__tick {
    position: absolute;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    color: var(--text-2);
    transform: translate(-50%, -50%);
}

.speed-test__tick--0 { left: 22.4%; top: 81.6%; }
.speed-test__tick--10 { left: 12.9%; top: 66.1%; }
.speed-test__tick--50 { left: 12.2%; top: 44.3%; }
.speed-test__tick--100 { left: 23.3%; top: 25.6%; }
.speed-test__tick--250 { left: 50%; top: 15%; }
.speed-test__tick--500 { left: 76.7%; top: 25.6%; }
.speed-test__tick--1000 { left: 88.9%; top: 51.6%; }
.speed-test__tick--2500 { left: 77.6%; top: 81.6%; }

.speed-test__go {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-1);
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease-out);
}

.speed-test__go:hover {
    color: var(--yellow-300);
}

.speed-test__go:active {
    transform: scale(0.99);
}

.speed-test__go:disabled {
    cursor: default;
}

.speed-test__go-label {
    position: absolute;
    top: 54%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    border: 2px solid var(--yellow-400);
    border-radius: 50%;
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    color: var(--yellow-400);
    box-shadow: 0 0 18px rgba(255, 214, 10, 0.08);
    transform: translate(-50%, -50%);
    transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}

.speed-test__go:hover .speed-test__go-label {
    border-color: var(--yellow-300);
    box-shadow: var(--glow-accent);
    transform: translate(-50%, -50%) scale(1.03);
}

.speed-test__reading {
    position: absolute;
    top: 62%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transform: translateX(-50%);
}

.speed-test [hidden] {
    display: none !important;
}

.speed-test__value {
    font-family: var(--font-mono);
    font-size: 38px;
    font-weight: 700;
    line-height: 1;
    color: var(--text-1);
}

.speed-test__unit {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.2;
    color: var(--text-2);
}

.speed-test--complete .speed-test__go-label {
    top: 89%;
    width: auto;
    height: auto;
    padding: 6px 10px;
    border: 1px solid var(--border-2);
    border-radius: 4px;
    background: var(--bg-2);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: var(--tracking-wide);
    box-shadow: none;
}

.speed-test--complete .speed-test__go:hover .speed-test__go-label {
    border-color: rgba(255, 214, 10, 0.5);
    box-shadow: none;
}

.speed-test__phases {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border-1);
    list-style: none;
}

.speed-test__phases li + li {
    border-left: 1px solid var(--border-1);
}

.speed-test__phases li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 12px 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
    transition: color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}

.speed-test__phases li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--border-2);
    border-radius: 50%;
    font-size: 9px;
}

.speed-test__phases li.is-active {
    background: var(--yellow-tint);
    color: var(--yellow-400);
}

.speed-test__phases li.is-complete {
    color: var(--green-400);
}

.speed-test__latency-details {
    display: grid;
    border-top: 1px solid var(--border-1);
}

.speed-test__latency-details > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    font-size: 11px;
    color: var(--text-3);
}

.speed-test__latency-details > span + span {
    border-top: 1px solid var(--border-1);
}

.speed-test__latency-details strong {
    font-family: var(--font-mono);
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-2);
}

.speed-test__summary {
    padding: 18px 16px;
    border-top: 1px solid rgba(72, 199, 116, 0.28);
    background: color-mix(in srgb, var(--green-400) 7%, var(--bg-2));
    outline: none;
}

.speed-test__summary-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.speed-test__summary-head > strong {
    font-size: 16px;
    color: var(--text-1);
}

.speed-test__summary > p {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-2);
}

.speed-test__recommendation {
    padding-top: 10px;
    border-top: 1px solid var(--border-1);
}

.speed-test__recommendation span {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--yellow-400);
}

.speed-test__recommendation strong {
    font-weight: 500;
    color: var(--text-1);
}

.speed-test__summary .btn {
    margin-top: 16px;
}

.speed-test__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    padding: 13px 16px;
    border-top: 1px solid var(--border-1);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
}

.speed-test__meta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    text-decoration: none;
}

.speed-test__meta a:hover {
    color: var(--text-2);
}

.speed-test__meta .badge__dot {
    color: var(--green-400);
}

.speed-test__error {
    margin: 0;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 159, 69, 0.25);
    background: var(--orange-tint);
    font-size: 13px;
    color: var(--orange-400);
}

/* ---------- forms / tools ---------- */

.tool-card {
    padding: 18px;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-grid {
    display: grid;
    gap: 12px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field__label {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-field input {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--yellow-500);
}

.checkbox-field span {
    display: grid;
    gap: 2px;
}

.checkbox-field strong {
    font-size: 13px;
    color: var(--text-1);
}

.checkbox-field small {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-3);
}

.text-input,
.select-input,
.text-area {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
    background: var(--bg-1);
    color: var(--text-1);
    font: inherit;
}

.text-input {
    font-family: var(--font-mono);
}

.text-area {
    min-height: 220px;
    padding: 11px;
    resize: vertical;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
}

.text-input::placeholder {
    color: var(--text-3);
}

.text-input:focus,
.select-input:focus,
.text-area:focus {
    border-color: var(--yellow-500);
}

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.form-hint,
.validation-summary {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-3);
}

.validation-summary {
    color: var(--orange-400);
}

.validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

.result-card {
    border-color: var(--border-2);
}

.result-card--good {
    border-color: rgba(61, 214, 140, 0.34);
}

.result-card--warn {
    border-color: rgba(255, 159, 69, 0.34);
}

.result-card--bad {
    border-color: rgba(255, 92, 92, 0.34);
}

.result-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.result-card--good .result-status {
    color: var(--green-400);
}

.result-card--warn .result-status {
    color: var(--orange-400);
}

.result-card--bad .result-status {
    color: var(--red-400);
}

.result-target {
    color: var(--text-2);
    overflow-wrap: anywhere;
}

.result-message {
    margin: 14px 0 0;
    font-size: 14px;
    color: var(--text-2);
}

.result-stats {
    margin-top: 18px;
}

.lookup-primary {
    margin-top: 20px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--border-1);
}

.result-notes {
    display: grid;
    gap: 6px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border-1);
}

.result-notes p {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    font-size: 12px;
    color: var(--orange-400);
}

.tool-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-3);
}

.tool-empty div {
    display: grid;
    gap: 3px;
}

.tool-empty strong {
    font-size: 14px;
    color: var(--text-1);
}

.tool-empty span,
.tool-explainer p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-2);
}

.tool-explainer h2 {
    margin: 0 0 10px;
    font-size: 16px;
}

.tool-explainer p {
    margin: 0;
}

.tool-explainer p + p {
    margin-top: 8px;
}

/* ---------- tool catalog ---------- */

.catalog {
    display: grid;
    gap: 28px;
}

.catalog-group__title {
    margin: 0 0 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.catalog-grid {
    display: grid;
    gap: 8px;
}

.catalog-tool {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    background: var(--bg-1);
    color: var(--text-3);
}

.catalog-tool--available {
    color: var(--text-2);
    text-decoration: none;
    transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.catalog-tool--available:hover,
.catalog-tool--available:focus-visible {
    border-color: var(--yellow-500);
    background: var(--bg-2);
}

.catalog-tool__body {
    display: grid;
    gap: 3px;
}

.catalog-tool__body strong {
    font-size: 14px;
    color: var(--text-1);
}

.catalog-tool__body span {
    font-size: 12px;
    line-height: 1.45;
}

.catalog-tool__state {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-3);
}

.catalog-tool--available .catalog-tool__icon,
.catalog-tool--available .catalog-tool__state {
    color: var(--yellow-500);
}

@media (min-width: 720px) {
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- CIDR calculator ---------- */

.cidr-fields {
    display: grid;
    gap: 12px;
}

.optional-label {
    margin-left: 5px;
    color: var(--text-3);
    text-transform: none;
}

.subnet-results {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-1);
}

.subnet-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
}

.subnet-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.subnet-table th,
.subnet-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-1);
}

.subnet-table th {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.subnet-table td {
    color: var(--text-2);
}

.subnet-table tbody tr:last-child td {
    border-bottom: 0;
}

@media (min-width: 720px) {
    .cidr-fields {
        grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.5fr);
    }
}

/* ---------- CGNAT detector ---------- */

.signal-list {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-1);
}

.signal-list h2 {
    margin: 0 0 8px;
    font-size: 14px;
}

.signal-list ul,
.verification-list {
    margin: 0;
    padding-left: 20px;
    color: var(--text-2);
}

.signal-list li,
.verification-list li {
    padding: 3px 0;
    font-size: 13px;
    line-height: 1.55;
}

.result-disclaimer {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-left: 2px solid var(--yellow-500);
    background: var(--yellow-tint);
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-2);
}

/* ---------- DNS lookup ---------- */

.dns-fields {
    display: grid;
    gap: 12px;
}

.dns-table-wrap {
    margin-top: 20px;
    overflow-x: auto;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
}

.dns-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.dns-table th,
.dns-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-1);
    vertical-align: top;
}

.dns-table th {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.dns-table tbody tr:last-child td {
    border-bottom: 0;
}

.dns-answer {
    display: block;
    max-width: 520px;
    white-space: normal;
    overflow-wrap: anywhere;
    color: var(--text-1);
}

@media (min-width: 720px) {
    .dns-fields {
        grid-template-columns: minmax(0, 1fr) 160px;
    }
}

/* ---------- DNS propagation ---------- */

.resolver-grid {
    display: grid;
    gap: 12px;
}

.resolver-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.resolver-card__head h2 {
    margin: 0;
    font-size: 16px;
}

.resolver-card__head div > span,
.resolver-card > p,
.resolver-meta {
    font-size: 12px;
    color: var(--text-2);
}

.dnssec-record-grid {
    margin-top: 20px;
}

.finding-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.finding-severity {
    min-width: 54px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--text-3);
}

.finding-severity--warning {
    color: var(--orange-400);
}

.finding-severity--error {
    color: var(--red-400);
}

.monitor-list {
    display: grid;
    gap: 16px;
}

.resolver-card > p {
    margin: 14px 0 0;
}

.resolver-state {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--yellow-400);
    text-transform: uppercase;
}

.resolver-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
}

.trace-grid {
    display: grid;
    gap: 12px;
}

.trace-card > p {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-2);
}

.trace-path {
    display: grid;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.trace-hop {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 5px 0;
}

.trace-hop:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 34px;
    bottom: -14px;
    left: 13px;
    width: 1px;
    background: var(--border-2);
}

.trace-hop__number {
    position: relative;
    z-index: 1;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--border-2);
    border-radius: 50%;
    background: var(--surface-1);
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-2);
}

.trace-hop--timeout .trace-hop__number,
.trace-hop--hidden .trace-hop__number {
    border-style: dashed;
    color: var(--text-3);
}

.trace-hop__identity {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.trace-hop__identity strong,
.trace-hop__identity code {
    overflow-wrap: anywhere;
}

.trace-hop__identity strong {
    font-size: 12px;
    color: var(--text-1);
}

.trace-hop__identity code,
.trace-hop__timing {
    font-size: 11px;
    color: var(--text-3);
}

.trace-hop__timing {
    font-family: var(--font-mono);
    text-align: right;
}

@media (max-width: 620px) {
    .trace-hop {
        grid-template-columns: 28px minmax(0, 1fr);
    }

    .trace-hop__timing {
        grid-column: 2;
        text-align: left;
    }
}

.resolver-answers {
    display: grid;
    gap: 6px;
    margin: 14px 0 0;
    padding: 12px 14px;
    list-style: none;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-md);
    background: var(--bg-0);
}

.resolver-answers code {
    overflow-wrap: anywhere;
}

@media (min-width: 720px) {
    .resolver-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- my IP details ---------- */

.my-ip-addresses .copyfield + .copyfield {
    border-top: 1px solid var(--border-1);
}

.my-ip-note,
.detail-section__note {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-3);
}

.detail-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.detail-section__head h2 {
    margin: 3px 0 0;
    font-size: 17px;
}

.detail-section .stat-grid {
    gap: 18px;
}

.my-ip-user-agent {
    margin-top: 18px;
    padding-top: 6px;
    border-top: 1px solid var(--border-1);
}

.related-tools {
    display: grid;
    gap: 12px;
}

@media (min-width: 720px) {
    .my-ip-page {
        width: min(100%, 900px);
    }

    .detail-section .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.btn--sm {
    height: 32px;
    padding: 6px 12px;
    font-size: 13px;
}

.btn--primary {
    background: var(--yellow-400);
    border: 1px solid transparent;
    color: var(--on-accent);
}

.btn--primary:hover {
    background: var(--yellow-300);
}

.btn--secondary {
    background: var(--bg-2);
    border: 1px solid var(--border-1);
    color: var(--text-1);
}

.btn--secondary:hover {
    background: var(--bg-3);
    border-color: var(--border-2);
}

.btn--full {
    width: 100%;
}

/* ---------- responsive layout ---------- */

@media (max-width: 719px) {
    .copyfield--wrap.copyfield--lg,
    .copyfield--wrap .copyfield__text {
        width: 100%;
        max-width: 100%;
    }

    .copyfield--wrap.copyfield--lg .copyfield__value {
        max-width: 100%;
        font-size: 20px;
        line-height: 1.3;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (min-width: 720px) {
    .site-header {
        padding-inline: max(24px, calc((100vw - 1120px) / 2 + 24px));
    }

    .page {
        gap: 16px;
        padding: 32px 24px 0;
    }

    .home-page {
        gap: 18px;
        padding-top: 36px;
    }

    .home-grid {
        gap: 16px;
    }

    .card {
        padding: 24px;
    }

    .card--flush {
        padding: 8px 24px;
    }

    .copyfield--lg {
        margin-bottom: 24px;
    }

    .copyfield--lg .copyfield__value {
        font-size: 42px;
        line-height: 1;
    }

    .stat-grid {
        gap: 18px 24px;
    }

    .tool-card {
        padding: 24px;
    }

    .field-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(110px, 0.45fr) minmax(110px, 0.45fr) minmax(130px, 0.65fr);
    }

    .form-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .result-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .wan-map {
        min-height: 300px;
    }

    .speed-test {
        padding: 0;
    }

    .speed-test__dial-wrap {
        min-height: 360px;
    }

    .speed-test__dial {
        width: 300px;
    }

    .speed-metric {
        padding: 17px 20px;
    }

    .speed-metric__label {
        font-size: 10px;
    }

    .speed-metric__reading {
        font-size: 11px;
    }

    .speed-metric__reading strong {
        font-size: 15px;
    }

    .speed-test__latency-details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .speed-test__latency-details > span {
        justify-content: center;
    }

    .speed-test__latency-details > span + span {
        border-top: 0;
        border-left: 1px solid var(--border-1);
    }

}

@media (min-width: 900px) {
    .home-page {
        width: min(100%, 1120px);
        gap: 24px;
        padding-top: 56px;
    }

    .status-row {
        margin-bottom: -4px;
    }

    .home-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
        grid-template-areas:
            "ip health"
            "details health";
        grid-template-rows: auto 1fr;
        gap: 0 24px;
        align-items: stretch;
    }

    .ip-card {
        padding: 28px 28px 24px;
        border-bottom: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        box-shadow: none;
    }

    .details-card {
        padding: 20px 28px 28px;
        border-top: 1px solid var(--border-1);
        border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    }

    .ip-card .copyfield--lg .copyfield__value {
        font-size: 46px;
    }

    .details-card .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .health-card {
        display: flex;
        flex-direction: column;
        align-self: start;
        padding: 20px 24px;
        border-radius: var(--radius-xl);
    }

    .health-head {
        align-items: flex-start;
        padding-block: 2px 10px;
    }

    .health-head__summary {
        display: block;
        margin-top: 5px;
        font-size: 13px;
        font-weight: 400;
        color: var(--text-2);
    }

    .health-card .health-row {
        padding-block: 11px;
    }

    .health-cta {
        margin-top: 12px;
    }

    .available__links {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .wan-map-card {
        margin-top: 8px;
    }

}

@media (min-width: 1200px) {
    .ip-card .copyfield--lg .copyfield__value {
        font-size: 48px;
    }
}

/* ---------- local JWT decoder ---------- */

[hidden] {
    display: none !important;
}

.jwt-input {
    min-height: 148px;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

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

.jwt-actions .form-hint {
    flex-basis: 100%;
}

.jwt-result {
    display: grid;
    gap: 20px;
}

.jwt-summary .stat__value {
    overflow-wrap: anywhere;
}

.jwt-json-grid {
    display: grid;
    gap: 16px;
}

.jwt-json {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-1);
    border-radius: var(--radius-lg);
    background: var(--bg-0);
}

.jwt-json__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 8px 12px 8px 16px;
    border-bottom: 1px solid var(--border-1);
}

.jwt-json__head h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
}

.jwt-json pre {
    max-height: 420px;
    margin: 0;
    padding: 16px;
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--text-1);
}

.jwt-claims dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.jwt-claims dl > div {
    display: grid;
    gap: 4px;
    padding: 12px 0;
    border-top: 1px solid var(--border-1);
}

.jwt-claims dt {
    font-size: 11px;
    color: var(--text-3);
}

.jwt-claims dd {
    display: grid;
    gap: 3px;
    min-width: 0;
    margin: 0;
}

.jwt-claims dd strong {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    overflow-wrap: anywhere;
    color: var(--text-1);
}

.jwt-claims dd span {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-3);
}

@media (min-width: 760px) {
    .jwt-json-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jwt-claims dl > div {
        grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
        align-items: start;
        gap: 20px;
    }
}

/* ---------- footer ---------- */

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--border-1);
}

.site-footer__links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-footer__links a {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-2);
    text-decoration: none;
}

.site-footer__links a:hover {
    color: var(--text-1);
}

@media (max-width: 599px) {
    .site-footer {
        flex-wrap: wrap;
        gap: 10px 16px;
    }

    .site-footer__timing {
        width: 100%;
    }
}

@media (min-width: 720px) {
    .privacy-hero {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .privacy-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .privacy-section--wide ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 599px) {
    .privacy-hero__meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .privacy-hero__mark {
        display: none;
    }
}

.site-footer__ms {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-3);
}

@media (min-width: 720px) {
    .site-footer {
        padding-inline: max(24px, calc((100vw - 1120px) / 2 + 24px));
    }
}

/* ---------- empty states (404 / error) ---------- */

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.empty__code {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: var(--tracking-wide);
    color: var(--text-3);
}

.empty__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-1);
}

.empty__sub {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--text-2);
}

/* ---------- page-load motion: single staggered fade + 4px rise ---------- */

@media (prefers-reduced-motion: no-preference) {
    .page > * {
        animation: rise var(--dur-slow) var(--ease-out) backwards;
    }

    .page > :nth-child(2) { animation-delay: 30ms; }
    .page > :nth-child(3) { animation-delay: 60ms; }
    .page > :nth-child(4) { animation-delay: 90ms; }
    .page > :nth-child(5) { animation-delay: 120ms; }
    .page > :nth-child(6) { animation-delay: 150ms; }

    @keyframes rise {
        from {
            opacity: 0;
            transform: translateY(4px);
        }

        to {
            opacity: 1;
            transform: none;
        }
    }
}

/* ---------- blazor error UI ---------- */

.blazor-error-boundary {
    padding: 16px;
    border: 1px solid var(--red-400);
    border-radius: var(--radius-lg);
    background: var(--red-tint);
    color: var(--text-1);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}
