:root {
  color-scheme: light;
  --ink: #17243a;
  --soft-ink: #4b5b73;
  --surface: #fff;
  --page: #f4f6fa;
  --line: #d8e0eb;
  --navy: #14223a;
  --blue: #2b49cc;
  --blue-dark: #1b37aa;
  --blue-tint: #edf1ff;
  --green: #08634d;
  --green-tint: #e4f6ee;
  --warn: #804b09;
  --warn-tint: #fff1db;
  --red: #a62c39;
  --red-tint: #fcebed;
  --neutral: #455873;
  --neutral-tint: #eef2f7;
  --shadow: 0 3px 14px #162d5210;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
  background: var(--page);
  color: var(--ink);
  font: 100%/1.5 var(--sans);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 18rem; }
button, input, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled, button[aria-disabled="true"] { cursor: wait; opacity: .63; }
a { color: inherit; }
:focus-visible { outline: 3px solid #6e8cff; outline-offset: 3px; }
.visually-hidden { position: absolute; clip-path: inset(50%); overflow: hidden; inline-size: 1px; block-size: 1px; white-space: nowrap; }
.skip-link { position: fixed; z-index: 5; inset: .7rem auto auto .7rem; border-radius: 8px; background: white; color: var(--ink); padding: .55rem .85rem; }
.skip-link:not(:focus) { clip-path: inset(50%); inline-size: 1px; block-size: 1px; overflow: hidden; padding: 0; white-space: nowrap; }
h1, h2, h3, p, dl, pre { margin: 0; }
.muted { color: var(--soft-ink); }
.mono { font-family: var(--mono); overflow-wrap: anywhere; }
.frame { width: min(76rem, calc(100% - 3rem)); margin-inline: auto; }
.panel { border: 1px solid var(--line); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); min-width: 0; }

