/* compliance-calendar.ca — design tokens, layout and components */
:root {
  --bg: #f5f6fa;
  --bg-soft: #eef0f6;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --ink: #0f1b33;
  --ink-2: #26324d;
  --muted: #5d6882;
  --faint: #8a93a8;
  --line: #e3e6ee;
  --line-2: #d4d9e4;
  --brand: #d62839;
  --brand-2: #b81f2f;
  --brand-soft: #fdeced;
  --navy: #14213d;
  --navy-2: #1d2d52;
  --focus: #2563eb;
  --ok: #0f8a5f;
  --ok-soft: #e4f6ee;
  --warn: #b45309;
  --warn-soft: #fdf3e2;
  --late: #c1121f;
  --late-soft: #fde8ea;

  --c-gst: #2563eb;      --c-gst-soft: #e7efff;
  --c-payroll: #0f8a5f;  --c-payroll-soft: #e3f5ec;
  --c-slips: #c26a00;    --c-slips-soft: #fdf1df;
  --c-tax: #7c3aed;      --c-tax-soft: #f0eaff;
  --c-registry: #0e7f86; --c-registry-soft: #e0f4f5;
  --c-prov: #c0267a;     --c-prov-soft: #fce8f2;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 51, .06), 0 1px 1px rgba(15, 27, 51, .04);
  --shadow: 0 1px 2px rgba(15, 27, 51, .05), 0 8px 24px -8px rgba(15, 27, 51, .12);
  --shadow-lg: 0 2px 6px rgba(15, 27, 51, .06), 0 24px 48px -16px rgba(15, 27, 51, .22);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Plus Jakarta Sans", var(--font);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-soft: #111a2c;
    --surface: #121b2d;
    --surface-2: #162036;
    --ink: #edf1f8;
    --ink-2: #d3d9e6;
    --muted: #9aa5bd;
    --faint: #6f7a93;
    --line: #233049;
    --line-2: #2d3b58;
    --brand: #ef4656;
    --brand-2: #ff5c6b;
    --brand-soft: #3a1a22;
    --navy: #0a1222;
    --navy-2: #16223b;
    --ok: #3ccf91;  --ok-soft: #12322a;
    --warn: #f0a640; --warn-soft: #33270f;
    --late: #ff6b76; --late-soft: #3a1820;
    --c-gst: #6b9cff;      --c-gst-soft: #172647;
    --c-payroll: #3ccf91;  --c-payroll-soft: #12322a;
    --c-slips: #f0a640;    --c-slips-soft: #33270f;
    --c-tax: #a98bff;      --c-tax-soft: #261d45;
    --c-registry: #3fc8cf; --c-registry-soft: #0f3034;
    --c-prov: #f07ab8;     --c-prov-soft: #3a1830;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 48px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.2; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-family: var(--display); font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, var(--brand), #9e1424); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px -6px rgba(214, 40, 57, .7); }
.brand-mark svg { width: 20px; height: 20px; }
.brand small { color: var(--faint); font-weight: 600; font-size: 15px; }
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; padding: 8px 12px; border-radius: 9px; }
.nav a:hover { color: var(--ink); background: var(--bg-soft); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.btn.menu-btn { display: none; }
@media (max-width: 860px) {
  .nav { display: none; }
  .nav.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--surface); padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .btn.menu-btn { display: inline-flex; }
  .header-actions .btn.hide-sm { display: none; }
}
@media (max-width: 480px) {
  .site-header .wrap { gap: 10px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand small { display: none; }
  .brand-mark { width: 30px; height: 30px; }
  .header-actions { gap: 6px; }
  .header-actions .btn.sm { padding: 0 10px; }
  .header-actions .btn.hide-xs { display: none; }
}
.nav .nav-sm { display: none; }
@media (max-width: 480px) { .nav.open .nav-sm { display: block; font-weight: 600; color: var(--brand); } }

/* ------------------------------------------------------------ buttons */
.btn {
  --b-bg: var(--surface); --b-fg: var(--ink); --b-line: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 11px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-line);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { --b-bg: var(--brand); --b-fg: #fff; --b-line: var(--brand); box-shadow: 0 8px 18px -10px rgba(214, 40, 57, .9), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn.primary:hover { --b-bg: var(--brand-2); --b-line: var(--brand-2); }
.btn.dark { --b-bg: var(--navy); --b-fg: #fff; --b-line: var(--navy); }
.btn.ghost { --b-bg: transparent; --b-line: transparent; box-shadow: none; }
.btn.ghost:hover { --b-bg: var(--bg-soft); }
.btn.danger { --b-fg: var(--late); --b-line: color-mix(in srgb, var(--late) 35%, var(--line)); }
.btn.danger:hover { --b-bg: var(--late-soft); }
.btn.sm { height: 36px; padding: 0 13px; font-size: 14px; border-radius: 9px; }
.btn.lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 13px; }
.btn.icon { width: 40px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 84px; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 900px; height: 900px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -50% -20%; width: 800px; height: 800px; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c-gst) 12%, transparent), transparent 70%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.hero h1 { font-size: clamp(36px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.035em; margin: 18px 0 20px; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--brand), #f0743e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 19px; color: var(--muted); max-width: 560px; }
.hero .actions { margin-top: 30px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 30px; color: var(--muted); font-size: 14.5px; font-weight: 500; }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: var(--ok); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 48px 0 56px; } }

