/* DailyCRM — free tools (/tools/). Uses variables, header, buttons, FAQ, CTA and footer from /style.css. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tool-hero { background: var(--sand); border-bottom: 1px solid var(--line); padding: 32px 0 48px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 28px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--accent-ink); }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tool-hero h1 { font-size: 56px; max-width: 900px; }
.tool-hero .lead { max-width: 760px; }
.tool-hero-notes { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; font-size: 14px; color: var(--muted); }
.tool-hero-notes li { display: inline-flex; align-items: center; gap: 6px; }
.tool-hero-notes .i { color: #1f9d6b; }

/* Calculator */
.calc-section { background: var(--sand); padding: 0 0 88px; }
.calc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
.calc-form, .calc-result { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.calc-form { padding: 8px 28px 28px; }
.calc-result { position: sticky; top: 92px; padding: 28px; box-shadow: var(--shadow-md); }
.calc-group { border: 0; margin: 0; padding: 22px 0 0; min-width: 0; }
.calc-group + .calc-group { margin-top: 22px; border-top: 1px solid var(--line); }
.calc-group legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-family: var(--display); font-size: 20px; line-height: 1.25; color: var(--ink); }
.calc-group legend span { display: block; margin-top: 4px; font-family: var(--text); font-size: 14px; color: var(--muted); }
.calc-group legend + * { clear: left; }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.calc-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .field-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field small { font-size: 13px; line-height: 1.4; color: var(--muted); }
.field[hidden] { display: none; }
.input { position: relative; display: flex; align-items: center; }
.input input, .field select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--paper); font: inherit; font-size: 16px; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; -moz-appearance: textfield; }
.input input::-webkit-outer-spin-button, .input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input input:hover, .field select:hover { border-color: var(--muted); }
.input input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(62, 99, 221, 0.18); }
.input input[aria-invalid='true'] { border-color: #c2410c; }
.input .pre, .input .suf { position: absolute; font-size: 15px; color: var(--muted); pointer-events: none; }
.input .pre { left: 12px; }
.input .suf { right: 12px; }
.input--pre input { padding-left: 26px; }
.input--suf input { padding-right: 56px; }
.field select { appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.hours-row { display: flex; gap: 8px; }
.hours-row .input { flex: 1; }
.btn-auto { height: 46px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--accent-ink); background: var(--paper); white-space: nowrap; }
.btn-auto:hover { border-color: var(--accent); }
.btn-auto[hidden] { display: none; }

/* Segmented control (radio group) */
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 10px; background: var(--sand-2); border: 1px solid var(--line); }
.seg label { flex: 1 1 auto; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 12px; border-radius: 7px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: center; transition: background-color 0.15s, color 0.15s; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 20, 28, 0.08); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-field { margin-bottom: 16px; }

