/* SawFacts — utilitarian, fast, mobile-friendly. Hand-written, no framework. */
:root {
  --fg: #1a1a1a;
  --muted: #5a5a5a;
  --line: #d9d9d9;
  --bg: #ffffff;
  --accent: #1b6b3a;
  --accent-light: #e6f2ea;
  --best: #d8f0dd;
  --link: #155a30;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

header.site {
  background: var(--accent);
  color: #fff;
  border-bottom: 3px solid #0f4423;
}
header.site .container {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-top: 12px; padding-bottom: 12px;
}
header.site a { color: #fff; }
.brand-name { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.brand-name .dot { color: #bfe6cc; }
header.site nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
header.site form.search { margin-left: auto; display: flex; }
header.site form.search input {
  border: none; padding: 6px 10px; border-radius: 4px 0 0 4px; font-size: 14px; width: 160px;
}
header.site form.search button {
  border: none; background: #0f4423; color: #fff; padding: 6px 12px;
  border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px;
}

main { padding: 24px 0 48px; }
h1 { font-size: 26px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 28px 0 10px; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }
.subtitle { color: var(--muted); margin: 0 0 20px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: 6px; padding: 14px;
  background: #fff;
}
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card .meta { color: var(--muted); font-size: 13px; }

.tile {
  display: block; border: 1px solid var(--line); border-radius: 6px;
  padding: 16px; text-align: center; background: var(--accent-light);
  color: var(--accent); font-weight: 600;
}
.tile:hover { background: #d6e9dd; text-decoration: none; }
.tile .count { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 4px; }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
table th, table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table th { background: #f4f4f4; font-weight: 600; }
.spec-table td.label { color: var(--muted); width: 38%; }

.compare-table th, .compare-table td { text-align: center; }
.compare-table th:first-child, .compare-table td.label { text-align: left; }
.compare-table td.best { background: var(--best); font-weight: 600; }
.group-head td { background: #efefef; font-weight: 700; }

.list-table td.name a { font-weight: 600; }
.pill {
  display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px;
  background: var(--accent-light); color: var(--accent); border: 1px solid #cfe3d6;
}
.filters { margin: 0 0 16px; font-size: 14px; }
.filters a { margin-right: 10px; }
.filters a.active { font-weight: 700; text-decoration: underline; }

.actions { margin: 16px 0; }
.btn {
  display: inline-block; background: var(--accent); color: #fff !important;
  padding: 8px 14px; border-radius: 5px; font-size: 14px; border: none; cursor: pointer;
}
.btn:hover { background: #155a30; text-decoration: none; }

.cmp-form { margin: 18px 0; }
.cmp-form label { display: block; margin: 4px 0; font-size: 14px; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0; }
footer.site a { color: var(--muted); }
footer.site .foot-links { margin: 0 0 8px; }
footer.site .foot-disclaimer { margin: 0; line-height: 1.55; max-width: 860px; }

/* Legal / prose pages */
.prose { max-width: 760px; }
.prose h2 { font-size: 17px; }
.prose h3 { font-size: 15px; margin: 20px 0 6px; }
.prose p, .prose li { color: var(--fg); }
.prose ul { padding-left: 22px; }
.prose .updated { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.note {
  background: var(--accent-light); border: 1px solid #cfe3d6; border-radius: 6px;
  padding: 12px 14px; font-size: 13px; color: var(--muted); margin: 16px 0;
}
.note strong { color: var(--accent); }

.searchbox-big { display: flex; max-width: 480px; margin: 8px 0 24px; }
.searchbox-big input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px 0 0 5px; font-size: 15px; }
.searchbox-big button { border: none; background: var(--accent); color: #fff; padding: 0 18px; border-radius: 0 5px 5px 0; cursor: pointer; }

.spec-table th.label { color: var(--muted); width: 38%; font-weight: 400; text-align: left; }
abbr[title] { text-decoration: underline dotted; cursor: help; text-underline-offset: 2px; }

/* --- short-name / example links --- */
.example-q { font-size: 13px; color: var(--muted); margin: -16px 0 24px; }
.example-q a { color: var(--link); }

/* --- homepage action cards --- */
.action-cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.action-card {
  display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 6px; padding: 14px 16px; background: #fff;
}
.action-card:hover { background: var(--accent-light); text-decoration: none; }
.ac-title { font-weight: 700; color: var(--accent); }
.ac-desc { font-size: 13px; color: var(--muted); }

.tile-blurb { text-align: left; }
.tile-name { display: block; }
.tile-blurb-text { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 6px; line-height: 1.45; }
.compare-tile .vs { color: var(--muted); font-weight: 400; font-size: 12px; }

/* --- listing cards --- */
.card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.prod-card { border: 1px solid var(--line); border-radius: 6px; padding: 14px; background: #fff; display: flex; flex-direction: column; }
.prod-card h3 { margin: 0 0 4px; font-size: 15px; }
.prod-card-meta { margin: 0 0 8px; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.prod-card-brand { color: var(--muted); }
.spec-chips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.spec-chips li { font-size: 11.5px; background: #f4f4f4; border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; }
.spec-chips .chip-k { color: var(--muted); }
.spec-chips .chip-v { font-weight: 600; }
.prod-card-actions { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.card-link { font-size: 13px; font-weight: 600; }

/* --- compare toggle button + tray --- */
.cmp-toggle {
  font: inherit; font-size: 13px; cursor: pointer; border: 1px solid var(--accent);
  background: #fff; color: var(--accent); border-radius: 5px; padding: 5px 10px; line-height: 1;
}
.cmp-toggle:hover { background: var(--accent-light); }
.cmp-toggle[disabled] { opacity: .45; cursor: not-allowed; }
.cmp-toggle .cmp-remove { display: none; }
.cmp-toggle.is-added { background: var(--accent); color: #fff; }
.cmp-toggle.is-added .cmp-add { display: none; }
.cmp-toggle.is-added .cmp-remove { display: inline; }
/* hide JS-only compare controls before/without JS */
html:not(.js) .cmp-toggle { display: none; }

#cmp-tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: #143; color: #fff; border-top: 3px solid #0f4423;
  box-shadow: 0 -2px 10px rgba(0,0,0,.18);
}
#cmp-tray[hidden] { display: none; }
.cmp-tray-inner { display: flex; align-items: center; gap: 12px; padding: 10px 16px; flex-wrap: wrap; }
.cmp-tray-label { font-weight: 700; font-size: 13px; }
.cmp-chips { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; flex-wrap: wrap; flex: 1; }
.cmp-chips li { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,.15); border-radius: 14px; padding: 3px 6px 3px 10px; font-size: 12.5px; }
.cmp-chip-x { background: rgba(255,255,255,.25); border: none; color: #fff; border-radius: 50%; width: 18px; height: 18px; line-height: 1; cursor: pointer; font-size: 13px; }
.cmp-chip-x:hover { background: rgba(255,255,255,.45); }
.cmp-go { background: #fff; color: var(--accent) !important; font-weight: 700; padding: 7px 14px; border-radius: 5px; font-size: 14px; }
.cmp-go:hover { text-decoration: none; background: #e8f3ec; }
.cmp-hint { font-size: 12.5px; opacity: .9; }
.cmp-clear { background: none; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 5px; padding: 6px 10px; cursor: pointer; font-size: 12.5px; }
body.has-tray { padding-bottom: 64px; }

/* --- faceted filters --- */
.facets {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin: 0 0 14px; background: #fafafa;
}
.facet-group { border: none; margin: 0; padding: 0; min-width: 140px; }
.facet-group legend { font-weight: 700; font-size: 13px; margin-bottom: 4px; padding: 0; color: var(--accent); }
.facet-group label { display: block; font-size: 13px; margin: 2px 0; cursor: pointer; }
.facet-group .fc { color: var(--muted); font-size: 12px; }
.facet-group select { font: inherit; font-size: 13px; padding: 4px; }
.facet-actions { display: flex; gap: 10px; align-items: center; align-self: flex-end; }
.facet-clear, .chip-clear { font-size: 13px; }

.result-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 13px; }
.result-count { color: var(--muted); font-weight: 600; }
.active-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-active { background: var(--accent-light); border: 1px solid #cfe3d6; border-radius: 14px; padding: 2px 10px; font-size: 12.5px; color: var(--accent); }
.chip-active:hover { background: #d6e9dd; text-decoration: none; }

/* --- product "at a glance" --- */
.glance-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0 0 14px; }
.glance-card { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; background: var(--accent-light); }
.glance-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.glance-value { font-weight: 700; font-size: 15px; }

/* --- trust / source microcopy --- */
.trust-note { font-size: 12.5px; color: var(--muted); background: #f7f9f7; border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 5px 5px 0; margin: 0 0 18px; }
.source-line { font-size: 12.5px; color: var(--muted); margin-top: 20px; }
.foot-trust { font-size: 12px; color: var(--muted); margin: 8px 0; }

/* --- compare page upgrades --- */
.verdict { background: var(--accent-light); border: 1px solid #cfe3d6; border-radius: 6px; padding: 12px 14px; margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; }
.compare-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin: 0 0 12px; }
.legend { font-size: 12.5px; color: var(--muted); }
.diff-toggle { font-size: 13px; cursor: pointer; white-space: nowrap; }
html:not(.js) .diff-toggle { display: none; }
.dir-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; background: var(--accent); color: #fff; border-radius: 3px; padding: 1px 5px; vertical-align: middle; }
.dir-tag.low { background: #3a6ea5; }
.compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table th[scope="col"] a { display: block; }
.compare-table thead th { position: sticky; top: 0; z-index: 2; }
.compare-table td.lead { background: var(--best); }
.compare-table td.lead .dir-tag { margin-left: 4px; }
.compare-table.diff-only tr.spec-row:not(.has-diff) { display: none; }
.compare-table tr.group-head th[role="button"] { cursor: pointer; }
.compare-table tr.group-head th[role="button"]::before { content: "▾ "; font-size: 11px; }
.compare-table tr.group-head.collapsed th[role="button"]::before { content: "▸ "; }
.compare-table tr.group-collapsed { display: none; }

/* --- FAQ --- */
.faq { max-width: 760px; }
.faq-item { border: 1px solid var(--line); border-radius: 6px; padding: 0; margin: 0 0 8px; background: #fff; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: 11px 14px; font-size: 15px; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item p { margin: 0; padding: 12px 14px; color: var(--fg); font-size: 14px; line-height: 1.55; }
.faq-more { font-size: 13px; color: var(--muted); margin-top: 12px; }

@media (max-width: 560px) {
  header.site form.search input { width: 110px; }
  .spec-table td.label, .spec-table th.label { width: 45%; }
  .facets { flex-direction: column; gap: 12px; }
  .compare-table thead th a { font-size: 12px; }
  .cmp-tray-inner { gap: 8px; padding: 8px 12px; }
}
