/*
 * Email Health Chk — briefing.css
 *
 * Two visual modes, intentionally split:
 *
 *   1. The BRIEFING FORM (steps 1 & 2: domain/email + OTP code) uses the
 *      LIGHT brand of the Digital Chk suite (Breach Chk, EML Analyzer,
 *      Toolkit Chk). Class names: .email-health-chk-briefing__*.
 *
 *   2. The RENDERED BRIEFING (step 3: hero, problems table, suggestion
 *      cards, action plan, CTA) keeps the DARK report style derived from
 *      tumayoraliado-briefing.html. Class names: .ehc-rb__* (unchanged).
 *      This is a full-width report — the dark surface is the point.
 *
 * Constraints: no @import in the form section; the rendered report MAY
 * use Google Fonts via a separate <link> in the standalone-download
 * pathway only.
 */

/* =========================================================================
   FORM — LIGHT THEME (matches breach-checker.css)
   ========================================================================= */

/* Fix: HTML [hidden] attribute must beat our display: flex / grid rules. */
.email-health-chk-briefing [hidden],
.email-health-chk-briefing[hidden],
.ehc-rb [hidden],
.ehc-rb[hidden] { display: none !important; }

.email-health-chk-briefing {
	--ehc-primary:        #126E00;
	--ehc-primary-hover:  #0a5a00;
	--ehc-bg:             #ffffff;
	--ehc-text:           #1a1a2e;
	--ehc-muted:          #5a6478;
	--ehc-line:           rgba(0, 0, 0, 0.08);
	--ehc-line-strong:    #d0d5dd;
	--ehc-btn-text:       #ffffff;
	--ehc-radius:         12px;

	max-width: 560px;
	margin: 0 auto;
	padding: 28px 24px;
	border-radius: var(--ehc-radius) !important;
	background: var(--ehc-bg) !important;
	color: var(--ehc-text) !important;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	box-sizing: border-box;
}

.email-health-chk-briefing *,
.email-health-chk-briefing *::before,
.email-health-chk-briefing *::after {
	box-sizing: border-box;
}

.email-health-chk-briefing__wrap { position: relative; }

.email-health-chk-briefing__step { display: none; }
.email-health-chk-briefing__step.is-active { display: block; }
.email-health-chk-briefing__step[hidden] { display: none !important; }

.email-health-chk-briefing__pill {
	display: inline-block;
	background: rgba(18, 110, 0, 0.10);
	border: 1px solid rgba(18, 110, 0, 0.4);
	color: var(--ehc-primary);
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	margin-bottom: 14px;
}

.email-health-chk-briefing__title {
	margin: 0 0 12px !important;
	font-size: clamp(20px, 3vw, 26px) !important;
	font-weight: 700 !important;
	color: var(--ehc-text) !important;
	line-height: 1.25 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-align: left;
}

.email-health-chk-briefing__lead {
	color: var(--ehc-muted);
	font-size: 14px;
	line-height: 1.6;
	margin: 0 0 18px;
}

.email-health-chk-briefing__field { margin-bottom: 14px; }

.email-health-chk-briefing__field label {
	display: block;
	font-size: 12px;
	color: var(--ehc-muted);
	margin-bottom: 6px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.email-health-chk-briefing__field input[type="text"],
.email-health-chk-briefing__field input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px !important;
	font-size: 0.95rem !important;
	border: 1.5px solid var(--ehc-line-strong) !important;
	border-radius: 6px !important;
	outline: none;
	background: rgba(0, 0, 0, 0.03) !important;
	color: var(--ehc-text) !important;
	font-family: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	line-height: normal !important;
	transition: border-color 0.2s;
}

.email-health-chk-briefing__field input:focus {
	border-color: var(--ehc-primary) !important;
	background: var(--ehc-bg) !important;
}

