/* ===========================================================================
   /tools — hub + the three free calculators.

   Additive layer only: tokens and base come from site.css, and the nav /
   footer / breadcrumb / card / table / calculator-field / result-row / FAQ /
   CTA composition comes from tint-laws.css, which every tools page also
   loads. Anything below is either new furniture (tool cards, pane rows, stat
   tiles, the cut-layout canvas) or a print sheet.

   Mobile-first. Nothing here may create horizontal page scroll: the wide
   elements are the cut-list table and the layout drawing, and both scroll
   inside their own .table-scroll / .tk-plan container.
   =========================================================================== */

/* ── hub: tool cards ─────────────────────────────────────────────────────── */
.tk-hub { list-style: none; display: grid; gap: 14px; }
.tk-tool {
  display: flex; flex-direction: column; gap: 9px;
  height: 100%;
  padding: 22px 24px 24px;
}
.tk-tool:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.tk-tool-k {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-hi);
}
.tk-tool-h {
  font-family: 'Archivo', sans-serif; font-weight: 700;
  font-size: 19px; letter-spacing: -0.025em; line-height: 1.2;
}
.tk-tool-p { color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.tk-tool-go {
  margin-top: auto; padding-top: 6px;
  font-size: 14px; font-weight: 600; color: var(--accent-hi);
}
.tk-free {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.35);
  color: #6ee7b7;
}

/* ── forms ───────────────────────────────────────────────────────────────── */
.tk-panel { padding: 22px; }
.tk-grid { display: grid; gap: 14px; }
.tk-legend {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--dim);
  margin: 22px 0 12px;
}
.tk-legend:first-of-type { margin-top: 0; }

.tk-toggle {
  display: flex; align-items: flex-start; gap: 11px;
  margin-top: 16px;
  font-size: 14.5px; color: var(--text); line-height: 1.5;
  cursor: pointer;
}
.tk-toggle input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.tk-toggle span small { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }

/* pane / add-on rows */
.tk-rows { list-style: none; display: grid; gap: 12px; }
.tk-row, .tk-addon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg-inset);
}
.tk-row-f { min-width: 0; }
.tk-row-f--label { grid-column: 1 / -1; }
.tk-row-f label {
  display: block;
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--dim);
  margin-bottom: 6px;
}
.tk-row-f input {
  width: 100%;
  font: inherit; font-size: 16px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-btn);
  padding: 10px 12px;
  min-height: 46px;
  transition: border-color .2s var(--ease);
}
.tk-row-f input:focus { outline: none; border-color: var(--accent); }
.tk-row-f input:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.tk-row-x {
  align-self: end;
  width: 46px; min-height: 46px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--muted);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.tk-row-x:hover { border-color: #7f3f42; color: #fca5a5; }

.tk-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tk-btns .btn { flex: 0 0 auto; }

.tk-errors {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-btn);
  border: 1px solid rgba(248,113,113,0.4);
  background: rgba(248,113,113,0.09);
  color: #fca5a5;
  font-size: 14px; line-height: 1.6;
}
.tk-errors ul { margin: 0; padding-left: 18px; }
.tk-errors li + li { margin-top: 5px; }

/* ── stat tiles ──────────────────────────────────────────────────────────── */
.tk-stats { list-style: none; display: grid; gap: 12px; margin-bottom: 22px; }
.tk-stat { padding: 18px 20px; }
.tk-stat--hero {
  border-color: var(--accent-line);
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(99,102,241,0.16) 0%, transparent 62%),
    var(--bg-card);
}
.tk-stat-l {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--dim);
}
.tk-stat-v {
  display: block;
  font-family: 'Archivo', sans-serif; font-weight: 800;
  font-size: clamp(28px, 4.6vw, 38px); letter-spacing: -0.04em; line-height: 1.1;
  margin-top: 7px;
  overflow-wrap: break-word;
}
.tk-stat--hero .tk-stat-v { color: var(--accent-hi); }
.tk-stat-u { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.tk-stat-s { display: block; font-size: 12.5px; color: var(--muted); margin-top: 7px; line-height: 1.55; }

/* ── cut layout drawing ──────────────────────────────────────────────────── */
.tk-plan-wrap { padding: 6px; overflow: hidden; }
.tk-plan {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  padding: 4px;
}
.tk-plan svg { display: block; max-width: none; height: auto; }
.tk-plan-note { font-size: 12.5px; color: var(--dim); margin-top: 12px; line-height: 1.6; }

.tk-steps {
  display: grid; gap: 8px;
  margin: 0; padding-left: 22px;
  font-size: 14.5px; color: var(--muted); line-height: 1.6;
}
.tk-steps li::marker { color: var(--accent-hi); font-weight: 700; }

.tk-notes {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-btn);
  border: 1px solid rgba(245,158,11,0.36);
  background: rgba(245,158,11,0.08);
  color: #fcd9a0;
  font-size: 14px; line-height: 1.65;
}
.tk-notes p + p { margin-top: 7px; }

