/* Tradie Toolbox — shared styles */
:root {
  --bg: #F3F1EC;            /* concrete */
  --surface: #FFFFFF;
  --ink: #1C1F23;           /* charcoal */
  --ink-muted: #5A5F66;     /* steel */
  --ink-on-dark: #D4D7DB;
  --border: #DDD9D1;
  --input-border: #CFCAC0;
  --dark: #1C1F23;
  --dark-2: #2C3137;
  --accent: #F26B1D;        /* hi-vis: fills and buttons, never text on light */
  --accent-hover: #DD5C10;
  --rust: #B84A0E;          /* text and links on light */
  --rust-dark: #8A3608;
  --tint: #FDE7D9;
  --radius: 14px;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(28,31,35,0.08), 0 8px 24px rgba(28,31,35,0.06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.6; }
a { color: var(--rust); }
a:hover { color: var(--rust-dark); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1; text-transform: uppercase; letter-spacing: 0.005em; }
h1 { font-size: 60px; font-weight: 800; margin: 0 0 12px; }
h2 { font-size: 34px; margin: 40px 0 12px; }
h3 { font-size: 24px; margin: 28px 0 8px; }
@media (max-width: 640px) { h1 { font-size: 42px; } h2 { font-size: 28px; } }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { background: var(--dark); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1; text-transform: uppercase; color: #fff; }
.brand:hover { color: #fff; }
.brand em { font-style: normal; color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px; }
.site-nav a { color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; padding: 10px 12px; border-radius: 8px; }
.site-nav a:hover, .site-nav a.active { background: var(--dark-2); color: #fff; }
@media (max-width: 560px) { .brand { font-size: 24px; } .site-nav a { padding: 10px 9px; font-size: 14px; } .site-nav a.hide-sm { display: none; } }

/* Footer */
.site-footer { background: var(--dark); color: #B9BDC3; margin-top: 72px; font-size: 14px; }
.site-footer .container { padding-top: 36px; padding-bottom: 40px; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 6px 0; max-width: 780px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 10px; border: 0; background: var(--accent); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: 21px; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); color: var(--ink); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-2); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid #5A5F66; }
.btn-ghost:hover { background: var(--dark-2); color: #fff; }
.btn-line { background: transparent; color: var(--ink); border: 2px solid var(--input-border); }
.btn-line:hover { background: #fff; color: var(--ink); }

/* Hero */
.hero { background: var(--dark); border-top: 1px solid var(--dark-2); color: #fff; }
.hero .container { padding-top: 64px; padding-bottom: 88px; }
.eyebrow { margin: 0 0 14px; font-size: 14px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: 76px; line-height: 0.95; max-width: 820px; color: #fff; }
.hero p.lead { font-size: 20px; color: var(--ink-on-dark); max-width: 640px; margin: 16px 0 0; }
@media (max-width: 640px) { .hero h1 { font-size: 50px; } .hero .container { padding-top: 40px; padding-bottom: 72px; } }

/* Tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; margin-top: -40px; }
.tool-card { background: var(--surface); border-radius: var(--radius); padding: 26px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.tool-card:hover { color: var(--ink); outline: 2px solid var(--accent); }
.tool-card .icon { width: 52px; height: 52px; border-radius: 12px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.tool-card .name { font-family: var(--font-head); font-weight: 700; font-size: 30px; line-height: 1; text-transform: uppercase; }
.tool-card .desc { font-size: 15px; color: var(--ink-muted); }
.tool-card.dark { background: var(--dark); color: #fff; }
.tool-card.dark .icon { background: var(--accent); }
.tool-card.dark .desc { color: var(--ink-on-dark); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; align-items: start; }
.link-list { display: flex; flex-direction: column; gap: 12px; padding: 0; margin: 0; list-style: none; }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fff; border-radius: 12px; padding: 18px 20px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 17px; }
.link-list a:hover { outline: 2px solid var(--accent); color: var(--ink); }

/* Promo band */
.promo { margin: 64px 0 0; background: var(--accent); border-radius: 18px; padding: 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; color: var(--ink); }
.promo h2 { margin: 0 0 8px; font-size: 44px; font-weight: 800; }
.promo p { margin: 0; font-size: 18px; max-width: 620px; }
.promo a:not(.btn) { color: var(--ink); }
@media (max-width: 640px) { .promo { padding: 28px; } .promo h2 { font-size: 34px; } }

/* Page intro */
.page-head { padding-top: 28px; }
.crumbs { font-size: 14px; color: var(--ink-muted); margin-bottom: 14px; }
.page-head p.lead { font-size: 18px; color: var(--ink-muted); max-width: 700px; margin: 0; }

/* Calculator layout */
.calc-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin-top: 28px; }
.calc-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.calc-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.card { background: var(--surface); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
@media (max-width: 560px) { .card { padding: 18px; } }
.field-label, .field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field { margin: 0; min-width: 0; }
.field .hint { display: block; font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
input[type=number], input[type=text], input[type=email], input[type=date], select, textarea {
  width: 100%; min-width: 0; height: 56px; padding: 0 14px; border: 2px solid var(--input-border); border-radius: 10px;
  font: inherit; font-size: 20px; font-weight: 600; color: var(--ink); background: #fff;
}
textarea { height: auto; padding: 12px 14px; font-size: 16px; font-weight: 400; }
select { font-size: 17px; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--ink); }
.input-unit { display: flex; }
.input-unit input { border-radius: 10px 0 0 10px; }
.input-unit .unit { display: flex; align-items: center; padding: 0 12px; background: #F3F1EC; border: 2px solid var(--input-border); border-left: 0; border-radius: 0 10px 10px 0; font-size: 14px; font-weight: 600; color: var(--ink-muted); white-space: nowrap; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 48px; padding: 0 18px; border-radius: 10px; border: 2px solid var(--input-border); background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; }
.seg.pills button { border-radius: 999px; min-height: 44px; font-size: 15px; }
.seg button[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }

/* Result panel */
.result { background: var(--dark); color: #fff; border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 560px) { .result { padding: 20px; } }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.result .label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #B9BDC3; }
.result .big { display: block; font-family: var(--font-head); font-weight: 800; font-size: 68px; line-height: 1; }
.result .big.hot { color: var(--accent); }
.result .sub { display: block; font-size: 14px; color: var(--ink-on-dark); margin-top: 4px; }
@media (max-width: 560px) { .result .big { font-size: 50px; } }
.tip { padding: 14px 16px; border-radius: 10px; background: var(--dark-2); font-size: 15px; color: #E6E8EB; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stat-list { list-style: none; padding: 0; margin: 0; }
.stat-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #3A4048; font-size: 15px; }
.stat-list li span:last-child { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.side-box { background: #fff; border-radius: var(--radius); padding: 22px; }
.side-box h2 { margin: 0 0 12px; font-size: 26px; }
.side-box ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-weight: 600; }
.side-promo { background: var(--accent); border-radius: var(--radius); padding: 22px; color: var(--ink); }
.side-promo h2 { margin: 0 0 8px; font-size: 28px; font-weight: 800; }
.side-promo p { margin: 0 0 10px; font-size: 15px; }
.side-promo a { color: var(--ink); font-weight: 700; }

/* Content */
.prose { max-width: 760px; font-size: 17px; line-height: 1.7; }
.prose p, .prose li { color: #2A2E33; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0 20px; background: #fff; border-radius: 10px; overflow: hidden; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { background: #ECE9E2; }
.table-wrap { overflow-x: auto; }
.note { font-size: 14px; color: var(--ink-muted); }
.faq details { background: #fff; border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; }
.ad-slot { margin: 8px 0; }

/* Blog */
.post-list { display: flex; flex-direction: column; gap: 16px; max-width: 780px; }
.post-card { background: #fff; border-radius: var(--radius); padding: 22px 24px; }
.post-card h2 { margin: 0 0 6px; font-size: 28px; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--rust); }
.post-card p { margin: 0; color: var(--ink-muted); }
.post-date { font-size: 14px; color: var(--ink-muted); margin: 0 0 24px; }
.cta-card { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 24px; margin: 32px 0; }
.cta-card p { color: var(--ink-on-dark); margin: 0 0 14px; }
.cta-card strong { color: #fff; }

/* Quote & invoice maker */
.line-items { display: flex; flex-direction: column; gap: 10px; }
.line-item { display: grid; grid-template-columns: minmax(0, 1fr) 90px 130px 44px; gap: 8px; align-items: end; }
.line-item input { font-size: 16px; height: 50px; }
.line-item .remove { height: 50px; width: 44px; border: 2px solid var(--input-border); border-radius: 10px; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
@media (max-width: 560px) { .line-item { grid-template-columns: minmax(0, 1fr) 70px; } .line-item .f-desc { grid-column: 1 / -1; } }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--dark); }

.doc { background: #fff; color: #111; border-radius: 6px; padding: 40px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.5; }
.doc-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.doc h2.doc-title { font-family: var(--font-head); font-size: 40px; margin: 0; text-transform: uppercase; }
.doc .muted { color: #555; }
.doc table { width: 100%; border-collapse: collapse; margin: 24px 0 12px; }
.doc th, .doc td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #ddd; vertical-align: top; }
.doc th.num, .doc td.num { text-align: right; white-space: nowrap; }
.doc .totals { margin-left: auto; width: min(320px, 100%); }
.doc .totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.doc .totals .grand { font-weight: 800; font-size: 18px; border-top: 2px solid #111; margin-top: 6px; padding-top: 8px; }
.doc-foot { margin-top: 36px; padding-top: 12px; border-top: 1px solid #eee; font-size: 11px; color: #777; }
@media (max-width: 560px) { .doc { padding: 20px; } }

@media print {
  body { background: #fff; }
  .no-print, .site-header, .site-footer, .page-head, .calc-side, ins.adsbygoogle { display: none !important; }
  .calc-layout { display: block; margin: 0; }
  .doc { box-shadow: none; padding: 0; }
  .container { max-width: none; padding: 0; }
}
