/* ComplyTrackr — minimal, mobile-first, no external assets. */
:root {
  --ink: #1a2332;
  --muted: #5b6b82;
  --line: #e3e9f2;
  --bg: #f7f9fc;
  --card: #ffffff;
  --accent: #0b5fff;
  --red: #c81e1e;
  --amber: #b45309;
  --green: #047857;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 1rem; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 1rem; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 800; font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.topbar nav a { margin-left: 1rem; text-decoration: none; color: var(--ink); }
.topbar nav a:hover { color: var(--accent); }
h1 { font-size: 1.7rem; margin: 1.4rem 0 .4rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; }
.muted { color: var(--muted); }
a { color: var(--accent); }

/* buttons & forms */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-radius: 8px;
  padding: .55rem 1.1rem; text-decoration: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { filter: brightness(.92); color: #fff; }
.btn.big { font-size: 1.1rem; padding: .75rem 1.6rem; }
.btn.small { font-size: .85rem; padding: .4rem .8rem; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: #e8f0ff; color: var(--accent); }
.form { max-width: 560px; }
.form label, .form fieldset { display: block; margin: 1rem 0; }
.form input[type=text], .form input[type=email], .form input[type=password], .form select {
  width: 100%; padding: .6rem; margin-top: .3rem; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; }
.form legend { font-weight: 700; padding: 0 .4rem; }
.radio { display: block; margin: .35rem 0; font-weight: normal; }
.radio input { margin-right: .5rem; }

/* quiz wizard */
.wstep[hidden] { display: none; }
.wstep h2 { margin-top: .8rem; }
.wprogress { margin: 1.2rem 0 .4rem; }
.wprogress-label { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: .35rem; }
.wprogress-track { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.wprogress-bar { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .25s ease; }
.wnav { display: flex; gap: .8rem; align-items: center; margin: 1.6rem 0 2.5rem; }
.wnav-spacer { flex: 1; }
.q { margin: 1.1rem 0; }
.q-label { display: block; font-weight: 700; margin-bottom: .4rem; }
.q.invalid .pick-card { border-color: var(--red); }
.werr { color: var(--red); font-size: .85rem; font-weight: 600; margin: .35rem 0 0; }

/* selectable option cards — only the SELECTED card is highlighted;
   unselected cards stay plain white for easy scanning */
.pick { display: grid; gap: .55rem; margin: .4rem 0; }
.pick-card {
  position: relative; display: block; background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: .7rem .9rem .7rem 2.7rem; margin: 0; cursor: pointer; font-weight: normal;
}
.pick-card:hover { border-color: #b9c6da; }
.pick-card input {
  position: absolute; left: .95rem; top: 1.05rem;
  width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent);
}
.pick-card:has(input:checked) { border-color: var(--accent); background: #eef4ff; }
.pick-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-title { display: block; font-weight: 700; }
.pick-sub { display: block; font-size: .85rem; color: var(--muted); }
@media (min-width: 560px) {
  .pick-grid { grid-template-columns: 1fr 1fr; }
}

/* dropdown options: explicit contrast so every option is readable
   (some platforms render native option lists with broken defaults) */
.form select option { background: #fff; color: var(--ink); }

/* wizard review summary */
.review-dl { background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 1rem 1.2rem; margin: 1rem 0 1.4rem; }
.review-dl dt { font-size: .8rem; color: var(--muted); margin-top: .7rem; }
.review-dl dt:first-child { margin-top: 0; }
.review-dl dd { margin: 0; font-weight: 600; }
.hint { display: block; font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.inline-form { display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
/* Business switcher: long org names truncate instead of breaking the topbar. */
select.biz-switch { max-width: 14rem; text-overflow: ellipsis; }
@media (max-width: 640px) { select.biz-switch { max-width: 9rem; } }
.inline-form input[type=text], .inline-form input[type=email] {
  padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem;
}
.flash { padding: .7rem 1rem; border-radius: 8px; margin: 1rem 0; }
.flash.ok { background: #e6f6ec; border: 1px solid #b7e4c7; }
.flash.error { background: #fde8e8; border: 1px solid #f5b5b5; }

/* landing */
.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2.1rem; line-height: 1.25; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.4rem; }
.steps { max-width: 600px; margin: 0 auto; padding-left: 1.2rem; }
.steps li { margin: .7rem 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.card h3 { margin: 0 0 .3rem; font-size: 1rem; }
.card p { margin: 0; font-size: .92rem; color: var(--muted); }
.waitlist { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.4rem; margin: 2rem 0; text-align: center; }

/* dashboard */
.pill { display: inline-block; font-size: .75rem; font-weight: 700; border-radius: 999px;
  padding: .15rem .6rem; margin-left: .4rem; vertical-align: middle; }
.pill.red { background: #fde8e8; color: var(--red); }
.pill.amber { background: #fef3c7; color: var(--amber); }
.pill.green { background: #d1fae5; color: var(--green); }
.pill.blue { background: #dbeafe; color: #1d4ed8; }
.cat { font-size: .75rem; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: .1rem .55rem; margin-left: .4rem; }
.deadline { background: var(--card); border: 1px solid var(--line);
  border-left: 5px solid var(--line); border-radius: 10px; padding: 1rem; margin: .8rem 0; }
.deadline.overdue { border-left-color: var(--red); }
.deadline.due_soon { border-left-color: var(--amber); }
.deadline.upcoming { border-left-color: var(--green); }
.deadline.filed { opacity: .75; }
.dl-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.due { white-space: nowrap; }
.period { font-size: .9rem; margin: .2rem 0 .4rem; }
details { font-size: .92rem; margin: .4rem 0; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.dl-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .6rem; align-items: center; }
.urg-h { margin-top: 1.8rem; }
.hist { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 1rem 0 2rem; }
.hist th, .hist td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); }

.foot { margin: 3rem auto 2rem; font-size: .82rem; color: var(--muted);
  border-top: 1px solid var(--line); padding-top: 1rem; }

/* reminder preferences */
.prefs { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: .8rem 1rem; margin: 1rem 0; }
.small { font-size: .82rem; }

/* landing: who-it's-for + FAQ */
.whofor { margin-top: 2rem; }
.checklist { list-style: none; padding: 0; max-width: 640px; }
.checklist li { padding: .45rem 0 .45rem 1.8rem; position: relative; }
.checklist li::before { content: "\2713"; position: absolute; left: .4rem;
  color: var(--green); font-weight: 800; }
.faq { margin-top: 2rem; max-width: 680px; }
.faq details { background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: .8rem 1rem; margin: .6rem 0; }
.faq summary { font-weight: 700; }
.faq p { margin: .5rem 0 0; }

/* wide tables scroll instead of breaking mobile layout */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .hist { min-width: 560px; }

@media (max-width: 560px) {
  .hero h1 { font-size: 1.6rem; }
  .dl-head { flex-direction: column; }
  .topbar { flex-wrap: wrap; row-gap: .4rem; }
  .topbar nav a { margin-left: .6rem; font-size: .92rem; }
}

/* custom deadlines */
.form label.check { display: flex; align-items: center; gap: .5rem; }
.nowrap { white-space: nowrap; }
.form input[type=date], .form input[type=url] {
  display: block; width: 100%; max-width: 420px; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; font-size: 1rem;
  margin-top: .3rem; background: #fff; color: var(--ink);
}

/* year grid dashboard */
.year-nav { display: flex; align-items: center; gap: 1rem; }
.year-nav a { text-decoration: none; font-size: 1.6rem; line-height: 1;
  padding: .1rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.year-nav a:hover { background: #e8f0ff; }
.year-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem;
  margin: 1rem 0 2rem; }
.month-box { display: block; background: var(--card); border: 1px solid var(--line);
  border-left: 5px solid var(--line); border-radius: 10px; padding: .7rem .8rem;
  text-decoration: none; color: var(--ink); min-width: 0; }
.month-box:hover { border-color: var(--accent); border-left-color: var(--accent); }
.month-box.current { box-shadow: 0 0 0 2px var(--accent); }
.month-box.has-overdue { border-left-color: var(--red); }
.month-box.has-duesoon { border-left-color: var(--amber); }
.month-head { display: flex; justify-content: space-between; align-items: center;
  gap: .4rem; flex-wrap: wrap; }
.month-items { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .82rem;
  color: var(--muted); }
.month-items li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: .1rem 0; }
.more { font-size: .8rem; color: var(--accent); font-weight: 600; margin-top: .2rem; }
@media (max-width: 700px) { .year-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .year-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .year-grid { grid-template-columns: 1fr; } }

/* documents */
.docs { margin-top: .8rem; border-top: 1px dashed var(--line); padding-top: .6rem; }
.doc-list { list-style: none; padding: 0; margin: .4rem 0; }
.doc-list li { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
  padding: .35rem 0; border-bottom: 1px dotted var(--line); font-size: .92rem; }
.doc-list li:last-child { border-bottom: 0; }
.doc-group { margin-bottom: 1rem; }
.btn.danger { color: var(--red); border-color: #f5b5b5; }
.btn.danger:hover { background: #fde8e8; color: var(--red); }
input[type=file] { font-size: .85rem; max-width: 100%; }

/* Document folders + collapsed card control */
.doc-toggle {
  background: none; border: 0; padding: .3rem 0; cursor: pointer;
  font-size: .95rem; color: var(--ink); display: inline-flex; align-items: center; gap: .3rem;
}
.doc-toggle:hover { text-decoration: underline; }
.doc-toggle::after { content: "▸"; font-size: .8rem; color: var(--muted); }
.doc-toggle[aria-expanded="true"]::after { content: "▾"; }
.doc-panel { margin-top: .4rem; }
.folder { margin-bottom: 1.2rem; }
.folder-head { margin: 0 0 .6rem; font-size: 1.15rem; }
.doc-group { margin-bottom: 1rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--line); }
.doc-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* MFA: QR code, recovery codes, manual key */
.qr svg { max-width: 240px; height: auto; display: block; margin: .5rem 0;
  background: #fff; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; }
.secret-key { font-size: 1.05rem; letter-spacing: .05em; word-break: break-all; }
.codes { list-style: none; padding: 0; display: grid; gap: .4rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 1rem 0; }
.codes li code { font-size: 1rem; }
