:root {
  --bg: #f4f7fb;
  --bg-alt: #e8eef5;
  --card: #ffffff;
  --card-border: #d7e0ea;
  --text: #122033;
  --muted: #5b6b7c;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --accent-glow: rgba(13, 148, 136, 0.12);
  --on-accent: #ffffff;
  --green: #059669;
  --yellow: #ca8a04;
  --red: #dc2626;
  --blue: #0284c7;
  --shadow: 0 6px 18px rgba(18, 32, 51, 0.05);
  --radius: 10px;
  --font: 'Instrument Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 15px;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(244, 247, 251, 0.88);
  border-bottom: 1px solid rgba(215, 224, 234, 0.9);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  box-shadow: 0 1px 2px rgba(15, 27, 43, 0.08);
}

/* full wordmark (landing / legal) */
.brand-logo {
  height: 34px;
  width: auto;
  display: block;
}

.login-card .brand {
  gap: 0.7rem;
}

.sidebar .brand {
  gap: 0.7rem;
  padding: 0.15rem 0.1rem;
  background: transparent;
  border-radius: 0;
}
.sidebar .brand-mark {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.18);
  border-radius: 9px;
}
.sidebar .brand-name {
  display: inline;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.brand-name {
  font-size: 1.08rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.brand-name span {
  color: var(--accent-dark);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-actions { display: flex; gap: 0.5rem; align-items: center; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: 0.15s ease;
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }

.btn-secondary {
  background: white;
  border-color: var(--card-border);
  color: var(--text);
}
.btn-secondary:hover:not(:disabled) { border-color: #b8c6d6; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover { color: var(--text); background: rgba(0,0,0,0.04); }

.btn-danger {
  background: #fef2f2;
  color: var(--red);
  border-color: #fecaca;
}

.btn-sm { padding: 0.3rem 0.55rem; font-size: 0.78rem; }

/* Customer freeze panel (edit form) */
.freeze-status {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.02);
}
.freeze-status--frozen {
  border-color: #fecaca;
  background: #fef2f2;
}
.freeze-status .btn {
  flex-shrink: 0;
}

.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
  padding: 0.55rem 1rem;
  background: #16324f;
  color: #f4f7fb;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.impersonation-banner strong {
  font-weight: 650;
}
.impersonation-banner .btn {
  background: #fff;
  color: #16324f;
  border-color: #fff;
}
.impersonation-hold {
  margin-top: 1rem;
}
.impersonation-hold p {
  margin: 0 0 0.85rem;
}

/* Landing (legacy helpers) */
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-card, .card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.footer {
  border-top: 1px solid var(--card-border);
  padding: 1.25rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* —— Marketing / product page —— */
body.marketing {
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(13, 148, 136, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(2, 132, 199, 0.08), transparent 50%),
    var(--bg);
}

.btn-lg {
  padding: 0.7rem 1.15rem;
  font-size: 0.95rem;
  border-radius: 10px;
}

.mkt-nav .nav-inner {
  min-height: 68px;
}

.mkt-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.mkt-nav-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.mkt-nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.mkt-hero {
  padding: 3.25rem 0 3.5rem;
}

.mkt-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.mkt-hero-copy h1 {
  margin: 0 0 1rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text);
}

.mkt-hero-copy .lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 48ch;
}

.mkt-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.mkt-trust {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.mkt-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.mkt-trust li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.mkt-preview-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 27, 43, 0.1);
  overflow: hidden;
  border: 1px solid #dbe4ee;
}

.mkt-preview-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 0.9rem;
  background: #f6f9fc;
  border-bottom: 1px solid #e7eef5;
}

.mkt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5d0dc;
}