.tk-copy-msg { font-size: 13px; color: #6ee7b7; min-height: 20px; margin-top: 10px; }

/* ── pricing: window picker ──────────────────────────────────────────────── */
.tk-wins { list-style: none; display: grid; gap: 10px; }
.tk-win {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg-inset);
}
.tk-check {
  display: flex; align-items: center; gap: 11px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  min-height: 28px;
}
.tk-check input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.tk-win-f { display: flex; align-items: center; gap: 10px; }
.tk-win-f label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--dim); white-space: nowrap;
}
.tk-win-f input {
  width: 100px;
  font: inherit; font-size: 16px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: var(--r-btn);
  padding: 9px 11px;
  min-height: 44px;
}
.tk-win-f input:focus { outline: none; border-color: var(--accent); }
.tk-win-n { font-size: 12.5px; color: var(--dim); }

.tk-break { list-style: none; display: grid; gap: 9px; }
.tk-break li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 6px 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg-inset);
  font-size: 14.5px;
}
.tk-break li.tk-break--total { border-color: var(--border-hi); background: var(--bg-raise); }
.tk-break-k { font-weight: 600; }
.tk-break-v { font-family: 'Archivo', sans-serif; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.tk-break-s { flex: 1 1 100%; font-size: 12.5px; color: var(--dim); }

.tk-whatif { margin-top: 22px; }
.tk-whatif-out {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--r-btn);
  border: 1px solid var(--border);
  background: var(--bg-inset);
  font-size: 14.5px; color: var(--muted); line-height: 1.6;
}
.tk-whatif-out--good { border-color: rgba(52,211,153,0.34); color: #a7f3d0; }
.tk-whatif-out--bad { border-color: rgba(248,113,113,0.4); color: #fca5a5; }

/* ── VLT: shade strip ────────────────────────────────────────────────────── */
.tk-shades {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin-top: 18px;
}
.tk-shade {
  display: flex; flex-direction: column; gap: 1px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  background: var(--bg-inset);
  font-size: 12.5px; color: var(--dim);
}
.tk-shade b {
  font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 17px;
  letter-spacing: -0.03em; color: var(--text);
}
.tk-state-line { font-size: 14px; color: var(--muted); margin-top: 16px; line-height: 1.6; }
.tk-state-line a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }

/* ── prose helper blocks ─────────────────────────────────────────────────── */
.tk-prose { display: grid; gap: 14px; }
.tk-prose-card { padding: 20px 22px; }
.tk-prose-card h3 { font-size: 16.5px; margin-bottom: 8px; color: var(--accent-hi); }
.tk-prose-card p { color: var(--muted); font-size: 14.5px; line-height: 1.72; }
.tk-prose-card p + p { margin-top: 9px; }
.tk-prose-card strong { color: var(--text); font-weight: 600; }
.tk-lead-extra { margin-top: 16px; }

/* ── wider screens ──────────────────────────────────────────────────────── */
@media (min-width: 620px) {
  .tk-grid--3 { grid-template-columns: 1fr 1fr 1fr; align-items: start; }
  .tk-grid--2 { grid-template-columns: 1fr 1fr; align-items: start; }
  .tk-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 78px 46px; }
  .tk-row-f--label { grid-column: auto; }
  .tk-addon { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 46px; }
  .tk-stats { grid-template-columns: repeat(3, 1fr); }
  .tk-win { grid-template-columns: minmax(0, 1fr) auto auto; }
  .tk-prose { grid-template-columns: 1fr 1fr; }
  .tk-hub { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .tk-prose { grid-template-columns: repeat(3, 1fr); }
}

/* ── phones ──────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .tk-panel { padding: 18px; }
  .tk-tool { padding: 18px 18px 20px; }
  .tk-btns .btn { width: 100%; }
  .tk-win-f input { width: 86px; }
}

@media (prefers-reduced-motion: reduce) {
  .tk-tool:hover { transform: none; }
}

/* ── print: the cut list is meant to go to the bay wall ──────────────────── */
@media print {
  .bg-fx, .bg-grain, #nav, #footer, .skip-link,
  .tl-crumbs, .tl-cta, .tk-btns, .tk-noprint { display: none !important; }
  body { background: #fff; color: #111; }
  .section { padding: 0 0 18px; }
  .card { background: #fff; border-color: #bbb; box-shadow: none; }
  .tk-stat-v, .tk-stat--hero .tk-stat-v, h1, h2, h3 { color: #111; }
  .tk-stat-l, .tk-stat-s, .tk-plan-note, .tk-steps, .tl-sub { color: #444; }
  .tk-plan { overflow: visible; }
  .tk-plan svg { max-width: 100%; }
  .tl-table tbody td, .tl-table tbody th { color: #111; }
  .tl-table thead th { background: #eee; color: #111; }
  a[href]::after { content: ''; }
}
