: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 */
.eh-stack {
  display: grid;
  gap: 24px;
  margin-top: -56px;
  position: relative;
  z-index: 1;
}
#eh-results[hidden] { display: none; }

.eh-input {
  width: 100%;
  min-height: 240px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fbfbfe;
  color: #111827;
  resize: vertical;
  box-sizing: border-box;
}
.eh-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); background: #fff; }

.eh-form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0 16px;
  font-size: 13px;
  color: #6b7280;
}

/* Verdict */
.eh-verdict {
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border: 1px solid;
}
.eh-verdict h3 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
.eh-verdict p { margin: 0; font-size: 14px; line-height: 1.6; }
.eh-v-good { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.eh-v-mid  { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.eh-v-bad  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* SPF / DKIM / DMARC */
.eh-auths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.eh-auth {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}
.eh-auth span { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: #6b7280; }
.eh-auth strong { display: block; font-size: 18px; font-weight: 800; margin-top: 2px; }
.eh-pass    { background: #ecfdf5; border-color: #a7f3d0; }
.eh-pass strong { color: #047857; }
.eh-fail    { background: #fef2f2; border-color: #fecaca; }
.eh-fail strong { color: #b91c1c; }
.eh-warn    { background: #fffbeb; border-color: #fde68a; }
.eh-warn strong { color: #b45309; }
.eh-neutral { background: #f8fafc; }
.eh-neutral strong { color: #475569; }

.eh-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.eh-stat {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  min-width: 0;
}
.eh-stat strong { display: block; font-size: 18px; font-weight: 800; color: #111827; overflow-wrap: anywhere; }
.eh-stat span { font-size: 12px; color: #6b7280; }

/* Warnings */
.eh-issues { list-style: none; margin: 0 0 22px; padding: 0; }
.eh-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;
}
.eh-level {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
}
.eh-issue-high   { background: #fef2f2; border-color: #fecaca; }
.eh-issue-high .eh-level   { background: #fee2e2; color: #b91c1c; }
.eh-issue-medium { background: #fffbeb; border-color: #fde68a; }
.eh-issue-medium .eh-level { background: #fef3c7; color: #b45309; }
.eh-issue-low .eh-level    { background: #e0f2fe; color: #0369a1; }
.eh-issue-info .eh-level   { background: #ede9fe; color: #6d28d9; }
.eh-issue-ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; font-weight: 600; }

/* Tables */
.eh-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 22px;
}
.eh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.eh-table th, .eh-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
  vertical-align: top;
}
.eh-table tr:last-child th, .eh-table tr:last-child td { border-bottom: 0; }
.eh-table thead th {
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  white-space: nowrap;
}
.eh-kv th { width: 160px; color: #374151; font-weight: 700; background: #fbfbfe; white-space: nowrap; }
.eh-kv td { overflow-wrap: anywhere; word-break: break-word; }

.eh-route { min-width: 760px; }
.eh-hop { font-weight: 800; color: #2563eb; }
.eh-host { overflow-wrap: anywhere; max-width: 220px; }
.eh-host small { display: block; color: #6b7280; font-size: 12px; margin-top: 2px; }
.eh-time { white-space: nowrap; color: #374151; }
.eh-delay { min-width: 110px; }
.eh-delay span { font-weight: 700; }
.eh-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #3b82f6;
  margin-top: 6px;
}
.eh-bar-slow { background: #f59e0b; }
.eh-route-empty { text-align: center; color: #6b7280; }

/* All headers */
.eh-all-block summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  list-style-position: inside;
}
.eh-all-block[open] summary { border-radius: 12px 12px 0 0; border-bottom: 0; }
.eh-all-inner {
  border: 1px solid #e5e7eb;
  border-radius: 0 0 12px 12px;
  padding: 12px;
}
.eh-all-inner .eh-table-wrap { margin-bottom: 0; max-height: 520px; overflow-y: auto; }
.eh-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.eh-search:focus { outline: none; border-color: #2563eb; }
.eh-all-table td { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* Steps for finding headers */
.eh-find-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 8px 0 24px;
}
.eh-find {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
}
.eh-find h3 { font-size: 16px; font-weight: 800; margin: 0 0 6px; color: #1d4ed8; }
.eh-find p { margin: 0; font-size: 14px; line-height: 1.65; color: #4b5563; }

/* Three SPF / DKIM / DMARC cards in one row */
.mk-cards.eh-cards-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 767px) {
  .mk-cards.eh-cards-3 { grid-template-columns: 1fr; }
  .eh-stack { margin-top: -40px; }
  .eh-find-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .eh-auths, .eh-stats { gap: 6px; }
  .eh-auth strong, .eh-stat strong { font-size: 15px; }
  .eh-kv th { width: 110px; white-space: normal; }
}

/* 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) */
.eh-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%; }