/* Public site (monitordns.app). Same colour tokens as the dashboard's theme.css so the
   landing page and the app read as one product. Anonymous pages follow the OS colour
   scheme; there is no sign-in here to carry a stored preference. */

:root {
  --app-bg:            #f5f7fa;
  --app-surface:       #ffffff;
  --app-surface-2:     #f1f4f8;
  --app-hover:         #e9eef5;
  --app-border:        #e2e8f0;
  --app-text:          #0f172a;
  --app-text-muted:    #5b6779;
  --app-input-bg:      #ffffff;
  --app-link:          #1d4ed8;
  --app-accent:        #2563eb;
  --app-accent-hover:  #1d4ed8;
  --app-accent-text:   #1d4ed8;
  --app-accent-soft:   #dbeafe;
  --app-success-text:  #15803d;
  --app-success-soft:  #dcfce7;
  --app-warning-text:  #a16207;
  --app-warning-soft:  #fef3c7;
  --app-danger-text:   #b91c1c;
  --app-danger-soft:   #fee2e2;
  --app-info-text:     #0e7490;
  --app-info-soft:     #cffafe;
  --app-shadow:        0 1px 2px rgba(15, 23, 42, .06);
  --app-shadow-lg:     0 12px 32px -12px rgba(15, 23, 42, .18);
  --app-font:          "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --app-mono:          ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --app-bg:            #0f1218;
    --app-surface:       #161a22;
    --app-surface-2:     #1d222c;
    --app-hover:         #232935;
    --app-border:        #262c38;
    --app-text:          #e6e9ef;
    --app-text-muted:    #9aa4b2;
    --app-input-bg:      #12161d;
    --app-link:          #8ab4f8;
    --app-accent:        #2563eb;
    --app-accent-hover:  #3b82f6;
    --app-accent-text:   #93c5fd;
    --app-accent-soft:   #1e2a44;
    --app-success-text:  #4ade80;
    --app-success-soft:  #12291b;
    --app-warning-text:  #fbbf24;
    --app-warning-soft:  #2e2410;
    --app-danger-text:   #f87171;
    --app-danger-soft:   #331616;
    --app-info-text:     #67e8f9;
    --app-info-soft:     #0f2a30;
    --app-shadow:        0 1px 2px rgba(0, 0, 0, .4);
    --app-shadow-lg:     0 12px 32px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

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

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

html { scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 400 16px/1.6 var(--app-font);
  color: var(--app-text);
  background: var(--app-bg);
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; }
a { color: var(--app-link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { margin: 0; padding: 0; }
code, .mono { font-family: var(--app-mono); font-size: .9em; }
button { font: inherit; color: inherit; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 8px 12px; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2rem, 1120px); margin-inline: auto; }
.container-narrow { width: min(100% - 2rem, 760px); margin-inline: auto; }

.muted { color: var(--app-text-muted); }
.small { font-size: .875rem; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  font-size: .9375rem; font-weight: 500; line-height: 1;
  border: 1px solid var(--app-border); border-radius: 8px;
  background: var(--app-surface); color: var(--app-text);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease;
}
.btn:hover { text-decoration: none; background: var(--app-hover); }
.btn-primary { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.btn-primary:hover { background: var(--app-accent-hover); border-color: var(--app-accent-hover); }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: .875rem; border-radius: 6px; }
.btn-block { width: 100%; }

/* -------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  background: var(--app-surface-2); color: var(--app-text-muted);
}
.badge-high    { background: var(--app-danger-soft);  color: var(--app-danger-text); }
.badge-medium  { background: var(--app-warning-soft); color: var(--app-warning-text); }
.badge-low     { background: var(--app-info-soft);    color: var(--app-info-text); }
.badge-ok      { background: var(--app-success-soft); color: var(--app-success-text); }
.badge-accent  { background: var(--app-accent-soft);  color: var(--app-accent-text); }

/* ----------------------------------------------------------------- nav */

.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--app-bg) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--app-border);
}
.site-nav .container { display: flex; align-items: center; gap: 24px; min-height: 60px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--app-text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px; background: var(--app-accent); flex-shrink: 0; }

