/* EMD Deadline Calculator. Page-specific styles, so the shared Tailwind build (css/output.css)
   is untouched. Colors and fonts match tailwind.config.js (brand-navy, brand-gold, Sora/Hanken Grotesk). */
.emd {
  --navy: #0B1C3E; --navy-2: #071229; --gold: #FFC72C; --gold-ink: #6B5300; --gold-wash: #FFF8DE;
  --ink: #0F1A2E; --muted: #4A5568; --rule: #D3DAE6; --paper: #ffffff; --page: #F2F4F7;
  --ok: #1d6b45; --warn: #9a5b00; --late: #b42318;
  font-family: "Hanken Grotesk", system-ui, sans-serif; color: var(--ink); background: var(--page);
}
.emd h1, .emd h2, .emd h3, .emd legend, .emd .emd-eyebrow { font-family: "Sora", system-ui, sans-serif; }
.emd-wrap { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 768px) { .emd-wrap { padding-inline: 32px; } }

.emd-hero { background: var(--navy); color: #fff; padding-block: 40px 56px; }
.emd-eyebrow { color: var(--gold); font-size: 16px; font-weight: 700; margin: 0 0 12px; letter-spacing: 0; }
.emd-hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 800; line-height: 1.04; letter-spacing: -0.04em; margin: 0 0 12px; text-wrap: balance; }
.emd-lede { max-width: 62ch; color: #CBD3E1; font-size: 17px; line-height: 1.6; margin: 0; }

.emd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: -32px; }
@media (min-width: 960px) { .emd-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.emd-card { background: var(--paper); border-radius: 20px; box-shadow: 0 6px 24px rgba(11, 28, 62, .10); padding: 24px; min-width: 0; }
@media (min-width: 768px) { .emd-card { padding: 28px; } }
.emd-card h2 { font-size: 20px; font-weight: 800; color: var(--navy); margin: 0 0 6px; }
.emd-example { font-size: 13px; color: var(--gold-ink); background: var(--gold-wash); border-radius: 6px; padding: 8px 10px; margin: 6px 0 18px; }

.emd-form { display: grid; gap: 16px; }
.emd-field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.emd-field > span:first-child, .emd-field legend, .emd-others-head > span { font-size: 13px; font-weight: 600; color: var(--navy); }
.emd-field em { font-weight: 400; color: var(--muted); font-style: normal; }
.emd input[type="text"], .emd input[type="email"], .emd input[type="date"], .emd input[type="number"] {
  width: 100%; min-width: 0; border: 1px solid #cfd5df; border-radius: 6px; padding: 10px 12px; font: inherit; font-size: 16px;
  color: var(--ink); background: #fff; }
.emd input:focus-visible, .emd button:focus-visible, .emd summary:focus-visible, .emd a:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px; }
.emd-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 520px) { .emd-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.emd-suffix { display: flex; align-items: center; gap: 8px; }
.emd-suffix b { font-weight: 400; color: var(--muted); font-size: 14px; }
.emd-suffix input { max-width: 120px; }

.emd-seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid #cfd5df; border-radius: 6px; overflow: hidden; width: fit-content; max-width: 100%; }
.emd-seg label { position: relative; padding: 8px 14px; font-size: 14px; cursor: pointer; border-right: 1px solid #cfd5df; }
.emd-seg label:last-child { border-right: 0; }
.emd-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.emd-seg label:has(input:checked) { background: var(--navy); color: #fff; }
.emd-seg label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: -2px; }
.emd-closing { gap: 10px; }

.emd-others { display: grid; gap: 8px; }
.emd-others-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.emd-other { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 8px; align-items: center; }
.emd-link { background: none; border: 0; color: var(--gold-ink); font-weight: 700; cursor: pointer; padding: 4px 0; font-size: 14px; }
.emd-link:disabled { color: var(--muted); cursor: default; }
.emd-remove { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 6px 8px; }
.emd-hint { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }

.emd-rules { border-top: 1px solid var(--rule); padding-top: 14px; display: grid; gap: 12px; }
.emd-rules[open] { gap: 12px; }
.emd-rules summary { font-family: "Sora", system-ui, sans-serif; font-weight: 700; color: var(--navy); cursor: pointer; }
.emd-rules > * + * { margin-top: 12px; }
.emd-check { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; line-height: 1.45; }
.emd-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--navy); }
.emd-check.is-disabled { opacity: .5; }