.mkt-dot:nth-child(1) { background: #f87171; }
.mkt-dot:nth-child(2) { background: #fbbf24; }
.mkt-dot:nth-child(3) { background: #34d399; }

.mkt-preview-url {
  margin-left: 0.5rem;
  color: #8496a8;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.mkt-preview-body {
  padding: 1rem 1.05rem 1.15rem;
  color: #152535;
  background: #ffffff;
}

.mkt-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.mkt-stat {
  background: #f6f9fc;
  border: 1px solid #e7eef5;
  border-radius: 10px;
  padding: 0.55rem 0.65rem;
}

.mkt-stat-label {
  display: block;
  font-size: 0.68rem;
  color: #5a6b7d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mkt-stat-value {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #122033;
}

.mkt-stat-value.text-ok { color: #059669; }
.mkt-stat-value.text-bad { color: #dc2626; }

.mkt-bars {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.mkt-bar-item {
  display: grid;
  grid-template-columns: 6.5rem 1fr 2.2rem;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.75rem;
  color: #5a6b7d;
}

.mkt-bar {
  height: 7px;
  background: #e8eef5;
  border-radius: 999px;
  overflow: hidden;
}

.mkt-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #2dd4bf);
  border-radius: 999px;
}

.mkt-bar-fwd i { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.mkt-bar-warn i { background: linear-gradient(90deg, #ca8a04, #facc15); }
.mkt-bar-bad i { background: linear-gradient(90deg, #dc2626, #f87171); }

.mkt-bar-item em {
  font-style: normal;
  text-align: right;
  color: #8496a8;
  font-weight: 600;
}

.mkt-preview-table {
  border: 1px solid #e7eef5;
  border-radius: 10px;
  overflow: hidden;
  font-size: 0.78rem;
  background: #fff;
}

.mkt-tr {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr 0.7fr;
  gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  align-items: center;
  border-top: 1px solid #eef3f8;
  color: #152535;
}

.mkt-tr:first-child { border-top: 0; }
.mkt-th {
  background: #f6f9fc;
  color: #5a6b7d;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mkt-section {
  padding: 3.5rem 0;
}

.mkt-section.mkt-alt {
  background: rgba(255, 255, 255, 0.55);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.mkt-section-head {
  max-width: 40rem;
  margin: 0 0 2rem;
}

.mkt-section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.mkt-section-head h2 {
  margin: 0 0 0.65rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.mkt-section-lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.mkt-now {
  padding: 1.75rem 0 2rem;
  background: #122033;
  color: #e8eef5;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mkt-now .eyebrow { color: #5eead4; }
.mkt-now h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  color: #fff;
}
.mkt-now p {
  margin: 0;
  color: #b7c4d1;
  font-size: 0.9rem;
  line-height: 1.45;
}
.mkt-now-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem 1.5rem;
  margin-top: 0.85rem;
}

.mkt-journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.mkt-journey-step {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.1rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
  position: relative;
}
.mkt-journey-step h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}
.mkt-journey-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.mkt-journey-label {
  display: inline-block;
  margin-bottom: 0.55rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mkt-problem-grid,
.mkt-steps,
.mkt-features,
.mkt-pricing {
  display: grid;
  gap: 1rem;
}

.mkt-problem-grid,
.mkt-steps {
  grid-template-columns: repeat(3, 1fr);
}

.mkt-features {
  grid-template-columns: repeat(3, 1fr);
}

.mkt-pricing {
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
}

.mkt-pricing-simple {
  grid-template-columns: 1fr;
  max-width: 28rem;
  margin: 0 auto;
}

.mkt-card,
.mkt-step,
.mkt-feature,
.mkt-price-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}

.mkt-card h3,
.mkt-step h3,
.mkt-feature h3,
.mkt-price-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.mkt-card p,
.mkt-step p,
.mkt-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.mkt-card-problem {
  border-left: 3px solid #f59e0b;
}

.mkt-card-soft {
  background: linear-gradient(145deg, #f0fdfa 0%, #fff 55%);
  border-color: #99f6e4;
}

.mkt-quote {
  margin: 0 0 0.75rem !important;
  font-family: var(--serif);
  font-size: 1.2rem !important;
  line-height: 1.35;
  color: var(--text) !important;
}

.mkt-quote-sub { font-size: 0.88rem; }

.mkt-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
}

.mkt-split h3 {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
}

.mkt-bullets {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  display: grid;
  gap: 0.45rem;
}

.mkt-bullets li::marker {
  color: var(--accent);
}

.mkt-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent-dark);
  font-weight: 750;
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

.mkt-feature {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mkt-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(18, 32, 51, 0.08);
}

.mkt-price-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.mkt-price-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.mkt-price {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.mkt-price-amount {
  font-size: 2.35rem;
  letter-spacing: -0.03em;
}

/* Optional label above the amount — not the euro value itself */
.mkt-price > span.mkt-price-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

/* Live price amount lives in a <span id="public-price-euro"> — keep it large */
.mkt-price-amount > span,
.mkt-price #public-price-euro {
  display: inline;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
  text-transform: none;
  letter-spacing: inherit;
  margin: 0;
}

.mkt-price small {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.15rem;
}

.mkt-price-tabs {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 0.2rem;
  padding: 0.22rem;
  margin: 0 auto 0.35rem;
  width: 100%;
  max-width: 18rem;
  background: #e8eef5;
  border-radius: 999px;
}

.mkt-price-tab {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.mkt-price-tab input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.mkt-price-tab span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.05rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mkt-price-tab em {
  display: inline-flex;
  align-items: center;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: #ccfbf1;
  padding: 0.18rem 0.38rem 0.12rem;
  border-radius: 999px;
  transform: translateY(1px);
}

.mkt-price-tab:hover span {
  color: var(--text);
}

.mkt-price-tab:has(input:checked) span {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(18, 32, 51, 0.1);
}

.mkt-price-tab:has(input:focus-visible) span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mkt-price-swap {
  display: grid;
}

.mkt-price-swap > * {
  grid-area: 1 / 1;
}

.mkt-price-card [data-price-panel="year"],
.mkt-price-card [data-price-note="year"] {
  visibility: hidden;
}

.mkt-price-card:has([name="public-price-interval"][value="year"]:checked) [data-price-panel="month"],
.mkt-price-card:has([name="public-price-interval"][value="year"]:checked) [data-price-note="month"] {
  visibility: hidden;
}

.mkt-price-card:has([name="public-price-interval"][value="year"]:checked) [data-price-panel="year"],
.mkt-price-card:has([name="public-price-interval"][value="year"]:checked) [data-price-note="year"] {
  visibility: visible;
}

.mkt-price-single {
  text-align: center;
  padding: 1.75rem 1.6rem 1.5rem;
}

.mkt-price-single .mkt-bullets {
  text-align: left;
  margin: 0.25rem 0 0.5rem;
}

.mkt-price-single .btn {
  align-self: center;
  width: 100%;
  max-width: 16rem;
  justify-content: center;
}

.mkt-price-note {
  margin: -0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.mkt-feature h3 a {
  color: inherit;
  text-decoration: none;
}

.mkt-feature h3 a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.mkt-faq {
  display: grid;
  gap: 0.65rem;
  max-width: 40rem;
  margin: 0 auto;
}

.mkt-faq details {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.mkt-faq summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.mkt-faq summary::-webkit-details-marker {
  display: none;
}

.mkt-faq summary::after {
  content: '+';
  float: right;
  color: var(--accent-dark);
  font-weight: 700;
}

.mkt-faq details[open] summary::after {
  content: '–';
}

.mkt-faq details p {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.mkt-price-explain {
  display: grid;
  gap: 0.5rem;
  margin: 0.15rem 0 0.35rem;
  text-align: left;
}

.mkt-price-pill {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #fff;
  font-size: 0.86rem;
  line-height: 1.35;
}

.mkt-price-pill strong {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mkt-price-pill span {
  color: var(--muted);
}

.mkt-price-pill-paid {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.mkt-price-pill-paid strong {
  color: var(--accent-dark);
}

.mkt-price-pill-free {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.mkt-price-pill-free strong {
  color: #475569;
}

.mkt-price-footnote {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
}

.mkt-price-featured {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.14);
  background: linear-gradient(180deg, #f0fdfa 0%, #fff 40%);
}

.mkt-price-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
  background: #ccfbf1;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.mkt-cta-band {
  padding: 2.75rem 0;
  background: #0f1b2b;
  color: #d7e2ef;
}

.mkt-cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.mkt-cta-band h2 {
  margin: 0 0 0.4rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  color: #fff;
}

.mkt-cta-band p {
  margin: 0;
  color: #9eb0c4;
  max-width: 42ch;
}

.mkt-cta-band .btn-secondary {
  background: transparent;
  border-color: #3d4f66;
  color: #fff;
}

.mkt-cta-band .btn-secondary:hover {
  border-color: #5eead4;
  color: #5eead4;
}

.mkt-footer {
  border-top: 1px solid var(--card-border);
  padding: 1.5rem 0 2rem;
  background: #fff;
}

.mkt-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.mkt-footer .muted {
  margin: 0;
  font-size: 0.85rem;
}

body.not-found-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.not-found-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2.75rem 0 3.5rem;
}

.not-found-visual {
  margin: 0;
}

.not-found-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid #dbe4ee;
  box-shadow: 0 18px 40px rgba(15, 27, 43, 0.12);
  background: #0f1b2b;
}

.not-found-visual figcaption {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.not-found-page .mkt-trust a {
  color: inherit;
  text-decoration: none;
}

.not-found-page .mkt-trust a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* Legal pages */
.signup-hero {
  padding-bottom: 3.5rem;
}
.signup-card-wrap {
  display: flex;
  align-items: stretch;
}
.signup-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.35rem 1.25rem;
  width: 100%;
  max-width: 28rem;
  margin-left: auto;
}
.signup-card h2 {
  margin: 0 0 0.35rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
}
.signup-form label {
  display: block;
  font-weight: 600;
  font-size: 0.86rem;
}
.signup-form input[type="email"],
.signup-form input[type="tel"] {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font: inherit;
}
.signup-form input[type="email"]:focus,
.signup-form input[type="tel"]:focus {
  outline: 2px solid rgba(13, 148, 136, 0.28);
  border-color: var(--accent);
}
.signup-form .signup-check,
.login-card .signup-check {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-weight: 500;
  font-size: 0.88rem;
  line-height: 1.4;
}
.signup-form .signup-check input[type="checkbox"],
.login-card .signup-check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.signup-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.signup-login-hint {
  margin: 0;
  font-size: 0.85rem;
}
.signup-success h2 {
  margin-bottom: 0.5rem;
}
.signup-success p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}
.trial-banner {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.9rem;
}
.trial-banner strong {
  font-weight: 650;
}
.profile-banner {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0c4a6e;
  font-size: 0.9rem;
}
.profile-banner .link-btn {
  font: inherit;
  font-weight: 650;
  color: #0369a1;
}

.legal-page .legal-content {
  max-width: 42rem;
}
.legal-content h1 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.02em;
}
.legal-content h2 {
  margin: 2rem 0 0.65rem;
  font-size: 1.2rem;
}
.legal-content h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1.02rem;
}
.legal-content p,
.legal-content li {
  color: var(--text);
  line-height: 1.55;
  font-size: 0.95rem;
}
.legal-content ul {
  margin: 0.4rem 0 0.8rem;
  padding-left: 1.2rem;
}
.legal-content .mkt-section-lead {
  margin-bottom: 1.5rem;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 0.75rem 0 1rem;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}
.legal-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.legal-note {
  font-size: 0.85rem;
  padding: 0.65rem 0.8rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
}
.legal-back {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent-dark, #0f766e);
  text-decoration: underline;
  cursor: pointer;
}
.link-btn:hover {
  color: var(--accent);
}

/* Cookie banner (AVG) */
.cookie-banner {
  position: fixed;
  z-index: 10000;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 27, 43, 0.96);
  color: #e8eef5;
  box-shadow: 0 -8px 32px rgba(15, 27, 43, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.cookie-banner-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.cookie-banner-copy {
  flex: 1 1 16rem;
  min-width: 0;
}
.cookie-banner-title {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.cookie-banner-copy p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #b7c6d8;
}
.cookie-banner-copy a {
  color: #5eead4;
  text-decoration: underline;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.cookie-banner .btn-secondary {
  background: transparent;
  border-color: #3d4f66;
  color: #e8eef5;
}
.cookie-banner .btn-secondary:hover {
  border-color: #5eead4;
  color: #5eead4;
}
.cookie-banner .btn-ghost {
  color: #b7c6d8;
}
.cookie-banner .btn-ghost:hover {
  color: #fff;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 27, 43, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.cookie-modal-panel {
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 50px rgba(15, 27, 43, 0.2);
  max-width: 28rem;
  width: 100%;
  padding: 1.25rem 1.35rem 1.15rem;
  max-height: min(90vh, 36rem);
  overflow: auto;
}
.cookie-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.cookie-modal-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.cookie-modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 0.2rem;
}
.cookie-modal-lead {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.cookie-cat {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.55rem;
  background: #f8fafc;
}
.cookie-cat-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.cookie-cat-row p {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
}
.cookie-cat-lock {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.15rem;
}
.cookie-cat-toggle {
  cursor: pointer;
}
.cookie-cat-toggle input[type='checkbox'] {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.cookie-modal-links {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
}

.dmarcs-dialog-root {
  z-index: 10050;
}
.dmarcs-dialog-panel {
  max-width: 26rem;
}
.dmarcs-dialog-message {
  margin-bottom: 0;
}
.dmarcs-dialog-input {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font: inherit;
}
.dmarcs-dialog-root .cookie-modal-actions {
  justify-content: flex-end;
}
.dmarcs-dialog-root .btn-danger {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
.dmarcs-dialog-root .btn-danger:hover:not(:disabled) {
  background: #991b1b;
  border-color: #991b1b;
}

@media (max-width: 1100px) {
  .mkt-journey { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .mkt-nav-links { display: none; }
  .mkt-hero-grid,
  .mkt-split,
  .mkt-problem-grid,
  .mkt-steps,
  .mkt-features,
  .mkt-pricing,
  .mkt-now-grid,
  .mkt-journey {
    grid-template-columns: 1fr;
  }
  .mkt-hero { padding: 2rem 0 2.5rem; }
  .mkt-cta-band-inner { flex-direction: column; align-items: flex-start; }
  .not-found-main { padding: 1.75rem 0 6.5rem; }
  .not-found-page .mkt-trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

/* App shell */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 210px 1fr;
}

.sidebar {
  background: #0f1b2b;
  color: #d7e2ef;
  padding: 0.85rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-shrink: 0;
}

.sidebar-menu-toggle {
  display: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  white-space: nowrap;
}

.sidebar-menu-toggle:hover,
.sidebar.is-open .sidebar-menu-toggle {
  background: rgba(94, 234, 212, 0.16);
  border-color: rgba(94, 234, 212, 0.28);
}

.sidebar-admin .sidebar-menu-toggle:hover,
.sidebar-admin.is-open .sidebar-menu-toggle {
  background: rgba(129, 140, 248, 0.2);
  border-color: rgba(165, 180, 252, 0.35);
}

.sidebar-menu-icon {
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

@media (min-width: 961px) {
  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    overflow: hidden;
  }
}

/* Admin shell — indigo/slate so it’s easy to tell from the portal (teal) */
.sidebar-admin {
  background: linear-gradient(180deg, #1a1535 0%, #141b2f 52%, #101828 100%);
  border-right: 1px solid rgba(129, 140, 248, 0.2);
  box-shadow: inset -1px 0 0 rgba(99, 102, 241, 0.06);
}
.sidebar-admin .brand-name span {
  color: #a5b4fc;
}
.sidebar-admin .brand-portal-label {
  color: rgba(165, 180, 252, 0.78);
}
.sidebar-admin .side-nav button {
  color: #c7d2e8;
}
.sidebar-admin .side-nav button.active,
.sidebar-admin .side-nav button:hover {
  background: rgba(129, 140, 248, 0.18);
  color: #fff;
}
.sidebar-admin .nav-group-items {
  border-left-color: rgba(165, 180, 252, 0.24);
}
.sidebar-admin .nav-domain-group {
  background: rgba(30, 27, 55, 0.55);
}
.sidebar-admin .nav-domain-group.is-selected {
  box-shadow: inset 0 0 0 1px rgba(165, 180, 252, 0.3);
}
.sidebar-admin .nav-domain-label {
  color: #e0e7ff;
}
.sidebar-admin .side-meta {
  color: #94a3b8;
}

.sidebar .brand { color: white; }
.sidebar .brand-name {
  letter-spacing: -0.03em;
  font-weight: 700;
}
.sidebar .brand-name span { color: #5eead4; font-weight: 600; }
.sidebar .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.18);
}
.sidebar .brand-name { font-size: 0.95rem; }
.sidebar .brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
  line-height: 1.15;
}
.sidebar .brand-portal-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(199, 210, 232, 0.78);
}

.side-nav {
  display: grid;
  gap: 0.15rem;
}

@media (min-width: 961px) {
  .side-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    align-content: start;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .side-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}

.side-nav button {
  text-align: left;
  background: transparent;
  border: 0;
  color: #b7c6d8;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  width: 100%;
}

.side-nav button.active,
.side-nav button:hover {
  background: rgba(94, 234, 212, 0.12);
  color: white;
}

.nav-group {
  display: grid;
  gap: 0.1rem;
}
.nav-group-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}
.nav-caret {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.85;
  transition: transform 0.12s ease;
  flex: 0 0 auto;
}
.nav-group.open .nav-caret {
  transform: rotate(90deg);
}
.nav-group-items {
  display: none;
  grid-template-columns: 1fr;
  gap: 0.05rem;
  padding: 0.1rem 0 0.15rem 0.45rem;
  margin-left: 0.25rem;
  border-left: 1px solid rgba(94, 234, 212, 0.18);
}
.nav-group.open .nav-group-items {
  display: grid;
}
.nav-group-items button {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.55rem;
  color: #9eb0c4;
}
.nav-group-items button.active,
.nav-group-items button:hover {
  color: #fff;
}

/* Open domain groups in portal sidebar */
.nav-domain-groups {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.35rem;
}
.nav-domain-groups:empty {
  display: none;
}
.nav-domain-group {
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
  padding: 0.15rem 0;
}
.nav-domain-group.is-selected {
  box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.22);
}
.nav-domain-group-header {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  min-width: 0;
  width: 100%;
}
.nav-domain-group-header .nav-group-toggle {
  flex: 1 1 auto;
  width: auto !important; /* override .side-nav button { width:100% } */
  min-width: 0;
  max-width: 100%;
  font-size: 0.8rem;
  padding: 0.4rem 0.35rem 0.4rem 0.55rem;
  gap: 0.4rem;
}
.nav-domain-label {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-weight: 650;
  color: #e8f1fa;
  text-align: left;
}
.nav-domain-label .nav-domain-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-domain-label .domain-favicon-slot {
  flex: 0 0 16px;
  background: rgba(255, 255, 255, 0.14);
}
.nav-domain-label .domain-favicon {
  background: rgba(255, 255, 255, 0.14);
}
.nav-domain-group-header .nav-caret {
  flex: 0 0 auto;
  margin-left: auto;
}
.nav-domain-close {
  flex: 0 0 auto;
  width: 1.85rem !important;
  min-width: 1.85rem;
  padding: 0 !important;
  margin: 0 0.2rem 0 0;
  border-radius: 6px !important;
  color: #8ea0b5 !important;
  font-size: 1.05rem !important;
  font-weight: 500 !important;
  line-height: 1;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}
.nav-domain-close:hover {
  background: rgba(248, 113, 113, 0.15) !important;
  color: #fecaca !important;
}
.nav-domain-group .nav-group-items {
  margin-right: 0.2rem;
  padding-bottom: 0.25rem;
}

.lookalikes-meta {
  font-size: 0.88rem;
}

.side-meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #8ea0b5;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 961px) {
  .side-meta {
    margin-top: auto;
  }
}

.main {
  padding: 0.85rem 1.1rem 1.5rem;
}

/* Portal home — frontpage hero visual */
.portal-home-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem 2rem;
  align-items: center;
  margin-bottom: 1rem;
}

.portal-home-copy .eyebrow {
  margin: 0 0 0.4rem;
}

.portal-home-copy h1 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.portal-home-lead {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 42ch;
}

.portal-home-copy .stats {
  margin-bottom: 0.85rem;
}

.portal-home-trust {
  margin-top: 0.35rem;
}

.portal-hero-visual {
  max-width: 420px;
  margin-left: auto;
}

.portal-hero-visual .mkt-preview-card {
  transform: none;
}

@media (max-width: 960px) {
  .portal-home-hero {
    grid-template-columns: 1fr;
  }
  .portal-hero-visual {
    max-width: none;
    margin-left: 0;
  }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.page-header h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.15rem;
}

.page-header p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.domain-switcher-prefix {
  font-weight: 700;
  white-space: nowrap;
}
.domain-switcher-prefix::after {
  content: '·';
  margin: 0 0.4rem 0 0.35rem;
  color: var(--muted);
  font-weight: 600;
}
.domain-switcher-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: min(100%, 28rem);
  margin: 0;
  padding: 0.1rem 0.4rem 0.1rem 0.22rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  letter-spacing: inherit;
  line-height: inherit;
  cursor: pointer;
  text-align: left;
}
.domain-switcher-btn:hover,
.domain-switcher-btn[aria-expanded='true'] {
  background: var(--bg-alt);
  border-color: var(--card-border);
}
.domain-switcher-btn .domain-favicon-slot {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.domain-switcher-btn .domain-favicon {
  width: 18px;
  height: 18px;
}
.domain-switcher-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.domain-switcher-caret {
  flex: 0 0 auto;
  font-size: 0.7em;
  opacity: 0.5;
  line-height: 1;
  transform: translateY(1px);
}
.domain-switcher-btn[aria-expanded='true'] .domain-switcher-caret {
  transform: translateY(1px) rotate(180deg);
}
.domain-switcher-pop {
  position: fixed;
  z-index: 140;
  width: min(22rem, calc(100vw - 1.5rem));
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(18, 32, 51, 0.16);
  padding: 0.45rem;
}
.domain-switcher-search {
  display: block;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  background: var(--bg);
}
.domain-switcher-search:focus {
  outline: 2px solid rgba(13, 148, 136, 0.28);
  outline-offset: 1px;
  border-color: var(--accent);
}
.domain-switcher-list {
  display: grid;
  gap: 0.08rem;
  max-height: min(18rem, 50vh);
  overflow: auto;
  margin-top: 0.35rem;
}
.domain-switcher-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin: 0;
  padding: 0.42rem 0.5rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.domain-switcher-item:hover,
.domain-switcher-item.is-active {
  background: var(--bg-alt);
}
.domain-switcher-item.is-current {
  background: var(--accent-glow);
}
.domain-switcher-item-text {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 0.05rem;
}
.domain-switcher-item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.domain-switcher-item-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.domain-switcher-empty {
  padding: 0.65rem 0.5rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.stat {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
}

.stat .label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.stat .value {
  margin-top: 0.1rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.panel {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  margin-bottom: 0.65rem;
}

.panel h2 {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  line-height: 1.3;
}

.panel > .muted {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.panel-grid--chart {
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  align-items: stretch;
}

.panel-grid--digest {
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  align-items: start;
  margin-bottom: 0.65rem;
}

.prospect-detail-grid {
  grid-template-columns: minmax(260px, 1.1fr) minmax(260px, 1.1fr) minmax(240px, 0.9fr);
  align-items: start;
}

.prospect-scan-headline {
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.prospect-scan-body ul {
  margin: 0;
  padding-left: 1.15rem;
}

.prospect-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.prospect-event {
  border-bottom: 1px solid var(--border, #e7eef5);
  padding-bottom: 0.55rem;
}

.prospect-event:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.prospect-event.is-pending {
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}

.prospect-event-meta {
  font-size: 0.78rem;
  color: #5b6b7c;
}

.prospect-workflow {
  margin: 0 0 1.05rem;
  padding: 0.9rem 1rem 0.75rem;
  background: #f8fbfc;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.prospect-workflow-head {
  margin-bottom: 0.7rem;
}

.prospect-workflow-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.prospect-workflow-sub {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.prospect-workflow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.prospect-workflow-step {
  display: grid;
  grid-template-columns: 1.05rem 1fr;
  gap: 0.15rem 0.75rem;
}

.prospect-workflow-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prospect-workflow-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 2px solid #9aa8b6;
  flex: 0 0 auto;
  margin-top: 0.28rem;
}

.prospect-workflow-line {
  width: 2px;
  flex: 1;
  min-height: 1.15rem;
  background: #d7e0ea;
  margin: 0.2rem 0 0;
}

.prospect-workflow-step:last-child .prospect-workflow-line {
  display: none;
}

.prospect-workflow-step.is-done .prospect-workflow-dot,
.prospect-workflow-step.is-sent .prospect-workflow-dot {
  background: var(--green);
  border-color: var(--green);
}

.prospect-workflow-step.is-scheduled .prospect-workflow-dot,
.prospect-workflow-step.is-due .prospect-workflow-dot {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.prospect-workflow-step.is-skipped .prospect-workflow-dot,
.prospect-workflow-step.is-cancelled .prospect-workflow-dot {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.prospect-workflow-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.prospect-workflow-step-title {
  font-weight: 650;
}

.prospect-workflow-step-meta,
.prospect-workflow-step-detail {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

.prospect-workflow-step-detail {
  margin-bottom: 0.7rem;
}

.prospect-workflow-step:last-child .prospect-workflow-step-detail {
  margin-bottom: 0.15rem;
}

.admin-profile-row {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 8.5rem;
}

.admin-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8eef5;
  display: block;
}

.admin-avatar-preview[hidden],
.admin-avatar-fallback[hidden],
.side-meta-avatar[hidden] {
  display: none !important;
}

.admin-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #5b6b7c;
  font-size: 1.4rem;
}

.admin-avatar-upload {
  cursor: pointer;
}

.reseller-logo-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--card-border);
}
.reseller-logo-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  width: 11rem;
}
.reseller-logo-preview {
  width: 11rem;
  height: 64px;
  object-fit: contain;
  object-position: left center;
  background: #f4f7fb;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  display: block;
  padding: 0.35rem;
}
.reseller-logo-preview[hidden],
.reseller-logo-fallback[hidden] {
  display: none !important;
}
.reseller-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 650;
  color: #5b6b7c;
}
.reseller-side-logo {
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.12);
}

.reseller-billing-note {
  padding: 0.75rem 0.95rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.02);
  margin: 0 0 1rem;
}
.reseller-billing-note p {
  margin: 0;
}

.side-meta-admin {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.side-meta-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e3a4c;
  flex-shrink: 0;
}

tr.prospect-due td {
  background: #fff7ed;
}

.digest-preview-panel {
  min-width: 0;
}

.digest-preview-panel .digest-preview-card {
  max-width: none;
  width: 100%;
}

.volume-chart-panel {
  min-width: 0;
}

.volume-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--card-border);
}

.volume-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.volume-chart-legend-item:hover {
  color: var(--text);
}

.volume-chart-legend-item.is-off {
  opacity: 0.45;
  text-decoration: line-through;
}

.volume-chart-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid currentColor;
  background: transparent;
  box-sizing: border-box;
  flex-shrink: 0;
}

.volume-chart-legend-item:not(.is-off) .volume-chart-swatch {
  background: currentColor;
}

.volume-chart-legend-item.cat-compliant { color: #059669; }
.volume-chart-legend-item.cat-non_compliant { color: #ca8a04; }
.volume-chart-legend-item.cat-threat { color: #dc2626; }
.volume-chart-legend-item.cat-forwarded { color: #64748b; }

.volume-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}

.volume-chart-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.volume-chart-meta {
  font-size: 0.78rem;
}

.volume-chart {
  width: 100%;
  min-height: 220px;
}

.volume-chart svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 280px;
}

.volume-chart-empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-chart-axis {
  font-size: 10px;
  fill: var(--muted);
}

.volume-chart-grid {
  stroke: #e8eef5;
  stroke-width: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th, td {
  text-align: left;
  padding: 0.4rem 0.35rem;
  border-bottom: 1px solid #e7eef5;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

tr:last-child td { border-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--muted);
}

.badge.ok { background: #d1fae5; color: #065f46; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.info { background: #e0f2fe; color: #075985; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: start;
}

.form-grid .full { grid-column: 1 / -1; }

.customer-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: none;
}

.customer-card--new .contact-manage-layout {
  grid-template-columns: 1fr;
}
.customer-card--new .contact-manage-subnav {
  display: none !important;
}
.customer-card--new .contact-manage-panel {
  display: flex;
  flex-direction: column;
}
.customer-card--new [data-customer-subpanel] {
  display: block !important;
}
.customer-card--new [data-customer-subpanel="moneybird"] { order: 1; }
.customer-card--new [data-customer-subpanel="account"] { order: 2; }
.customer-card--new [data-customer-subpanel="plan"] { order: 3; }

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 58rem;
}

.contact-detail-card {
  padding: 1.15rem 1.25rem 1.35rem;
  overflow: visible;
}

.contact-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.contact-detail-identity {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 16rem;
}

.contact-detail-identity h1 {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.contact-detail-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.contact-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.contact-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.contact-detail-body,
.customer-tab-panel {
  min-width: 0;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-tabs--underline {
  gap: 0;
  margin: 0 0 0.15rem;
  border-bottom: 1px solid var(--card-border);
}

.admin-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.admin-tab:hover {
  color: var(--text);
}

.admin-tabs--underline .admin-tab.active {
  color: var(--accent-dark);
  background: transparent;
  border-bottom-color: var(--accent);
}

.contact-manage-layout {
  display: grid;
  grid-template-columns: minmax(10rem, 12.5rem) minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
  padding-top: 0.85rem;
}

.contact-manage-subnav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-manage-subnav__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.contact-manage-subnav__item:hover {
  border-color: #9fd9d1;
}

.contact-manage-subnav__item.is-active {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.contact-manage-subnav__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.contact-manage-subnav__hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.contact-manage-panel {
  min-width: 0;
}

.contact-section {
  padding: 0.95rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--card-border) 78%, transparent);
}
.contact-section:first-child {
  padding-top: 0.35rem;
}
.contact-section:last-child {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.contact-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.contact-section__intro {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 12rem;
}

.contact-section__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
}

.contact-section__sub {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.4;
}

.contact-section__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.contact-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.55rem 1.35rem;
  margin: 0;
}

.contact-meta-grid span {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.12rem;
}

.contact-meta-grid strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.contact-meta-grid a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.contact-meta-grid a:hover {
  text-decoration: underline;
}

.contact-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  align-items: flex-start;
}

.contact-status-item {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 7.5rem;
  max-width: 16rem;
}

.contact-status-item > span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-status-item > strong {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.admin-inline-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-inline-link:hover {
  color: var(--text);
}

.contact-status-item .admin-inline-link {
  margin-top: 0.1rem;
  width: fit-content;
}

#customer-form-actions {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
}

.customer-table-row {
  cursor: pointer;
}
.customer-table-row:hover td {
  background: var(--accent-glow);
}

@media (max-width: 960px) {
  .contact-detail-header {
    flex-direction: column;
    align-items: stretch;
  }
  .contact-detail-identity {
    flex: 1 1 auto;
  }
  .contact-detail-actions {
    justify-content: flex-start;
  }
  .contact-manage-layout {
    grid-template-columns: 1fr;
  }
  .contact-manage-subnav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .contact-manage-subnav__item {
    flex: 1 1 8rem;
  }
  .contact-manage-subnav__hint {
    display: none;
  }
  .contact-meta-grid {
    grid-template-columns: 1fr;
  }
}

.perm-fieldset {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem 0.85rem;
  margin: 0;
}
.perm-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.perm-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  margin: 0.35rem 0;
  font-weight: 400;
}
.perm-check input { margin-top: 0.25rem; }
.perm-check span { display: flex; flex-direction: column; gap: 0.1rem; }
.perm-check .muted { font-size: 0.78rem; }

.admins-table { width: 100%; font-size: 0.9rem; }
.admins-table td { vertical-align: middle; }
.admins-table tr.row-inactive td { opacity: 0.65; }
.admin-modal-form { margin-top: 0.25rem; }

#settings-website-leads-list {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.35rem 0.85rem 0.55rem;
}

.moneybird-link-box {
  background: #f4f7fb;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  margin-top: 0.25rem;
  font-weight: 400;
}

.moneybird-link-box .form-actions {
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}

.moneybird-link-box input[type='search'] {
  margin: 0;
}

.moneybird-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
  font-weight: 400;
}

.moneybird-result strong {
  display: block;
}

.moneybird-result .muted {
  font-size: 0.78rem;
}

.moneybird-linked-card {
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 400;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.35;
  min-height: 2.35rem;
  background: white;
  color: var(--text);
  box-sizing: border-box;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b7c' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 0.7rem;
  padding-right: 2rem;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(13, 148, 136, 0.25);
  border-color: var(--accent);
}

input[type="checkbox"],
input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}

textarea { min-height: 80px; resize: vertical; }

.form-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  align-items: center;
}

/* —— Structured fields (alerts, etc.) —— */
.alert-panel {
  max-width: 40rem;
}

.alert-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.alert-form .field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  align-items: start;
}

