/* smallbizbooks.ca — one stylesheet, mobile-first, no framework.
   Type scale is deliberately large: the audience is business owners reading
   deadline tables on a phone, often in a hurry, often stressed. */

:root {
  --ink: #16202b;
  --ink-soft: #47566a;
  --line: #dfe5ec;
  --line-soft: #eef2f6;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --brand: #10603f;
  --brand-dark: #0b4a30;
  --brand-tint: #eaf4ef;
  --warn: #8a4b00;
  --warn-tint: #fdf3e4;
  --alert: #9b1c1c;
  --alert-tint: #fdecec;
  --wrap: 74rem;
  --measure: 44rem;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--brand);
  color: #fff; padding: .75rem 1rem; z-index: 20;
}
.skip:focus { left: 0; }

a { color: var(--brand-dark); text-underline-offset: .18em; }
a:hover { color: var(--brand); }

/* ---------------------------------------------------------------- header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.hdr {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .85rem 0;
}
.brand {
  font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
}
.navtoggle {
  display: none;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink);
  border-radius: 8px; padding: .5rem .8rem; font: inherit; font-size: .95rem;
  cursor: pointer;
}
/* Progressive enhancement: the nav is open by default so it works with no JavaScript.
   The inline script adds .js-nav to <html> and collapses it, then the toggle opens it.
   Without JS the toggle button is hidden and the links simply stay visible. */
#nav { display: grid; gap: .1rem; grid-column: 1 / -1; padding-top: .5rem; }
.js-nav .navtoggle { display: block; }
.js-nav #nav { display: none; }
.js-nav #nav.open { display: grid; }
#nav a {
  padding: .6rem .25rem; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
#nav a[aria-current] { color: var(--brand); font-weight: 600; }
.hdr-cta { display: none; }
.hdr-phone { font-weight: 600; margin-right: .9rem; white-space: nowrap; }

@media (min-width: 62rem) {
  .hdr { grid-template-columns: auto 1fr auto; }
  /* Above this width the nav is always a row, whatever the toggle last did —
     including after a resize that leaves .open on the element. */
  .navtoggle, .js-nav .navtoggle { display: none; }
  #nav, .js-nav #nav, .js-nav #nav.open {
    display: flex; grid-column: auto; gap: 1.15rem; padding: 0; justify-content: center;
  }
  #nav a { border: 0; padding: .35rem 0; font-size: .97rem; }
  .hdr-cta { display: flex; align-items: center; }
}

/* ------------------------------------------------------------------ type */
main { padding-block: 1.75rem 4rem; }

.crumbs { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-soft); }

h1 {
  font-size: clamp(1.85rem, 1.35rem + 2.1vw, 2.7rem);
  line-height: 1.15; letter-spacing: -.02em; margin: 0 0 1rem;
  max-width: 20ch; max-width: min(20ch, 100%);
}
h1 + .lede {
  font-size: clamp(1.1rem, 1.02rem + .4vw, 1.28rem);
  color: var(--ink-soft); max-width: var(--measure); margin-bottom: 2rem;
}
h2 {
  font-size: clamp(1.35rem, 1.2rem + .7vw, 1.7rem);
  line-height: 1.25; letter-spacing: -.01em; margin: 2.75rem 0 .85rem;
}
h3 { font-size: 1.16rem; line-height: 1.3; margin: 1.9rem 0 .6rem; }

p, ul, ol { max-width: var(--measure); }
p { margin: 0 0 1.05rem; }
ul, ol { margin: 0 0 1.15rem; padding-left: 1.3rem; }
li { margin-bottom: .5rem; }
li > ul, li > ol { margin-top: .5rem; }

strong { font-weight: 650; }

/* ------------------------------------------------------------- callouts */
.answer {
  background: var(--brand-tint);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem; margin: 0 0 1.75rem;
  max-width: var(--measure);
}
.answer p:last-child, .note p:last-child, .warnbox p:last-child { margin-bottom: 0; }
.answer > :first-child { margin-top: 0; }

.note {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.05rem 1.2rem;
  margin: 1.75rem 0; max-width: var(--measure);
}
.warnbox {
  background: var(--warn-tint); border: 1px solid #f0d9b3;
  border-left: 4px solid var(--warn);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.05rem 1.2rem; margin: 1.75rem 0; max-width: var(--measure);
}
.warnbox h3, .note h3, .answer h3 { margin-top: 0; font-size: 1.03rem; }

.src {
  font-size: .875rem; color: var(--ink-soft);
  border-top: 1px solid var(--line-soft);
  padding-top: .7rem; margin-top: 1.1rem; max-width: var(--measure);
}
/* Citation links carry the brand colour: on a site whose whole argument is that it
   publishes its sources, the sources have to look clickable. */
.src a { color: var(--brand-dark); }
.src a:hover { color: var(--brand); }

