:root {
  --bg: #0b1020;
  --bg-2: #0f1530;
  --panel: #131a36;
  --panel-2: #1a2348;
  --border: #2a335a;
  --text: #e7ebff;
  --muted: #9aa3c7;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --good: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --info: #3b82f6;
  --neutral: #94a3b8;
}


/* DNSConsult logo */
.brand-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo img {
    width: 180px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

/* Default: dark theme */
.brand-logo .logo-light {
    display: none;
}

.brand-logo .logo-dark {
    display: block;
}

/* Light theme */
html[data-theme="light"] .brand-logo .logo-light {
    display: block;
}

html[data-theme="light"] .brand-logo .logo-dark {
    display: none;
}


* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,0.25), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(139,92,246,0.2), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}

.logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px rgba(99,102,241,0.4);
}
.logo svg { width: 28px; height: 28px; }

.logo-dmarc { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 10px 30px rgba(16,185,129,0.4); }
.logo-dkim  { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 10px 30px rgba(245,158,11,0.4); }
.logo-header{ background: linear-gradient(135deg, #3b82f6, #1d4ed8); box-shadow: 0 10px 30px rgba(59,130,246,0.4); }

.dropdown-content a.active { color: var(--accent); }

input[type="text"] {
  display: block;
  width: 100%;
}

h1 {
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.input-row {
  display: flex;
  gap: 10px;
}

input[type="text"] {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]::placeholder { color: #5d6694; }
input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.18);
}

button[type="submit"] {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
  justify-content: center;
  transition: transform .05s, box-shadow .15s, opacity .2s;
  box-shadow: 0 8px 20px rgba(99,102,241,0.35);
}
button[type="submit"]:hover { box-shadow: 0 10px 26px rgba(99,102,241,0.5); }
button[type="submit"]:active { transform: translateY(1px); }
button[type="submit"]:disabled { opacity: 0.7; cursor: progress; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  display: none;
  animation: spin 0.8s linear infinite;
}
button.loading .spinner { display: inline-block; }
button.loading .btn-label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.example {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  cursor: pointer;
  margin: 0 2px;
}
.example:hover { color: var(--text); border-color: var(--accent); }

.results { margin-top: 22px; }

.result-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
  animation: fadeIn .25s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.result-header h2 {
  font-size: 18px;
  margin: 0;
}
.domain-pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.good { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.badge.warn { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.badge.bad  { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.badge.info { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge.neutral { background: rgba(148,163,184,0.15); color: #cbd5e1; border: 1px solid rgba(148,163,184,0.3); }

.record {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  color: #cbd5e1;
  word-break: break-all;
  white-space: pre-wrap;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 18px 0 8px;
}

.mech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.mech-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}
.mech-item .raw { color: #e2e8f0; word-break: break-all; }

.policy-card {
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.policy-card .policy-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 4px;
}
.policy-card .policy-desc {
  color: var(--muted);
  font-size: 14px;
}

.error {
  background: rgba(239,68,68,0.1);
  color: #fecaca;
  border: 1px solid rgba(239,68,68,0.3);
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
}

details.txt-all {
  margin-top: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}
details.txt-all summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}
details.txt-all summary::-webkit-details-marker { display: none; }
details.txt-all .record { margin-top: 10px; }
details.txt-all .record + .record { margin-top: 8px; }

.footer {
  text-align: center;
  margin-top: 32px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .input-row { flex-direction: column; }
  button[type="submit"] { width: 100%; padding: 14px; }
}
/* NAVBAR */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1100px;
  margin: auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  color: white;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.nav-links a:hover {
  color: white;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

@media (max-width: 900px) {
  .nav-container { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .dropdown.open .dropdown-content {
    display: flex;
    position: static;
    flex-direction: column;
  }
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropbtn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  min-width: 140px;
  overflow: hidden;
}

.dropdown-content a {
  display: block;
  padding: 10px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Theme switch */
.theme-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-left: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Reusable photo slots */
.image-slot {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(99,102,241,.14), transparent 55%),
    linear-gradient(135deg, var(--panel), var(--bg-2));
  color: var(--muted);
}
.image-slot-photo,
.image-slot-placeholder { grid-area: 1 / 1; width: 100%; height: 100%; }
.image-slot-photo { object-fit: cover; }
.image-slot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  text-align: center;
}
.image-slot-placeholder[hidden],
.image-slot-photo[hidden] { display: none !important; }
.image-slot-placeholder strong { color: var(--text); font-size: 14px; }
.image-slot-placeholder small { font-size: 12px; line-height: 1.5; }
.image-slot-placeholder code {
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(99,102,241,.12);
  color: var(--text);
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-wrap: anywhere;
}
.image-slot-icon { font-size: 26px; line-height: 1; color: var(--accent); }
.home-image-slot { width: min(100%, 820px); aspect-ratio: 2.45 / 1; margin: 36px auto 0; }
.project-image-slot { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; }
.project-image-slot .image-slot-placeholder { gap: 5px; padding: 10px; }
.project-image-slot .image-slot-placeholder strong { font-size: 12px; }
.project-image-slot .image-slot-placeholder small { font-size: 10px; }
.project-image-slot .image-slot-placeholder code { font-size: 9px; padding: 2px 5px; }
html body .project-card { min-height: 0; padding: 14px; gap: 14px; }
.article-image-slot { width: 100%; aspect-ratio: 16 / 7; margin: 0 0 32px; }

/* Light theme */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-2: #edf2f8;
  --panel: #ffffff;
  --panel-2: #f6f8fc;
  --border: #d5deeb;
  --text: #18243a;
  --muted: #56657b;
  --accent: #4f46e5;
  --accent-2: #7c3aed;
  --good: #059669;
  --warn: #b45309;
  --bad: #dc2626;
  --info: #2563eb;
  --neutral: #64748b;
}
html[data-theme="light"] body {
  background: linear-gradient(180deg, #f8fafc 0%, #eff3f9 100%);
  color: var(--text);
}
html[data-theme="light"] .navbar { background: rgba(248, 250, 252, .94); }
html[data-theme="light"] .navbar .brand,
html[data-theme="light"] .footer-brand .brand { color: var(--text) !important; }
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links .dropbtn:hover { color: var(--text); }
html[data-theme="light"] .hero-title,
html[data-theme="light"] .page-title {
  background-image: linear-gradient(135deg, #17233b 20%, #4338ca 70%, #6d28d9) !important;
  -webkit-text-fill-color: transparent;
}
html[data-theme="light"] .hero-eyebrow,
html[data-theme="light"] .page-eyebrow { color: #4338ca; }
html[data-theme="light"] .project-open,
html[data-theme="light"] .article-body a,
html[data-theme="light"] .article-body code,
html[data-theme="light"] .toc-list li a:hover,
html[data-theme="light"] .toc-list li a.active { color: #4338ca; }
html[data-theme="light"] .article-body a:hover { color: #312e81; }
html[data-theme="light"] .article-body pre,
html[data-theme="light"] .dns-record { color: #334155; }
html[data-theme="light"] .cat-security { color: #b91c1c; }
html[data-theme="light"] .cat-basics { color: #1d4ed8; }
html[data-theme="light"] .cat-cases { color: #a16207; }
html[data-theme="light"] .cat-practice { color: #047857; }
html[data-theme="light"] .callout-warning .callout-body p { color: #92400e; }
html[data-theme="light"] .callout-danger .callout-body p { color: #991b1b; }
html[data-theme="light"] .callout-info .callout-body p { color: #1e40af; }
html[data-theme="light"] .callout-tip .callout-body p { color: #065f46; }
html[data-theme="light"] .tv-key { color: #4338ca; }
html[data-theme="light"] .tv-val { color: #047857; }
html[data-theme="light"] .tv-warn { color: #92400e; }
html[data-theme="light"] .tv-bad { color: #b91c1c; }
html[data-theme="light"] .success-msg { color: #047857; }
html[data-theme="light"] .error-msg { color: #b91c1c; }

@media (max-width: 900px) {
  .theme-toggle { margin-left: 8px; padding: 8px 10px; }
  .home-image-slot { aspect-ratio: 1.7 / 1; margin-top: 28px; }
}
@media (max-width: 560px) {
  .article-image-slot { aspect-ratio: 4 / 3; }
  .home-image-slot { aspect-ratio: 4 / 3; }
}

/* Light-theme navbar: readable links and interactive states */
html[data-theme="light"] .navbar {
  background: rgba(248, 250, 252, 0.96);
  border-bottom-color: #d5deeb;
}

html[data-theme="light"] .navbar .nav-links > a,
html[data-theme="light"] .navbar .dropbtn,
html[data-theme="light"] .navbar .dropdown-content a {
  color: #26354d;
}

html[data-theme="light"] .navbar .nav-links > a:hover,
html[data-theme="light"] .navbar .nav-links > a:focus-visible,
html[data-theme="light"] .navbar .nav-links > a:active,
html[data-theme="light"] .navbar .dropbtn:hover,
html[data-theme="light"] .navbar .dropbtn:focus-visible,
html[data-theme="light"] .navbar .dropbtn:active,
html[data-theme="light"] .navbar .dropdown-content a:hover,
html[data-theme="light"] .navbar .dropdown-content a:focus-visible,
html[data-theme="light"] .navbar .dropdown-content a:active,
html[data-theme="light"] .navbar .dropdown-content a.active {
  color: #4338ca;
}

html[data-theme="light"] .navbar .dropdown-content {
  background: #fff;
  border-color: #d5deeb;
}

html[data-theme="light"] .navbar .dropdown-content a:hover,
html[data-theme="light"] .navbar .dropdown-content a:focus-visible,
html[data-theme="light"] .navbar .dropdown-content a:active,
html[data-theme="light"] .navbar .dropdown-content a.active {
  background: #eef2ff;
}

html[data-theme="light"] .navbar .nav-links.open {
  background: #fff;
}

html[data-theme="light"] .navbar .nav-toggle,
html[data-theme="light"] .navbar .theme-toggle {
  color: #26354d;
}