.email-health-chk-briefing__field input::placeholder { color: #999; }

.email-health-chk-briefing__turnstile {
	display: flex;
	justify-content: center;
	margin-top: 4px;
}

.email-health-chk-briefing__turnstile .cf-turnstile { max-width: 100%; }
.email-health-chk-briefing__turnstile .cf-turnstile iframe { max-width: 100% !important; }

.email-health-chk-briefing__tc {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	color: var(--ehc-muted);
	font-size: 0.82rem;
	line-height: 1.5;
	cursor: pointer;
}

.email-health-chk-briefing__tc input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.email-health-chk-briefing__tc a {
	color: var(--ehc-primary);
	text-decoration: none;
}
.email-health-chk-briefing__tc a:hover { text-decoration: underline; }

.email-health-chk-briefing__tc-text-full {
	margin-top: 8px;
	font-size: 0.78rem;
	color: var(--ehc-muted);
	line-height: 1.5;
}

.email-health-chk-briefing__tc-link {
	margin: 6px 0 0;
	font-size: 0.78rem;
}
.email-health-chk-briefing__tc-link a {
	color: var(--ehc-primary);
	text-decoration: none;
}
.email-health-chk-briefing__tc-link a:hover { text-decoration: underline; }

.email-health-chk-briefing__error {
	background: #fff0f0;
	color: #c0392b;
	border: 1px solid #f5c6cb;
	padding: 11px 14px;
	border-radius: 6px;
	font-size: 0.88rem;
	margin: 0 0 14px;
}

.email-health-chk-briefing__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	color: var(--ehc-btn-text) !important;
	background: var(--ehc-primary) !important;
	background-image: none !important;
	border: none !important;
	border-radius: 6px !important;
	cursor: pointer;
	font-family: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	transition: opacity 0.2s, transform 0.1s;
}

.email-health-chk-briefing__btn:hover,
.email-health-chk-briefing__btn:focus {
	opacity: 0.88;
	background: var(--ehc-primary) !important;
	background-image: none !important;
	color: var(--ehc-btn-text) !important;
}

.email-health-chk-briefing__btn:active { transform: scale(0.97); }

.email-health-chk-briefing__btn[disabled],
.email-health-chk-briefing__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.email-health-chk-briefing__btn--ghost {
	background: transparent !important;
	background-image: none !important;
	border: 1.5px solid var(--ehc-line-strong) !important;
	color: var(--ehc-text) !important;
}

.email-health-chk-briefing__btn--ghost:hover,
.email-health-chk-briefing__btn--ghost:focus {
	background: rgba(0, 0, 0, 0.04) !important;
	background-image: none !important;
	color: var(--ehc-text) !important;
}

.email-health-chk-briefing__btn-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: ehc-bf-spin 0.8s linear infinite;
}

.email-health-chk-briefing__btn.is-loading .email-health-chk-briefing__btn-spinner {
	display: inline-block;
}
.email-health-chk-briefing__btn.is-loading { cursor: progress; }

.email-health-chk-briefing__btn--ghost .email-health-chk-briefing__btn-spinner {
	border-color: rgba(0, 0, 0, 0.18);
	border-top-color: var(--ehc-text);
}

@keyframes ehc-bf-spin {
	to { transform: rotate(360deg); }
}

.email-health-chk-briefing__row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.email-health-chk-briefing__toolbar {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0 auto 18px;
	justify-content: flex-end;
	max-width: 1100px;
	padding: 0 22px;
	box-sizing: border-box;
}

/* Step 3 (rendered briefing) takes over the full width of the page; the
   light card sizing is only for steps 1 & 2. */
.email-health-chk-briefing:has(.email-health-chk-briefing__step--3.is-active) {
	max-width: none;
	padding: 0;
	background: transparent !important;
	box-shadow: none;
	border-radius: 0 !important;
}

/* Fallback for browsers without :has() — when step 3 is shown JS adds
   the modifier class .is-rendering on the root. */
.email-health-chk-briefing.is-rendering {
	max-width: none;
	padding: 0;
	background: transparent !important;
	box-shadow: none;
	border-radius: 0 !important;
}

@media (max-width: 480px) {
	.email-health-chk-briefing {
		padding: 22px 16px;
		max-width: 100%;
	}
	.email-health-chk-briefing__row {
		flex-direction: column;
	}
	.email-health-chk-briefing__btn {
		width: 100%;
	}
}

/* =========================================================================
   RENDER — DARK THEME (kept from tumayoraliado-briefing.html scaffolding)
   Class names unchanged: .ehc-rb / .ehc-rb__*.  These do not collide with
   the light .email-health-chk-briefing__* form.
   ========================================================================= */

.ehc-rb {
	--ehc-bg: #070b14;
	--ehc-panel: #0f1525;
	--ehc-ink: #f1f4f9;
	--ehc-muted: #8b95a8;
	--ehc-brand: #126E00;
	--ehc-brand-2: #2b88f5;
	--ehc-check: #2ecc71;
	--ehc-check-2: #5fcf91;
	--ehc-good: #2ecc71;
	--ehc-bad: #ff4d6d;
	--ehc-warn: #ffb84d;
	--ehc-info: #7ba5ff;
	--ehc-card: #131a2e;
	--ehc-line: #262f4a;
	--ehc-warm: #ffb784;

	font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ehc-ink);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	background: var(--ehc-bg);
	border-radius: 16px;
	overflow: hidden;
}

