/* CanaryQuote — shared styles
   Visual idea: the carbonless estimate pad a contractor carries in the truck,
   rebuilt as software. Chalk-line blue for actions, canary yellow for the job ticket. */

:root {
  color-scheme: light;
  --page: #F3F5F8;
  --surface: #FFFFFF;
  --ink: #18202B;
  --ink-2: #4B5666;
  --ink-3: #7A8494;
  --rule: #D8DEE6;
  --rule-strong: #B9C2CE;
  --chalk: #1D57D0;
  --chalk-hover: #1646A9;
  --chalk-tint: #E6EEFC;
  --canary: #FFF2A6;
  --canary-line: #E9D774;
  --canary-ink: #3A3214;
  --carbon-red: #C4321F;
  --ok: #1F7A4A;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 4px;
  --r-md: 8px;
  --gutter: 16px;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--chalk); text-underline-offset: 2px; }
a:hover { color: var(--chalk-hover); }
:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Display type: Archivo pushed to its widest setting, like lettering on a truck door */
.display, h1, h2 {
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; margin: 0; line-height: 1.3; }
p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--ink-3); }
.small { font-size: 0.875rem; }

/* Header */
.site-head { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.site-head .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-stretch: 125%; font-size: 1.2rem; }
.logo svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 720px) {
  .site-head .wrap { gap: 12px; }
  .nav { gap: 14px; }
  .nav a[href*="pricing"] { display: none; }
}
.nav .btn { white-space: nowrap; }
@media (max-width: 560px) { .site-head .logo .word { display: none; } .nav a { font-size: 0.875rem; } .nav .btn { padding: 0 10px; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--r-sm);
  font: 600 0.95rem/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--chalk); color: #fff; }
.btn-primary:hover { background: var(--chalk-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* Forms: big targets, made for a phone on a jobsite */
label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--ink-3); }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  font: 500 1rem var(--font); font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--rule-strong); border-radius: var(--r-sm);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--chalk); box-shadow: 0 0 0 3px var(--chalk-tint); }
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
.unit-field { position: relative; }
.unit-field input { padding-right: 38px; }
.unit-field span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 0.9rem; pointer-events: none; }
.unit-field.pre input { padding-right: 12px; padding-left: 26px; }
.unit-field.pre span { right: auto; left: 12px; }
.ftin { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* Segmented control */
.seg { display: inline-flex; background: var(--page); border: 1.5px solid var(--rule-strong); border-radius: var(--r-sm); padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button {
  font: 600 0.9rem var(--font); border: 0; background: transparent; color: var(--ink-2);
  padding: 8px 14px; border-radius: 3px; cursor: pointer; min-height: 38px;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 var(--rule-strong), 0 0 0 1px var(--rule-strong); }

/* The job ticket: canary carbon copy */
.ticket {
  background: var(--canary);
  color: var(--canary-ink);
  border-radius: 2px;
  position: relative;
  padding: 26px 22px 20px;
  box-shadow: 0 1px 0 var(--canary-line), 0 10px 24px -14px rgba(60, 50, 10, 0.35);
}
.ticket::before { /* perforated tear-off edge */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px;
  background: radial-gradient(circle at 6px -1px, var(--page) 4px, transparent 4.5px) 0 0 / 12px 10px repeat-x;
}
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ticket-title { font-weight: 800; font-stretch: 125%; font-size: 1.05rem; }
.ticket-no { color: #B02A18; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; }
.ticket table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.ticket td { padding: 6px 0; vertical-align: middle; border-bottom: 1px solid var(--canary-line); }
.ticket td.num { text-align: right; white-space: nowrap; padding-left: 10px; }
.ticket tr.group td { font-weight: 700; padding-top: 4px; }
.ticket .qty { color: var(--canary-ink); opacity: 0.75; font-size: 0.85rem; display: block; line-height: 1.1; }
.ticket tfoot td { font-weight: 700; }
.ticket .total-row td { font-size: 1.35rem; font-stretch: 125%; font-weight: 800; padding-top: 12px; border-top: 2px solid var(--canary-ink); border-bottom: 0; }
.ticket-empty { padding: 18px 0; font-size: 0.95rem; }

/* Generic panels */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 22px; }
.rule-top { border-top: 1px solid var(--rule); }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); margin-top: 96px; padding: 40px 0 56px; background: var(--surface); color: var(--ink-2); font-size: 0.9rem; }
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 28px; }
.foot-grid h3 { font-size: 0.95rem; margin-bottom: 10px; color: var(--ink); }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--page); padding: 12px 18px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 0.95rem; transition: opacity .2s, transform .2s; z-index: 50; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* Article byline: experience and review credit */
.byline { font-size: 0.875rem; color: var(--ink-3); margin: 0 0 8px; }

/* Section titles that are h2 for document outline but sized like h3 */
h2.h3 { font-size: 1.15rem; font-weight: 700; font-stretch: 100%; letter-spacing: 0; line-height: 1.3; margin: 0; }

/* Calculator index: dense lists, grouped by trade */
.finder { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; max-width: 520px; }
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
@media (max-width: 920px) { .groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .groups { grid-template-columns: 1fr; } }
.group h3 { padding-bottom: 8px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; font-stretch: 112%; }
.group ul { list-style: none; margin: 0; padding: 0; }
.group li a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 600; }
.group li a span { color: var(--ink-3); font-weight: 400; font-size: 0.875rem; text-align: right; }
.group li a:hover { color: var(--chalk); }
.no-match { color: var(--ink-3); display: none; }

/* Footer legal row */
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--ink-3); }
.foot-legal a { color: var(--ink-3); text-decoration: none; }
.foot-legal a:hover { color: var(--ink); text-decoration: underline; }
/* Privacy and terms */
.legal h1 { margin: 48px 0 6px; }