.alert-form .field {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.35rem;
  min-width: 0;
  align-content: start;
}

.alert-form .field > input,
.alert-form .field > select,
.alert-form .field > textarea {
  width: 100%;
}

.alert-form .field > textarea {
  min-height: 4.5rem;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}

.digest-preview-card {
  max-width: 100%;
}

.digest-preview-headline {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

/* Multi-recipient email rows (alerts + digests) */
.recipient-list {
  display: grid;
  gap: 0.4rem;
}

.recipient-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: center;
}

.recipient-row .recipient-input {
  width: 100%;
  min-width: 0;
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.recipient-row .recipient-input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  border-color: #0f766e;
}

.recipient-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.recipient-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.recipient-btn:hover {
  border-color: #b8c6d6;
  color: var(--text);
  background: #f6f9fc;
}

.recipient-add {
  color: #0f766e;
}

.recipient-add:hover {
  border-color: #0f766e;
  background: #e6f7f5;
  color: #0f766e;
}

.recipient-remove {
  color: #b91c1c;
}

.dkim-busy {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.7rem 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--text);
}
.dkim-busy.hidden {
  display: none;
}
.dkim-throbber {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
  border: 2.5px solid #cce8e4;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: dkim-spin 0.7s linear infinite;
}
@keyframes dkim-spin {
  to { transform: rotate(360deg); }
}
#view-dkim-beheer.is-dkim-busy .dmarc-mode-cards,
#view-dkim-beheer.is-dkim-busy #dkim-mode-actions,
#view-dkim-beheer.is-dkim-busy #dkim-ns-host,
#view-dkim-beheer.is-dkim-busy .dkim-key-list {
  pointer-events: none;
  opacity: 0.55;
}
.dmarc-mode-card input:disabled {
  cursor: wait;
}