.preview {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 22px; transform: rotate(.6deg);
}
.preview::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; z-index: -1; border-radius: 22px; background: var(--bg-soft); border: 1px solid var(--line); transform: rotate(-2.2deg); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.preview-head h2 { font-size: 15px; font-weight: 700; }
.preview-head p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.preview .badge-live { font-size: 12px; font-weight: 700; color: var(--ok); background: var(--ok-soft); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.preview .item { padding: 12px 14px; }
.preview .item + .item { margin-top: 8px; }

/* ------------------------------------------------------------ sections */
.section { padding: 84px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; }
.section-head p { color: var(--muted); font-size: 17.5px; margin-top: 12px; }
@media (max-width: 640px) { .section { padding: 56px 0; } }

.covers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cover { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-sm); }
.cover .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 12px; }
.cover .ico svg { width: 20px; height: 20px; }
.cover b { display: block; font-size: 15px; }
.cover span { font-size: 13.5px; color: var(--muted); line-height: 1.45; display: block; margin-top: 3px; }
@media (max-width: 1060px) { .covers { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .covers { grid-template-columns: repeat(2, 1fr); } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 16px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ cards and forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; }
@media (max-width: 640px) { .card { padding: 20px; border-radius: 14px; } }

.builder { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.builder aside { position: sticky; top: 92px; }
@media (max-width: 1000px) { .builder { grid-template-columns: 1fr; } .builder aside { position: static; } }

.tips { background: var(--navy); color: #dfe5f2; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.tips h3 { color: #fff; font-size: 17px; margin-bottom: 14px; }
.tips ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-size: 14.5px; line-height: 1.5; }
.tips li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; }
.tips li svg { width: 20px; height: 20px; color: #ff8d97; margin-top: 1px; }
.tips b { color: #fff; }
.tips .note { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #a9b4cc; }

.form { display: grid; gap: 26px; }
.group { display: grid; gap: 18px; padding-top: 24px; border-top: 1px dashed var(--line-2); }
.group-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; }
.group-title .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.group-title .ico svg { width: 17px; height: 17px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; }
.field > label, .legend { font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.field small, .help { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.input, .field select, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 84px; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.input:focus, .field select:focus, .field input:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 13px; }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 9px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.seg span:hover { color: var(--ink); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--focus) 55%, transparent); }

.checks { display: grid; gap: 10px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.check:hover { border-color: var(--line-2); background: var(--surface-2); }
.check input { appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--surface); display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s; }
.check input::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { opacity: 1; }
.check span { font-weight: 500; font-size: 14.5px; line-height: 1.45; }
.check small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.check:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.check.plain { padding: 6px 0; border: 0; background: none; }
.check.plain:hover { background: none; }
.check.plain:has(input:checked) { background: none; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.status { font-size: 14px; color: var(--muted); min-height: 1em; }
.status.err { color: var(--late); font-weight: 500; }
.status.ok { color: var(--ok); font-weight: 500; }

/* ------------------------------------------------------------ results */
.results { display: grid; gap: 22px; }
.next {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff; border-radius: 20px; padding: 26px 30px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.next::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(239, 70, 86, .45), transparent); }
.next .label { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: #ff9ea6; font-weight: 700; }
.next strong { display: block; font-family: var(--display); font-size: 22px; margin: 4px 0; letter-spacing: -.02em; }
.next .meta { color: #b8c2d9; font-size: 14.5px; }
.next .count { position: relative; z-index: 1; text-align: right; }
.next .count b { display: block; font-family: var(--display); font-size: 40px; line-height: 1; }
.next .count span { color: #b8c2d9; font-size: 13px; }
.next > * { position: relative; z-index: 1; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: default; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
button.pill { cursor: pointer; }
button.pill[aria-pressed=false] { opacity: .5; }
button.pill:hover { border-color: var(--line-2); }
.pill.total { background: var(--navy); color: #fff; border-color: var(--navy); }

.notes { background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent); border-radius: 14px; padding: 16px 20px; font-size: 14.5px; }
.notes b { display: flex; align-items: center; gap: 8px; color: var(--warn); }
.notes b svg { width: 18px; height: 18px; }
.notes ul { margin: 8px 0 0; padding-left: 20px; color: var(--ink-2); }
.notes li + li { margin-top: 4px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.viewtoggle { display: inline-flex; padding: 4px; border-radius: 11px; background: var(--bg-soft); border: 1px solid var(--line); }
.viewtoggle button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.viewtoggle button svg { width: 16px; height: 16px; }
.viewtoggle button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

.month-h { display: flex; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 28px 0 12px; }
.month-h:first-child { margin-top: 0; }
.month-h span { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--faint); font-size: 13px; }
.list { display: grid; gap: 10px; }

.item {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 16px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--cat, var(--faint)); transition: box-shadow .15s, border-color .15s;
}
.item:hover { box-shadow: var(--shadow); }
.item.done { opacity: .62; }
.item.done h4 { text-decoration: line-through; text-decoration-color: var(--faint); }
.item.overdue { background: color-mix(in srgb, var(--late-soft) 50%, var(--surface)); }
.date { width: 62px; text-align: center; border-radius: 12px; background: var(--bg-soft); padding: 8px 0 7px; line-height: 1; }
.date b { display: block; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.date span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 4px; }
.date small { display: block; font-size: 10.5px; color: var(--faint); margin-top: 3px; font-weight: 600; }
.item h4 { font-family: var(--font); font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; line-height: 1.35; }
.item h4 .act { color: var(--muted); font-weight: 600; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--cat-soft, var(--bg-soft)); color: var(--cat, var(--muted)); }
.moved { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 12.5px; }
.moved svg { width: 13px; height: 13px; }
.when { font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 99px; white-space: nowrap; background: var(--bg-soft); color: var(--muted); }
.when.soon { background: var(--warn-soft); color: var(--warn); }
.when.late { background: var(--late-soft); color: var(--late); }
.when.ok { background: var(--ok-soft); color: var(--ok); }

.item details { margin-top: 10px; }
.item summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); list-style: none; padding: 4px 0; }
.item summary::-webkit-details-marker { display: none; }
.item summary svg { width: 15px; height: 15px; transition: transform .2s; }
.item details[open] summary svg { transform: rotate(90deg); }
.detail { margin-top: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.detail a { color: var(--brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.detail a:hover { text-decoration: underline; }
.prep { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.prep li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.prep li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cat, var(--faint)); margin: 8px 0 0 5px; }
.verify { color: var(--warn); font-weight: 600; }
@media (max-width: 600px) {
  .item { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .item .when { grid-column: 2; justify-self: start; }
  .date { width: 52px; }
  .date b { font-size: 21px; }
}

/* category colours */
[data-cat="GST/HST"] { --cat: var(--c-gst); --cat-soft: var(--c-gst-soft); }
[data-cat="Payroll"] { --cat: var(--c-payroll); --cat-soft: var(--c-payroll-soft); }
[data-cat="Information slips"] { --cat: var(--c-slips); --cat-soft: var(--c-slips-soft); }
[data-cat="Income tax"] { --cat: var(--c-tax); --cat-soft: var(--c-tax-soft); }
[data-cat="Corporate registry"] { --cat: var(--c-registry); --cat-soft: var(--c-registry-soft); }
[data-cat="Provincial"] { --cat: var(--c-prov); --cat-soft: var(--c-prov-soft); }
.pill[data-cat] i, .dotc[data-cat] { background: var(--cat); }
.ico[data-cat] { background: var(--cat-soft); color: var(--cat); }

/* ------------------------------------------------------------ month grid */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.cal-head h3 { font-size: 18px; }
.cal-nav { display: flex; gap: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 8px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-day { min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .n { color: var(--faint); }
.cal-day .n { font-size: 13px; font-weight: 700; color: var(--ink-2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-day.today .n { background: var(--brand); color: #fff; }
.cal-day.weekend { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.ev { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font-size: 12px; font-weight: 600; line-height: 1.3; padding: 4px 7px; border-radius: 6px; background: var(--cat-soft); color: var(--cat); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.done { opacity: .5; text-decoration: line-through; }
.ev:hover { filter: brightness(.96); }
.more { font-size: 12px; color: var(--muted); font-weight: 600; padding: 0 4px; background: none; border: 0; text-align: left; cursor: pointer; }
@media (max-width: 760px) {
  .cal-day { min-height: 64px; padding: 4px; }
  .ev { font-size: 0; padding: 0; height: 7px; border-radius: 4px; background: var(--cat); }
  .cal-dow { padding: 6px 4px; font-size: 10.5px; text-align: center; }
  .cal-day .n { font-size: 12px; width: 22px; height: 22px; }
}

/* ------------------------------------------------------------ pricing, faq */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 900px; margin: 0 auto; }
.plan { display: flex; flex-direction: column; gap: 18px; position: relative; }
.plan h3 { font-size: 20px; }
.plan .price { font-family: var(--display); font-size: 46px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.plan .price small { font-size: 16px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; flex: 1; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 15px; }
.plan li svg { width: 20px; height: 20px; color: var(--ok); margin-top: 2px; }
.plan.featured { border: 2px solid var(--brand); box-shadow: 0 30px 60px -30px rgba(214, 40, 57, .45); }
.plan .ribbon { position: absolute; top: -13px; left: 28px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 99px; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } }

.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 19px 0; font-weight: 650; font-size: 16.5px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--muted); line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); font-size: 15.5px; }

.cta-band { background: linear-gradient(120deg, var(--navy), #2a1530); color: #fff; border-radius: 24px; padding: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; box-shadow: var(--shadow-lg); }
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.cta-band p { color: #c3cbe0; margin-top: 8px; }
@media (max-width: 640px) { .cta-band { padding: 30px 22px; } }

.disclaimer { font-size: 13.5px; color: var(--faint); }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 36px; margin-top: 40px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-family: var(--font); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.site-footer a { display: block; text-decoration: none; color: var(--muted); font-size: 14.5px; padding: 3px 0; }
.site-footer a:hover { color: var(--ink); }
.site-footer p { color: var(--muted); font-size: 14px; max-width: 380px; margin-top: 12px; }
.site-footer .bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--faint); }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ app */
.app-main { padding: 34px 0 60px; min-height: calc(100vh - 68px - 200px); }
.auth { display: grid; grid-template-columns: 1fr 1fr; max-width: 980px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); overflow: hidden; }
.auth-side { background: linear-gradient(150deg, var(--navy), #3a1424); color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, rgba(239, 70, 86, .5), transparent); }
.auth-side h2 { font-size: 28px; font-weight: 800; line-height: 1.15; }
.auth-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; position: relative; z-index: 1; }
.auth-side li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: #d5dcec; font-size: 15px; }
.auth-side li svg { width: 20px; height: 20px; color: #ff9ea6; margin-top: 2px; }
.auth-form { padding: 44px; display: grid; gap: 18px; align-content: center; }
.auth-form h1 { font-size: 28px; font-weight: 800; }
.auth-form .sub { color: var(--muted); margin-top: -8px; }
.auth-form .btn { width: 100%; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
@media (max-width: 820px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } .auth-form { padding: 28px 22px; } }

.dash-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dash-bar h1 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; }
.dash-bar .sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.biz-select { height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); padding: 0 36px 0 12px; font-weight: 600; font-size: 14.5px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a93a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; max-width: 260px; cursor: pointer; }

.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 18px; border-radius: 14px; margin-bottom: 12px; background: color-mix(in srgb, var(--c-gst-soft) 70%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-gst) 22%, transparent); font-size: 14.5px; }
.banner.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.banner.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 14px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.tabs button svg { width: 17px; height: 17px; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--brand); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat b { display: block; font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.stat small { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.late b { color: var(--late); }
.stat.soon b { color: var(--warn); }
.stat.ok b { color: var(--ok); }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat { padding: 14px; } .stat b { font-size: 24px; } }

.filters { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.drawer { margin-top: 12px; display: grid; gap: 16px; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.drawer .checks { gap: 2px; }
.docs { display: grid; gap: 8px; }
.doc { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.doc a { font-weight: 600; text-decoration: none; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc a:hover { color: var(--brand); }
.doc span { color: var(--muted); font-size: 13px; white-space: nowrap; display: inline-flex; gap: 12px; align-items: center; }
.upload { position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .panel-grid { grid-template-columns: 1fr; } }
.panel-title { font-size: 18px; margin-bottom: 4px; }
.panel-sub { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px !important; }
.danger-zone { border-color: color-mix(in srgb, var(--late) 30%, var(--line)); }
.plan-status { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 18px; }
.plan-status .badge { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--ok-soft); color: var(--ok); }
.plan-status .badge.free { background: var(--bg-soft); color: var(--muted); }
.plan-status .badge.warn { background: var(--warn-soft); color: var(--warn); }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--faint); }
.loading { display: grid; place-items: center; min-height: 40vh; color: var(--muted); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .2s, transform .2s; z-index: 100; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(10, 18, 34, .5); backdrop-filter: blur(3px); }
.modal .item { border: 0; box-shadow: none; padding: 22px 22px 8px; }
.modal-foot { display: flex; justify-content: flex-end; padding: 0 22px 18px; }

.prose { max-width: 760px; }
.prose h1 { font-size: 36px; font-weight: 800; margin-bottom: 18px; }
.prose h2 { font-size: 22px; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16px; }
.prose p + p { margin-top: 12px; }

@media print {
  .site-header, .site-footer, .tabs, .filters, .toolbar, .actions, .banner, .stats { display: none !important; }
  .item { break-inside: avoid; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