.ehc-rb__wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 22px;
	box-sizing: border-box;
}

.ehc-rb__hero {
	padding: 36px 0 24px;
	background:
		radial-gradient(900px 500px at 20% 0%, rgba(46, 204, 113, .10) 0%, transparent 60%),
		radial-gradient(900px 500px at 80% 30%, rgba(30, 111, 219, .14) 0%, transparent 60%),
		linear-gradient(180deg, #0a0f1f 0%, var(--ehc-bg) 80%);
}
.ehc-rb__greeting {
	display: inline-block;
	background: rgba(46, 204, 113, .12);
	border: 1px solid rgba(46, 204, 113, .4);
	color: #9be7be;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	letter-spacing: .06em;
	font-weight: 600;
	margin-bottom: 18px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ehc-rb__h1 {
	font-size: clamp(28px, 5vw, 44px);
	margin: 0 0 18px;
	letter-spacing: -.02em;
	line-height: 1.15;
	font-weight: 700;
	color: #fff;
	max-width: 820px;
}
.ehc-rb__letter {
	color: #d6dae3;
	font-size: 16.5px;
	max-width: 720px;
	line-height: 1.7;
	margin: 0 0 12px;
}
.ehc-rb__meta {
	color: var(--ehc-muted);
	font-size: 12.5px;
	margin: 16px 0 0;
	font-family: ui-monospace, Menlo, Consolas, monospace;
}

.ehc-rb__section { padding: 24px 0 8px; }
.ehc-rb__section:last-child { padding-bottom: 24px; }
.ehc-rb__num {
	display: inline-block;
	color: var(--ehc-brand-2);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .2em;
	margin-bottom: 10px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ehc-rb__h2 {
	font-size: clamp(22px, 3.5vw, 32px);
	margin: 0 0 14px;
	letter-spacing: -.02em;
	line-height: 1.2;
	font-weight: 700;
	color: #fff;
}
.ehc-rb__lead {
	color: var(--ehc-muted);
	font-size: 15.5px;
	max-width: 780px;
	margin: 0 0 20px;
	line-height: 1.65;
}

.ehc-rb__ptable {
	background: var(--ehc-card);
	border: 1px solid var(--ehc-line);
	border-radius: 12px;
	overflow: hidden;
	margin-top: 14px;
}
.ehc-rb__pt-row {
	display: grid;
	grid-template-columns: 50px 1fr 110px;
	gap: 14px;
	padding: 13px 18px;
	align-items: center;
	border-bottom: 1px solid var(--ehc-line);
}
.ehc-rb__pt-row:last-child { border-bottom: 0; }
.ehc-rb__pt-row--head {
	background: #0c1124;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ehc-muted);
	font-weight: 700;
}
.ehc-rb__num2 {
	font-size: 18px;
	font-weight: 800;
	color: #fff;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	text-align: center;
}
.ehc-rb__pname {
	font-weight: 600;
	font-size: 14px;
}
.ehc-rb__ev {
	display: block;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 11.5px;
	color: var(--ehc-muted);
	margin-top: 4px;
	font-weight: 400;
	word-break: break-word;
}
.ehc-rb__sev2 {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-align: center;
	padding: 5px 8px;
	border-radius: 6px;
	display: inline-block;
}
.ehc-rb__sev2--crit { background: #3d0f1e; color: var(--ehc-bad); }
.ehc-rb__sev2--high { background: #3d0f1e; color: #ffb3bf; }
.ehc-rb__sev2--med  { background: #3d2a0f; color: var(--ehc-warn); }
.ehc-rb__sev2--low  { background: #0c2440; color: var(--ehc-info); }

.ehc-rb__details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 14px;
	margin-top: 14px;
	align-items: start;
}
.ehc-rb__sug-card {
	background: var(--ehc-card);
	border: 1px solid var(--ehc-line);
	border-radius: 12px;
	padding: 20px;
}
.ehc-rb__sug-card .ehc-rb__step {
	display: inline-block;
	background: rgba(46, 204, 113, .14);
	border: 1px solid rgba(46, 204, 113, .4);
	color: var(--ehc-check-2);
	padding: 3px 10px;
	border-radius: 6px;
	font-size: 10.5px;
	letter-spacing: .08em;
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 12px;
}
.ehc-rb__sug-card h4 {
	margin: 0 0 8px;
	font-size: 15.5px;
	color: #fff;
	font-weight: 700;
}
.ehc-rb__sug-card p {
	margin: 8px 0;
	color: #d6dae3;
	font-size: 13.5px;
	line-height: 1.65;
}
.ehc-rb__sug-card code {
	background: #06080c;
	color: #ffd4dc;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ehc-rb__evidence {
	background: #06080c;
	border: 1px solid var(--ehc-line);
	border-radius: 8px;
	padding: 12px 14px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 12.5px;
	line-height: 1.7;
	color: #d6dae3;
	margin: 10px 0;
	white-space: pre-wrap;
	word-break: break-word;
}
.ehc-rb__dns-fix {
	background: #06080c;
	border: 1px solid var(--ehc-line);
	border-radius: 8px;
	padding: 12px 14px;
	margin: 10px 0;
	display: grid;
	gap: 8px;
}
.ehc-rb__dns-row {
	display: grid;
	grid-template-columns: 70px 1fr;
	gap: 10px;
	align-items: center;
	font-size: 12.5px;
}
.ehc-rb__dns-k {
	color: var(--ehc-muted);
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-weight: 700;
}
.ehc-rb__dns-row code {
	font-family: ui-monospace, Menlo, Consolas, monospace;
	background: transparent;
	color: #d7defb;
	padding: 0;
	word-break: break-all;
}
.ehc-rb__effort {
	display: inline-block;
	margin-top: 10px;
	font-size: 11px;
	color: var(--ehc-check-2);
	background: rgba(46, 204, 113, .08);
	border: 1px solid rgba(46, 204, 113, .3);
	padding: 4px 10px;
	border-radius: 6px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
}
.ehc-rb__ai-disclaimer {
	margin-top: 12px;
	padding: 9px 12px;
	background: rgba(255, 184, 77, .08);
	border: 1px solid rgba(255, 184, 77, .35);
	border-radius: 8px;
	color: var(--ehc-warm);
	font-size: 12px;
	line-height: 1.55;
}
.ehc-rb__ai-disclaimer::before { content: "\26A0  "; font-weight: 700; }

/* Action plan — horizontal grid (3 cols on desktop, stacks on narrow). */
.ehc-rb__plan {
	list-style: none;
	counter-reset: ehc-plan;
	padding: 0;
	margin: 14px 0 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
	align-items: start;
}
.ehc-rb__plan-item {
	counter-increment: ehc-plan;
	background: var(--ehc-card);
	border: 1px solid var(--ehc-line);
	border-radius: 12px;
	padding: 16px 18px 16px 54px;
	position: relative;
	margin-bottom: 0;
}
.ehc-rb__plan-item::before {
	content: counter(ehc-plan, decimal-leading-zero);
	position: absolute;
	left: 18px;
	top: 18px;
	font-family: ui-monospace, Menlo, Consolas, monospace;
	font-size: 16px;
	font-weight: 800;
	color: var(--ehc-brand-2);
}
.ehc-rb__plan-head { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.ehc-rb__plan-title { font-weight: 700; color: #fff; font-size: 15px; }
.ehc-rb__plan-summary { margin: 6px 0 0; color: #d6dae3; font-size: 13.5px; line-height: 1.65; }

/* CTA */
.ehc-rb__cta-block {
	margin: 20px 0 0;
	background: linear-gradient(135deg, rgba(46, 204, 113, .10), rgba(30, 111, 219, .08));
	border: 1px solid rgba(46, 204, 113, .4);
	border-radius: 16px;
	padding: 24px 28px;
	text-align: center;
}
.ehc-rb__cta-block h3 {
	margin: 0 0 12px;
	font-size: 24px;
	letter-spacing: -.01em;
	font-weight: 700;
	color: #fff;
}
.ehc-rb__cta-block p {
	margin: 0 auto;
	color: #d6dae3;
	font-size: 15.5px;
	line-height: 1.65;
	max-width: 640px;
}

/* Responsive */
@media (max-width: 820px) {
	.ehc-rb__hero { padding: 40px 0 30px; }
	.ehc-rb__pt-row { grid-template-columns: 40px 1fr 90px; gap: 10px; padding: 12px 14px; }
	.ehc-rb__section { padding: 36px 0 12px; }
	.ehc-rb__details { grid-template-columns: 1fr; }
	.ehc-rb__plan-item { padding-left: 56px; }
}