.dkim-key-list {
  display: grid;
  gap: 0.4rem;
}
.dkim-key-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.4rem;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #fff;
}
.dkim-key-row.is-empty,
.dkim-key-row.is-stored {
  grid-template-columns: 1fr auto;
  background: #fafbfc;
}
.dkim-key-row.is-off {
  opacity: 0.55;
  background: #fafbfc;
}
.dkim-key-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
}
.dkim-key-switch input {
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent, #0f766e);
  cursor: pointer;
}
.dkim-key-main {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-width: 0;
}
.dkim-key-main code {
  font-weight: 700;
  flex: 0 0 auto;
}
.dkim-key-kind {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
  background: #e6f7f5;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}
.dkim-key-kind.is-txt {
  color: #334155;
  background: #f1f5f9;
}
.dkim-key-target {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--muted);
}
.dkim-key-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.15rem 0.1rem;
}
.dkim-ns-box {
  margin-bottom: 0.85rem;
}
.dkim-ns-box > .muted {
  margin: 0 0 0.45rem;
  font-size: 0.88rem;
}
.dkim-key-modal-panel {
  max-width: 34rem;
  max-height: min(90vh, 44rem);
}
.dkim-modal-section {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}
.dkim-modal-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.dkim-modal-input {
  width: 100%;
  min-width: 0;
  font: inherit;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.dkim-modal-input:focus {
  outline: 2px solid rgba(15, 118, 110, 0.25);
  border-color: #0f766e;
}
textarea.dkim-modal-input {
  resize: vertical;
  min-height: 4.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.4;
}
select.dkim-modal-input {
  padding-right: 2rem;
  cursor: pointer;
}
.dkim-modal-input.is-locked,
.dkim-modal-input[readonly] {
  background: #f8fafc;
  color: var(--muted);
  cursor: default;
}
.dkim-key-edit {
  color: var(--muted);
}
.dkim-key-edit:hover {
  border-color: #0f766e;
  background: #e6f7f5;
  color: #0f766e;
}
.dkim-type-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.dkim-type-card {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  background: #fff;
}
.dkim-type-card input {
  margin-top: 0.2rem;
  accent-color: var(--accent);
}
.dkim-type-card strong {
  display: block;
  font-size: 0.9rem;
}
.dkim-type-card .muted {
  display: block;
  font-size: 0.78rem;
  margin-top: 0.15rem;
}
.dkim-type-card:has(input:checked) {
  border-color: #0f766e;
  background: #f0fdfa;
  box-shadow: inset 0 0 0 1px #0f766e;
}
@media (max-width: 640px) {
  .dkim-type-picks {
    grid-template-columns: 1fr;
  }
}

.recipient-remove:hover {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.alert-form .field-full {
  width: 100%;
}

.alert-form .field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
}

.alert-form .field-hint {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
  min-height: 2.1em; /* reserve 2 lines so pairs stay level */
}

.alert-form .field-hint-spacer {
  visibility: hidden;
  user-select: none;
}

.alert-form .check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
}

.alert-form .check-group--stack {
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.65rem;
}

.alert-form .check-group--stack .check-inline {
  display: grid !important;
  grid-template-columns: 1rem 1fr;
  align-items: start;
  column-gap: 0.55rem;
}

.alert-form .check-group--stack .check-inline input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0.18em 0 0;
}

.alert-form .check-group--stack .check-inline-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.alert-form .check-group--stack .check-inline-title {
  font-weight: 600;
  line-height: 1.3;
}

.alert-form .check-group--stack .check-inline-hint {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.alert-form .check-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  margin: 0;
  grid-template-columns: unset;
}

.alert-form .check-inline span {
  line-height: 1.3;
}

.alert-form .form-actions {
  margin-top: 0.15rem;
  padding-top: 0.15rem;
}

.alert-meta {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .alert-form .field-pair {
    grid-template-columns: 1fr;
  }
}

