:root {
  --mk-primary: #2563eb;
  --mk-primary-dark: #1d4ed8;
  --mk-accent: #3b82f6;
}
.mk-hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
}
.mk-btn-primary {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.mk-btn-primary:hover {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.34);
}

/* Layout */
.dn-stack {
  display: grid;
  gap: 24px;
  margin-top: -56px;
  position: relative;
  z-index: 1;
}
#dn-results[hidden] { display: none; }

/* Tabs */
.dn-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: #f1f5f9;
  border-radius: 12px;
  margin-bottom: 22px;
  overflow-x: auto;
}
.dn-tab {
  flex: 1 0 auto;
  text-align: center;
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  color: #475569;
  text-decoration: none;
  white-space: nowrap;
}
.dn-tab:hover { color: #1d4ed8; text-decoration: none; }
.dn-tab.active { background: #fff; color: #1d4ed8; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

/* Form */
.dn-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: #111827; }
.dn-row { display: flex; gap: 10px; }
.dn-input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  font-size: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fbfbfe;
  color: #111827;
}
.dn-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); background: #fff; }
.dn-row .mk-btn { flex: 0 0 auto; }
.dn-note { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: #6b7280; }

/* Results head and summary */
.dn-results-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.dn-results-head .mk-panel-title { margin: 0; overflow-wrap: anywhere; }
.dn-time { font-size: 13px; color: #6b7280; }

.dn-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
.dn-card {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.dn-card:hover { text-decoration: none; transform: translateY(-1px); }
.dn-card span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: #6b7280; }
.dn-card strong { display: block; font-size: 18px; font-weight: 800; margin-top: 2px; }

.dn-pass { background: #ecfdf5; border-color: #a7f3d0; }
.dn-pass strong, .dn-badge.dn-pass { color: #047857; }
.dn-warn { background: #fffbeb; border-color: #fde68a; }
.dn-warn strong, .dn-badge.dn-warn { color: #b45309; }
.dn-fail { background: #fef2f2; border-color: #fecaca; }
.dn-fail strong, .dn-badge.dn-fail { color: #b91c1c; }

/* Sections */
.dn-sec {
  border-top: 1px solid #eef0f4;
  padding-top: 20px;
  margin-top: 20px;
  scroll-margin-top: 20px;
}
.dn-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.dn-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dn-sec-head h3 { font-size: 18px; font-weight: 800; margin: 0; }
.dn-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.dn-provider { margin: 0 0 12px; font-size: 15px; color: #374151; }

/* Record box */
.dn-record {
  position: relative;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px 90px 14px 16px;
  margin-bottom: 16px;
}
.dn-record-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8; margin-bottom: 6px; }
.dn-record code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #e2e8f0;
  background: none;
  padding: 0;
}
.dn-copy { position: absolute; top: 12px; right: 12px; }

/* Lookup meter */
.dn-meter { margin-bottom: 18px; }
.dn-meter-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: #374151; }
.dn-meter-bar { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.dn-meter-bar i { display: block; height: 100%; background: #3b82f6; border-radius: 999px; }
.dn-meter-bar i.dn-near { background: #f59e0b; }
.dn-meter-bar i.dn-over { background: #ef4444; }

/* Tables */
.dn-table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 16px; }
.dn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dn-table th, .dn-table td { padding: 10px 12px; border-bottom: 1px solid #eef0f4; text-align: left; vertical-align: top; }
.dn-table tr:last-child td { border-bottom: 0; }
.dn-table thead th {
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  white-space: nowrap;
}
.dn-table td { overflow-wrap: anywhere; }
.dn-mech td:nth-child(1), .dn-mech td:nth-child(2) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.dn-mech td:nth-child(1) { width: 80px; text-align: center; font-weight: 700; }

/* Include tree */
.dn-tree { list-style: none; margin: 0 0 16px; padding: 0; }
.dn-tree .dn-tree { margin: 8px 0 0 14px; padding-left: 12px; border-left: 2px solid #dbeafe; }
.dn-tree li { margin-bottom: 8px; }
.dn-tree-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; }
.dn-tree-line strong { overflow-wrap: anywhere; }
.dn-tree-type { font-size: 11px; font-weight: 800; text-transform: uppercase; background: #dbeafe; color: #1d4ed8; padding: 2px 8px; border-radius: 999px; }
.dn-tree-count { font-size: 12px; color: #6b7280; }
.dn-tree-record {
  display: block;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #475569;
  background: #f8fafc;
  border-radius: 6px;
  padding: 6px 8px;
  overflow-wrap: anywhere;
}

/* Issues */
.dn-issues { list-style: none; margin: 0; padding: 0; }
.dn-issue {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  overflow-wrap: anywhere;
}
.dn-level {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}
.dn-issue-high   { background: #fef2f2; border-color: #fecaca; }
.dn-issue-high .dn-level   { background: #fee2e2; color: #b91c1c; }
.dn-issue-medium { background: #fffbeb; border-color: #fde68a; }
.dn-issue-medium .dn-level { background: #fef3c7; color: #b45309; }
.dn-issue-low .dn-level    { background: #e0f2fe; color: #0369a1; }
.dn-issue-info .dn-level   { background: #ede9fe; color: #6d28d9; }
.dn-issue-ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; font-weight: 600; }

/* Content */
.mk-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #eef2ff;
  color: #1e3a8a;
  padding: 2px 6px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.mk-cards.dn-cards-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 767px) {
  .dn-stack { margin-top: -40px; }
  .mk-cards.dn-cards-3 { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .dn-row { flex-direction: column; }
  .dn-row .mk-btn { width: 100%; }
  .dn-summary { gap: 6px; }
  .dn-card strong { font-size: 15px; }
  .dn-record { padding-right: 16px; padding-top: 48px; }
}

/* Code examples in the content */
.mk-prose pre.dn-pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 16px;
  overflow-x: auto;
}
.mk-prose pre.dn-pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 13.5px;
  white-space: pre;
}
.mk-prose .dn-table code { font-size: 12.5px; }
.mk-prose .dn-table-wrap { background: #fff; margin: 8px 0 18px; }

/* AdSense fix: an ad inside the grid must fill the full width.
   (auto margins on a grid item stop it stretching, which gave AdSense availableWidth=96) */
.dn-stack > .mk-ad { width: 100%; max-width: none; margin: 0; padding: 0; }
.mk-ad-inner { display: block; width: 100%; }
.mk-ad-inner ins.adsbygoogle { display: block; width: 100%; }