.nav-menu { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-menu a { padding: 8px 10px; font-size: .9rem; font-weight: 500; color: var(--app-text-muted); border-radius: 6px; }
.nav-menu a:hover { color: var(--app-text); background: var(--app-hover); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: auto;
  border: 1px solid var(--app-border); border-radius: 8px; background: var(--app-surface); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu, .nav-actions { display: none; }
  .site-nav .container { flex-wrap: wrap; }
  .site-nav.is-open .nav-menu { display: flex; flex-direction: column; align-items: stretch; width: 100%; padding-top: 4px; }
  .site-nav.is-open .nav-menu a { padding: 10px 8px; }
  .site-nav.is-open .nav-actions { display: flex; width: 100%; padding: 8px 0 14px; }
  .site-nav.is-open .nav-actions .btn { flex: 1; }
}

/* ------------------------------------------------------------ sections */

.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--app-border); }
.section-head { max-width: 62ch; margin-bottom: 40px; }
.section-head h2 { font-size: 1.75rem; margin-bottom: 10px; }
.section-head p { color: var(--app-text-muted); font-size: 1.0625rem; }
@media (max-width: 640px) { .section { padding-block: 52px; } .section-head { margin-bottom: 28px; } }

/* ---------------------------------------------------------------- hero */

.hero { padding-block: 72px 64px; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 1.1rem + 2.8vw, 3.1rem); line-height: 1.08; letter-spacing: -0.025em; max-width: 17ch; }
.hero-lead { margin-top: 20px; max-width: 50ch; font-size: 1.125rem; color: var(--app-text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-note { margin-top: 14px; font-size: .875rem; color: var(--app-text-muted); }
@media (max-width: 900px) {
  .hero { padding-block: 48px; }
  .hero .container { grid-template-columns: 1fr; gap: 36px; }
  .hero h1 { max-width: none; }
}

/* The hero panel: a zone overview in the dashboard's own vocabulary. */
.zone-panel {
  background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 14px;
  box-shadow: var(--app-shadow-lg); font-size: .875rem; overflow: hidden;
}
.zone-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--app-border); }
.zone-panel-head strong { font-weight: 600; font-size: .9375rem; }
.zone-panel-section { padding: 12px 18px 14px; }
.zone-panel-section + .zone-panel-section { border-top: 1px solid var(--app-border); }
.zone-panel-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; font-weight: 500; color: var(--app-text-muted); }
.finding-list { list-style: none; display: grid; gap: 8px; }
.finding-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.finding-list .badge { margin-top: 1px; min-width: 62px; justify-content: center; }
.finding-list small { display: block; color: var(--app-text-muted); font-size: 12px; }
.change-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; font-family: var(--app-mono); font-size: 12.5px; }
.change-row .rtype { font-weight: 600; color: var(--app-accent-text); }
.change-row del { color: var(--app-danger-text); text-decoration: line-through; text-decoration-thickness: 1px; }
.change-row ins { color: var(--app-success-text); text-decoration: none; }
.change-meta { margin-top: 8px; font-size: 12px; color: var(--app-text-muted); }
.alert-row { display: flex; align-items: flex-start; gap: 10px; color: var(--app-text-muted); font-size: 12.5px; }
.alert-row .dot { margin-top: 5px; }
.alert-row .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--app-success-text); flex-shrink: 0; }

/* ----------------------------------------------------------- how/steps */

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 14px; border-top: 2px solid var(--app-border); }
.steps li::before { content: counter(step); display: block; margin-bottom: 10px; font-size: .875rem; font-weight: 600; color: var(--app-accent-text); }
.steps h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.steps p { color: var(--app-text-muted); font-size: .9375rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }

/* ------------------------------------------------------------ features */

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 32px; }
.feature { padding-top: 14px; border-top: 2px solid var(--app-border); }
.feature h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.feature p { color: var(--app-text-muted); font-size: .9375rem; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; gap: 24px; } }

/* -------------------------------------------------------------- checks */

