/* Email Security Checker — page-specific styles (loads only on its template).
   Reuses the theme tokens from style.css; gate-form styles live there too. */

.ec-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: start;
}

/* ----- checker card ----- */

.ec-card {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 34px 32px;
}

.ec-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 18px;
}

.ec-scan-form > label {
  display: block;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.ec-scan-row {
  display: flex;
  gap: 12px;
}

.ec-scan-row input[type="text"] {
  flex: 1;
  font-size: 1.05rem;
  padding: 12px 14px;
  border: 1px solid var(--line-light);
  border-radius: 10px;
  background: var(--paper-tint);
  color: var(--ink);
  min-width: 0;
}

.ec-scan-row input[type="text"]:focus {
  outline: 2px solid var(--ember);
  outline-offset: 1px;
}

.ec-error {
  color: #c0392b;
  font-size: 0.88rem;
  margin: 12px 0 0;
}

/* ----- results ----- */

.ec-results { margin-top: 28px; }
.ec-results[hidden] { display: none; }

.ec-scorebox {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line-light);
  border-radius: 12px;
  background: var(--paper-tint);
  margin-bottom: 18px;
}

.ec-score-dial {
  display: flex;
  align-items: baseline;
  font-family: var(--font-display);
  color: var(--ink);
}

.ec-score-n {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.ec-score-of {
  font-size: 1.1rem;
  color: var(--mist-dim);
  margin-left: 2px;
}

.ec-score-band {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.ec-score-band.good     { background: #e2f4ea; color: #1e7a4d; }
.ec-score-band.partial  { background: #fdf3d7; color: #8a6200; }
.ec-score-band.poor     { background: #fde8d7; color: #a34e00; }
.ec-score-band.critical { background: #fddddd; color: #a11212; }

.ec-score-domain {
  font-size: 0.9rem;
  color: var(--mist-dim);
  margin: 0;
}

/* traffic-light check list */

.ec-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.ec-checks li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line-light);
}

.ec-checks li:last-child { border-bottom: 0; }

.ec-light {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  align-self: center;
}

.ec-light.pass { background: #2fa36b; }
.ec-light.warn { background: #f6b73c; }
.ec-light.fail { background: #ef4444; }
.ec-light.info { background: #b8c4cf; }

.ec-check-name {
  flex: 0 0 96px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.ec-check-label {
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 600;
}

.ec-check-label.pass { color: #1e7a4d; }
.ec-check-label.warn { color: #8a6200; }
.ec-check-label.fail { color: #a11212; }
.ec-check-label.info { color: var(--mist-dim); }

.ec-check-what {
  font-size: 0.82rem;
  color: var(--mist-dim);
}

.ec-smallprint {
  font-size: 0.78rem;
  color: var(--mist-dim);
  margin: 18px 0 0;
}

/* ----- gate panel (dark, mirrors calc-result) ----- */

.ec-gatepanel {
  position: sticky;
  top: 96px;
  background: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 30px 28px;
}

.ec-gatepanel[hidden] { display: none; }

.ec-gate-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}

.ec-gate-lede {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--mist);
  margin: 0 0 18px;
}

/* the gate inherits .gate-form styles from style.css; tune for dark panel */
.ec-gate .gate-form,
.ec-gate .gate-success {
  background: var(--paper);
  border-radius: 12px;
  padding: 22px 20px;
}

/* ----- full report ----- */

.ec-report[hidden] { display: none; }

.ec-report-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.ec-report-check {
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 24px;
}

.ec-report-check h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--ink);
}

.ec-report-check p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft, var(--ink));
  margin: 0 0 10px;
}

.ec-report-check code {
  display: block;
  font-size: 0.76rem;
  line-height: 1.5;
  background: var(--paper-tint);
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.ec-report-issues {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ec-report-issues li {
  font-size: 0.85rem;
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
}

.ec-report-issues li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--orange);
}

/* fix list */

.ec-fixes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ec-fix {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-left: 4px solid var(--line-light);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.ec-fix.high   { border-left-color: #ef4444; }
.ec-fix.medium { border-left-color: #f6b73c; }
.ec-fix.low    { border-left-color: #b8c4cf; }

.ec-fix-pill {
  grid-row: span 2;
  align-self: start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 3px;
  white-space: nowrap;
}

.ec-fix.high   .ec-fix-pill { background: #fddddd; color: #a11212; }
.ec-fix.medium .ec-fix-pill { background: #fdf3d7; color: #8a6200; }
.ec-fix.low    .ec-fix-pill { background: var(--paper-tint); color: var(--mist-dim); }

.ec-fix h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.ec-fix p {
  grid-column: 2;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.ec-fixes-none {
  font-size: 0.95rem;
  color: var(--ink);
}

/* ----- responsive ----- */

@media (max-width: 900px) {
  .ec-layout { grid-template-columns: 1fr; }
  .ec-gatepanel { position: static; }
  .ec-report-checks { grid-template-columns: 1fr; }
  .ec-scan-row { flex-direction: column; }
  .ec-check-what { display: none; }
}