.topbar { background: var(--navy); color: #f2f6ff; }
.topbar-inner { min-height: 4.25rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-size: 1.17rem; font-weight: 750; letter-spacing: -.035em; }
.brand-mark { width: 2.12rem; height: 2.12rem; border-radius: 9px; background: #4264f6; display: grid; place-items: center; }
.envelope { display: block; position: relative; border: 1.5px solid currentColor; border-radius: 3px; width: 1.14rem; height: .81rem; overflow: hidden; }
.envelope::after { content: ""; position: absolute; left: 50%; top: -.4rem; width: .72rem; height: .72rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateX(-50%) rotate(45deg); }
.navigation { display: flex; align-items: center; gap: .3rem; }
.topbar button { border: 0; border-radius: 8px; padding: .5rem .85rem; background: transparent; color: #c9d5e9; font-size: .9rem; font-weight: 650; }
.topbar button:hover { background: #253655; color: white; }
.topbar button[aria-current] { background: #2b3d64; color: white; }
.logout { margin-left: auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding-block: 2.25rem 1.45rem; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.65rem); line-height: 1.12; letter-spacing: -.04em; }
.page-head p, .login-panel p { margin-top: .55rem; }
h2 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 1rem; line-height: 1.35; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .45rem; border: 1px solid var(--line); background: white; color: var(--ink); min-height: 2.55rem; padding: .48rem .85rem; border-radius: 9px; font-size: .9rem; font-weight: 680; line-height: 1.25; text-decoration: none; }
.button:hover { border-color: #92a4d8; background: #f7f9ff; }
.primary { background: var(--blue); color: white; border-color: var(--blue); }
.primary:not(:disabled):hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.primary span { font-size: 1.25rem; line-height: 1; font-weight: 450; }
.message { color: var(--red); font-size: .9rem; }
.message[data-tone="hint"] { color: var(--soft-ink); }
.message:empty { display: none; }
#tester-status, #dns-status { margin-bottom: .8rem; }
label { display: block; font-size: .9rem; font-weight: 680; margin-bottom: .35rem; }
label small { font-size: .83rem; color: var(--soft-ink); font-weight: 450; margin-left: .22rem; }
input, select { width: 100%; border: 1px solid #c8d4e4; border-radius: 9px; background: #fff; padding: .57rem .7rem; min-height: 2.65rem; }
input::placeholder { color: #586c87; }
select { appearance: none; padding-right: 2rem; background: linear-gradient(45deg, transparent 51%, #557099 51%) calc(100% - 16px) 51% / 5px 5px no-repeat, linear-gradient(135deg, #557099 51%, transparent 51%) calc(100% - 11px) 51% / 5px 5px no-repeat, #fff; }
.login-panel { padding: 1.8rem; max-width: 30rem; margin: 8vh auto; }
.login-panel h1 { font-size: 1.85rem; }
.login-panel form { margin-top: 1.25rem; }
.login-panel .button { margin-top: .85rem; width: 100%; }

.workbench { display: grid; grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); gap: 1.1rem; align-items: start; padding-bottom: 2.5rem; }
.rail { padding: 1.15rem; }
.rail h2 { margin-bottom: .8rem; }
.search { position: relative; }
.search::before { position: absolute; content: ""; width: .73rem; height: .73rem; border: 1.6px solid #637697; border-radius: 50%; left: .82rem; top: .82rem; pointer-events: none; }
.search::after { position: absolute; content: ""; height: 1.5px; width: .39rem; background: #637697; transform: rotate(47deg); left: 1.35rem; top: 1.48rem; pointer-events: none; }
.search input { padding-left: 2.04rem; font-size: .93rem; }
.mailboxes { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; max-height: 35rem; overflow: auto; padding: 3px; margin-inline: -3px; }
.mailbox { width: 100%; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: .35rem; padding: .64rem .7rem; color: var(--ink); background: #fafbfd; border: 1px solid var(--line); border-radius: 10px; }
.mailbox:hover { border-color: #9aade0; }
.mailbox[aria-pressed="true"] { border-color: #8198f1; background: var(--blue-tint); }
.mailbox .mono { font-size: .86rem; font-weight: 650; word-break: break-all; }
.mailbox-meta { display: flex; gap: .35rem; align-items: center; color: var(--soft-ink); font-size: .82rem; }
.dot { width: .5rem; height: .5rem; background: #8794aa; border-radius: 50%; flex: none; }
.dot.received { background: #128268; }
.rail-empty { font-size: .9rem; margin-top: .55rem; }
.inspector { min-height: 22rem; overflow: clip; }
.placeholder { min-height: inherit; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .65rem; padding: 2.3rem 1.25rem; }
.placeholder .empty-icon { width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: 14px; background: var(--blue-tint); color: var(--blue); margin-bottom: .25rem; }
.placeholder .envelope { transform: scale(1.3); }
.address-strip { background: #eef3ff; border-bottom: 1px solid #dce5f7; padding: 1rem 1.35rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.address-info { min-width: 0; }
.address-info span { display: block; }
.address-info .label { font-weight: 650; font-size: .88rem; color: var(--blue-dark); }
.address-info .mono { margin-top: .12rem; font-size: clamp(.9rem, 2vw, 1.12rem); font-weight: 720; }
.address-info .small { color: var(--soft-ink); font-size: .8rem; margin-top: .18rem; }
.report { padding: 1.3rem; display: flex; flex-direction: column; gap: 1rem; }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: .45rem .8rem; flex-wrap: wrap; }
.score { color: var(--blue-dark); background: var(--blue-tint); border-radius: 8px; padding: .38rem .62rem; font-size: .87rem; font-weight: 650; }
.waiting { padding-block: 2.15rem; align-items: flex-start; }
.waiting h2 { display: flex; align-items: center; gap: .55rem; }
.waiting .dot { background: #536ee4; box-shadow: 0 0 0 4px #e2e9ff; }
.message-select { display: grid; gap: .28rem; align-self: start; max-width: 100%; width: 28rem; }
.message-select label { margin: 0; }
.facts { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.fact { min-width: 0; display: grid; grid-template-columns: minmax(7rem, 25%) minmax(0, 1fr); gap: .4rem .95rem; padding: .75rem .9rem; align-items: baseline; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact dt, .source-item dt { font-weight: 680; font-size: .9rem; color: var(--soft-ink); }
.fact dt small, .source-item dd small { display: block; font: .82rem/1.4 var(--sans); color: var(--soft-ink); }
.fact dd, .source-item dd { margin: 0; min-width: 0; }
.from { font-size: 1.06rem; font-weight: 730; }
.source { border: 1px solid var(--line); border-radius: 12px; padding: .85rem .9rem; }
.source h3 { margin-bottom: .55rem; }
.source-grid { display: grid; grid-template-columns: 1fr 1fr 1.65fr; gap: .65rem 1rem; }
.source-item { min-width: 0; }
.source-item dd { font-weight: 630; margin-top: .16rem; overflow-wrap: anywhere; }

.auth-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .62rem; }
.auth-section h3 { margin-bottom: .55rem; }
.auth-tile { border: 1px solid var(--line); background: #f8fafd; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem; padding: .65rem .75rem; }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: .23rem; }
.badge { background: var(--neutral-tint); color: var(--neutral); font: 650 .84rem/1.15 var(--sans); border-radius: 7px; padding: .3rem .44rem; overflow-wrap: anywhere; }
.badge.good { background: var(--green-tint); color: var(--green); }
.badge.warn { background: var(--warn-tint); color: var(--warn); }
.badge.bad { background: var(--red-tint); color: var(--red); }
.disclosure { min-width: 0; border-radius: 10px; border: 1px solid var(--line); background: white; }
.disclosure > summary { cursor: pointer; font-size: .95rem; font-weight: 670; padding: .67rem .82rem; }
.disclosure > summary:hover { background: #f6f8fc; border-radius: 9px; }
.disclosure-body { padding: 0 .82rem .85rem; }
.disclosure.headers { border-color: #a1b3f6; background: #f0f3ff; }
.disclosure.headers > summary { color: var(--blue-dark); }
.disclosure.headers > summary:hover { background: #e5ebff; }
.disclosure.headers .disclosure-body { padding-top: .22rem; }
.scroll-text { padding: .7rem .8rem; border-radius: 8px; border: 1px solid var(--line); background: #fbfcfe; font: .85rem/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; max-height: 19rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.disclosure-body .actions { margin-block: .3rem .55rem; }
.diagnostics { font-size: .9rem; color: var(--soft-ink); }
.diagnostics p + p { margin-top: .55rem; }
.clip-buffer { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.dns-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .85rem; padding: 1.15rem; margin-bottom: .8rem; }
.dns-form > div { flex: 1 1 10rem; min-width: 0; }
.dns-form > div:first-child { flex: 2 1 16rem; }
.dns-form > .dns-form-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: .5rem; }
.dns-form-actions [aria-pressed="true"] { background: var(--blue-tint); border-color: #8198f1; color: var(--blue-dark); }
.watch-note { margin-bottom: .65rem; font-size: .9rem; }
.dns-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-bottom: .85rem; }
.dns-card { padding: 1.05rem; display: grid; gap: .55rem; align-content: start; }
.dns-name { display: flex; justify-content: space-between; align-items: center; gap: .35rem; }
.dns-mail-values { display: grid; gap: .5rem; min-inline-size: 0; }
#dns-result { padding-bottom: 2rem; }
.report-dns { display: grid; min-width: 0; gap: .65rem; }
.dns-panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem .85rem; }
.dns-time { display: block; margin-top: .12rem; font-size: .82rem; }
.dns-checks { display: grid; gap: .45rem; min-width: 0; }
.dns-check { min-width: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.dns-check.warn { border-inline-start: 3px solid #c78126; }
.dns-check.bad { border-inline-start: 3px solid #c24755; }
.dns-check > summary { display: flex; align-items: center; gap: .65rem; padding: .61rem .7rem; cursor: pointer; border-radius: 9px; }
.dns-check > summary:hover { background: #f6f8fc; }
.dns-check > summary::-webkit-details-marker { display: none; }
.dns-check > summary::before {
  content: ""; border: solid var(--soft-ink); border-width: 0 1.5px 1.5px 0;
  width: .41rem; height: .41rem; rotate: -45deg; flex: none;
}
.dns-check[open] > summary::before { rotate: 45deg; }
.dns-check-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: .2rem .65rem; min-width: 0; }
.dns-check-name > .mono { min-width: 0; font-size: .82rem; }
.dns-check > summary > .badge { margin-inline-start: auto; max-width: 62%; }
.dns-check-detail { padding: 0 .78rem .78rem; font-size: .91rem; }
.dns-check-detail .scroll-text { margin-top: .45rem; }
.dns-comparison { display: grid; gap: .9rem; padding: clamp(.75rem, 2.3vw, 1.25rem); container: dns-results / inline-size; }
.dns-comparison h2 { overflow-wrap: anywhere; }
.dns-answer-control { min-inline-size: 8.6rem; }
.dns-answer-control label { margin-block-end: .15rem; }
.dns-records { display: grid; gap: .55rem; min-inline-size: 0; padding: .85rem; border: 1px solid #ccd8f3; border-radius: 10px; background: #f1f5ff; }
.dns-records h3 { font-size: 1.12rem; }
.dns-records-status { font-size: .9rem; }
.dns-record-groups { min-inline-size: 0; max-block-size: 24rem; overflow: auto; }
.dns-record-group { display: grid; gap: .45rem; }
.dns-record-group + .dns-record-group { margin-block-start: .75rem; padding-block-start: .75rem; border-block-start: 1px solid #ccd8f3; }
.dns-record-group dt, .dns-record-support { font-size: .84rem; }
.dns-record-group dd { margin: 0; min-inline-size: 0; }
.dns-record-owner { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; }
.dns-record-list { list-style: none; margin: .2rem 0 0; padding: 0; }
.dns-record-row { display: grid; gap: .12rem .85rem; align-items: baseline; padding: .34rem 0; border-block-start: 1px solid #d8e2f6; }
.dns-record-row:last-child { padding-block-end: 0; }
.dns-record-support { font-variant-numeric: tabular-nums; }
.dns-record-value { display: block; white-space: pre-wrap; font-size: .96rem; font-weight: 650; }
.dns-summary { padding: .8rem; border-radius: 10px; border: 1px solid var(--line); background: #f5f8fd; }
#dns-progress-label { color: var(--soft-ink); font-size: .9rem; font-variant-numeric: tabular-nums; }
.dns-progress { display: block; inline-size: 100%; block-size: .64rem; margin-block: .45rem .65rem; accent-color: var(--blue); }
.dns-consensus { font-size: 1.1rem; font-weight: 720; }
.dns-summary-count { font-size: .89rem; margin-block-start: .18rem; }
.resolver-table-scroll { min-inline-size: 0; overflow: auto; max-block-size: min(52vh, 30rem); border: 1px solid var(--line); border-radius: 10px; }
.resolver-table { inline-size: 100%; min-inline-size: 43rem; border-collapse: separate; border-spacing: 0; }
.resolver-table caption { padding: .55rem .72rem; text-align: start; font-size: .95rem; font-weight: 690; }
.resolver-table :is(th, td) { padding: .46rem .64rem; border-block-end: 1px solid var(--line); text-align: start; font-size: .88rem; }
.resolver-table thead { position: sticky; inset-block-start: 0; z-index: 2; background: #edf2fa; }
.resolver-table thead th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; background: #edf2fa; }
.resolver-table tbody th { position: sticky; inset-inline-start: 0; z-index: 1; background: #fff; }
.resolver-table tr.chosen :is(th,td) { background: #eef3ff; }
.resolver-table tr:last-child :is(th,td) { border-block-end: 0; }
.resolver-table :is(th,td):nth-child(2) { white-space: nowrap; }
.resolver-name { border: 0; background: transparent; color: var(--blue-dark); padding: .16rem 0; min-block-size: 24px; font-weight: 680; text-align: start; }
.resolver-name:hover { text-decoration: underline; }
.resolver-ip { display: block; font-size: .78rem; }
.resolver-table .numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.answer-preview { display: block; max-inline-size: 14rem; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.resolver-detail { display: grid; gap: .45rem; min-inline-size: 0; border: 1px solid var(--line); border-radius: 10px; padding: .75rem; }
.resolver-detail > p { font-size: .89rem; overflow-wrap: anywhere; }

@container dns-results (min-width: 30rem) {
  .dns-record-row { grid-template-columns: minmax(0, 1fr) auto; }
}

@container dns-results (min-width: 43rem) {
  .answer-preview { max-inline-size: 19rem; }
}

@media (max-width: 52rem) {
  .workbench { grid-template-columns: minmax(12rem, 15.5rem) minmax(0, 1fr); gap: .75rem; }
  .frame { width: calc(100% - 2rem); }
  .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-item:last-child { grid-column: 1 / -1; }
  .report { padding: 1rem; }
}
@media (max-width: 39rem) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .dns-form { flex-direction: column; align-items: stretch; }
  .dns-form > div, .dns-form > div:first-child { flex: auto; }
  .mailboxes { max-height: 13rem; }
  .page-head { align-items: flex-start; flex-direction: column; padding-top: 1.65rem; }
  .topbar-inner { gap: .45rem 1rem; flex-wrap: wrap; padding-block: .6rem; }
  .navigation { flex-basis: 100%; order: 2; }
  .frame { width: calc(100% - 1.3rem); }
}

@supports (container-type: inline-size) {
  .inspector { container: mail-report / inline-size; }
  .source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-item:last-child { grid-column: 1 / -1; }
  @container mail-report (min-width: 34rem) {
    .source-grid { grid-template-columns: 1fr 1fr 1.65fr; }
    .source-item:last-child { grid-column: auto; }
  }
}
@media (max-width: 28rem) {
  .dns-grid { grid-template-columns: minmax(0, 1fr); }
  .fact { grid-template-columns: minmax(0, 1fr); }
  .auth-tile { flex-direction: column; align-items: flex-start; padding-inline: .5rem; }
  .address-strip { padding-inline: 1rem; }
  .address-info .mono { word-break: break-all; }
  .badge { font-size: .76rem; }
}