.check-areas { display: grid; gap: 0; border-top: 1px solid var(--app-border); }
.check-area { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--app-border); }
.check-area h3 { font-size: 1rem; }
.check-area .count { display: block; margin-top: 4px; font-size: .875rem; color: var(--app-text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.chip {
  display: inline-flex; align-items: center; padding: 4px 10px;
  font-size: 13px; line-height: 1.4; border-radius: 999px;
  background: var(--app-surface); border: 1px solid var(--app-border); color: var(--app-text);
}
.check-foot { margin-top: 20px; max-width: 70ch; color: var(--app-text-muted); font-size: .9375rem; }
@media (max-width: 760px) { .check-area { grid-template-columns: 1fr; gap: 12px; padding: 18px 0; } }

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

.lookup { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 14px; padding: 24px; box-shadow: var(--app-shadow); }
.lookup-form { display: flex; gap: 8px; }
.lookup-form input[type="text"] {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 14px;
  font: inherit; color: var(--app-text); background: var(--app-input-bg);
  border: 1px solid var(--app-border); border-radius: 8px;
}
.lookup-form input[type="text"]:focus-visible { outline: none; border-color: var(--app-accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .25); }
.lookup-form .btn { min-height: 44px; }
.type-toggles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip-toggle { cursor: pointer; user-select: none; position: relative; }
.chip-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip-toggle:has(input:checked) { background: var(--app-accent-soft); border-color: transparent; color: var(--app-accent-text); font-weight: 500; }
.chip-toggle:has(input:focus-visible) { outline: 2px solid var(--app-accent); outline-offset: 2px; }
.lookup-status { margin-top: 14px; font-size: .9rem; color: var(--app-text-muted); min-height: 1.4em; }
.lookup-status.is-error { color: var(--app-danger-text); }
.lookup-results { margin-top: 12px; }
.lookup-results[hidden] { display: none; }
.results-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: .875rem; color: var(--app-text-muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--app-border); border-radius: 10px; }
.records { width: 100%; border-collapse: collapse; font-size: 13px; }
.records th, .records td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--app-border); }
.records th { font-weight: 500; color: var(--app-text-muted); background: var(--app-surface-2); white-space: nowrap; }
.records tbody tr:last-child td { border-bottom: 0; }
.records td.data { font-family: var(--app-mono); font-size: 12.5px; word-break: break-all; }
.records td.ttl { white-space: nowrap; }
.lookup-foot { margin-top: 14px; font-size: .875rem; color: var(--app-text-muted); }
@media (max-width: 560px) { .lookup { padding: 18px; } .lookup-form { flex-direction: column; } }

/* ------------------------------------------------------------- pricing */

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column; gap: 16px; padding: 22px;
  background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 12px;
}
.plan-featured { border-color: var(--app-accent); box-shadow: 0 0 0 1px var(--app-accent); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-head h3 { font-size: 1.0625rem; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-amount { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.plan-period { font-size: .875rem; color: var(--app-text-muted); }
.plan-alt { margin-top: -10px; font-size: .875rem; color: var(--app-text-muted); min-height: 1.4em; }
.plan-limits { list-style: none; display: grid; gap: 6px; font-size: .9375rem; }
.plan-limits li { display: flex; gap: 10px; align-items: baseline; }
.plan-limits li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--app-accent); flex-shrink: 0; transform: translateY(-2px); }
.plan > :last-child { margin-top: auto; }
.plan-contact { font-size: .9375rem; }
.plans-foot { margin-top: 24px; max-width: 70ch; font-size: .9375rem; color: var(--app-text-muted); }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- faq */

.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.faq { border-top: 1px solid var(--app-border); }
.faq summary {
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0; font-weight: 600; font-size: 1rem; cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex-shrink: 0;
  border-right: 2px solid var(--app-text-muted); border-bottom: 2px solid var(--app-text-muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .15s ease;
}
.faq[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq p { padding: 0 0 18px; color: var(--app-text-muted); font-size: .9375rem; max-width: 60ch; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: 1fr; } }

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

.site-footer { border-top: 1px solid var(--app-border); padding-block: 48px 28px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: .875rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.footer-grid a { color: var(--app-text-muted); }
.footer-grid a:hover { color: var(--app-text); }
.footer-blurb { margin-top: 14px; max-width: 38ch; color: var(--app-text-muted); }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--app-border); color: var(--app-text-muted); font-size: .85rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------- prose */

.prose { padding-block: 56px 72px; }
.prose h1 { font-size: 2rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.prose .updated { color: var(--app-text-muted); margin-bottom: 36px; }
.prose h2 { font-size: 1.25rem; margin: 36px 0 10px; }
.prose h3 { font-size: 1.0625rem; margin: 22px 0 8px; }
.prose p, .prose ul { margin-bottom: 14px; max-width: 72ch; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 4px; }
.prose .note { padding: 14px 18px; margin-bottom: 18px; background: var(--app-surface-2); border: 1px solid var(--app-border); border-radius: 10px; }
.prose .note p { margin-bottom: 4px; }
.prose .note p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