.emd-results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.emd-count { font-size: 13px; color: var(--muted); }
.emd-errors { background: #fdecea; color: var(--late); border-radius: 6px; padding: 10px 12px; font-size: 14px; margin-top: 12px; }
.emd-errors ul { margin: 0; padding-left: 18px; }

.emd-timeline { list-style: none; margin: 16px 0 0; padding: 0; display: grid; }
.emd-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.emd-item:first-child { border-top: 0; }
.emd-date { text-align: center; border-radius: 8px; padding: 6px 4px; background: #F2F4F7; color: var(--navy); align-self: start; }
.emd-date .m { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.emd-date .d { display: block; font-family: "Sora", system-ui, sans-serif; font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.emd-date .w { display: block; font-size: 11px; color: var(--muted); }
.emd-item.contract .emd-date { background: var(--navy); color: #fff; }
.emd-item.contract .emd-date .w { color: #c9d2e3; }
.emd-item.plan .emd-date { background: var(--gold-wash); color: var(--gold-ink); }
.emd-body { min-width: 0; }
.emd-label { font-weight: 700; color: var(--navy); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.emd-note { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.emd-actby { font-size: 13px; margin-top: 4px; color: var(--ink); }
.emd-actby b { color: var(--gold-ink); }
.emd-pill { font-family: "Hanken Grotesk", system-ui, sans-serif; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.emd-pill.past { background: #eceef2; color: var(--muted); }
.emd-pill.today { background: #fdecea; color: var(--late); }
.emd-pill.soon { background: #fff4e0; color: var(--warn); }
.emd-pill.later { background: #e7f4ec; color: var(--ok); }
.emd-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.emd-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.emd-dot.contract { background: var(--navy); }
.emd-dot.plan { background: var(--gold); }

.emd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.emd-btn { font-family: "Hanken Grotesk", system-ui, sans-serif; font-weight: 700; font-size: 16px; border-radius: 999px; padding: 12px 22px;
  border: 2px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; text-decoration: none; display: inline-block; }
.emd-btn:hover { background: #F2F4F7; }
.emd-btn.primary { background: var(--gold); color: var(--navy-2); border-color: var(--gold); }
.emd-btn.primary:hover { background: #FFD666; border-color: #FFD666; color: var(--navy-2); }
.emd-btn.gold { background: var(--gold); color: var(--navy); border-color: var(--gold); white-space: nowrap; }
.emd-btn.gold:hover { background: #FFD666; border-color: #FFD666; }
.emd-status { min-height: 1.4em; font-size: 14px; color: var(--ok); margin: 8px 0; }
.emd-status.err { color: var(--late); }

.emd-email { border-top: 1px solid var(--rule); margin-top: 18px; padding-top: 18px; display: grid; gap: 14px; }
.emd-email h3 { font-size: 16px; font-weight: 800; color: var(--navy); margin: 0; }

.emd-cta { margin-top: 40px; }
.emd-cta-box { background: var(--navy); color: #fff; border-radius: 20px; padding: 28px; display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between; border-left: 6px solid var(--gold); }
.emd-cta-box h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; }
.emd-cta-box p { margin: 0; color: #CBD3E1; max-width: 58ch; }
.emd-soon { font-size: 14px; color: var(--muted); margin: 14px 4px 0; }
.emd-notice { margin: 16px 0 0; max-width: 70ch; font-size: 14px; line-height: 1.5; color: #fff; background: rgba(197, 160, 89, .16);
  border: 1px solid rgba(197, 160, 89, .55); border-radius: 6px; padding: 10px 14px; }
.emd-notice a { color: var(--gold); font-weight: 700; }
.emd-ack { margin-top: 18px; background: var(--gold-wash); border-radius: 6px; padding: 12px; }
.emd-ack a, .emd-disclaimer a { color: var(--gold-ink); font-weight: 700; }
.emd-btn:disabled { opacity: .45; cursor: not-allowed; }
.emd-btn:disabled:hover { background: inherit; color: inherit; }
.emd-disclaimer { padding-block: 32px 56px; scroll-margin-top: 96px; }
.emd-disclaimer h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin: 0 0 12px; }
.emd-disclaimer ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; max-width: 90ch; }
.emd-disclaimer li, .emd-terms-foot { font-size: 13px; line-height: 1.6; color: var(--muted); }
.emd-disclaimer li strong { color: var(--ink); }
.emd-terms-foot { margin: 14px 0 0; max-width: 90ch; }

@media print {
  header, footer, .emd-hero, .emd-form, .emd-actions, .emd-email, .emd-cta { display: none !important; }
  .emd-grid { display: block; margin: 0; }
  .emd-card { box-shadow: none; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .emd * { transition: none !important; } }

/* ---- EMD funding page (emd-funding.html) shares the tokens above ---- */
.emd-hero-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
@media (min-width: 960px) { .emd-hero-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.emd-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.emd-steps li { counter-increment: step; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px;
  background: var(--navy-2); border-radius: 8px; padding: 12px 14px; }
.emd-steps li::before { content: counter(step); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: var(--navy); font: 800 15px/32px "Sora", system-ui, sans-serif; text-align: center; }
.emd-steps b { font-family: "Sora", system-ui, sans-serif; color: #fff; }
.emd-steps span { color: #c9d2e3; font-size: 14px; line-height: 1.45; }
.emd-apply-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: -32px; }
@media (min-width: 960px) { .emd-apply-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); align-items: start; } }
.emd-apply-head { display: grid; gap: 4px; }
.emd-form-sec { display: grid; gap: 16px; }
.emd-form-sec[hidden] { display: none; }
.emd-callme { background: var(--gold-wash); border-radius: 6px; padding: 12px; }
.emd textarea { width: 100%; min-width: 0; border: 1px solid #cfd5df; border-radius: 6px; padding: 10px 12px; font: inherit; font-size: 16px; resize: vertical; }
.emd input[type="tel"], .emd input[type="file"] { width: 100%; min-width: 0; font: inherit; font-size: 16px; }
.emd input[type="tel"] { border: 1px solid #cfd5df; border-radius: 6px; padding: 10px 12px; }
.emd-prefix { display: flex; align-items: center; border: 1px solid #cfd5df; border-radius: 6px; background: #fff; padding-left: 12px; }
.emd-prefix b { color: var(--muted); font-weight: 600; }
.emd-prefix input[type="text"] { border: 0 !important; padding-left: 6px !important; }
.emd-ref summary { cursor: pointer; font-weight: 700; color: var(--gold-ink); font-size: 14px; }
.emd-ref[open] { display: grid; gap: 10px; }
.emd-offline { background: #F2F4F7; border-radius: 6px; padding: 12px 14px; font-size: 14px; }
.emd-offline p { margin: 0; }
.emd-mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.emd-side { display: grid; gap: 12px; align-content: start; }
.emd-side h2 { font-size: 16px; margin: 4px 0 0; }
.emd-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.emd-ticks li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.45; }
.emd-ticks li::before { content: "✓"; color: var(--gold-ink); font-weight: 800; }
.emd-side .emd-btn { text-align: center; }

.emd select { width: 100%; min-width: 0; border: 1px solid #cfd5df; border-radius: 6px; padding: 10px 12px; font: inherit; font-size: 16px; background: #fff; color: var(--ink); }
.emd-dc { margin-top: 40px; scroll-margin-top: 96px; }
.emd-dc .emd-card { display: grid; gap: 16px; }
.emd-eyebrow-dark { color: var(--gold-ink); margin: 0; }
.emd-dc h2 { font-size: clamp(22px, 3vw, 28px); margin: 0; }
.emd-dc h3 { font-family: "Sora", system-ui, sans-serif; font-size: 15px; font-weight: 800; color: var(--navy); margin: 0 0 8px; }
.emd-dc-lede { max-width: 72ch; margin: 0; line-height: 1.6; }
.emd-dc-steps { list-style: none; counter-reset: dc; margin: 0; padding: 0; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.emd-dc-steps li { counter-increment: dc; display: grid; gap: 4px; padding: 14px; border-radius: 8px; background: #F2F4F7; }
.emd-dc-steps li::before { content: counter(dc); width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff;
  font: 800 14px/28px "Sora", system-ui, sans-serif; text-align: center; }
.emd-dc-steps b { font-family: "Sora", system-ui, sans-serif; color: var(--navy); }
.emd-dc-steps span { font-size: 14px; color: var(--muted); line-height: 1.45; }
.emd-dc-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 768px) { .emd-dc-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.emd-cross { font-size: 14px; margin: 4px 0 0; color: var(--muted); }
.emd-cross a { color: var(--gold-ink); font-weight: 700; }

/* ---- Legal pages (privacy.html, terms.html) ---- */
.emd-hero-slim { padding-block: 32px 40px; }
.emd-legal { max-width: 760px; padding-block: 32px 64px; }
.emd-legal h2 { font-family: "Sora", system-ui, sans-serif; font-size: 19px; font-weight: 800; color: var(--navy); margin: 28px 0 8px; }
.emd-legal h2:first-child { margin-top: 0; }
.emd-legal p, .emd-legal li { line-height: 1.65; max-width: 70ch; }
.emd-legal ul { padding-left: 20px; display: grid; gap: 6px; }
.emd-legal a { color: var(--gold-ink); font-weight: 700; }

/* Honeypot field: off-screen for people, visible to naive bots. */
.emd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.emd-recaptcha-note { font-size: 12px; }
