/* tweaks panel styles */
.tw-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  background: var(--bg);
  border: var(--rule) solid var(--line-strong);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  z-index: 500;
  font-family: var(--sans);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.tw-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.tw-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: var(--rule) solid var(--line);
}
.tw-title { font-size: 12px; font-weight: 600; letter-spacing: -0.01em; }
.tw-title .mono { color: var(--accent); margin-right: 4px; }
.tw-x {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
}
.tw-x:hover { color: var(--fg); }
.tw-body { padding: 8px 16px 16px; }
.tw-sec { padding: 12px 0; border-bottom: var(--rule) solid var(--line); }
.tw-sec:last-child { border-bottom: 0; }
.tw-lab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  margin-bottom: 10px;
}
.tw-lab .tw-val { color: var(--fg); }
.tw-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tw-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: var(--rule) solid var(--line);
  color: var(--fg-2);
}
.tw-chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tw-chip .sw { width: 12px; height: 12px; border: var(--rule) solid var(--line); }
.tw-chip.active .sw { border-color: var(--bg); }

.tw-panel input[type=range] {
  width: 100%;
  accent-color: var(--accent);
}
.tw-hue-preview {
  height: 10px;
  margin-top: 8px;
  background: linear-gradient(90deg,
    oklch(0.62 0.18 180),
    oklch(0.62 0.18 210),
    oklch(0.62 0.18 240),
    oklch(0.62 0.18 270),
    oklch(0.62 0.18 300)
  );
  position: relative;
}
#tw-hue-swatch {
  position: absolute; right: -6px; top: -3px;
  width: 16px; height: 16px;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--fg);
}

.tw-panel input[type=checkbox] { accent-color: var(--accent); margin-right: 6px; }
.tw-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tw-reset {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg);
  border: var(--rule) solid var(--line);
  padding: 6px 10px;
}
.tw-reset:hover { background: var(--bg-2); }
.tw-note { font-size: 9px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.08em; }

/* density variants */
html[data-density="compact"] { font-size: 14px; }
html[data-density="compact"] .audit-row { padding: 18px 0; }
html[data-density="compact"] .feature { padding-top: 36px; padding-bottom: 44px; }
html[data-density="compact"] .section-hdr { margin-top: 36px; margin-bottom: 24px; }

html[data-density="spacious"] { font-size: 16px; }
html[data-density="spacious"] .audit-row { padding: 40px 0; }
html[data-density="spacious"] .feature { padding-top: 80px; padding-bottom: 88px; }
html[data-density="spacious"] .section-hdr { margin-top: 80px; margin-bottom: 44px; }

/* serif headline toggle */
html[data-serif="off"] .feature-title,
html[data-serif="off"] .section-hdr h2,
html[data-serif="off"] .ar-title,
html[data-serif="off"] .feed-title,
html[data-serif="off"] .audits-hero h1,
html[data-serif="off"] .pull,
html[data-serif="off"] .pull-big,
html[data-serif="off"] .art-hdr h1,
html[data-serif="off"] .prose h2,
html[data-serif="off"] .pull-fig blockquote,
html[data-serif="off"] .method h2,
html[data-serif="off"] .two-col h2,
html[data-serif="off"] .about-hero h1,
html[data-serif="off"] .tenet h3,
html[data-serif="off"] .ax-t,
html[data-serif="off"] .v-verdict,
html[data-serif="off"] .cat-t,
html[data-serif="off"] .pkg-verdict,
html[data-serif="off"] .related h3,
html[data-serif="off"] .rel .vt,
html[data-serif="off"] .prose .lede,
html[data-serif="off"] .contact h3,
html[data-serif="off"] .term-side .mission {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.025em;
}