.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.82rem; }
.error {
  color: var(--red);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.success {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.hidden { display: none !important; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(13,148,136,0.12), transparent 40%),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.login-card h1 {
  margin: 0.4rem 0 0.25rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
}

.code-box {
  background: #0f1b2b;
  color: #d7e2ef;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Compact DNS instruction cards (HTML layout, not preformatted text) */
.code-box-dns {
  white-space: normal;
  word-break: normal;
  padding: 0.45rem 0.55rem;
  font-size: 0.72rem;
  line-height: 1.35;
}
.code-box-dns .dns-label {
  color: #8fa3b8;
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.3rem;
}
.code-box-dns .dns-row {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0.2rem 0.45rem;
  align-items: baseline;
  margin: 0.1rem 0;
}
.code-box-dns .dns-row strong {
  color: #8fa3b8;
  font-weight: 600;
  font-size: 0.68rem;
}
.code-box-dns .dns-row code {
  font-size: 0.72rem;
  color: #e8f0f8;
  word-break: break-all;
}
.dns-instruction-note {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  padding-left: 0;
}

/* —— Settings layout —— */
.settings-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 28rem) minmax(20rem, 1fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}
.settings-managed-monitor-panel {
  max-width: 48rem;
}
.settings-monitor-config {
  font-size: 0.85rem;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}
.settings-monitor-config .badge {
  font-size: 0.75rem;
}
.settings-monitor-events-table {
  width: 100%;
  font-size: 0.82rem;
}
.settings-monitor-events-table th,
.settings-monitor-events-table td {
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}
.settings-monitor-events-table .issue-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted, #64748b);
  font-size: 0.78rem;
}

/* —— DMARC Beheer simplified UI —— */
.dmarc-beheer-top {
  display: grid;
  grid-template-columns: minmax(16rem, 0.95fr) minmax(18rem, 1.15fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
  max-width: 72rem;
}
.dmarc-beheer-panel {
  max-width: 40rem;
  margin-bottom: 1rem;
}
.dmarc-beheer-top > .dmarc-beheer-panel {
  max-width: none;
  margin-bottom: 0;
  min-width: 0;
}
.dmarc-beheer-dns {
  max-width: 72rem;
}
.dmarc-dns-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 72rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 12px;
}
.dmarc-dns-banner strong {
  display: block;
  margin-bottom: 0.15rem;
}
.dmarc-dns-banner p {
  margin: 0;
  color: var(--muted, #64748b);
  font-size: 0.88rem;
  line-height: 1.4;
}
.dmarc-dns-modal {
  max-width: 36rem;
  max-height: min(92vh, 44rem);
}
.dmarc-dns-modal .cookie-modal-head h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dmarc-dns-modal-lead,
.dmarc-dns-name-hint,
.dmarc-dns-modal-note {
  overflow-wrap: anywhere;
}
.dmarc-dns-modal-lead {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  line-height: 1.45;
}
.dmarc-dns-modal-record .dns-row {
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.28rem 0.15rem;
}
.dmarc-dns-modal-record .dns-row code {
  font-size: 0.8rem;
}
.dmarc-dns-copy,
.dmarc-dns-inline-copy {
  border: 1px solid #334155;
  background: transparent;
  color: #99f6e4;
  border-radius: 6px;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
  white-space: nowrap;
}
.dmarc-dns-copy:hover,
.dmarc-dns-inline-copy:hover { border-color: #5eead4; }
.dmarc-dns-inline-copy {
  border-color: var(--card-border, #e2e8f0);
  color: #0f766e;
  margin-left: 0.35rem;
  vertical-align: baseline;
}
.dmarc-dns-name-hint,
.dmarc-dns-modal-note,
.dmarc-dns-modal-status {
  margin: 0.65rem 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted, #64748b);
}
.dmarc-dns-modal-status.is-error { color: #b91c1c; }
.dmarc-dns-modal-status.is-ok { color: #0f766e; }
.dmarc-dns-modal-switch {
  margin: 0.85rem 0 0;
  font-size: 0.84rem;
}
.dmarc-dns-modal-switch button {
  background: none;
  border: none;
  padding: 0;
  color: #0f766e;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
}
.dmarc-dns-modal-switch button:disabled {
  opacity: 0.55;
  cursor: default;
}
@media (max-width: 640px) {
  .dmarc-dns-banner {
    flex-direction: column;
    align-items: stretch;
  }
  .dmarc-dns-modal-record .dns-row {
    grid-template-columns: 4.2rem minmax(0, 1fr);
  }
  .dmarc-dns-modal-record .dmarc-dns-copy {
    grid-column: 2;
    justify-self: start;
  }
}
/* Stack mode cards when sitting beside Policy (narrower column) */
.dmarc-beheer-top .dmarc-mode-cards {
  grid-template-columns: 1fr;
}
.dmarc-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.35rem;
}
@media (max-width: 900px) {
  .dmarc-beheer-top {
    grid-template-columns: 1fr;
  }
  .dmarc-beheer-top .dmarc-mode-cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .dmarc-mode-cards,
  .dmarc-beheer-top .dmarc-mode-cards {
    grid-template-columns: 1fr;
  }
}
.dmarc-mode-card {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 0.9rem;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.dmarc-mode-card:hover { border-color: #94a3b8; }
.dmarc-mode-card:has(input:checked),
.dmarc-mode-card.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb33;
}
.dmarc-mode-card input {
  margin-top: 0.2rem;
  width: auto;
  flex-shrink: 0;
}
.dmarc-mode-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.dmarc-mode-card-body strong {
  font-size: 0.95rem;
}
.dmarc-mode-card-body .muted {
  font-size: 0.8rem;
  line-height: 1.35;
  font-weight: 500;
}
.dmarc-mode-status {
  margin-top: 0.75rem;
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
}
.dmarc-mode-actions { margin-top: 0.65rem; }

.dmarc-policy-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}
.dmarc-policy-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.dmarc-policy-label {
  font-weight: 650;
  font-size: 0.88rem;
}
.dmarc-policy-field select,
.dmarc-policy-field input[type="text"],
.dmarc-policy-field input[type="number"],
.dmarc-policy-field textarea {
  width: 100%;
  max-width: 100%;
}
.dmarc-policy-field textarea {
  font: inherit;
  min-height: 5.5rem;
}
.dmarc-policy-hint {
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  line-height: 1.35;
}
.dmarc-rollout {
  margin-top: 0.35rem;
  padding: 0.75rem 0.85rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 8px;
}
.dmarc-platform-addrs {
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
}
.dmarc-platform-addrs .dns-row {
  font-size: 0.82rem;
}
.dmarc-pct-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.dmarc-pct-row input[type="range"] {
  flex: 1;
  min-width: 0;
}
.dmarc-pct-row input[type="number"] {
  width: 4.5rem;
  flex-shrink: 0;
}
.dmarc-advanced {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  background: #f8fafc;
}
.dmarc-advanced > summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 0.88rem;
  color: #334155;
}
.dmarc-advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.dmarc-advanced-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
}
.dmarc-advanced-grid label.full { grid-column: 1 / -1; }
.dmarc-advanced-grid select,
.dmarc-advanced-grid input {
  font-weight: 500;
}
@media (max-width: 560px) {
  .dmarc-advanced-grid { grid-template-columns: 1fr; }
}
.dmarc-rua-details > summary {
  cursor: pointer;
  list-style: none;
}
.dmarc-rua-details > summary::-webkit-details-marker { display: none; }
.dmarc-rua-details[open] > summary { margin-bottom: 0.25rem; }

/* —— Admin live chat —— */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
}
.nav-badge.hidden { display: none !important; }

.live-chat-admin-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 22rem) 1fr;
  gap: 1rem;
  min-height: 28rem;
  align-items: stretch;
}
@media (max-width: 900px) {
  .live-chat-admin-layout { grid-template-columns: 1fr; }
}
.live-chat-admin-list-panel,
.live-chat-admin-thread-panel {
  display: flex;
  flex-direction: column;
  min-height: 24rem;
  max-height: min(70vh, 40rem);
}
.live-chat-conversation-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.live-chat-conversation-item {
  text-align: left;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  width: 100%;
  font: inherit;
}
.live-chat-conversation-item:hover { border-color: #94a3b8; }
.live-chat-conversation-item.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb33;
}
.live-chat-conversation-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}
.live-chat-conversation-top strong { font-size: 0.9rem; }
.live-chat-unread {
  background: #2563eb;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.35rem;
}
.live-chat-conversation-sub {
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  margin-top: 0.15rem;
}
.live-chat-conversation-preview {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  color: #334155;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.live-chat-conversation-time {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
  margin-top: 0.3rem;
}
.live-chat-source-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  margin-left: 0.35rem;
}
.live-chat-source-badge--portal { background: #dbeafe; color: #1d4ed8; }
.live-chat-source-badge--app { background: #fef3c7; color: #92400e; }
.live-chat-thread-header {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.live-chat-admin-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.25rem 0 0.75rem;
}
.live-chat-admin-message {
  max-width: 85%;
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font-size: 0.88rem;
  line-height: 1.4;
}
.live-chat-admin-message--visitor {
  align-self: flex-start;
  background: #f1f5f9;
  color: #0f172a;
}
.live-chat-admin-message--admin {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
}
.live-chat-admin-message--system {
  align-self: center;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.8rem;
  max-width: 95%;
  text-align: center;
}
.live-chat-admin-message-meta {
  font-size: 0.7rem;
  opacity: 0.75;
  margin-top: 0.25rem;
}
.live-chat-admin-compose {
  border-top: 1px solid var(--border, #e2e8f0);
  padding-top: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.live-chat-admin-compose textarea {
  width: 100%;
  resize: vertical;
  min-height: 3rem;
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  padding: 0.5rem 0.65rem;
}
.live-chat-admin-compose textarea:disabled {
  opacity: 0.55;
  background: #f8fafc;
}

.bar-chart {
  display: grid;
  gap: 0.3rem;
}

.bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 60px;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.78rem;
}

.bar-track {
  height: 10px;
  background: var(--bg-alt);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #2dd4bf);
  border-radius: 999px;
}

.stack {
  display: grid;
  gap: 0.5rem;
}

.empty {
  padding: 0.85rem 0.75rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--card-border);
  border-radius: 8px;
  font-size: 0.84rem;
}

/* Domain source analyzer */
.stats-wide { grid-template-columns: repeat(4, 1fr); }
.stat-sub { margin-top: 0.1rem; font-size: 0.72rem; color: var(--muted); }
.text-ok { color: var(--green) !important; }
.text-bad { color: var(--red) !important; }
.text-warn { color: #b45309 !important; }
.home-attention-ok {
  text-align: left;
  padding: 1rem 0.25rem;
}
.home-attention-table { font-size: 0.9rem; }
.home-mta-sts-table { font-size: 0.9rem; }
.mta-sts-fail-types {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.digest-preview-mta {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--card-border);
}

/* Clickable domain rows in overview tables */
tr.domain-row {
  cursor: pointer;
}
tr.domain-row:hover {
  background: rgba(15, 118, 110, 0.06);
}
tr.domain-row:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.45);
  outline-offset: -2px;
}
tr.domain-row .col-actions,
tr.domain-row .domain-row-no-open {
  cursor: default;
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}
.panel-head h2 { margin: 0; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.tab {
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
.tab:hover { border-color: #b8c6d6; color: var(--text); }
.tab.active { background: #0f1b2b; color: #fff; border-color: #0f1b2b; }
.tab.tab-compliant.active { background: #059669; border-color: #059669; }
.tab.tab-non.active { background: #ca8a04; border-color: #ca8a04; }
.tab.tab-threat.active { background: #dc2626; border-color: #dc2626; }
.tab.tab-fwd.active { background: #0284c7; border-color: #0284c7; }

.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.cat-card {
  text-align: left;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: 0.15s ease;
}
.cat-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.cat-label { font-size: 0.68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.cat-value { font-size: 1.15rem; font-weight: 750; margin-top: 0.05rem; letter-spacing: -0.02em; line-height: 1.2; }
.cat-pct { font-size: 0.74rem; color: var(--muted); margin-top: 0.05rem; }
.cat-compliant { border-left: 3px solid var(--green); }
.cat-non_compliant { border-left: 3px solid var(--yellow); }
.cat-threat { border-left: 3px solid var(--red); }
.cat-forwarded { border-left: 3px solid var(--blue); }
.cat-hint { margin: 0.45rem 0 0; font-size: 0.74rem; }

.compliance-wrap { display: grid; gap: 0.55rem; }
.donut-row { display: flex; gap: 0.75rem; align-items: center; }
.donut {
  --p: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--p) * 1%), #fecaca 0);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  position: relative;
}
.donut::after {
  content: '';
  position: absolute;
  inset: 9px;
  background: var(--card);
  border-radius: 50%;
}
.donut span {
  position: relative;
  z-index: 1;
  font-weight: 800;
  font-size: 0.82rem;
}
.donut-legend { font-size: 0.82rem; display: grid; gap: 0.25rem; }
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 0.3rem;
}
.dot.ok { background: var(--green); }
.dot.bad { background: var(--red); }

.stack-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-alt);
}
.stack-pass { background: var(--green); }
.stack-fail { background: #fca5a5; }

.table-scroll { overflow-x: auto; }
.spf-mech-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.spf-tree-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.spf-mech-table { min-width: 640px; }
.spf-mech-table td { vertical-align: middle; }
.spf-mech-label { min-width: 16rem; }
.spf-mech-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding-left: calc(var(--spf-depth, 0) * 1.15rem);
}
.spf-mech-toggle,
.spf-mech-leaf {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  max-width: 100%;
  min-width: 0;
}
.spf-mech-label .tree-toggle {
  flex-wrap: nowrap;
  gap: 0.35rem;
}
.spf-mech-label .tree-toggle:hover .spf-mech-code {
  color: var(--accent-dark);
}
.spf-mech-spacer {
  display: inline-block;
  width: 1.15rem;
  flex: 0 0 1.15rem;
}
.spf-mech-code {
  font-size: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spf-mech-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}
.spf-nested td { background: transparent; }
.spf-child-hidden { display: none; }
.spf-unmatched {
  margin-top: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 10px;
}
.spf-unmatched-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.spf-unmatched-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #92400e;
}
.spf-unmatched-vol {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.84rem;
}
.spf-unmatched-lead {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #78350f;
}
.spf-unmatched-meta {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.spf-unmatched-group {
  margin-top: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #f3e8c8;
}
.spf-unmatched-group.tone-warn {
  border-color: #fecaca;
  background: #fff7f7;
}
.spf-unmatched-group.tone-info {
  border-color: #bfdbfe;
  background: #f8fbff;
}
.spf-unmatched-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}
.spf-unmatched-group-head strong {
  font-size: 0.82rem;
  color: var(--text);
}
.spf-unmatched-hint {
  margin: 0.2rem 0 0.45rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #6b5b3a;
}
.spf-unmatched-group.tone-warn .spf-unmatched-hint { color: #7f1d1d; }
.spf-unmatched-group.tone-info .spf-unmatched-hint { color: #1e3a5f; }
.spf-unmatched-table { min-width: 28rem; }
.spf-unmatched-table th { font-size: 0.66rem; }
.spf-unmatched-table td { font-size: 0.8rem; }
.spf-managed-top { margin-top: 0.25rem; }
.spf-managed-details { margin-top: 0.85rem; }
.spf-source-input {
  width: 100%;
  margin-top: 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 4.2rem;
}
.spf-source-advanced {
  margin-top: 0.75rem;
  font-size: 0.82rem;
}
.spf-source-advanced summary {
  cursor: pointer;
  color: var(--muted);
}
.spf-unpublished-banner {
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.7rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #92400e;
}
.spf-mech-admin-table { min-width: 48rem; }
.spf-mech-admin-table td { vertical-align: middle; }
.spf-mech-off td { opacity: 0.55; }
.spf-mech-note {
  width: 100%;
  min-width: 10rem;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
}
.spf-mech-name { min-width: 8rem; }
.spf-mech-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
}
.spf-mech-add-input {
  width: 100%;
  min-width: 14rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  padding: 0.25rem 0.4rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
}
.spf-mech-add-form .dmarc-policy-label { margin-top: 0.75rem; display: block; }

.advisor-path { max-width: 46rem; margin-bottom: 0.85rem; }
.advisor-path-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.advisor-path-grade-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.advisor-path-score {
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.advisor-path-steps {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
  display: grid;
  gap: 0.28rem;
}
.advisor-path-steps li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.advisor-path-steps li.is-done { color: var(--green); font-weight: 600; }
.advisor-path-steps li.is-current { color: var(--text); font-weight: 700; }
.advisor-path-mark {
  width: 1.1rem;
  text-align: center;
  flex: 0 0 auto;
}
.advisor-path-next {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
}
.advisor-path-next h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}
.advisor-path-next p { margin: 0 0 0.35rem; font-size: 0.9rem; }

.cd-modal-panel {
  max-width: 44rem;
  max-height: min(92vh, 52rem);
}
.cd-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.cd-tile {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.7rem 0.55rem 0.65rem;
  text-align: center;
  background: #f8fafc;
}
.cd-tile.is-pass { background: #ecfdf5; border-color: #a7f3d0; }
.cd-tile.is-fail { background: #fef2f2; border-color: #fecaca; }
.cd-tile.is-warn { background: #fffbeb; border-color: #fde68a; }
.cd-tile-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.cd-tile-result {
  margin-top: 0.15rem;
  font-size: 1.05rem;
  font-weight: 750;
}
.cd-tile-extra {
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--muted);
  word-break: break-all;
}
.agg-explain-tiles {
  grid-template-columns: repeat(4, 1fr);
}
.agg-explain-facts {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.82rem;
}
.agg-explain-panel .cd-block p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}
.agg-explain-tip {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  padding: 0.7rem 0.85rem;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
}
tr.agg-explain-row {
  cursor: pointer;
}
tr.agg-explain-row:hover {
  background: #eef2f6;
}
tr.agg-explain-row.row-threat:hover { background: #fecaca; }
tr.agg-explain-row.row-non_compliant:hover { background: #fde68a; }
tr.agg-explain-row.row-forwarded:hover { background: #bae6fd; }
tr.agg-explain-row.row-compliant:hover { background: #a7f3d0; }
tr.agg-explain-row:focus-visible {
  outline: 2px solid var(--accent, #0d9488);
  outline-offset: -2px;
}
@media (max-width: 720px) {
  .agg-explain-tiles { grid-template-columns: 1fr 1fr; }
}
.cd-block {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem 0.8rem;
  margin-bottom: 0.55rem;
  background: #fff;
}
.cd-block h3 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.cd-dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.65rem;
}
.cd-dl div { min-width: 0; }
.cd-dl dt {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 650;
}
.cd-dl dd { margin: 0.05rem 0 0; font-size: 0.88rem; }
.cd-align {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
}
.cd-align-box {
  flex: 1;
  min-width: 0;
  border: 1px dashed var(--card-border);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  background: var(--bg);
}
.cd-align-box strong {
  display: block;
  font-size: 0.8rem;
  word-break: break-all;
}
.cd-align-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.12rem;
}
.cd-align-link {
  flex: 0 0 2.1rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  border-radius: 999px;
  align-self: center;
}
.cd-align-link.is-pass { color: var(--green); }
.cd-align-link.is-fail { color: var(--red); }
.cd-align-link.is-none { color: var(--muted); }
.cd-align-caption { margin: 0.3rem 0 0; font-size: 0.78rem; }
.cd-key-wrap { margin-top: 0.65rem; }
.cd-key-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.cd-key {
  flex: 1;
  height: 8px;
  background: #e8eef5;
  border-radius: 99px;
  overflow: hidden;
}
.cd-key i { display: block; height: 100%; border-radius: 99px; }
.cd-key i.is-ok { background: var(--green); }
.cd-key i.is-warn { background: var(--yellow); }
.cd-key i.is-bad { background: var(--red); }
.cd-dmarc-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}
.cd-dmarc-seg {
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e8eef5;
  color: var(--muted);
}
.cd-dmarc-seg.is-pass { background: #d1fae5; color: #065f46; }
.cd-dmarc-seg.is-fail { background: #fee2e2; color: #991b1b; }
.cd-dmarc-seg.is-warn { background: #fef3c7; color: #92400e; }
.cd-dmarc-or, .cd-dmarc-eq { font-size: 0.75rem; color: var(--muted); font-weight: 650; }
.cd-note {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #155e75;
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
  margin: 0 0 0.75rem;
}
.cd-raw { margin-top: 0.7rem; font-size: 0.82rem; }
.cd-raw pre {
  margin: 0.4rem 0 0;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: 6px;
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.72rem;
}
.cd-issue { color: var(--red); font-size: 0.86rem; }
.dkim-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.55rem;
}
.dkim-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.dkim-preset-list .btn {
  font-size: 0.78rem;
}

.dkim-key-card {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  margin-bottom: 0.65rem;
  background: #fff;
}
.dkim-key-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-bottom: 0.55rem;
}
.dkim-private {
  margin: 0.55rem 0 0;
  padding: 0.55rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.72rem;
  white-space: pre-wrap;
  word-break: break-all;
}

tr.compliance-row { cursor: pointer; }
tr.compliance-row:hover { background: rgba(13, 148, 136, 0.06); }
tr.compliance-row:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.45);
  outline-offset: -2px;
}

.advisor-card { max-width: 46rem; }
.advisor-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.advisor-card.advisor-ready { border-color: #a7f3d0; }
.advisor-card.advisor-watch { border-color: #fde68a; }
.advisor-card.advisor-ok { border-color: #bbf7d0; }
.advisor-ready .advisor-sev { background: #d1fae5; color: #065f46; }
.advisor-watch .advisor-sev { background: #fef3c7; color: #92400e; }
.advisor-ok .advisor-sev { background: #dcfce7; color: #166534; }
.advisor-info .advisor-sev { background: #e0f2fe; color: #075985; }

.reporter-row { cursor: pointer; }
.reporter-row:hover td { background: rgba(13, 148, 136, 0.06); }
.reporter-row.is-active td { background: rgba(13, 148, 136, 0.12); }
.reporter-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.reporter-filter-bar.hidden { display: none; }
.agg-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.agg-toolbar .reporter-filter-bar { margin-left: 0; }
.agg-search {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0;
  font-weight: 500;
}
.changes-search {
  width: 100%;
  max-width: 28rem;
  margin-top: 0.15rem;
}
.changes-search input[type="search"] {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.agg-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.agg-search input[type="search"] {
  font: inherit;
  font-size: 0.84rem;
  padding: 0.34rem 1.85rem 0.34rem 0.75rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  min-width: 15.5rem;
  max-width: 22rem;
  background: #fff;
  color: inherit;
}
.agg-search input[type="search"]:focus {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  outline-offset: 1px;
  border-color: #0d9488;
}
.agg-search-clear {
  position: absolute;
  right: 0.28rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.agg-search-clear:hover { background: #f1f5f9; color: var(--ink); }
.agg-search-clear.hidden { display: none; }
.agg-search-meta {
  margin: 0;
  width: 100%;
  font-size: 0.8rem;
  order: 4;
  flex-basis: 100%;
}
.agg-search-meta.hidden { display: none; }
.panel-head #source-tabs {
  order: 5;
  flex-basis: 100%;
}
@media (max-width: 640px) {
  .agg-search input[type="search"] {
    min-width: 0;
    width: 100%;
    max-width: none;
  }
  .agg-toolbar { width: 100%; margin-left: 0; }
  .agg-search { width: 100%; }
}
.reporter-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 0.8rem;
  font-weight: 600;
}
.spf-mech-add-form select,
.spf-mech-add-form .spf-mech-note {
  width: 100%;
  margin-top: 0.25rem;
}
.spf-mech-add-hint { margin: 0.3rem 0 0; font-size: 0.78rem; }
.spf-mech-admin-table .recipient-actions { justify-content: flex-end; }
.spf-all-select {
  font: inherit;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  background: #fff;
  max-width: 16rem;
}
.sources-table { min-width: 680px; }
.tree-source-head {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
}
.tree-source-head .tree-toggle {
  flex: 1 1 auto;
  min-width: 0;
}
.src-flags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.src-flag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  line-height: 1.3;
  white-space: nowrap;
}
.src-flag-ok {
  color: #047857;
  background: #ecfdf5;
}
.src-flag-warn {
  color: #b45309;
  background: #fffbeb;
}
.src-flag-new {
  color: #1d4ed8;
  background: #eff6ff;
}
.src-flag-mid {
  color: #334155;
  background: #f1f5f9;
}
.src-flag-legend {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
}
.cookie-modal-panel.source-playbook-modal {
  max-width: 32rem;
}
.source-playbook-fact {
  margin: 0.65rem 0 0;
  padding: 0.55rem 0.7rem;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
}
.source-playbook-fact span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.source-playbook-fact code,
.source-playbook-fact p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text);
  word-break: break-word;
}
.source-playbook-steps {
  margin: 0.85rem 0 0;
  padding-left: 1.2rem;
}
.source-playbook-steps li {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
}
.source-playbook-links {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
}
.source-playbook-links a {
  font-weight: 650;
}
.source-playbook-btn {
  color: var(--accent-dark);
}
.source-playbook-btn:hover {
  color: var(--accent);
  background: var(--accent-glow);
}
.source-rename {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 0;
  border-radius: 6px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.source-rename:hover {
  color: var(--text);
  background: var(--bg-alt);
}
.source-rename-form .dmarc-policy-label {
  display: block;
}
.source-rename-form .spf-mech-note {
  width: 100%;
  margin-top: 0.25rem;
}
.source-rename-preview {
  margin: 0.7rem 0 0;
  padding: 0.55rem 0.7rem;
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
}
.source-rename-preview span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.source-rename-preview strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
}
.sources-tree { min-width: 720px; }
.sources-tree-nested { min-width: 640px; }
.sources-tree th:first-child,
.sources-tree td.tree-label { min-width: 16rem; }

/* Pass bars + detail grid */
.pass-rate {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 7.5rem;
}
.pass-rate-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  min-width: 3.5rem;
}
.pass-rate-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #94a3b8;
}
.pass-rate-fill.ok { background: linear-gradient(90deg, #34d399, #059669); }
.pass-rate-fill.mid { background: linear-gradient(90deg, #fbbf24, #d97706); }
.pass-rate-fill.bad { background: linear-gradient(90deg, #f87171, #dc2626); }
.pass-rate-pct {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 2.6rem;
  text-align: right;
}
.result-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.result-pill.ok { color: #047857; }
.result-pill.bad { color: #b91c1c; }
.result-pill.warn { color: #b45309; }
.result-pill.muted { color: var(--muted); font-weight: 500; }
.tree-subheader td {
  background: #f8fafc;
  border-top: 1px solid var(--card-border);
  padding-top: 0.45rem;
  padding-bottom: 0.35rem;
}
.detail-table-cell {
  padding: 0.35rem 0.5rem 0.75rem 1.5rem !important;
  background: #fafbfc !important;
}
.source-detail-scroll {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #fff;
}
.source-detail {
  min-width: 1100px;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.source-detail th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
  text-align: left;
}
.source-detail th.th-sort {
  padding: 0;
}
.th-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-transform: inherit;
  letter-spacing: inherit;
  text-align: left;
  padding: 0.45rem 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0;
}
.th-sort-btn:hover,
.th-sort-btn:focus-visible {
  color: var(--text);
  background: #e2e8f0;
  outline: none;
}
.th-sort.is-sorted .th-sort-btn {
  color: var(--text);
}
.th-sort-ind {
  font-size: 0.62rem;
  line-height: 1;
  opacity: 0.85;
}
.th-sort-ind-idle {
  opacity: 0.32;
}
.source-detail td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.source-detail tr:last-child td { border-bottom: 0; }
.auth-result-cell {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--text);
}
.nowrap { white-space: nowrap; }
.ip-cell-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.ip-flag {
  font-size: 1rem;
  line-height: 1;
}
.detail-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.85rem;
  margin-top: 0.5rem;
  padding: 0 0.15rem;
}
.detail-pager-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
  min-width: 0;
}
.detail-pager-btns {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}
label.pager-size {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  width: auto;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}
.pager-size select,
.detail-pager select[data-page-size] {
  width: auto;
  min-width: 3.6rem;
  max-width: 5rem;
  min-height: 0;
  height: 1.85rem;
  padding: 0 1.5rem 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
  border-radius: 6px;
  background-position: right 0.4rem center;
  background-size: 0.55rem;
  flex: 0 0 auto;
}
.xml-modal-panel {
  max-width: min(52rem, 96vw);
  width: 100%;
  max-height: min(92vh, 52rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.xml-view-meta {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}
.xml-view-tabs {
  display: flex;
  gap: 0.2rem;
  margin: 0 0 0.65rem;
  padding: 0.18rem;
  background: var(--bg-alt);
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
}
.xml-view-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0.38rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--muted);
  border-radius: 6px;
  cursor: pointer;
}
.xml-view-tab:hover {
  color: var(--text);
}
.xml-view-tab[aria-selected='true'] {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
}
.xml-view-note {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
}
.xml-view-pre {
  margin: 0;
  flex: 1 1 auto;
  min-height: 12rem;
  max-height: none;
  overflow: auto;
  padding: 0.75rem 0.85rem;
  background: #0f1b2b;
  color: #e2e8f0;
  border-radius: 10px;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.tree-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  text-align: left;
  max-width: 100%;
}
.tree-toggle:hover strong { color: var(--accent-dark); }
.tree-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  transition: transform 0.12s ease;
  flex: 0 0 auto;
}
.tree-chevron.open { transform: rotate(90deg); }
.tree-kind {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}
.tree-meta { font-size: 0.72rem; font-weight: 500; }
.tree-indent {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
}
.tree-indent-1 { padding-left: 1.1rem; }
.tree-indent-2 {
  padding-left: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
}
.tree-domain td {
  background: rgba(15, 27, 43, 0.03);
  font-weight: 600;
}
.tree-domain td:first-child { border-left: 3px solid var(--accent); }
.tree-source td { background: rgba(15, 27, 43, 0.015); }
.tree-detail td { font-weight: 400; }
.tree-row td { vertical-align: middle; }
.cell-sub { margin-top: 0.1rem; font-size: 0.68rem; color: var(--muted); }
.cell-sub .auth-field-label {
  display: inline-block;
  font-weight: 700;
  color: var(--muted);
  min-width: 1.35rem;
  font-size: 0.64rem;
  text-transform: none;
}
.cell-sub .badge {
  margin-left: 0.3rem;
  vertical-align: middle;
  font-size: 0.62rem;
  padding: 0.05rem 0.3rem;
}
.cell-sub.text-bad,
.cell-sub.text-bad .auth-field-label { color: var(--red); }
.row-threat { background: #fee2e2; }
.row-non_compliant { background: #fef3c7; }
.row-forwarded { background: #e0f2fe; }
.row-compliant { background: #d1fae5; }
tr.row-threat td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
tr.row-non_compliant td:first-child { box-shadow: inset 3px 0 0 #ca8a04; }
tr.row-forwarded td:first-child { box-shadow: inset 3px 0 0 #0284c7; }
tr.row-compliant td:first-child { box-shadow: inset 3px 0 0 #059669; }

.bar-track.dual { position: relative; background: #fecaca; }
.bar-track.dual .bar-fill.fail { position: absolute; inset: 0 auto 0 0; background: transparent; border-right: 0; }
.bar-track.dual .bar-fill.pass { position: relative; z-index: 1; background: linear-gradient(90deg, var(--accent), #2dd4bf); }

/* Period filter */
.period-bar {
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.75rem;
}
.period-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
}
.period-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.period-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.period-pill {
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}
.period-pill:hover { border-color: #b8c6d6; color: var(--text); }
.period-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  margin: 0 0 0.7rem;
}
.list-toolbar .domain-filter-bar {
  margin: 0;
  flex: 1 1 14rem;
}
.list-toolbar .list-search {
  margin-left: auto;
}
@media (max-width: 640px) {
  .list-toolbar .list-search,
  .list-toolbar .list-search input[type="search"] {
    width: 100%;
    max-width: none;
  }
}

.domain-filter-bar {
  margin: 0.15rem 0 0.7rem;
}
.domain-filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
}
.domain-filter-group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  flex: 0 0 auto;
}
.domain-filter-sep {
  flex: 0 0 auto;
  width: 1px;
  height: 1.05rem;
  background: var(--card-border);
  margin: 0 0.15rem;
}
.domain-filter-chip {
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.16rem 0.48rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  white-space: nowrap;
}
.domain-filter-chip:hover { border-color: #b8c6d6; color: var(--text); }
.domain-filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.domain-filter-count {
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.72;
  min-width: 0.9rem;
  text-align: center;
}
.domain-filter-chip.active .domain-filter-count { opacity: 0.88; }
.domains-overview-table { min-width: 36rem; }
.domain-name-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}
.domain-name-cell strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.domain-favicon-slot {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 3px;
  background: #e8eef5;
}
.domain-favicon {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: contain;
  background: #f1f5f9;
}
.domain-favicon.is-missing {
  display: none;
}
.failure-table { min-width: 44rem; }
.failure-row.is-selected { background: rgba(15, 118, 110, 0.08); }
.failure-detail {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
}
.failure-detail h3 { margin: 0 0 0.55rem; font-size: 0.95rem; }
.failure-kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1.25rem;
}
.failure-kv {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.4rem;
  font-size: 0.8rem;
}
.failure-kv span:first-child { color: var(--muted); }
.failure-pre {
  margin: 0;
  padding: 0.6rem 0.7rem;
  background: var(--bg-alt);
  border-radius: 8px;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 720px) {
  .failure-kv-grid { grid-template-columns: 1fr; }
}
.health-status-inline,
.mta-sts-status-inline {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border, #e5e7eb);
}
.mta-sts-verdict {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.mta-sts-verdict strong {
  display: block;
  font-size: 1.02rem;
}
.mta-sts-verdict .muted {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
}
.mta-sts-verdict-mark {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1;
}
.mta-sts-verdict.is-ok .mta-sts-verdict-mark {
  background: #dcfce7;
  color: #166534;
}
.mta-sts-verdict.is-wait .mta-sts-verdict-mark {
  background: #fef3c7;
  color: #92400e;
}
.mta-sts-issues {
  margin: 0.45rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.82rem;
  color: #92400e;
}
.mta-sts-dns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
}
.mta-sts-dns-grid .btn { margin-top: 0.55rem; }

.bimi-preview-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 0 1rem;
}
.bimi-preview {
  flex: 0 0 6.5rem;
  width: 6.5rem;
  height: 6.5rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  padding: 0.35rem;
}
.bimi-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.bimi-preview-meta {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.bimi-inbox-table td:last-child {
  font-size: 0.8rem;
}
.bimi-info-btn {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
}
.bimi-info-btn:hover,
.bimi-info-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--accent-glow);
  outline: none;
}
.bimi-explain {
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.bimi-explain > div {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.45rem 0.75rem;
  margin: 0.55rem 0;
}
.bimi-explain dt {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}
.bimi-explain dd {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 640px) {
  .bimi-explain > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    margin: 0.55rem 0;
  }
}
.bimi-help-btn {
  background: var(--accent-glow);
  border-color: #99f6e4;
  color: var(--accent-dark);
  text-decoration: none;
}
.bimi-help-btn:hover {
  background: rgba(13, 148, 136, 0.22);
  border-color: var(--accent);
  color: var(--accent-dark);
  text-decoration: none;
}
.bimi-file-btn {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  margin: 0;
}
.bimi-file-btn input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.domains-overview-table td { vertical-align: middle; }
.period-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.45rem;
  margin-top: 0.5rem;
}
.period-custom label {
  font-size: 0.78rem;
}
.period-custom input[type="date"] {
  min-width: 9rem;
}
.period-active-label {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
}

/* DMARC config form */
.dmarc-config-form label .muted {
  display: block;
  margin-top: 0.2rem;
}

/* Action menu (⋯) */
.col-actions {
  width: 2.5rem;
  text-align: right;
  white-space: nowrap;
}
.action-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}
.action-menu-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.action-menu-btn:hover,
.action-menu.open .action-menu-btn {
  background: var(--bg-alt);
  border-color: var(--card-border);
  color: var(--text);
}
.action-menu-dots {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transform: translateY(-1px);
}
.action-menu-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.2rem);
  min-width: 10.5rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 0.25rem;
  z-index: 80;
}
.action-menu.open .action-menu-panel {
  display: grid;
}
.action-menu-item {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.action-menu-item:hover {
  background: var(--bg-alt);
}
.action-menu-item-danger {
  color: var(--red);
}
.action-menu-item-danger:hover {
  background: #fef2f2;
}

/* Live DMARC / SPF / DKIM / MX checker */
.dc-widget {
  max-width: 52rem;
  margin: 0 auto;
}
.dc-widget .dc-label {
  display: block;
  font-weight: 650;
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}
.dc-form-lead .dc-lead-fields {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}
.dc-form-lead .dc-label {
  margin-bottom: 0;
}
.dc-form-lead .dc-label .dc-input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
}
.dc-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.84rem;
  line-height: 1.4;
  font-weight: 500;
  color: var(--text);
}
.dc-consent input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.15rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.dc-lead-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
}
.dc-form {
  position: relative;
}
.dc-row {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}
.dc-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
.dc-input:focus {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  border-color: var(--accent);
}
.dc-examples {
  margin: 0.55rem 0 0;
  font-size: 0.84rem;
}
.dc-ex {
  border: 0;
  background: none;
  color: var(--accent-dark);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dc-error {
  margin: 0.55rem 0 0;
  color: var(--red);
  font-weight: 600;
  font-size: 0.88rem;
}
.dc-loading { margin: 1rem 0 0; }
.dc-results { margin-top: 1.15rem; }
.dc-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.dc-domain {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dc-when { font-size: 0.8rem; margin-top: 0.15rem; }
.dc-grade-wrap { text-align: center; }
.dc-grade {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 650;
  color: #fff;
  background: var(--muted);
}
.dc-grade-A { background: var(--green); }
.dc-grade-B { background: var(--accent-dark); }
.dc-grade-C { background: var(--yellow); color: #1f2937; }
.dc-grade-D { background: #ea580c; }
.dc-grade-F { background: var(--red); }
.dc-score { font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-top: 0.2rem; }
.dc-spoof {
  margin: 0 0 0.85rem;
  padding: 0.8rem 0.95rem;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
  line-height: 1.45;
}
.dc-spoof strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.dc-spoof code {
  font-size: 0.84em;
  background: rgba(153, 27, 27, 0.08);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}
.dc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.dc-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
}
.dc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.dc-card-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.dc-record {
  margin: 0 0 0.4rem;
  padding: 0.5rem 0.55rem;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.74rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
  color: #334155;
}
.dc-meta { margin: 0 0 0.4rem; font-size: 0.78rem; }
.dc-issues, .dc-sels, .dc-mx {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.82rem;
}
.dc-issues li, .dc-sels li, .dc-mx li { margin: 0.22rem 0; }
.dc-issue { color: var(--red); }
.dc-warn { color: #b45309; }
.dc-ok { color: var(--green); font-weight: 600; }
.dc-prio {
  display: inline-block;
  min-width: 1.5rem;
  font-weight: 700;
  color: var(--muted);
}
.dc-cta {
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}
.mkt-check-card {
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  padding: 1.25rem 1.35rem 1.4rem;
  box-shadow: 0 18px 40px rgba(15, 27, 43, 0.08);
}

@media (max-width: 960px) {
  .panel-grid--chart,
  .panel-grid--digest {
    grid-template-columns: 1fr;
  }

  .hero, .panel-grid, .panel-grid.prospect-detail-grid, .stats, .grid-3, .form-grid, .app-shell {
    grid-template-columns: 1fr;
  }
  /* Keep the dark sidebar a compact top bar. Default grid stretch + min-height:100vh
     otherwise inflates the first row on iPad portrait into a large empty slab. */
  .app-shell {
    grid-template-rows: auto 1fr;
    align-content: start;
  }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    max-height: none;
    overflow: visible;
    align-self: start;
    width: 100%;
    padding: 0.55rem 0.75rem 0.6rem;
    gap: 0;
  }
  .sidebar-menu-toggle {
    display: inline-flex;
  }
  .side-nav,
  .side-meta {
    display: none;
  }
  .sidebar.is-open .side-nav {
    display: grid;
    grid-auto-flow: row;
    flex: none;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: min(70dvh, calc(100dvh - 5.5rem));
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .sidebar.is-open .side-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  .sidebar.is-open .side-meta {
    display: block;
  }
  .side-nav button {
    min-height: 40px;
  }
  .stats, .stats-wide { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .dc-grid, .dc-row { grid-template-columns: 1fr; flex-direction: column; }
  .cd-tiles, .cd-dl, .cd-align { grid-template-columns: 1fr; flex-direction: column; }
}

.side-nav a.side-nav-ext {
  display: block;
  text-align: left;
  color: #b7c6d8;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
}
.side-nav a.side-nav-ext:hover {
  background: rgba(94, 234, 212, 0.12);
  color: #fff;
  text-decoration: none;
}

/* —— Public help centre —— */
.help-page .help-main {
  padding: 2.25rem 0 4rem;
  min-height: 60vh;
}
.help-page .mkt-nav-links a[aria-current="page"] {
  color: var(--text);
}
.mkt-nav-help {
  display: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  margin-right: 0.15rem;
}
.mkt-nav-help:hover {
  color: var(--text);
  text-decoration: none;
}

.help-hero {
  max-width: 40rem;
  margin: 0 0 2.25rem;
}
.help-hero h1,
.help-article-head h1 {
  margin: 0 0 0.75rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.85rem, 3.4vw, 2.55rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.help-hero .lead,
.help-article-head .lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 48ch;
}

.help-search {
  margin: 0;
}
.help-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.help-search input {
  width: min(32rem, 100%);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  box-shadow: var(--shadow);
}
.help-search input:focus {
  outline: 2px solid rgba(13, 148, 136, 0.28);
  border-color: var(--accent);
}

.help-topics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 0 0 2.5rem;
}
.help-topic-card {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.15rem 1.2rem 1.05rem;
  box-shadow: var(--shadow);
}
.help-topic-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
}
.help-topic-card > p {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.help-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.help-article-list a {
  display: grid;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}
.help-article-list a:hover {
  background: var(--accent-glow);
  text-decoration: none;
}
.help-article-list a strong {
  color: var(--text);
  font-size: 0.95rem;
}
.help-article-list a span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.help-popular h2,
.help-results h2,
.help-related h2 {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
}
.help-popular,
.help-results {
  max-width: 42rem;
}

.help-layout {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 46rem);
  gap: 2.5rem;
  align-items: start;
}
.help-aside {
  position: sticky;
  top: 5.25rem;
  padding: 0.2rem 0 1rem;
}
.help-aside-home {
  display: inline-block;
  margin: 0 0 1rem;
  font-size: 0.82rem;
  font-weight: 650;
}
.help-aside-group {
  margin: 0 0 1.1rem;
}
.help-aside-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.help-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}
.help-aside a {
  display: block;
  padding: 0.32rem 0.45rem;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
.help-aside a:hover,
.help-aside a[aria-current="page"] {
  color: var(--text);
  background: rgba(13, 148, 136, 0.1);
  text-decoration: none;
}

.help-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.help-article-body {
  font-size: 0.98rem;
  line-height: 1.6;
}
.help-article-body h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.22rem;
}
.help-article-body h3 {
  margin: 1.35rem 0 0.4rem;
  font-size: 1.02rem;
}
.help-article-body p,
.help-article-body li {
  color: var(--text);
}
.help-article-body ul,
.help-article-body ol {
  margin: 0.4rem 0 1rem;
  padding-left: 1.2rem;
}
.help-article-body li + li {
  margin-top: 0.28rem;
}
.help-article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86em;
  background: #eef3f8;
  padding: 0.08em 0.32em;
  border-radius: 4px;
}
.help-pre {
  background: #0f1b2b;
  color: #d7e2ef;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}
.help-dns {
  margin: 0.75rem 0 1rem;
}

.help-trio,
.help-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.help-trio {
  grid-template-columns: 1fr 1fr 1fr;
}
.help-trio article,
.help-split > div {
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}
.help-trio h3,
.help-split h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.help-trio p,
.help-split p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.help-split ul {
  margin: 0.35rem 0 0;
}

.help-steps {
  counter-reset: helpstep;
  list-style: none;
  padding-left: 0;
}
.help-steps li {
  position: relative;
  padding-left: 2.1rem;
  margin: 0 0 0.7rem;
}
.help-steps li::before {
  counter-increment: helpstep;
  content: counter(helpstep);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: var(--accent-glow);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.help-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: stretch;
  margin: 1.1rem 0 1.4rem;
}
.help-flow-step {
  flex: 1 1 8.5rem;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  display: grid;
  gap: 0.2rem;
}
.help-flow-step span {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.help-flow-step strong {
  font-size: 0.88rem;
}
.help-flow-step em {
  font-style: normal;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}
.help-flow-arrow {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-weight: 600;
}

.help-callout {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.help-callout p {
  margin: 0;
  color: inherit;
  font-size: 0.92rem;
}
.help-callout-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.help-related {
  margin: 2.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--card-border);
}
.help-back {
  margin: 1.75rem 0 0;
  font-weight: 650;
}

@media (max-width: 960px) {
  .mkt-nav-help { display: inline; }
  .help-topics,
  .help-trio,
  .help-split,
  .help-layout {
    grid-template-columns: 1fr;
  }
  .help-aside {
    position: static;
    padding: 0 0 0.5rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 1.25rem;
  }
  .help-flow-arrow {
    display: none;
  }
}
