:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5a6475;
  --line: #e2e6ec;
  --accent: #1f6feb;
  --accent-soft: #e8f0fe;
  --ok: #137333;
  --radius: 10px;
  --max: 920px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #11151c; --surface: #181e27; --text: #e6e9ef; --muted: #9aa4b2; --line: #2a323e; --accent: #5b9bff; --accent-soft: #1b2a42; --ok: #5bd17a; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
nav.top a { margin-left: 14px; font-size: 14px; text-decoration: none; }
.crumbs { font-size: 13px; color: var(--muted); margin: 16px 0 4px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 28px; line-height: 1.25; margin: 8px 0 12px; }
h2 { font-size: 21px; margin: 32px 0 10px; }
.lead { color: var(--muted); margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.answer { background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; font-size: 18px; }
.answer strong { font-size: 24px; }
label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input, select { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
button { font: inherit; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 10px 16px; cursor: pointer; }
button.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.result { margin-top: 16px; font-size: 18px; }
.result b { color: var(--ok); }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 15px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--bg); font-weight: 600; }
.scroll { overflow-x: auto; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--text); }
.tile span { display: block; color: var(--muted); font-size: 14px; }
.pills a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; background: var(--surface); }
.ad-slot { min-height: 250px; margin: 40px 0; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 12px; }
.note { font-size: 14px; color: var(--muted); }
footer.site { margin-top: 48px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer.site a { color: var(--muted); margin-right: 14px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 520px) {
  #timecard th, #timecard td { padding: 6px 4px; font-size: 14px; }
  #timecard input { padding: 6px 4px; font-size: 14px; min-width: 0; }
  #timecard input[type=number] { width: 56px; }
  h1 { font-size: 24px; }
}
@media print {
  header.site, footer.site, .ad-slot, .no-print, .crumbs { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border: 0; padding: 0; }
}
