:root {
    --page: #f7f9fc;
    --surface: #ffffff;
    --surface-soft: #f1f5fa;
    --ink: #172033;
    --text: #465269;
    --muted: #748096;
    --line: #d8e0ea;
    --line-strong: #bbc8d8;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --a: #16966b;
    --b: #d58a18;
    --c: #d64646;
    --unknown: #778397;
    --shadow: 0 18px 50px rgba(25, 43, 75, .08);
}

html[data-theme="dark"] {
    --page: #101827;
    --surface: #172235;
    --surface-soft: #1d2a3e;
    --ink: #edf3fb;
    --text: #bdc9d9;
    --muted: #8997aa;
    --line: #324056;
    --line-strong: #46566d;
    --accent: #4f82f5;
    --accent-hover: #6d96f5;
    --shadow: 0 18px 50px rgba(0, 0, 0, .2);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    transition: color .2s ease, background-color .2s ease;
}
button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(37, 99, 235, .3); outline-offset: 2px; }
.studio-container { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3000; padding: .75rem 1rem; color: var(--ink); background: var(--surface); }

.studio-header {
    position: relative;
    z-index: 10;
    min-height: 60px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; min-height: 60px; align-items: center; gap: 1.8rem; }
.studio-brand { display: flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.studio-brand:hover { color: var(--ink); }
.studio-brand strong { font-size: .98rem; font-weight: 780; letter-spacing: -.02em; }
.brand-icon { display: grid; width: 1.35rem; height: 1.35rem; place-items: center; color: var(--accent); }
.brand-icon svg { width: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.brand-byline { padding-left: .55rem; color: var(--muted); border-left: 1px solid var(--line-strong); font-size: .79rem; }
.main-nav { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.main-nav a { color: var(--text); text-decoration: none; font-size: .87rem; }
.main-nav a:hover { color: var(--accent); }
.header-controls { display: flex; align-items: center; gap: .55rem; margin-left: auto; }
.mode-toggle { display: flex; padding: 2px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: .45rem; }
.mode-button, .theme-button { min-height: 34px; color: var(--text); background: transparent; border: 0; font-size: .8rem; }
.mode-button { padding: .35rem .75rem; border-radius: .32rem; }
.mode-button.active { color: #fff; background: var(--accent); box-shadow: 0 1px 3px rgba(37, 99, 235, .25); }
.theme-button { display: flex; align-items: center; gap: .38rem; padding: .35rem .72rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: .45rem; }
.theme-icon { width: 1rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }

.tool-hero { padding: clamp(3.5rem, 7vw, 6.5rem) 0 0; }
.hero-copy { max-width: 810px; margin: 0 auto 2.5rem; text-align: center; }
.studio-kicker { margin: 0 0 .65rem; color: var(--accent); font-size: .74rem; font-weight: 800; letter-spacing: .12em; }
.error-title { color: var(--ink); }
.hero-copy h1 { margin: 0; color: var(--ink); font-size: clamp(2.45rem, 6vw, 4.15rem); font-weight: 780; letter-spacing: -.05em; line-height: 1.02; }
.hero-copy > p:last-child { max-width: 710px; margin: 1.15rem auto 0; color: var(--text); font-size: clamp(1rem, 2vw, 1.15rem); }

.checker-panel {
    position: relative;
    max-width: 1010px;
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 1.15rem;
    box-shadow: var(--shadow);
}
.checker-panel::before {
    position: absolute;
    right: 1rem;
    left: 1rem;
    top: -1px;
    height: 2px;
    content: "";
    background: linear-gradient(90deg, transparent, var(--accent), #28b6a2, transparent);
}
.field-label { display: block; margin: 0 0 .45rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.checker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .75rem; }
.domain-input {
    width: 100%;
    min-height: 58px;
    padding: 0 1rem;
    color: var(--ink);
    background: var(--surface-soft);
    border: 1px solid var(--line-strong);
    border-radius: .65rem;
    font-size: 1.05rem;
}
.domain-input::placeholder, .selector-field input::placeholder { color: var(--muted); opacity: .82; }
.domain-input:focus, .selector-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235,.12); outline: 0; }
.run-button {
    min-width: 175px;
    min-height: 58px;
    padding: 0 1.35rem;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: .65rem;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
    font-weight: 720;
}
.run-button:hover:not(:disabled) { background: var(--accent-hover); transform: translateY(-1px); }
.run-button:disabled { cursor: not-allowed; opacity: .55; }
.checker-options { display: flex; min-height: 38px; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .65rem; color: var(--muted); font-size: .82rem; }
.selector-field { display: flex; align-items: center; gap: .5rem; }
.selector-field label { color: var(--text); white-space: nowrap; }
.selector-field input { width: 140px; height: 34px; padding: 0 .65rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: .4rem; }
.captcha-row { margin-top: .75rem; }
.inline-warning, .tool-error { padding: .85rem 1rem; border-radius: .5rem; font-size: .9rem; }
.inline-warning { margin-top: .8rem; color: #74500a; background: #fff5d9; border: 1px solid #f2d78f; }
.tool-error { max-width: 1010px; margin: 1rem auto 0; color: #9e2929; background: #fff0f0; border: 1px solid #efb5b5; }
html[data-theme="dark"] .inline-warning { color: #f2d78f; background: #342b18; border-color: #68582d; }
html[data-theme="dark"] .tool-error { color: #ffb8b8; background: #392326; border-color: #724148; }

.scan-status { display: flex; max-width: 1010px; align-items: center; gap: .9rem; margin: 1rem auto 0; padding: .85rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: .6rem; }
.scan-status strong, .scan-status span { display: block; }
.scan-status strong { color: var(--ink); font-size: .9rem; }
.scan-status #status-detail { color: var(--muted); font-size: .8rem; }
.scan-pulse { width: .75rem; height: .75rem; flex: 0 0 auto; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 0 rgba(37,99,235,.45); animation: pulse 1.45s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(37,99,235,0); } 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); } }

.empty-report { display: flex; min-height: 150px; max-width: 1010px; flex-direction: column; align-items: center; justify-content: center; margin: 1.35rem auto 0; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: .85rem; text-align: center; }
.empty-report strong { margin-top: .25rem; color: var(--ink); }
.empty-report p { margin: .2rem 1rem 0; font-size: .88rem; }
.empty-icon { width: 1.8rem; color: var(--muted); }
.empty-icon svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }

.report { max-width: 1010px; margin: 3.2rem auto 0; }
.report-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.report-heading h2 { margin: 0; color: var(--ink); font-size: clamp(1.8rem, 4vw, 2.55rem); font-weight: 760; letter-spacing: -.035em; overflow-wrap: anywhere; }
.report-time { margin: .25rem 0 0; color: var(--muted); font-size: .82rem; }
.quiet-button { min-height: 40px; padding: .45rem .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: .45rem; font-size: .85rem; }
.quiet-button:hover { color: var(--accent); border-color: var(--accent); }
.scorecard { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.3rem; margin-top: 1.25rem; padding: 1.3rem 1.45rem; background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; }
.score-grade { display: grid; width: 68px; height: 68px; place-items: center; color: #fff; border-radius: .65rem; font-size: 2.6rem; font-weight: 820; line-height: 1; }
.score-copy span { display: block; color: var(--muted); font-size: .73rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.score-copy strong { display: block; max-width: 500px; margin-top: .2rem; color: var(--ink); font-size: 1rem; line-height: 1.4; }
.score-counts { display: grid; grid-template-columns: repeat(2, auto); gap: .3rem 1.2rem; }
.score-counts span { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.score-counts b { color: var(--ink); font-size: .9rem; }
.report-legend { display: flex; flex-wrap: wrap; gap: .7rem 1.25rem; padding: 1rem .2rem; color: var(--muted); font-size: .76rem; }
.report-legend span { display: flex; align-items: center; gap: .4rem; }
.legend-dot { width: .55rem; height: .55rem; border-radius: 50%; }
.status-a { background: var(--a); }
.status-b { background: var(--b); }
.status-c { background: var(--c); }
.status-unknown { background: var(--unknown); }

.check-list { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: .85rem; }
.check-item + .check-item { border-top: 1px solid var(--line); }
.check-summary-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; min-height: 86px; padding: 1rem 1.25rem; }
.check-status { width: .72rem; height: .72rem; border-radius: 50%; box-shadow: 0 0 0 4px var(--surface-soft); }
.check-title-block { min-width: 0; }
.check-name { margin: 0; color: var(--ink); font-size: .96rem; font-weight: 720; }
.check-summary { margin: .18rem 0 0; color: var(--muted); font-size: .84rem; }
.check-label { min-width: 84px; padding: .28rem .55rem; border-radius: 999px; text-align: center; font-size: .71rem; font-weight: 760; }
.check-label.grade-a { color: #08724f; background: #def7ec; }
.check-label.grade-b { color: #8a5708; background: #fff0cf; }
.check-label.grade-c { color: #a62d2d; background: #ffe1e1; }
.check-label.grade-unknown { color: #586274; background: #e9edf2; }
html[data-theme="dark"] .check-label.grade-a { color: #78dcb8; background: #153d32; }
html[data-theme="dark"] .check-label.grade-b { color: #f4c775; background: #40331e; }
html[data-theme="dark"] .check-label.grade-c { color: #ffaaaa; background: #42272c; }
html[data-theme="dark"] .check-label.grade-unknown { color: #bdc8d8; background: #2b374a; }
.check-toggle { padding: .35rem .1rem .35rem .55rem; color: var(--accent); background: transparent; border: 0; font-size: .78rem; }
.check-toggle span { display: inline-block; margin-left: .25rem; transition: transform .2s ease; }
.check-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.check-body { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; padding: 0 1.25rem 1.25rem 2.95rem; }
.meaning-block, .recommendation-block, .evidence { padding: 1rem; background: var(--surface-soft); border-radius: .55rem; }
.meaning-block > span, .recommendation-block > span, .evidence > span { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.meaning-block p, .recommendation-block p { margin: 0; color: var(--text); font-size: .84rem; }
.policy-interpretation { grid-column: 1 / -1; padding: 1rem; color: var(--text); background: #eef5f9; border: 1px solid #cbdde8; border-left: 4px solid var(--accent); }
.policy-interpretation > span { display: block; margin-bottom: .55rem; color: var(--accent); font-size: .68rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.policy-interpretation-list { display: grid; gap: .45rem; }
.policy-interpretation-list p { margin: 0; font-size: .82rem; line-height: 1.55; }
.recommendation-block { border-left: 3px solid var(--accent); }
.evidence { grid-column: 1 / -1; overflow-wrap: anywhere; }
.evidence dl { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; }
.evidence dt { color: var(--muted); font-weight: 600; }
.evidence dd { margin: 0 0 .55rem; color: var(--ink); }
.evidence dd:last-child { margin-bottom: 0; }

.starttls-hosts { display: grid; grid-column: 1 / -1; gap: 1rem; }
.smtp-host { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: .65rem; }
.smtp-host-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.smtp-host-title { min-width: 0; }
.smtp-host-title h4 { display: inline; margin: 0 0 0 .45rem; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; font-weight: 700; overflow-wrap: anywhere; }
.smtp-host-title p { margin: .25rem 0 0; color: var(--muted); font-size: .75rem; }
.smtp-priority { padding: .18rem .38rem; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: .3rem; font-size: .66rem; font-weight: 800; }
.smtp-outcome { flex: 0 0 auto; padding: .28rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 760; }
.smtp-outcome.good { color: #08724f; background: #def7ec; }
.smtp-outcome.warn { color: #8a5708; background: #fff0cf; }
.smtp-outcome.bad { color: #a62d2d; background: #ffe1e1; }
html[data-theme="dark"] .smtp-outcome.good { color: #78dcb8; background: #153d32; }
html[data-theme="dark"] .smtp-outcome.warn { color: #f4c775; background: #40331e; }
html[data-theme="dark"] .smtp-outcome.bad { color: #ffaaaa; background: #42272c; }
.smtp-trail { margin: 0; padding: 1rem 1rem .5rem; list-style: none; }
.smtp-trail li { position: relative; display: grid; grid-template-columns: 1rem 1fr; gap: .75rem; min-height: 58px; padding-bottom: .7rem; }
.smtp-trail li:not(:last-child)::before { position: absolute; top: .75rem; bottom: -.1rem; left: .35rem; width: 1px; content: ""; background: var(--line-strong); }
.trail-marker { position: relative; z-index: 1; width: .72rem; height: .72rem; margin-top: .25rem; background: var(--unknown); border: 2px solid var(--surface); border-radius: 50%; box-shadow: 0 0 0 1px var(--unknown); }
.trail-passed .trail-marker { background: var(--a); box-shadow: 0 0 0 1px var(--a); }
.trail-failed .trail-marker { background: var(--c); box-shadow: 0 0 0 1px var(--c); }
.trail-warning .trail-marker { background: var(--b); box-shadow: 0 0 0 1px var(--b); }
.trail-notrun .trail-marker { background: var(--surface); box-shadow: 0 0 0 1px var(--unknown); }
.trail-copy strong { display: block; color: var(--ink); font-size: .8rem; }
.trail-copy p { margin: .1rem 0 0; color: var(--muted); font-size: .76rem; }
.certificate-summary { margin: 0 1rem 1rem; padding: 1rem; background: color-mix(in srgb, var(--a) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--a) 28%, var(--line)); border-radius: .55rem; }
.certificate-heading { display: flex; align-items: flex-start; gap: .7rem; }
.certificate-heading strong { color: var(--ink); font-size: .84rem; }
.certificate-heading p { margin: .1rem 0 0; color: var(--muted); font-size: .76rem; }
.certificate-icon { display: grid; width: 1.55rem; height: 1.55rem; flex: 0 0 auto; place-items: center; color: #fff; background: var(--a); border-radius: 50%; font-size: .78rem; font-weight: 800; }
.certificate-facts, .technical-grid { display: grid; grid-template-columns: minmax(110px, .35fr) 1fr; gap: .35rem 1rem; margin: .85rem 0 0; font-size: .74rem; }
.certificate-facts dt, .technical-grid dt { color: var(--muted); font-weight: 600; }
.certificate-facts dd, .technical-grid dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.smtp-technical { margin: 0 1rem 1rem; padding: 1rem; background: var(--surface-soft); border: 1px solid var(--line); border-radius: .55rem; }
.smtp-technical h5 { margin: 0; color: var(--ink); font-size: .78rem; font-weight: 760; letter-spacing: .04em; text-transform: uppercase; }
.smtp-technical .technical-subheading { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.certificate-chain { display: grid; gap: .55rem; margin-top: .7rem; }
.chain-item { display: grid; grid-template-columns: auto 1fr; gap: .65rem; padding: .7rem; background: var(--surface); border: 1px solid var(--line); border-radius: .45rem; }
.chain-number { display: grid; width: 1.4rem; height: 1.4rem; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; font-size: .65rem; font-weight: 800; }
.chain-item strong { display: block; color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .7rem; overflow-wrap: anywhere; }
.chain-item p { margin: .14rem 0 0; color: var(--muted); font-size: .68rem; overflow-wrap: anywhere; }
.smtp-transcript { max-height: 260px; margin: .7rem 0 0; padding: .8rem; overflow: auto; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: .45rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .7rem; line-height: 1.55; white-space: pre-wrap; }

.point-in-time { margin-top: 1.25rem; padding: 1rem 1.1rem; color: var(--muted); background: var(--surface-soft); border-left: 3px solid var(--line-strong); font-size: .82rem; }
.point-in-time strong { color: var(--ink); }
.point-in-time p { margin: .2rem 0 0; }

.explainer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; max-width: 1010px; margin: 4.5rem auto 5.5rem; padding: 3rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.explainer-grid h2 { margin: 0 0 .65rem; color: var(--ink); font-size: .98rem; font-weight: 720; }
.explainer-grid p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.7; }

.studio-footer { background: var(--surface); border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--accent), #28b6a2, #9168e5, #e65f91, #e8a326) 1; }
.footer-inner { display: flex; min-height: 140px; align-items: center; justify-content: space-between; gap: 2rem; }
.footer-inner strong { color: var(--ink); }
.footer-inner p { margin: .2rem 0 0; color: var(--muted); font-size: .82rem; }
.footer-note { max-width: 360px; text-align: right; }
.tech-only { display: none; }
body.tech-mode .tech-only { display: flex; }
body.tech-mode .evidence.tech-only:not(.d-none) { display: block; }
body.tech-mode .smtp-technical.tech-only { display: block; }

@media (max-width: 820px) {
    .brand-byline { display: none; }
    .tool-hero { padding-top: 3.5rem; }
    .scorecard { grid-template-columns: auto 1fr; }
    .score-counts { grid-column: 1 / -1; padding-top: .8rem; border-top: 1px solid var(--line); }
    .explainer-grid { gap: 1.25rem; }
}

@media (max-width: 640px) {
    .studio-container { width: min(100% - 1.25rem, 1120px); }
    .header-inner { min-height: 56px; gap: .5rem; }
    .studio-brand strong { font-size: .9rem; }
    .theme-button span { display: none; }
    .theme-button { padding-inline: .55rem; }
    .mode-button { padding-inline: .55rem; }
    .hero-copy { margin-bottom: 1.75rem; }
    .checker-panel { padding: 1rem; border-radius: .85rem; }
    .checker-row { grid-template-columns: 1fr; }
    .run-button { width: 100%; min-height: 52px; }
    .domain-input { min-height: 54px; }
    .checker-options { align-items: flex-start; flex-direction: column; }
    .selector-field { width: 100%; justify-content: space-between; }
    .selector-field input { flex: 1; }
    .report { margin-top: 2.5rem; }
    .report-heading { align-items: flex-start; flex-direction: column; }
    .scorecard { gap: .9rem; padding: 1rem; }
    .score-grade { width: 58px; height: 58px; font-size: 2.2rem; }
    .score-counts { grid-template-columns: 1fr 1fr; }
    .check-summary-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; padding: .9rem; }
    .check-label { min-width: 0; }
    .check-toggle { grid-column: 2 / -1; justify-self: start; padding-left: 0; }
    .check-body { grid-template-columns: 1fr; padding: 0 .9rem .9rem 2.35rem; }
    .evidence, .policy-interpretation { grid-column: auto; }
    .starttls-hosts { grid-column: auto; }
    .smtp-host-header { align-items: flex-start; flex-direction: column; }
    .certificate-facts, .technical-grid { grid-template-columns: 1fr; gap: .12rem; }
    .certificate-facts dd, .technical-grid dd { margin-bottom: .45rem; }
    .explainer-grid { grid-template-columns: 1fr; gap: 1.75rem; margin: 3.5rem auto; padding: 2.5rem 0; }
    .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: .75rem; }
    .footer-note { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
    :root { --page: #fff; --surface: #fff; --surface-soft: #f6f6f6; --ink: #000; --text: #222; --muted: #555; --line: #bbb; --line-strong: #888; }
    .studio-header, .hero-copy, .checker-panel, .scan-status, .tool-error, .empty-report, .explainer-grid, .studio-footer, .d-print-none { display: none !important; }
    .tool-hero { padding: 0; }
    .studio-container, .report { width: 100%; max-width: none; margin: 0; }
    .report { display: block !important; }
    .scorecard, .check-list { border-color: #777; }
    .check-item { break-inside: avoid; }
    .check-body { display: grid !important; }
    .check-toggle { display: none; }
    .tech-only { display: block !important; }
}

/* TechKee corporate identity */
:root {
    --page: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f7f9fb;
    --ink: #102a43;
    --text: #3f5266;
    --muted: #6b7c8f;
    --line: #d9e0e7;
    --line-strong: #bcc8d3;
    --accent: #176b9e;
    --accent-hover: #10577f;
    --shadow: 0 10px 30px rgba(16, 42, 67, .07);
}

body { background: var(--page); }
.site-container { width: min(1180px, calc(100% - 2.5rem)); margin-inline: auto; }
.corporate-bar { height: 4px; background: #102a43; }
.corporate-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 2rem; }
.corporate-brand { display: flex; align-items: center; gap: .8rem; color: var(--ink); text-decoration: none; }
.corporate-brand:hover { color: var(--ink); }
.brand-symbol { display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 2.75rem; place-items: center; }
.brand-symbol img { display: block; width: 100%; height: 100%; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 1rem; font-weight: 760; letter-spacing: -.015em; }
.brand-copy small { margin-top: .22rem; color: var(--muted); font-size: .68rem; letter-spacing: .04em; }
.corporate-nav { display: flex; align-items: center; gap: 1.8rem; }
.corporate-nav a { color: var(--text); text-decoration: none; font-size: .86rem; font-weight: 620; }
.corporate-nav a:hover { color: var(--accent); }
.tool-hero { padding: 4.5rem 0 0; background: linear-gradient(180deg, #fff 0, #fff 31rem, var(--page) 31rem); }
.hero-copy { max-width: 860px; margin: 0 0 2rem; text-align: left; }
.section-label { margin: 0 0 .7rem; color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.hero-copy h1 { max-width: 780px; color: var(--ink); font-size: clamp(2.35rem, 5vw, 3.7rem); letter-spacing: -.04em; }
.hero-copy > p:last-child { max-width: 780px; margin: 1rem 0 0; color: var(--text); }
.checker-panel { max-width: none; margin: 0; border-color: var(--line); border-radius: .45rem; box-shadow: var(--shadow); }
.checker-panel::before { display: none; }
.assessment-methodology-link { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .8rem; padding: .8rem 1rem; background: #eef5f9; border: 1px solid #cbdde8; border-left: 4px solid var(--accent); }
.assessment-methodology-link strong { color: var(--ink); font-size: .78rem; }
.assessment-methodology-link p { margin: .15rem 0 0; color: var(--text); font-size: .7rem; }
.assessment-methodology-link a { flex: 0 0 auto; color: var(--accent); font-size: .74rem; font-weight: 780; text-decoration: none; }
.assessment-methodology-link a:hover { text-decoration: underline; }
.domain-input, .selector-field input { border-radius: .28rem; }
.run-button { background: var(--ink); border-radius: .28rem; box-shadow: none; }
.run-button:hover:not(:disabled) { background: var(--accent); }
.empty-report, .report, .explainer-grid, .scan-status, .tool-error { max-width: none; }
.empty-report { background: rgba(255,255,255,.55); border-radius: .45rem; }
.report-button { display: inline-flex; min-height: 42px; align-items: center; padding: .55rem 1rem; color: #fff; background: var(--ink); border-radius: .28rem; text-decoration: none; font-size: .83rem; font-weight: 700; }
.report-button:hover { color: #fff; background: var(--accent); }
.scorecard, .check-list { border-radius: .45rem; box-shadow: 0 3px 12px rgba(16,42,67,.035); }
.score-grade { border-radius: .28rem; }
.check-item, .smtp-host { border-radius: .35rem; }
.check-body { grid-template-columns: 1fr; }
.meaning-block, .recommendation-block, .evidence { border-radius: .3rem; }
.evidence { display: block; }
.smtp-technical { display: block; }
.explainer-grid { margin-bottom: 4.5rem; }
.corporate-footer { color: #d7e1eb; background: #102a43; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .6fr 1.4fr; gap: 3rem; padding: 2.5rem 0; }
.corporate-footer strong { color: #fff; }
.corporate-footer p { margin: .25rem 0 0; color: #b8c7d5; font-size: .78rem; }
.corporate-footer nav { display: flex; flex-direction: column; gap: .45rem; }
.corporate-footer a { color: #d7e1eb; text-decoration: none; font-size: .8rem; }
.corporate-footer a:hover { color: #fff; }
.footer-legal { text-align: right; }

@media (max-width: 720px) {
    .site-container { width: min(100% - 1.25rem, 1180px); }
    .header-inner { min-height: 68px; gap: 1rem; }
    .corporate-nav { gap: .75rem; }
    .corporate-nav a { font-size: .73rem; }
    .brand-copy small { display: none; }
    .tool-hero { padding-top: 3.25rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .footer-legal { text-align: left; }
}

@media (max-width: 460px) {
    .corporate-nav a:nth-child(5) { display: none; }
    .corporate-nav { gap: .6rem; }
}

/* Reference, legal and downloadable report pages */
.content-page { min-height: 64vh; padding: 4rem 0 5rem; }
.narrow-content { max-width: 900px; }
.page-heading { max-width: 850px; margin-bottom: 2rem; }
.page-heading h1, .page-heading h2 { margin: 0; color: var(--ink); font-size: clamp(2rem, 4vw, 3.15rem); font-weight: 770; letter-spacing: -.035em; }
.page-heading > p:not(.section-label) { max-width: 720px; margin: .85rem 0 0; color: var(--text); font-size: 1rem; line-height: 1.7; }
.page-heading small { display: block; margin-top: .7rem; color: var(--muted); }
.compact-heading { margin: 3.8rem 0 1.4rem; }
.compact-heading h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); }

.glossary-search { display: grid; grid-template-columns: 1fr auto; gap: .45rem 1rem; margin-bottom: 1.5rem; padding: 1.25rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.glossary-search label { grid-column: 1 / -1; color: var(--ink); font-size: .8rem; font-weight: 700; }
.glossary-search input { min-height: 48px; padding: .65rem .8rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: .25rem; }
.glossary-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,158,.12); outline: 0; }
.glossary-search p { align-self: center; margin: 0; color: var(--muted); font-size: .8rem; }
.glossary-list { display: grid; gap: 1rem; }
.glossary-entry { scroll-margin-top: 1rem; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink); }
.glossary-entry:target { border-left-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,158,.08); }
.glossary-term-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.glossary-term-heading h2 { margin: 0; color: var(--ink); font-size: 1.25rem; }
.glossary-term-heading span { padding: .2rem .45rem; color: var(--accent); background: #eaf3f8; font-size: .7rem; font-weight: 800; }
.glossary-definition { display: grid; grid-template-columns: 145px 1fr; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.glossary-definition h3 { margin: 0; color: var(--muted); font-size: .73rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.glossary-definition p { margin: 0; color: var(--text); font-size: .9rem; line-height: 1.65; }
.technical-definition p { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
.related-terms { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .75rem; }
.related-terms strong { margin-right: .25rem; color: var(--muted); }
.related-terms a { padding: .2rem .45rem; color: var(--accent); background: var(--surface-soft); text-decoration: none; }
.glossary-empty { padding: 2rem; color: var(--muted); background: #fff; border: 1px solid var(--line); text-align: center; }

.legal-document { padding: 1.8rem 2rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.legal-document section + section { margin-top: 1.65rem; padding-top: 1.65rem; border-top: 1px solid var(--line); }
.legal-document h2 { margin: 0 0 .55rem; color: var(--ink); font-size: 1.08rem; }
.legal-document p { margin: 0; color: var(--text); font-size: .9rem; line-height: 1.75; }

.report-document-page { background: linear-gradient(180deg, #fff 0, #fff 20rem, var(--page) 20rem); }
.report-cover { display: flex; min-height: 180px; align-items: center; justify-content: space-between; gap: 2rem; padding: 2.2rem; color: #fff; background: var(--ink); }
.report-cover .section-label { color: #83c4e7; }
.report-cover h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 780; letter-spacing: -.035em; overflow-wrap: anywhere; }
.report-cover p:last-child { margin: .7rem 0 0; color: #c5d3df; font-size: .85rem; }
.report-cover-grade { display: grid; min-width: 115px; height: 100px; place-items: center; padding: .8rem; color: #fff; text-align: center; }
.report-cover-grade span { font-size: 2.3rem; font-weight: 820; line-height: 1; }
.report-cover-grade span:not(:last-child) { overflow-wrap: anywhere; }
.report-cover-grade small { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.grade-panel-a { color: #fff; background: #168760; }
.grade-panel-b { color: #fff; background: #bd7410; }
.grade-panel-c { color: #fff; background: #c43e3e; }
.grade-panel-unknown { color: #fff; background: #68778a; }
.report-toolbar { display: flex; align-items: center; gap: 1rem; padding: 1rem 0 1.5rem; }
.text-link { color: var(--accent); font-size: .84rem; font-weight: 650; }
.report-panel { padding: 1.5rem; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(16,42,67,.04); }
.report-panel h2 { margin: 0 0 .8rem; color: var(--ink); font-size: 1.18rem; }
.report-panel > p { color: var(--text); line-height: 1.65; }
.executive-summary { border-top: 4px solid var(--accent); }
.executive-summary h2 { max-width: 850px; font-size: clamp(1.35rem, 3vw, 2rem); }
.executive-summary > p:last-of-type { max-width: 900px; }
.executive-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 1.4rem; background: var(--line); border: 1px solid var(--line); }
.executive-metrics div { padding: 1rem; background: var(--surface-soft); }
.executive-metrics strong, .executive-metrics span { display: block; }
.executive-metrics strong { color: var(--ink); font-size: 1.45rem; }
.executive-metrics span { color: var(--muted); font-size: .75rem; }
.report-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.report-findings-list { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.report-findings-list li { display: grid; grid-template-columns: 34px 1fr; gap: .75rem; }
.mini-grade { display: grid; width: 34px; height: 30px; place-items: center; font-size: .72rem; font-weight: 800; }
.report-findings-list strong { color: var(--ink); font-size: .84rem; }
.report-findings-list p { margin: .1rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.report-results-section { margin-top: 1rem; }
.report-check { margin-bottom: 1rem; }
.report-check > header { display: grid; grid-template-columns: 58px 1fr; gap: 1rem; align-items: center; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.report-check-grade { display: grid; min-height: 48px; place-items: center; padding: .3rem; font-size: .75rem; font-weight: 800; text-align: center; }
.report-check h3 { margin: 0; color: var(--ink); font-size: 1.2rem; }
.report-check header p { margin: .25rem 0 0; color: var(--muted); font-size: .84rem; }
.report-check-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.2rem 0; }
.report-check h4, .report-check h5 { margin: 0 0 .5rem; color: var(--ink); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.report-check-columns p { margin: 0; color: var(--text); font-size: .86rem; line-height: 1.65; }
.report-evidence, .report-smtp-host { margin-top: .5rem; padding: 1rem; background: var(--surface-soft); border: 1px solid var(--line); }
.report-policy-interpretation { margin: .8rem 0; padding: 1rem; background: #eef5f9; border: 1px solid #cbdde8; border-left: 4px solid var(--accent); }
.report-policy-interpretation h4 { margin: 0 0 .5rem; color: var(--ink); font-size: .88rem; }
.report-policy-interpretation p { margin: 0; color: var(--text); font-size: .76rem; line-height: 1.55; }
.report-policy-interpretation p + p { margin-top: .4rem; }
.report-evidence dl, .report-fact-grid { display: grid; grid-template-columns: minmax(150px, .3fr) 1fr; gap: .42rem 1rem; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .74rem; }
.report-evidence dt, .report-fact-grid dt { color: var(--muted); }
.report-evidence dd, .report-fact-grid dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.report-smtp-host { margin-top: 1rem; background: #fff; }
.report-smtp-host > h4 { padding-bottom: .8rem; border-bottom: 1px solid var(--line); font-size: .9rem; text-transform: none; }
.report-smtp-host > h5 { margin-top: 1.4rem; }
.report-trail, .report-chain { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.report-trail li { display: grid; grid-template-columns: minmax(140px, .25fr) 90px 1fr; gap: .7rem; padding: .65rem; border-left: 3px solid var(--line-strong); background: var(--surface-soft); }
.report-trail li.trail-result-passed { border-left-color: #168760; }
.report-trail li.trail-result-failed { border-left-color: #c43e3e; }
.report-trail li.trail-result-warning { border-left-color: #bd7410; }
.report-trail strong, .report-trail span { color: var(--ink); font-size: .75rem; }
.report-trail p { margin: 0; color: var(--text); font-size: .75rem; }
.report-chain li { display: grid; gap: .2rem; padding: .7rem; background: var(--surface-soft); border: 1px solid var(--line); font-size: .72rem; }
.report-chain strong { color: var(--ink); overflow-wrap: anywhere; }
.report-chain span { color: var(--muted); }
.report-chain code { color: var(--text); overflow-wrap: anywhere; }
.report-transcript { max-height: 320px; margin: 0; padding: .9rem; overflow: auto; color: #dbe8f2; background: #12283b; font-size: .72rem; line-height: 1.55; white-space: pre-wrap; }
.report-disclaimer { margin-top: 1.5rem; padding: 1.2rem; color: var(--text); background: #eaf1f6; border-left: 4px solid var(--ink); font-size: .8rem; }
.report-disclaimer strong { color: var(--ink); }
.report-disclaimer p { margin: .25rem 0 .5rem; line-height: 1.6; }
.report-disclaimer a { color: var(--accent); font-weight: 700; }
.unavailable-report { margin: 3rem auto; padding: 2.5rem; text-align: center; }
.unavailable-report h1 { color: var(--ink); font-size: clamp(1.6rem, 4vw, 2.4rem); }
.unavailable-report p:not(.section-label) { max-width: 600px; margin: .8rem auto 1.4rem; color: var(--text); }

/* Assessment diary */
.prototype-warning { display: grid; grid-template-columns: 155px 1fr; gap: 1rem; margin-bottom: 1.25rem; padding: 1rem 1.15rem; color: #714d0c; background: #fff6dc; border: 1px solid #ead397; border-left: 4px solid var(--b); font-size: .82rem; }
.prototype-warning strong { color: #62410a; }
.diary-controls { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(230px, .55fr) auto auto; align-items: end; gap: .75rem; padding: 1.2rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.diary-controls div { display: grid; gap: .35rem; }
.diary-controls label { color: var(--ink); font-size: .75rem; font-weight: 750; }
.diary-controls input, .diary-controls select { min-height: 44px; padding: .55rem .7rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: .25rem; }
.diary-controls button { min-height: 44px; padding: 0 1rem; color: #fff; background: var(--ink); border: 0; border-radius: .25rem; font-weight: 700; }
.diary-controls button:hover { background: var(--accent); }
.diary-controls > a { min-height: 44px; align-content: center; padding: 0 .45rem; color: var(--accent); font-size: .8rem; font-weight: 700; }
.diary-summary { padding: 1rem 0 .65rem; color: var(--muted); font-size: .8rem; }
.diary-summary strong { color: var(--ink); }
.diary-groups { display: grid; gap: .75rem; }
.diary-group { background: #fff; border: 1px solid var(--line); box-shadow: 0 3px 12px rgba(16,42,67,.035); }
.diary-group > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; min-height: 58px; padding: .8rem 1rem; color: var(--ink); background: #fff; cursor: pointer; list-style: none; }
.diary-group > summary::-webkit-details-marker { display: none; }
.diary-group > summary:hover { background: var(--surface-soft); }
.diary-group > summary:focus-visible { outline: 3px solid rgba(23,107,158,.22); outline-offset: -3px; }
.diary-group[open] > summary { background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.diary-group-title { min-width: 0; font-size: .92rem; font-weight: 780; overflow-wrap: anywhere; }
.diary-group-count { color: var(--muted); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.diary-group-toggle { display: grid; width: 28px; height: 28px; place-items: center; color: var(--accent); border: 1px solid var(--line-strong); transition: transform .18s ease; }
.diary-group[open] .diary-group-toggle { transform: rotate(180deg); }
.diary-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); }
.diary-group .diary-table-wrap { border: 0; }
.diary-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.diary-table th { padding: .75rem 1rem; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.diary-table td { padding: 1rem; color: var(--text); border-bottom: 1px solid var(--line); font-size: .79rem; vertical-align: top; }
.diary-table tr:last-child td { border-bottom: 0; }
.diary-table td:nth-child(1), .diary-table td:nth-child(4) { white-space: nowrap; }
.diary-table td > strong, .diary-table td > small { display: block; }
.diary-table td > strong { color: var(--ink); font-size: .86rem; }
.diary-table td > small { max-width: 310px; margin-top: .22rem; color: var(--muted); line-height: 1.45; }
.diary-table code { color: var(--ink); font-size: .73rem; }
.diary-grade { display: grid; width: 34px; height: 34px; place-items: center; color: #fff; font-weight: 800; }
.downloaded-yes { color: #08724f; font-weight: 750; }
.diary-actions { display: flex; gap: .65rem; white-space: nowrap; }
.diary-actions a { color: var(--accent); font-weight: 700; }
.diary-empty { padding: 3rem 1.5rem; background: #fff; border: 1px solid var(--line); text-align: center; }
.diary-empty h2 { margin: 0; color: var(--ink); font-size: 1.3rem; }
.diary-empty p { margin: .5rem 0 1.2rem; color: var(--muted); }
.archive-metadata { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 1rem; background: var(--line); border: 1px solid var(--line); }
.archive-metadata div { padding: .85rem 1rem; background: #fff; }
.archive-metadata span, .archive-metadata strong { display: block; }
.archive-metadata span { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.archive-metadata strong { margin-top: .25rem; color: var(--ink); font-size: .78rem; overflow-wrap: anywhere; }

@media (max-width: 700px) {
    .content-page { padding: 2.5rem 0 3.5rem; }
    .glossary-definition, .report-check-columns, .report-overview-grid { grid-template-columns: 1fr; }
    .report-cover { align-items: flex-start; flex-direction: column; padding: 1.5rem; }
    .report-cover-grade { min-width: 96px; height: 82px; }
    .report-cover-grade span { font-size: 1.7rem; }
    .executive-metrics { grid-template-columns: 1fr; }
    .report-fact-grid, .report-evidence dl { grid-template-columns: 1fr; gap: .12rem; }
    .report-fact-grid dd, .report-evidence dd { margin-bottom: .5rem; }
    .report-trail li { grid-template-columns: 1fr auto; }
    .report-trail p { grid-column: 1 / -1; }
    .legal-document { padding: 1.25rem; }
    .prototype-warning, .diary-controls, .archive-metadata { grid-template-columns: 1fr; }
    .diary-controls button, .diary-controls > a { width: 100%; text-align: center; }
    .diary-group > summary { grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .75rem; }
    .diary-group-count { grid-column: 1; grid-row: 2; }
    .diary-group-toggle { grid-column: 2; grid-row: 1 / span 2; }
}

/* DNS record drafting tools */
.tools-heading { max-width: 900px; }
.tools-workspace { display: grid; gap: 1rem; }
.tool-step { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 1.1rem; scroll-margin-top: 1rem; padding: 1.5rem; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(16,42,67,.04); }
.tool-step-disabled { opacity: .48; pointer-events: none; }
.step-number { display: grid; width: 42px; height: 42px; place-items: center; color: #fff; background: var(--ink); font-size: .9rem; font-weight: 800; }
.step-content { min-width: 0; }
.step-content > h2 { margin: 0; color: var(--ink); font-size: 1.35rem; }
.step-content > h2 + p { margin: .35rem 0 1.2rem; color: var(--muted); font-size: .88rem; }
.tools-domain-form { max-width: 850px; }
.tools-domain-form > label, .manual-mx-panel label, .draft-config > label, .field-pair label { display: block; margin-bottom: .35rem; color: var(--ink); font-size: .74rem; font-weight: 750; }
.tools-domain-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; }
.tools-domain-form input, .manual-mx-panel textarea, .draft-config input, .draft-config select, .draft-config textarea { width: 100%; min-height: 44px; padding: .55rem .7rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: .25rem; }
.draft-config textarea, .manual-mx-panel textarea { min-height: 86px; resize: vertical; }
.tools-domain-form input:focus, .manual-mx-panel textarea:focus, .draft-config input:focus, .draft-config select:focus, .draft-config textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,158,.11); outline: 0; }
.tools-domain-form button, .primary-tool-button { min-height: 44px; padding: .55rem 1rem; color: #fff; background: var(--ink); border: 0; border-radius: .25rem; font-weight: 720; }
.tools-domain-form button:hover, .primary-tool-button:hover { background: var(--accent); }
.tools-domain-form button:disabled { opacity: .6; }
.dns-tools-page .tool-error { margin: .8rem 0 0; }
.discovery-result { margin-top: 1rem; padding: 1rem; color: var(--text); background: #eff7f4; border: 1px solid #b9dbce; border-left: 4px solid var(--a); font-size: .82rem; }
.discovery-result strong { color: var(--ink); font-size: .9rem; }
.discovery-result p { margin: .55rem 0 0; }
.discovery-result ul { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin: .65rem 0 0; padding: 0; list-style: none; }
.discovery-result li { padding: .25rem .45rem; color: var(--ink); background: #fff; border: 1px solid #c9ddd6; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .73rem; }
.discovery-warning { color: #795614; }
.manual-mx-panel { margin-top: 1rem; padding: 1rem; background: #fff7e2; border: 1px solid #e8d29a; border-left: 4px solid var(--b); }
.manual-mx-panel strong { color: var(--ink); }
.manual-mx-panel p { margin: .35rem 0 .8rem; font-size: .82rem; }
.mx-editor-panel { margin: 0 0 1rem; padding: 1rem; background: #f8fbfd; border: 1px solid var(--line); }
.mx-editor-panel legend { width: auto; float: none; margin: 0 0 .7rem; color: var(--ink); font-size: 1rem; font-weight: 780; }
.mx-record-list { display: grid; gap: .55rem; margin: .8rem 0; }
.mx-record-row { display: grid; grid-template-columns: 120px minmax(220px, 1fr) auto; gap: .65rem; align-items: end; padding: .7rem; background: #fff; border: 1px solid var(--line); }
.mx-record-row label { display: block; margin-bottom: .25rem; color: var(--muted); font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.mx-record-row input { width: 100%; min-height: 42px; padding: .5rem .65rem; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: .25rem; }
.mx-record-row > div:last-child { display: flex; gap: .45rem; align-items: center; min-height: 42px; }
.mx-record-row button, .inline-add-button { padding: .48rem .7rem; color: var(--accent); background: #fff; border: 1px solid var(--line-strong); font-size: .72rem; font-weight: 750; }
.source-badge { display: inline-block; padding: .24rem .42rem; color: #135a48; background: #e3f3ec; border: 1px solid #add8c9; font-size: .64rem; font-weight: 800; white-space: nowrap; }
.source-warning { margin: .7rem 0; padding: .7rem; color: #694d05; background: #fff7df; border-left: 3px solid #d9a91c; font-size: .78rem; }
.record-source { margin: 0 0 .8rem; padding: .7rem; background: #eaf6f1; border: 1px solid #b7ddcf; border-left: 4px solid #278368; font-size: .72rem; }
.record-source strong, .record-source code, .record-source p { display: block; }
.record-source code { margin-top: .35rem; color: var(--ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.record-source p { margin: .4rem 0 0; color: #6d5211; }
.proposed-record { margin-top: 1rem; padding: .8rem; background: #fff; border: 1px solid var(--line-strong); border-left: 4px solid var(--accent); }
.proposed-record > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .55rem; }
.proposed-record strong { color: var(--ink); font-size: .78rem; }
.proposed-record > span { display: block; margin-top: .55rem; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.proposed-record code, .proposed-record pre { display: block; margin: 0; padding: .55rem; color: var(--ink); background: var(--surface-soft); font-size: .7rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.proposed-record p { margin: .5rem 0 0; color: var(--muted); font-size: .7rem; }
.proposed-record.dependency-updated { background: #f2f8fc; border-color: #9dc8df; border-left-color: var(--accent); box-shadow: 0 0 0 2px rgba(23,107,158,.06); }
.preview-status { display: inline-block; padding: .2rem .4rem; color: #135a48; background: #e3f3ec; border: 1px solid #add8c9; font-size: .6rem; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.preview-status.status-modified { color: #714d00; background: #fff2cb; border-color: #e6ca70; }
.preview-status.status-new { color: #135583; background: #e9f4fb; border-color: #b7d7e9; }
.preview-status.status-manual-review, .preview-status.status-incomplete { color: #8a3030; background: #fff0f0; border-color: #e8b7b7; }
.draft-choice { margin: 0 0 1rem; padding: 0; border: 0; }
.draft-choice legend { margin-bottom: .55rem; color: var(--ink); font-size: .78rem; font-weight: 780; }
.draft-choice-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .55rem; }
.draft-choice-grid label { position: relative; display: block; min-height: 84px; cursor: pointer; }
.draft-choice-grid input { position: absolute; opacity: 0; }
.draft-choice-grid span { display: flex; height: 100%; flex-direction: column; justify-content: center; padding: .8rem; background: var(--surface-soft); border: 1px solid var(--line); }
.draft-choice-grid strong { color: var(--ink); font-size: .82rem; }
.draft-choice-grid small { margin-top: .2rem; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.draft-choice-grid input:checked + span { background: #edf5fa; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.draft-choice-grid input:focus-visible + span { outline: 3px solid rgba(23,107,158,.22); outline-offset: 2px; }
.draft-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.draft-config { min-width: 0; padding: 1rem; background: var(--surface-soft); border: 1px solid var(--line); }
.draft-config legend { width: auto; float: none; margin: 0 0 .8rem; padding: 0; color: var(--ink); font-size: 1rem; font-weight: 780; }
.draft-config > label:not(:first-of-type) { margin-top: .75rem; }
.draft-config .check-option { display: flex; align-items: flex-start; gap: .5rem; }
.draft-config .check-option input { width: 17px; min-height: 17px; margin-top: .1rem; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: .75rem; }
.field-note { margin: .8rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.mta-sync-option { margin-top: .8rem; padding: .65rem; background: #eaf6f1; border: 1px solid #b7ddcf; }
.mta-sync-option + .field-note { margin: .35rem 0 .75rem; }
.mta-sync-option + .field-note.sync-disabled { color: #795614; }
.primary-tool-button { margin-top: 1rem; }
.publish-warning { margin-bottom: 1rem; padding: .9rem 1rem; color: #68490d; background: #fff7e2; border-left: 4px solid var(--b); font-size: .8rem; }
.publish-warning strong { color: #543a0a; }
.draft-output { display: grid; gap: .8rem; }
.record-card { overflow: hidden; border: 1px solid var(--line); }
.record-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; background: var(--ink); }
.record-card-heading > div { display: flex; align-items: center; gap: .7rem; }
.record-kind { padding: .18rem .4rem; color: var(--ink); background: #fff; font-size: .65rem; font-weight: 850; }
.record-card h3 { margin: 0; color: #fff; font-size: .95rem; }
.record-status { color: #b9d7e8; font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.record-field, .policy-field { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: .8rem; padding: .8rem 1rem; border-top: 1px solid var(--line); }
.record-field > span, .policy-field > span { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.record-field > div, .policy-field > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .6rem; }
.record-field code, .policy-field code { color: var(--ink); font-size: .78rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.record-field button, .policy-field button { padding: .25rem .5rem; color: var(--accent); background: #fff; border: 1px solid var(--line-strong); font-size: .68rem; font-weight: 700; white-space: nowrap; }
.record-field button:hover, .policy-field button:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.record-type-row code { font-weight: 800; }
.record-notes { margin: 0; padding: .8rem 1rem .8rem 2.1rem; color: var(--text); background: var(--surface-soft); border-top: 1px solid var(--line); font-size: .76rem; }
.record-notes li + li { margin-top: .35rem; }

@media (max-width: 900px) {
    .draft-choice-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .tool-step { grid-template-columns: 1fr; padding: 1rem; }
    .step-number { width: 34px; height: 34px; }
    .draft-config-grid, .field-pair { grid-template-columns: 1fr; }
    .record-field, .policy-field { grid-template-columns: 1fr; gap: .3rem; }
    .mx-record-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .tools-domain-form > div, .draft-choice-grid { grid-template-columns: 1fr; }
    .tools-domain-form button { width: 100%; }
    .draft-choice-grid label { min-height: 68px; }
}

/* Administration */
.maintenance-banner { padding: .7rem 0; color: #533b08; background: #fff4cf; border-bottom: 1px solid #ead28b; font-size: .78rem; }
.maintenance-banner strong { color: #3e2c06; }
.admin-notice { margin: 0 0 1rem; padding: .8rem 1rem; color: #135a48; background: #e3f3ec; border: 1px solid #add8c9; font-size: .78rem; }
.admin-tabs { display: flex; gap: .25rem; overflow-x: auto; margin: 1rem 0; padding: .35rem; background: #edf2f6; border: 1px solid var(--line); }
.admin-tabs a { flex: 0 0 auto; padding: .65rem .85rem; color: var(--text); text-decoration: none; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.admin-tabs a:hover { color: var(--accent); background: #fff; }
.admin-tabs a.active { color: #fff; background: var(--ink); }
.admin-panel { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem; border-bottom: 1px solid var(--line); }
.admin-panel-heading h2 { margin: 0; color: var(--ink); font-size: 1.15rem; }
.admin-panel-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .74rem; }
.admin-panel-heading .primary-tool-button { margin: 0; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.admin-stat-grid article { padding: 1.15rem; background: #fff; }
.admin-stat-grid span, .admin-stat-grid strong { display: block; }
.admin-stat-grid span { color: var(--muted); font-size: .67rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.admin-stat-grid strong { margin-top: .25rem; color: var(--ink); font-size: 1.65rem; }
.admin-dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); }
.admin-dashboard-grid > article { padding: 1.15rem; background: #fff; }
.admin-subheading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.admin-subheading h3 { margin: 0; color: var(--ink); font-size: .95rem; }
.admin-subheading a { color: var(--accent); font-size: .72rem; font-weight: 750; }
.admin-recent-list { display: grid; gap: .65rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.admin-recent-list li { display: flex; align-items: center; gap: .7rem; }
.admin-recent-list li > div { min-width: 0; }
.admin-recent-list strong, .admin-recent-list small { display: block; overflow-wrap: anywhere; }
.admin-recent-list strong { color: var(--ink); font-size: .75rem; }
.admin-recent-list small { color: var(--muted); font-size: .66rem; }
.admin-empty { margin: 1rem 0 0; color: var(--muted); font-size: .78rem; }
.admin-panel > .diary-controls, .admin-panel > .diary-summary, .admin-panel > .diary-groups, .admin-panel > .diary-table-wrap, .admin-panel > .diary-empty { margin-left: 1.2rem; margin-right: 1.2rem; }
.admin-panel > .diary-controls { margin-top: 1.2rem; }
.admin-panel > .diary-groups, .admin-panel > .diary-table-wrap, .admin-panel > .diary-empty { margin-bottom: 1.2rem; }
.admin-feedback-controls { grid-template-columns: minmax(220px, 1fr) 190px 170px auto auto; }
.diary-actions form { margin: 0; }
.diary-actions button { padding: 0; color: #a33a3a; background: transparent; border: 0; font: inherit; font-weight: 700; text-decoration: underline; }
.feedback-status { display: inline-flex; padding: .25rem .42rem; color: #4f6275; background: #edf2f6; border: 1px solid var(--line); font-size: .64rem; font-weight: 800; white-space: nowrap; }
.feedback-status.status-new { color: #8a3030; background: #fff0f0; border-color: #e8b7b7; }
.feedback-status.status-underreview { color: #714d00; background: #fff2cb; border-color: #e6ca70; }
.feedback-status.status-planned { color: #135583; background: #e9f4fb; border-color: #b7d7e9; }
.feedback-status.status-resolved, .feedback-status.status-closed { color: #135a48; background: #e3f3ec; border-color: #add8c9; }
.admin-config-form { padding: 1.2rem; }
.admin-config-form fieldset { margin: 0 0 1rem; padding: 1rem; background: var(--surface-soft); border: 1px solid var(--line); }
.admin-config-form legend { width: auto; float: none; margin: 0 0 .85rem; color: var(--ink); font-size: .95rem; font-weight: 800; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.admin-form-grid label { color: var(--ink); font-size: .72rem; font-weight: 750; }
.admin-form-grid label.full { grid-column: 1 / -1; }
.admin-form-grid input, .admin-form-grid textarea, .feedback-admin-form select, .feedback-admin-form textarea { display: block; width: 100%; min-height: 43px; margin-top: .3rem; padding: .55rem .65rem; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: .2rem; font-weight: 400; }
.admin-form-grid textarea { min-height: 76px; resize: vertical; }
.admin-form-grid small, .admin-field-help { display: block; margin: .35rem 0 0; color: var(--muted); font-size: .68rem; font-weight: 400; }
.admin-check-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .55rem; margin-top: .9rem; }
.admin-check-grid label { display: flex; align-items: center; gap: .45rem; min-height: 42px; padding: .55rem; color: var(--ink); background: #fff; border: 1px solid var(--line); font-size: .72rem; font-weight: 750; }
.admin-check-grid input { width: 17px; height: 17px; }
.admin-status-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.admin-status-row span { padding: .6rem .7rem; color: var(--text); background: #fff; border: 1px solid var(--line); font-size: .72rem; }
.admin-retention-form { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 1.2rem 1.2rem; padding: 1rem; color: #68490d; background: #fff7e2; border: 1px solid #ead397; }
.admin-retention-form strong { color: #543a0a; font-size: .8rem; }
.admin-retention-form p { margin: .2rem 0 0; font-size: .7rem; }
.admin-retention-form button, .danger-button { padding: .55rem .8rem; color: #fff; background: #a33a3a; border: 1px solid #a33a3a; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.diagnostic-list { display: grid; gap: .7rem; padding: 1.2rem; }
.diagnostic-list article { display: flex; align-items: flex-start; gap: .8rem; padding: .9rem; background: var(--surface-soft); border: 1px solid var(--line); }
.diagnostic-list h3 { margin: 0; color: var(--ink); font-size: .85rem; }
.diagnostic-list p { margin: .25rem 0 0; color: var(--text); font-size: .72rem; }
.diagnostic-status { display: inline-block; min-width: 66px; padding: .25rem .4rem; color: #4f6275; background: #edf2f6; border: 1px solid var(--line); font-size: .62rem; font-weight: 850; text-align: center; text-transform: uppercase; }
.diagnostic-pass { color: #135a48; background: #e3f3ec; border-color: #add8c9; }
.diagnostic-warning { color: #714d00; background: #fff2cb; border-color: #e6ca70; }
.diagnostic-fail { color: #8a3030; background: #fff0f0; border-color: #e8b7b7; }
.diagnostic-list + .admin-field-help { margin: 0 1.2rem 1.2rem; }
.feedback-admin-form { margin: 1rem 0; padding: 1.2rem; background: #fff; border: 1px solid var(--line); }
.feedback-admin-form h2 { margin: 0 0 .8rem; color: var(--ink); font-size: 1rem; }
.feedback-admin-form label { display: block; color: var(--ink); font-size: .74rem; font-weight: 750; }
.feedback-admin-form label + label { margin-top: .8rem; }
.feedback-admin-form textarea { min-height: 140px; resize: vertical; }
.detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.detail-actions form { margin: 0; }

/* Message Header Analyser */
.header-privacy { margin-bottom: 1rem; padding: .9rem 1rem; color: #135a48; background: #e3f3ec; border-left: 4px solid #278368; }
.header-privacy strong { color: #0d4939; }
.header-privacy p { margin: .25rem 0 0; font-size: .76rem; }
.header-analysis-form { padding: 1.2rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.header-analysis-form > label { display: block; margin-bottom: .4rem; color: var(--ink); font-size: .8rem; font-weight: 780; }
.header-analysis-form textarea { width: 100%; min-height: 300px; padding: .8rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; line-height: 1.5; resize: vertical; }
.header-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-form-actions span { color: var(--muted); font-size: .7rem; }
.header-results { margin-top: 1rem; }
.header-result-summary { display: flex; align-items: flex-start; gap: 1rem; padding: 1.2rem; background: #fff; border: 1px solid var(--line); }
.header-result-summary h2, .header-result-grid h2, .header-timeline-panel h2 { margin: 0; color: var(--ink); font-size: 1.05rem; }
.header-result-summary p { margin: .35rem 0; }
.header-result-summary small { color: var(--muted); }
.header-result-summary #header-meta { display: flex; flex-wrap: wrap; gap: .35rem .6rem; margin-top: .45rem; }
.header-meta-item { display: inline-flex; align-items: center; padding-right: .6rem; border-right: 1px solid var(--line); }
.header-meta-item:last-child { padding-right: 0; border-right: 0; }
.header-meta-item.transport-slower { color: #6a570e; font-weight: 750; }.header-meta-item.transport-unusual { color: #8a5b00; font-weight: 800; }.header-meta-item.transport-significant { color: #a12f2f; font-weight: 850; }
.header-outcome { display: inline-flex; min-width: 105px; justify-content: center; padding: .45rem .6rem; color: #fff; background: var(--accent); font-size: .7rem; font-weight: 850; text-transform: uppercase; }
.outcome-authentication-concerns-found { background: var(--c); }.outcome-review-recommended, .outcome-checks-changed-in-transit { background: var(--b); }.outcome-checks-passed, .outcome-delivered-to-inbox, .outcome-delivered-checks-changed-in-transit { background: var(--a); }.outcome-inconclusive { background: #778397; }
.header-plain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.header-plain-grid article { padding: 1.1rem 1.2rem; background: #eef5f9; border: 1px solid #cbdde8; border-top: 4px solid var(--accent); }
.header-card-label { color: var(--accent); font-size: .63rem; font-weight: 850; letter-spacing: .08em; }
.header-plain-grid h2 { margin: .35rem 0; color: var(--ink); font-size: 1rem; }
.header-plain-grid p, .header-section-intro { margin: 0; color: var(--text); font-size: .74rem; line-height: 1.55; }
.header-result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.header-result-grid > article, .header-timeline-panel, .header-auth-stages-panel { padding: 1.2rem; background: #fff; border: 1px solid var(--line); }
.header-auth-row, .header-observation { position: relative; margin-top: .7rem; padding: .8rem; background: var(--surface-soft); border-left: 3px solid var(--accent); }
.header-auth-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.header-auth-row strong { display: inline-block; min-width: 62px; }.header-auth-row span { font-size: .66rem; font-weight: 850; text-transform: uppercase; }.header-auth-row p, .header-observation p { margin: .3rem 0; font-size: .72rem; line-height: 1.5; }.header-auth-row > a, .header-observation a { display: inline-block; margin-top: .45rem; color: var(--accent); font-size: .67rem; font-weight: 750; }
.auth-pass { color: var(--a); }.auth-fail, .auth-permerror { color: var(--c); }.auth-softfail, .auth-temperror, .auth-forwarded { color: var(--b); }.observation-warning { border-left-color: var(--b); }
.header-technical { margin-top: .55rem; padding-top: .45rem; border-top: 1px solid var(--line); }
.header-technical summary { color: var(--accent); cursor: pointer; font-size: .68rem; font-weight: 750; }
.header-technical p { color: var(--muted); overflow-wrap: anywhere; }
.header-auth-stages-panel { margin-top: 1rem; }
.header-auth-stages-panel > h2 { margin: 0; color: var(--ink); font-size: 1.05rem; }
.header-auth-stages-panel > p { margin: .35rem 0 1rem; color: var(--muted); font-size: .72rem; }
.header-stage { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: .8rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.header-stage-number { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: var(--accent); border-radius: 50%; font-size: .68rem; font-weight: 850; }
.header-stage-copy h3 { margin: 0; color: var(--ink); font-size: .83rem; }
.header-stage-copy > p { margin: .25rem 0; color: var(--text); font-size: .73rem; }
.header-stage-copy > small { color: var(--muted); font-size: .67rem; }
.header-stage-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.header-stage-badges span { padding: .25rem .42rem; background: var(--surface-soft); border: 1px solid var(--line); font-size: .62rem; font-weight: 800; }
.header-timeline-panel { margin-top: 1rem; }.header-timeline-panel > p { color: var(--muted); font-size: .72rem; }.header-timeline-panel ol { margin: 1rem 0 0; padding: 0; list-style: none; }
.header-timeline-panel li { position: relative; margin-left: 12px; padding: 0 0 1.1rem 1.5rem; border-left: 2px solid #b9cfdd; }.header-timeline-panel li::before { position: absolute; top: .1rem; left: -7px; width: 12px; height: 12px; content: ""; background: var(--accent); border: 2px solid #fff; border-radius: 50%; }.header-timeline-panel h3 { margin: 0; color: var(--ink); font-size: .8rem; overflow-wrap: anywhere; }.header-timeline-panel p { margin: .25rem 0; font-size: .72rem; }.header-timeline-panel small { color: var(--muted); font-size: .66rem; }
.header-hop-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.delay-badge { flex: 0 0 auto; padding: .24rem .42rem; font-size: .6rem; font-weight: 850; text-transform: uppercase; }
.delay-badge-slower { color: #5f531d; background: #f8f2d8; border: 1px solid #dfd18b; }
.delay-badge-unusual { color: #714d00; background: #fff2cb; border: 1px solid #e6ca70; }
.delay-badge-significant { color: #8a3030; background: #fff0f0; border: 1px solid #e8b7b7; }
.delay-badge-timestamp-inconsistency { color: #68490d; background: #fff7e2; border: 1px solid #ead397; }
.header-timeline-panel li.delay-slower::before, .header-timeline-panel li.delay-unusual::before { background: #d5aa24; }
.header-timeline-panel li.delay-significant::before { background: var(--c); }
.header-timeline-panel li.delay-timestamp-inconsistency { border-left-style: dashed; }
.header-timeline-panel li.delay-timestamp-inconsistency::before { background: #9a7430; }
.header-timeline-panel li.delay-slower > div, .header-timeline-panel li.delay-unusual > div, .header-timeline-panel li.delay-timestamp-inconsistency > div { padding: .7rem; background: #fffaf0; border: 1px solid #ead9a6; }
.header-timeline-panel li.delay-significant > div { padding: .7rem; background: #fff3f3; border: 1px solid #e8b7b7; }
.header-timeline-panel .delay-explanation { margin-top: .5rem; padding: .55rem .65rem; color: var(--text); background: #fffaf0; border-left: 3px solid #d5aa24; line-height: 1.5; }
.header-timeline-panel li.delay-significant .delay-explanation { color: #782828; background: #fff3f3; border-left-color: var(--c); }
.header-boundary { margin: 1rem 0 0; padding: .8rem; color: #68490d; background: #fff7e2; border-left: 3px solid var(--b); font-size: .72rem; }

@media (max-width: 900px) {
    .admin-stat-grid, .admin-check-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-feedback-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .admin-panel-heading, .admin-retention-form, .detail-actions { align-items: stretch; flex-direction: column; }
    .admin-stat-grid, .admin-dashboard-grid, .admin-form-grid, .admin-check-grid { grid-template-columns: 1fr; }
    .admin-form-grid label.full { grid-column: auto; }
    .admin-feedback-controls { grid-template-columns: 1fr; }
    .header-result-grid, .header-plain-grid { grid-template-columns: 1fr; }
    .header-result-summary, .header-form-actions, .assessment-methodology-link { align-items: stretch; flex-direction: column; }
    .admin-panel-heading > a, .admin-retention-form button, .detail-actions > * { width: 100%; justify-content: center; text-align: center; }
}

/* DNS drafting workflow and review */
.workflow-progress { display: flex; max-width: 570px; align-items: center; gap: .7rem; margin-top: 1.4rem; }
.workflow-progress span { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .75rem; font-weight: 700; }
.workflow-progress span b { display: grid; width: 25px; height: 25px; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line-strong); font-size: .68rem; }
.workflow-progress span.active { color: var(--ink); }
.workflow-progress span.active b { color: #fff; background: var(--accent); border-color: var(--accent); }
.workflow-progress i { height: 1px; flex: 1; background: var(--line-strong); }
.tools-domain-form > small { display: block; margin-top: .4rem; color: var(--muted); font-size: .7rem; }
.ttl-setting { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 1rem; margin: 0 0 .8rem; padding: 1rem; background: #eef5f9; border: 1px solid #cbdde8; border-left: 4px solid var(--accent); }
.ttl-setting label { display: block; color: var(--ink); font-size: .8rem; font-weight: 780; }
.ttl-setting p { margin: .25rem 0 0; color: var(--text); font-size: .75rem; }
.ttl-setting input { width: 100%; min-height: 44px; padding: .55rem .7rem; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: .25rem; }
.config-guidance { min-height: 116px; margin: -.15rem 0 1rem; padding: .85rem; color: var(--text); background: #fff; border-left: 3px solid var(--accent); }
.config-guidance strong { color: var(--ink); font-size: .8rem; }
.config-guidance p { margin: .3rem 0 0; font-size: .73rem; line-height: 1.55; }
.draft-page-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.draft-page-actions .primary-tool-button { margin-top: 0; }
.draft-page-actions a { color: var(--accent); font-size: .78rem; font-weight: 700; }
.review-missing { padding: 3rem 1.5rem; background: #fff; border: 1px solid var(--line); text-align: center; }
.review-missing h2 { margin: 0; color: var(--ink); }
.review-missing p { margin: .5rem 0 1.2rem; color: var(--muted); }
.review-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 1rem; background: var(--line); border: 1px solid var(--line); }
.review-summary div { min-width: 0; padding: 1rem; background: #fff; }
.review-summary span, .review-summary strong { display: block; }
.review-summary span { color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.review-summary strong { margin-top: .25rem; color: var(--ink); font-size: .82rem; overflow-wrap: anywhere; }
.draft-records-panel, .mta-policy-review, .review-notes { margin-top: 1rem; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(16,42,67,.04); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 0; color: var(--ink); font-size: 1.08rem; }
.panel-heading p { margin: .25rem 0 0; color: var(--muted); font-size: .74rem; }
.panel-heading button, .draft-records-table button, .mta-policy-review dd button { padding: .42rem .7rem; color: var(--accent); background: #fff; border: 1px solid var(--line-strong); font-size: .7rem; font-weight: 750; white-space: nowrap; }
.panel-heading button { color: #fff; background: var(--ink); border-color: var(--ink); }
.panel-heading button:hover { background: var(--accent); border-color: var(--accent); }
.draft-table-wrap { overflow-x: auto; }
.draft-records-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.draft-records-table th { padding: .7rem .9rem; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.draft-records-table td { padding: .9rem; color: var(--text); border-bottom: 1px solid var(--line); font-size: .76rem; vertical-align: top; }
.draft-records-table tr:last-child td { border-bottom: 0; }
.draft-records-table th:first-child, .draft-records-table td:first-child { width: 72px; color: var(--ink); font-weight: 800; }
.draft-records-table th:nth-child(2), .draft-records-table td:nth-child(2) { width: 220px; }
.draft-records-table th:nth-child(3), .draft-records-table td:nth-child(3), .draft-records-table th:nth-child(4), .draft-records-table td:nth-child(4) { min-width: 260px; }
.draft-records-table th:nth-child(5), .draft-records-table td:nth-child(5) { width: 90px; }
.draft-records-table th:nth-child(6), .draft-records-table td:nth-child(6) { width: 145px; }
.draft-records-table th:last-child, .draft-records-table td:last-child { width: 90px; }
.draft-records-table code { color: var(--ink); font-size: .72rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.draft-records-table .record-status { display: inline-block; padding: .24rem .42rem; color: #135a48; background: #e3f3ec; border: 1px solid #add8c9; font-size: .62rem; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.draft-records-table .record-status.status-modified { color: #714d00; background: #fff2cb; border-color: #e6ca70; }
.draft-records-table .record-status.status-new { color: #135583; background: #e9f4fb; border-color: #b7d7e9; }
.draft-records-table .record-status.status-manual-review { color: #8a3030; background: #fff0f0; border-color: #e8b7b7; }
.mta-policy-review dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); margin: 0; }
.mta-policy-review dt, .mta-policy-review dd { margin: 0; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.mta-policy-review dt { color: var(--muted); background: var(--surface-soft); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.mta-policy-review dd { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .7rem; }
.mta-policy-review code { color: var(--ink); font-size: .75rem; overflow-wrap: anywhere; }
.mta-policy-review pre { margin: 0; color: #dbe8f2; background: #12283b; padding: .8rem; font-size: .73rem; line-height: 1.55; white-space: pre-wrap; }
.review-notes { padding: 1.2rem; }
.review-notes > h2 { margin: 0 0 .8rem; color: var(--ink); font-size: 1.08rem; }
#review-note-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
#review-note-list article { padding: .9rem; background: var(--surface-soft); border-left: 3px solid var(--accent); }
#review-note-list h3 { margin: 0; color: var(--ink); font-size: .82rem; }
#review-note-list ul { margin: .5rem 0 0; padding-left: 1.1rem; color: var(--text); font-size: .72rem; }
#review-note-list li + li { margin-top: .3rem; }
.review-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.review-actions .primary-tool-button { margin-top: 0; }
.secondary-tool-button { display: inline-flex; min-height: 44px; align-items: center; padding: .55rem 1rem; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: .25rem; text-decoration: none; font-size: .78rem; font-weight: 720; }
.secondary-tool-button:hover { color: var(--accent); border-color: var(--accent); }

/* Feedback and grading methodology */
.feedback-card { padding: clamp(1rem, 3vw, 1.6rem); background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(16,42,67,.04); }
.feedback-field + .feedback-field, .feedback-two-column + .feedback-field { margin-top: 1rem; }
.feedback-field label { display: block; margin-bottom: .35rem; color: var(--ink); font-size: .76rem; font-weight: 780; }
.feedback-field input, .feedback-field select, .feedback-field textarea { width: 100%; min-height: 44px; padding: .6rem .7rem; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: .25rem; }
.feedback-field textarea { min-height: 170px; resize: vertical; }
.feedback-field small { display: block; margin-top: .3rem; color: var(--muted); font-size: .68rem; text-align: right; }
.feedback-two-column { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1rem; }
.feedback-two-column .feedback-field { margin: 0; }
.feedback-privacy { margin-top: 1rem; padding: .8rem; color: var(--text); background: #eef5f9; border-left: 3px solid var(--accent); font-size: .73rem; }
.feedback-privacy strong { color: var(--ink); }
.feedback-privacy p { margin: .25rem 0 0; }
.feedback-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.feedback-result { margin-top: 1rem; padding: .8rem; font-size: .78rem; }
.feedback-result.success { color: #135a48; background: #e3f3ec; border: 1px solid #add8c9; }
.feedback-result.error { color: #8a3030; background: #fff0f0; border: 1px solid #e8b7b7; }
.feedback-review-table { min-width: 1120px; }
.feedback-review-table td:nth-child(4) { min-width: 300px; white-space: normal; }
.feedback-message-preview { display: -webkit-box; max-width: 430px; overflow: hidden; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.feedback-type-badge { display: inline-flex; padding: .28rem .45rem; color: var(--ink); background: #edf2f6; border: 1px solid var(--line); font-size: .68rem; font-weight: 760; white-space: nowrap; }
.feedback-type-positive { color: #135a48; background: #e3f3ec; border-color: #add8c9; }
.feedback-type-negative, .feedback-type-bugfix { color: #8a3030; background: #fff0f0; border-color: #e8b7b7; }
.feedback-type-enhancement { color: #135583; background: #e9f4fb; border-color: #b7d7e9; }
.feedback-type-getintouch { color: #714d0c; background: #fff6dc; border-color: #ead397; }
.feedback-detail-card { margin-bottom: 1rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.feedback-detail-metadata { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.feedback-detail-metadata div { padding: 1rem 1.2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feedback-detail-metadata div:nth-child(2n) { border-right: 0; }
.feedback-detail-metadata dt { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.feedback-detail-metadata dd { margin: .25rem 0 0; color: var(--ink); font-size: .82rem; overflow-wrap: anywhere; }
.feedback-detail-message { padding: 1.2rem; }
.feedback-detail-message h2 { margin: 0 0 .7rem; color: var(--ink); font-size: 1rem; }
.feedback-detail-message p { margin: 0; color: var(--text); line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.grade-definition-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1rem; }
.grade-definition-grid article { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem; background: #fff; border: 1px solid var(--line); }
.grade-tile { display: grid; width: 44px; height: 44px; flex: 0 0 44px; place-items: center; color: #fff; font-size: 1.1rem; font-weight: 850; }
.grade-definition-grid h2 { margin: 0; color: var(--ink); font-size: .92rem; }
.grade-definition-grid p { margin: .3rem 0 0; font-size: .74rem; }
.methodology-panel, .grading-table-panel { margin-top: 1rem; padding: 1.2rem; background: #fff; border: 1px solid var(--line); }
.methodology-panel h2, .grading-table-panel h2 { margin: 0 0 .7rem; color: var(--ink); font-size: 1.1rem; }
.methodology-panel ol { margin: 0 0 .8rem; padding-left: 1.25rem; font-size: .8rem; }
.methodology-panel li + li { margin-top: .35rem; }
.methodology-panel p { margin: .6rem 0 0; font-size: .8rem; }
.grading-table-wrap { overflow-x: auto; }
.grading-table { width: 100%; min-width: 980px; border-collapse: collapse; }
.grading-table th, .grading-table td { padding: .75rem; border: 1px solid var(--line); font-size: .72rem; vertical-align: top; }
.grading-table thead th { color: var(--ink); background: var(--surface-soft); }
.grading-table tbody th { color: var(--ink); background: #f8fafc; white-space: nowrap; }
.reference-callout { margin: 0 0 1rem; padding: .75rem 1rem; background: #eef5f9; border-left: 3px solid var(--accent); font-size: .78rem; }
.report-legend a { margin-left: auto; color: var(--accent); font-weight: 700; }

@media (max-width: 760px) {
    .workflow-progress { max-width: none; }
    .ttl-setting, .review-summary, #review-note-list { grid-template-columns: 1fr; }
    .config-guidance { min-height: 0; }
    .mta-policy-review dl { grid-template-columns: 1fr; }
    .mta-policy-review dt { border-bottom: 0; }
    .draft-page-actions, .review-actions { align-items: stretch; flex-direction: column; }
    .feedback-two-column, .feedback-detail-metadata, .grade-definition-grid { grid-template-columns: 1fr; }
    .feedback-detail-metadata div { border-right: 0; }
    .draft-page-actions .primary-tool-button, .draft-page-actions a, .review-actions > * { width: 100%; text-align: center; justify-content: center; }
}

@media (max-width: 520px) {
    .workflow-progress span { font-size: .67rem; }
    .panel-heading { align-items: stretch; flex-direction: column; }
    .panel-heading button { width: 100%; }
}
.analytics-consent { position:fixed; bottom:1rem; left:1rem; right:1rem; max-width: 70rem; margin-inline:auto; z-index:1100; background:#fff; color:#102a43; border:2px solid #236b78; border-radius:12px; padding:1.25rem; box-shadow:0 8px 36px #102a4333; max-height:80vh; overflow:auto; }
.analytics-consent[hidden] { display:none; }
.analytics-consent h2 { font-size:1.25rem; }
.analytics-actions { display:flex; flex-wrap:wrap; gap:1rem; align-items:center; }
.footer-legal { display:flex; flex-direction:column; }
.footer-analytics { margin-top:auto; padding-top:1rem; text-align:right; }
.footer-analytics-status { display:block; margin-top:.4rem; color:#d7e1eb; font-size:.78rem; }
.registration-panel { background:white; border:1px solid #ccd9e3; border-top:4px solid #1a7293; padding:1.3rem; margin:1.3rem 0; }
.registration-heading { display:flex; justify-content:space-between; gap:1rem; align-items:center; }
.registration-heading h2 { margin:0; font-size:1.3rem; color:#102a43; }
.registration-heading>span { font-size:.75rem; color:#36576e; background:#eaf1f6; border-radius:1rem; padding:.3rem .7rem; }
.registration-intro,.registration-stamp { font-size:.8rem; color:#52677b; margin:.75rem 0; }
.registration-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin:1rem 0; border-top:1px solid #d8e2eb; border-left:1px solid #d8e2eb; }
.registration-grid>div { padding:1rem; border-right:1px solid #d8e2eb; border-bottom:1px solid #d8e2eb; overflow-wrap:anywhere; }
.registration-grid dt { font-size:.75rem; color:#52677b; font-weight:400; }.registration-grid dd { color:#17354c; font-weight:600; font-size:.9rem; margin:.4rem 0; }
.registration-grid small,.registration-ns { display:block; }.registration-grid small {font-size:.75rem}.registration-grid a {font-size:.8rem}
.registration-notice {background:#fff6e7; border-left:3px solid #cc8d24; color:#755217;padding:.8rem;font-size:.85rem}
.registration-details summary {cursor:pointer;color:#174b6a;font-weight:600;padding:.5rem 0;}.registration-evidence{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;margin-top:1rem}.registration-evidence h3{font-size:1rem}.registration-evidence dt{font-size:.8rem;color:#284c66}.registration-evidence dd{font-size:.8rem;overflow-wrap:anywhere;margin:.2rem 0 .7rem}
.registration-copy {background:white;border:1px solid #b7c7d5;border-radius:4px;color:#174b6a;font-size:.75rem;padding:.3rem .6rem}.registration-copy-status{font-size:.8rem}
@media(max-width:760px){.registration-grid,.registration-evidence{grid-template-columns:1fr}.registration-heading{align-items:flex-start;flex-direction:column}}
@media print{.registration-copy{display:none}.registration-panel{break-inside:auto}}
.registration-hide,.registration-details[open] .registration-show{display:none}.registration-details[open] .registration-hide{display:inline}

.assessment-scope { margin-top: 20px; border-top: 1px solid #d7e1eb; padding-top: 16px; }
.assessment-scope summary { cursor: pointer; font-weight: 600; }
.assessment-scope summary span { font-weight: 400; margin-left: 12px; }
.assessment-scope p { margin: 12px 0; font-size: .9rem; }
#scope-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 0; padding: 12px 0; }
#scope-checks label { display: flex; align-items: center; gap: 8px; }
#scope-checks input { width: 18px; height: 18px; flex-shrink: 0; }
.scope-actions { display: flex; gap: 12px; }
.scope-actions button { background: white; color: #102a43; border: 1px solid #829ab1; border-radius: 4px; padding: 6px 12px; }
.scope-result { padding: 14px; background: #edf4fa; border-radius: 6px; }
@media (max-width: 600px) { #scope-checks { grid-template-columns: 1fr; } .assessment-scope summary span { display: block; margin: 6px 0 0; } }