/* Tabs inside a calculator */
.calc-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 22px 0 0; border-radius: 10px; background: var(--sand-2); border: 1px solid var(--line); }
.calc-tabs [role='tab'] { flex: 1 1 auto; min-height: 40px; padding: 0 12px; border-radius: 7px; font-size: 15px; font-weight: 600; color: var(--muted); transition: background-color 0.15s, color 0.15s; }
.calc-tabs [role='tab']:hover { color: var(--ink); }
.calc-tabs [role='tab'][aria-selected='true'] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(18, 20, 28, 0.08); }
.calc-panel[hidden], .res-block[hidden], [data-show-when][hidden] { display: none; }
.field-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink); cursor: pointer; }
.field-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.field--wide { grid-column: 1 / -1; }
.res-hl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.res-hl div { padding: 10px 12px; border-radius: 10px; background: var(--sand); border: 1px solid var(--line); }
.res-hl div.is-main { background: var(--accent-soft); border-color: #c9d5fa; }
.res-hl dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.res-hl dd { margin: 2px 0 0; font-family: var(--display); font-size: 22px; line-height: 1.2; color: var(--ink); }
.res-hl .is-loss dd, .res-hl div.is-loss dd { color: #c2410c; }
.res-section { margin-top: 22px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.res-section + .res-stats { margin-top: 8px; }
.res-adj { display: grid; gap: 6px; margin-top: 10px; font-size: 14px; }
.res-adj li { display: flex; justify-content: space-between; gap: 12px; }
.res-adj b { font-weight: 600; font-variant-numeric: tabular-nums; }
.c-free { background: #b9e4cf; }
.c-buffer { background: #e4e4e0; }
.c-fees { background: #c4a5f0; }
.c-ads { background: var(--accent); }
.c-tax { background: #7c95eb; }
.c-ins { background: #f2a541; }
.c-pto { background: #57c3c9; }
.c-benefits { background: #e57f9f; }
.c-train { background: #9aa0b1; }
.c-equip { background: #c9b48a; }

/* Related calculators */
.related { padding: 24px 0 8px; }
.related h2 { font-size: 32px; margin-bottom: 20px; }

/* Results */
.res-title { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.res-main { margin-top: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.res-price { font-family: var(--display); font-size: 60px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.res-per { font-size: 15px; color: var(--muted); }
.res-price--range { font-size: 38px; }
.res-sub { margin-top: 8px; font-size: 14px; color: var(--muted); min-height: 21px; }
.res-range { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
.res-range div { padding: 10px 12px; border-radius: 10px; background: var(--sand); border: 1px solid var(--line); }
.res-range div.is-main { background: var(--accent-soft); border-color: #c9d5fa; }
.res-range dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.res-range dd { margin: 2px 0 0; font-family: var(--display); font-size: 22px; line-height: 1.2; color: var(--ink); }
.res-range dd small { display: block; font-family: var(--text); font-size: 12px; color: var(--muted); }
.res-bar { display: flex; height: 14px; margin-top: 24px; border-radius: 999px; overflow: hidden; background: var(--sand-2); }
.res-bar span { display: block; height: 100%; min-width: 0; transition: width 0.25s ease; }
.c-labor { background: var(--accent); }
.c-supplies { background: #7c95eb; }
.c-travel { background: #f2a541; }
.c-overhead { background: #9aa0b1; }
.c-profit { background: #1f9d6b; }
.res-legend { display: grid; gap: 8px; margin-top: 14px; font-size: 14px; }
.res-legend li { display: flex; align-items: center; gap: 10px; }
.res-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.res-legend b { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.res-legend em { font-style: normal; color: var(--muted); font-size: 13px; min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }
.res-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 22px; border-top: 1px solid var(--line); }
.res-stats div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.res-stats div:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--line); }
.res-stats dt { font-size: 13px; color: var(--muted); }
.res-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.res-stats .is-loss dd { color: #c2410c; }
.res-stats div.res-stat--wide { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
.res-note { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #fff7e6; border: 1px solid #f6dfae; font-size: 14px; line-height: 1.5; color: #6b4e00; }
.res-note[hidden] { display: none; }
.res-actions { display: flex; gap: 8px; margin-top: 20px; }
.res-actions .btn { flex: 1; }
.res-status { margin-top: 10px; font-size: 14px; color: #177a53; min-height: 21px; }
.res-fine { margin-top: 6px; font-size: 13px; color: var(--muted); }

.calc-mini { display: none; }
@media (max-width: 1024px) {
  .calc-mini:not([hidden]) { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--night); color: #d9dbe6; font-size: 14px; box-shadow: var(--shadow-lg); }
  .calc-mini b { font-family: var(--display); font-weight: 400; font-size: 22px; color: #fff; }
  .calc-mini-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--sun); }
}

/* Article content */
.tool-content { padding: 96px 0 40px; }
.prose { max-width: 780px; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.prose h2 { font-size: 38px; margin: 64px 0 18px; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 22px; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose ol { list-style: decimal; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.formula { margin: 20px 0; padding: 18px 20px; border-radius: 12px; background: var(--sand); border: 1px solid var(--line); font-size: 16px; line-height: 1.8; color: var(--ink); }
.formula code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14.5px; }
.table-wrap { margin: 20px 0 24px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-weight: 600; color: var(--ink); background: var(--sand); white-space: nowrap; }
.prose td:first-child { font-weight: 600; color: var(--ink); }
.example { margin: 20px 0; padding: 22px 24px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-md); }
.example ol { margin-bottom: 0; }
.mistakes { counter-reset: m; list-style: none !important; padding: 0 !important; display: grid; gap: 14px; }
.mistakes li { counter-increment: m; position: relative; margin: 0; padding: 18px 20px 18px 64px; border-radius: 12px; background: var(--sand); border: 1px solid var(--line); }
.mistakes li::before { content: counter(m, decimal-leading-zero); position: absolute; left: 20px; top: 18px; font-family: var(--display); color: var(--accent); font-size: 18px; }
.mistakes b { display: block; color: var(--ink); margin-bottom: 4px; }
.callout-tip { margin: 20px 0; padding: 14px 18px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--accent-soft); color: var(--ink); font-size: 16px; }
.tool-faq { padding-top: 72px; }

/* Tools hub */
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); }
.tool-card .mega-ico { margin-bottom: 6px; }
.tool-card h2, .tool-card h3 { font-size: 24px; line-height: 1.2; }
.tool-card p { color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.tool-card .link-arrow { margin-top: auto; padding-top: 8px; }
a.tool-card { transition: border-color 0.15s, box-shadow 0.15s; }
a.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.tool-card--soon { background: transparent; border-style: dashed; }
.tool-card--soon h3 { color: var(--ink-2); }
.soon { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--sand-2); color: var(--muted); }
.tools-subtitle { font-size: 28px; margin: 56px 0 18px; }
.tools-group-lead { margin: -8px 0 18px; color: var(--ink-2); font-size: 16px; }
.tools-hub { background: var(--sand); padding: 1px 0 96px; }

@media (max-width: 1024px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-result { position: static; }
  .tool-hero h1 { font-size: 46px; }
  .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .tool-hero { padding: 20px 0 36px; }
  .crumbs { margin-bottom: 20px; }
  .tool-hero h1 { font-size: 36px; line-height: 1.08; }
  .calc-section { padding-bottom: 64px; }
  .calc-form { padding: 4px 18px 22px; }
  .calc-result { padding: 22px 18px; }
  .calc-grid, .calc-grid--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
  .seg span { font-size: 14px; padding: 0 8px; }
  .res-price { font-size: 50px; }
  .res-price--range { font-size: 30px; }
  .res-hl dd { font-size: 19px; }
  .related h2 { font-size: 28px; }
  .res-range dd { font-size: 19px; }
  .tool-content { padding-top: 64px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 30px; margin-top: 48px; }
  .mistakes li { padding: 16px 16px 16px 54px; }
  .mistakes li::before { left: 16px; top: 16px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
}