/* --------------------------------------------------------------- tables */
.tablewrap { overflow-x: auto; margin: 1.5rem 0 1.75rem; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .97rem; }
caption {
  text-align: left; font-weight: 650; padding-bottom: .6rem; color: var(--ink);
}
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-soft); border-bottom: 2px solid var(--line); font-size: .9rem; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ----------------------------------------------------------------- cards */
.cards { display: grid; gap: 1rem; margin: 1.75rem 0 2rem; max-width: none; padding: 0; list-style: none; }
@media (min-width: 46rem) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .cards.three { grid-template-columns: repeat(3, 1fr); } }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.25rem; background: var(--bg); margin: 0;
}
.card h3 { margin: 0 0 .45rem; font-size: 1.06rem; }
.card p { margin: 0 0 .6rem; font-size: .97rem; color: var(--ink-soft); max-width: none; }
.card p:last-child { margin-bottom: 0; }
.card a { font-weight: 600; }

/* ------------------------------------------------------------------ CTA */
.cta {
  background: var(--brand); color: #fff; border-radius: var(--radius);
  padding: 1.5rem 1.5rem; margin: 2.5rem 0; max-width: var(--measure);
}
.cta h2 { margin: 0 0 .55rem; color: #fff; font-size: 1.28rem; }
.cta p { color: #d9ece2; margin-bottom: 1.1rem; max-width: none; }
.cta .btn { background: #fff; color: var(--brand-dark); }
.cta .btn:hover { background: #eaf4ef; }

.btn {
  display: inline-block; background: var(--brand); color: #fff;
  padding: .72rem 1.3rem; border-radius: 8px; text-decoration: none;
  font-weight: 600; border: 0;
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-sm { padding: .5rem .95rem; font-size: .94rem; }

/* ------------------------------------------------------------------ FAQ */
.faq { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.faq h2 { margin-top: 0; }
.faq-item { padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { margin: 0 0 .5rem; font-size: 1.06rem; }
.faq-item p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------- placeholders */
/* Deliberately loud. A placeholder that looks like real copy is how the last
   site shipped a fake phone number to live visitors in 24 files. */
.ph {
  background: repeating-linear-gradient(45deg, #ffe08a, #ffe08a 6px, #ffd45e 6px, #ffd45e 12px);
  color: #5a3d00; font-weight: 700; padding: .05em .35em;
  border-radius: 4px; box-decoration-break: clone;
  outline: 2px dashed #b57e00; outline-offset: 1px;
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--bg-soft); border-top: 1px solid var(--line);
  margin-top: 4rem; padding: 2.5rem 0 2rem; font-size: .95rem;
}
.fgrid { display: grid; gap: 1.9rem; }
@media (min-width: 46rem) { .fgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 68rem) { .fgrid { grid-template-columns: repeat(4, 1fr); } }
.fgroup h2 { font-size: .93rem; text-transform: uppercase; letter-spacing: .05em;
             color: var(--ink-soft); margin: 0 0 .7rem; }
.fgroup ul { list-style: none; padding: 0; margin: 0; }
.fgroup li { margin-bottom: .45rem; }
.fgroup a { text-decoration: none; }
.fgroup a:hover { text-decoration: underline; }
.nap p { margin: 0 0 .35rem; }
.nap .serves { color: var(--ink-soft); margin-top: .7rem; }
.fbottom {
  margin-top: 2.25rem; padding-top: 1.3rem; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .88rem;
}
.fbottom p { max-width: 60rem; margin-bottom: .6rem; }
.copy { margin-top: 1rem; }

/* ---------------------------------------------------------------- misc */
figure { margin: 1.75rem 0; max-width: var(--measure); }
figure img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: .55rem; }

.hero { margin-bottom: 2rem; }
.hero img { width: 100%; height: auto; border-radius: var(--radius); display: block; }

.checklist { list-style: none; padding-left: 0; }
.checklist li {
  padding-left: 1.75rem; position: relative;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: .85rem; height: .85rem; border: 2px solid var(--brand);
  border-radius: 3px;
}

@media print {
  .site-header, .site-footer, .cta, .navtoggle { display: none; }
  body { font-size: 11pt; }
}

/* --------------------------------------------------------------- lead form */
/* Deliberately plain. A quote form is a chore the reader agreed to do — the job
   is to make it fast and legible, not to decorate it. */
.leadform { max-width: var(--measure); margin: 2rem 0 2.5rem; }
.leadform fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem .5rem;
  margin: 0 0 1.25rem;
}
.leadform legend {
  font-weight: 650; font-size: 1.02rem; padding: 0 .45rem;
}
.field { margin: 0 0 1.15rem; max-width: none; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; }
.req { font-weight: 400; color: var(--alert); }
.opt { font-weight: 400; color: var(--ink-soft); }
.field .hint {
  display: block; font-size: .88rem; color: var(--ink-soft); margin-top: .35rem;
}
.leadform input,
.leadform select,
.leadform textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid #b9c3cf; border-radius: 8px;
  padding: .62rem .7rem;
}
.leadform textarea { resize: vertical; min-height: 6rem; }
.leadform input:focus-visible,
.leadform select:focus-visible,
.leadform textarea:focus-visible,
.leadform button:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 2px; border-color: var(--brand);
}
.leadform input::placeholder, .leadform textarea::placeholder { color: #7c8794; }
.formnote {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .95rem 1.1rem;
  font-size: .93rem; color: var(--ink-soft); margin-bottom: 1.35rem;
}
.leadform button { cursor: pointer; font-size: 1.02rem; }

@media (min-width: 40rem) {
  .leadform .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
}

.formactions { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.formstatus { color: var(--alert); font-size: .93rem; }
.leadform button[disabled] { opacity: .6; cursor: progress; }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
