/* Shared styles for the static /guides/ pages (scripts/build-guides.mjs).
   Plain CSS on purpose: these pages load no app bundle. */
:root {
  --ink: #0f172a; --muted: #475569; --line: #e2e8f0; --bg: #ffffff; --soft: #f8fafc;
  --brand: #142956; --accent: #f5b301; --link: #1d4ed8;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e2e8f0; --muted: #94a3b8; --line: #1e293b; --bg: #0b1220; --soft: #111a2e; --link: #93c5fd; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.site-header { background: var(--brand); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; max-width: 1040px; }
.site-header a { color: #fff; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { border-radius: 7px; background: #fff; padding: 2px; }
.site-header nav { display: flex; align-items: center; gap: 16px; font-size: 15px; }
.btn { display: inline-block; background: var(--accent); color: #111 !important; font-weight: 600; padding: 9px 16px; border-radius: 10px; text-decoration: none; }
.btn:hover { filter: brightness(1.05); }
.crumbs { margin: 28px 0 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.prose { padding: 8px 0 24px; }
.prose h1 { font-size: clamp(30px, 6vw, 42px); line-height: 1.15; letter-spacing: -0.02em; margin: 12px 0 8px; }
.prose h2 { font-size: 26px; line-height: 1.25; margin: 40px 0 10px; }
.prose h3 { font-size: 20px; margin: 28px 0 6px; }
.prose .meta { color: var(--muted); font-size: 14px; margin-top: 0; }
.prose .lede { font-size: 19px; color: var(--muted); }
.prose img { max-width: 100%; height: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--soft); }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 4px solid var(--accent); background: var(--soft); }
.prose code { background: var(--soft); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.cards { list-style: none; padding: 0; display: grid; gap: 12px; }
.cards a { display: block; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.cards a:hover { border-color: var(--link); }
.cards strong { display: block; font-size: 18px; }
.cards span { color: var(--muted); font-size: 15px; }
.cta { margin: 16px 0 48px; padding: 24px; border-radius: 16px; background: var(--brand); color: #fff; }
.cta h2 { margin: 0 0 8px; font-size: 22px; }
.cta p { margin: 0 0 16px; color: #cbd5e1; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 16px 0 32px; }
.site-footer a { color: var(--muted); }

/* Interactive tools embedded in a guide */
.tool { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--soft); margin: 20px 0; }
.tool label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
.tool input, .tool select, .tool textarea { width: 100%; font: inherit; font-size: 16px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.tool .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.tool .row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tool button { font: inherit; font-size: 15px; font-weight: 600; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.tool button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.tool table { font-size: 14px; }
.tool td input { padding: 6px; font-size: 15px; min-width: 70px; }
.tool .result { margin-top: 14px; padding: 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.tool .result strong { font-size: 22px; }
@media print {
  .site-header, .site-footer, .cta, .crumbs, .no-print, .prose > :not(.tool) { display: none !important; }
  .tool { border: 0; background: none; padding: 0; }
  body { background: #fff; color: #000; }
}
@media print {
  .tool input, .tool textarea, .tool select { border: 0; padding: 2px 0; background: none; resize: none; }
}
.tool td:nth-child(2) input { min-width: 220px; }
.tool table.compare td.best input:first-child { border-color: #16a34a; box-shadow: 0 0 0 2px rgba(22, 163, 74, .25); }
.tool table.compare td.best .unit { color: #16a34a; font-weight: 700; }
.tool table.compare small.unit { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.tool table.compare th input { font-weight: 700; }
.tool table.compare td:first-child input { min-width: 170px; }
.tool table.compare td:nth-child(2) input { min-width: 0; width: 70px; }
#guide-tool td input { min-width: 0; width: 72px; }
#guide-tool td:nth-child(1) input { width: 96px; }
#guide-tool td:nth-child(2) input { width: 170px; }
#guide-tool td:nth-child(3) input, #guide-tool td:nth-child(4) input { width: 60px; }
#guide-tool td.oq { text-align: center; min-width: 56px; }
