/* Mesfonic rebuild v1 — "Employer compliance math" design system.
   Deliberately distinct from the previous brand: deep navy + amber,
   Inter throughout, cool paper. No visual link to the old store. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/inter-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f5f7fb;
  --card: #ffffff;
  --ink: #16233f;
  --ink-soft: #33415e;
  --muted: #5b6b8c;
  --faint: #8494b3;
  --line: #dfe6f2;
  --line-soft: #edf1f8;
  --navy: #0e1830;
  --navy-2: #16233f;
  --accent: #b45309;
  --accent-hover: #92400e;
  --accent-soft: #fef3e2;
  --accent-line: #f0d9b5;
  --gold: #f5c169;
  --ok: #166534;
  --ok-bg: #eaf7ee;
  --warn: #92400e;
  --warn-bg: #fef3e2;
  --bad: #991b1b;
  --bad-bg: #fdecec;
  --info: #1d4ed8;
  --info-bg: #eaf0fe;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(14, 24, 48, .06), 0 8px 24px -12px rgba(14, 24, 48, .18);
  --shadow-sm: 0 1px 2px rgba(14, 24, 48, .08);
  --maxw: 1120px;
  --maxw-narrow: 760px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 .55em;
}
h1 { font-size: clamp(2rem, 1.35rem + 3.2vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.1rem); margin-top: 2.2em; }
h3 { font-size: 1.22rem; margin-top: 1.6em; }
h4 { font-size: 1.05rem; margin-top: 1.3em; }
.lede { font-size: 1.16rem; color: var(--ink-soft); max-width: 44em; }
.small { font-size: .86rem; }
.muted { color: var(--muted); }
::selection { background: #f5d9a8; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(2.6rem, 6vw, 4.8rem) 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 68px; position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--navy) 0%, #2b3f6b 100%);
  display: grid; place-items: center;
  color: var(--gold); font-weight: 700; font-size: 1rem;
}
.brand small { display: block; font-size: .66rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; line-height: 1.25; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--ink-soft); font-weight: 600; font-size: .94rem;
  padding: 9px 13px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--line-soft); }
.nav a.cta {
  background: var(--accent); color: #fff; margin-left: 8px;
  padding: 10px 18px; font-weight: 700;
}
.nav a.cta:hover { background: var(--accent-hover); color: #fff; }
.menu-btn {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; font-size: 1rem; cursor: pointer; color: var(--ink);
  font-family: var(--font);
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: -22px; right: -22px;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 22px 18px; gap: 2px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 10px; }
  .nav a.cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #eef2fa;
  padding: clamp(3rem, 8vw, 5.6rem) 0 clamp(2.6rem, 6vw, 4.4rem);
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(720px 320px at 85% -40px, rgba(245, 193, 105, .16), transparent 65%);
}
.hero h1 { color: #fff; max-width: 16em; }
.hero .lede { color: #c3cede; }
.hero .eyebrow { color: var(--gold); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-card {
  background: #fff; color: var(--ink); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow);
}
.hero-card h3 { margin-top: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-weight: 700; font-size: 1rem; font-family: var(--font);
  padding: 14px 26px; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; text-align: center;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
.btn:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-secondary {
  background: #fff; color: var(--ink); border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn-secondary:hover { border-color: var(--ink-soft); background: #fff; color: var(--ink); }
.btn-ghost-light {
  background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.4); box-shadow: none;
}
.btn-ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.4em; }

/* ---------- Notice picker ---------- */
.picker-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 1.6em; }
@media (max-width: 720px) { .picker-grid { grid-template-columns: 1fr; } }
.notice-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative; color: var(--ink);
}
a.notice-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.notice-card .tag {
  align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.tag-live { background: var(--ok-bg); color: var(--ok); }
.tag-soon { background: var(--line-soft); color: var(--muted); }
.notice-card h3 { margin: 0; font-size: 1.25rem; }
.notice-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.notice-card .go { font-weight: 700; color: var(--accent); margin-top: auto; padding-top: 8px; }
.notice-card.soon { opacity: .78; }

/* ---------- Generic cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card h3 { margin-top: 0; font-size: 1.08rem; }
.card p:last-child { margin-bottom: 0; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--navy); color: var(--gold);
  display: inline-grid; place-items: center; font-weight: 700; font-size: .95rem;
  margin-bottom: 12px;
}

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius); padding: 18px 20px; margin: 1.4em 0;
  border: 1px solid; font-size: .96rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { display: block; margin-bottom: 4px; }
.callout-warn { background: var(--warn-bg); border-color: var(--accent-line); color: #6b3a06; }
.callout-info { background: var(--info-bg); border-color: #c4d6f7; color: #1e3a8a; }
.callout-ok { background: var(--ok-bg); border-color: #bfe3c9; color: #14532d; }
.callout-bad { background: var(--bad-bg); border-color: #f3c2c2; color: #7f1d1d; }

/* ---------- Citations ---------- */
.cite {
  font-size: .82rem; color: var(--muted);
  border-left: 3px solid var(--line); padding: 6px 0 6px 12px; margin: 1em 0;
}
.cite a { color: var(--muted); text-decoration: underline; }
.cite-list { list-style: none; padding: 0; margin: 1.2em 0; font-size: .88rem; color: var(--muted); }
.cite-list li { margin-bottom: .55em; padding-left: 1.4em; position: relative; }
.cite-list li::before { content: "§"; position: absolute; left: 0; color: var(--faint); font-weight: 700; }
.cite-list a { color: var(--muted); text-decoration: underline; }

/* ---------- FAQ accordion ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 10px; overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 17px 20px; font-size: 1rem; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  font-family: var(--font);
}
.faq-q .mark { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--line-soft); display: grid; place-items: center; font-weight: 700; color: var(--accent); transition: transform .2s ease; }
.faq-item.open .faq-q .mark { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a-inner { padding: 0 20px 20px; color: var(--ink-soft); font-size: .97rem; }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .94rem; margin-bottom: 6px; }
.field .hint { font-size: .84rem; color: var(--muted); margin-top: 5px; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
  width: 100%; font-family: var(--font); font-size: 1rem;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 3px solid rgba(180, 83, 9, .18); }
input[type="checkbox"], input[type="radio"] { width: 1.15em; height: 1.15em; accent-color: var(--accent); }
.checkline { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: .96rem; }
.checkline input { margin-top: 4px; flex: none; }

/* ---------- Quiz ---------- */
.quiz-q { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.quiz-q h3 { margin-top: 0; }
.quiz-opts { display: grid; gap: 10px; margin-top: 14px; }
.quiz-opt {
  border: 1.5px solid var(--line); border-radius: 9px; padding: 13px 16px;
  cursor: pointer; font-weight: 500; background: #fff; font-family: var(--font); font-size: 1rem; text-align: left;
  display: flex; gap: 10px; align-items: center; width: 100%;
  transition: border-color .12s ease, background .12s ease;
}
.quiz-opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-opt.selected { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; }

/* ---------- Builder ---------- */
.steps-bar { display: flex; gap: 6px; margin: 1.6em 0 2em; overflow-x: auto; padding-bottom: 4px; }
.step-pill {
  flex: 1; min-width: 120px; text-align: center; font-size: .8rem; font-weight: 600;
  padding: 10px 8px; border-radius: 8px; background: var(--line-soft); color: var(--muted);
  white-space: nowrap;
}
.step-pill.active { background: var(--navy); color: #fff; }
.step-pill.done { background: var(--ok-bg); color: var(--ok); }
.builder-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow-sm); }
.table-scroll { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; min-width: 640px; }
table.data th, table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); text-align: left; }
table.data th { background: var(--navy); color: #fff; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.flag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.flag-bad { background: var(--bad-bg); color: var(--bad); }
.flag-ok { background: var(--ok-bg); color: var(--ok); }
.flag-warn { background: var(--warn-bg); color: var(--warn); }
.flag-info { background: var(--info-bg); color: var(--info); }
.flag-neutral { background: var(--line-soft); color: var(--muted); }
.matrix-input { width: 70px; padding: 6px 8px; font-size: .85rem; }

/* ---------- Paywall ---------- */
.paywall {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #eef2fa; border-radius: var(--radius-lg); padding: clamp(26px, 5vw, 44px);
  text-align: center; box-shadow: var(--shadow);
}
.paywall h2, .paywall h3 { color: #fff; margin-top: 0; }
.paywall p { color: #c3cede; }
.paywall .price { font-size: 3rem; font-weight: 700; color: #fff; letter-spacing: -0.03em; }
.paywall .price small { font-size: 1rem; font-weight: 400; color: #c3cede; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3cede; margin-top: 4rem; }
.site-footer-inner { padding: 3.2rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.site-footer a { color: #c3cede; font-size: .93rem; display: block; margin-bottom: 8px; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: #8b99bb; font-size: .88rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2rem; padding-top: 1.4rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .82rem; color: #8b99bb; }
.disclaimer { font-size: .8rem; color: #8b99bb; border-top: 1px solid rgba(255,255,255,.12); margin-top: 1.6rem; padding-top: 1.4rem; }
.disclaimer p { color: #8b99bb; }

/* ---------- Misc ---------- */
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin: 1.6em 0; }
.toc ol { margin: .6em 0 0 1.2em; }
.toc li { margin-bottom: 6px; }
.prose { max-width: 46em; }
.prose ul, .prose ol { margin: 0 0 1.2em 1.4em; }
.prose li { margin-bottom: .5em; }
.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: 1.2em; }
.breadcrumb a { color: var(--muted); text-decoration: underline; }
.result-box {
  background: var(--card); border: 2px solid var(--navy); border-radius: var(--radius-lg);
  padding: 26px; margin: 1.6em 0; box-shadow: var(--shadow);
}
.result-big { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; color: var(--navy); }
.countdown { display: flex; gap: 10px; flex-wrap: wrap; margin: 1em 0; }
.countdown .cell { background: var(--navy); color: #fff; border-radius: 9px; padding: 10px 16px; text-align: center; min-width: 84px; }
.countdown .cell b { display: block; font-size: 1.5rem; }
.countdown .cell span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #c3cede; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; color: #fff; }

/* deadline urgency variants */
.urgent { color: var(--bad); font-weight: 700; }
.soonish { color: var(--warn); font-weight: 700; }
.plenty { color: var(--ok); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .no-print, .steps-bar, .btn-row { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .builder-panel, .card, .result-box { box-shadow: none; border: 1px solid #999; }
}
