:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --green: #059669;
  --amber: #d97706;
  --blue: #2563eb;
  --gray: #6b7280;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 26px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 17px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 14px; }
.footer-links a { color: var(--muted); }

/* hero */
.hero { text-align: center; padding: 40px 0 8px; }
.hero h1 { font-size: 34px; margin: 0 0 10px; }
.lead { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 auto; }

/* tabs */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 18px; }
.tab {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s ease;
}
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* panels */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 28px; }
.panel h2 { margin: 0 0 6px; }
.tool-desc { color: var(--muted); margin: 0 0 18px; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.toolbar .ctl, .toolbar label.ctl { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.ctl select, input[type="text"], input[type="number"], select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
}
input[type="text"]:focus, input[type="number"]:focus, select:focus { outline: 2px solid #c7d2fe; border-color: var(--brand); }
.grow { flex: 1; min-width: 120px; }
.chk { display: flex; align-items: center; gap: 5px; font-size: 14px; white-space: nowrap; }

.btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 6px 11px; font-size: 13px; }
.btn-share { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-share:hover { background: var(--brand-dark); color: #fff; }
.btn-ko-fi { background: #c2410c; border-color: #c2410c; color: #fff; }  /* contrast fix 2026-11-09 */
.btn-ko-fi:hover { background: #e14c49; color: #fff; }
.btn-paypal { background: #003087; border-color: #003087; color: #fff; }
.btn-paypal:hover { background: #022f7e; color: #fff; }

/* ---- Round 5: pressed / clicked feedback — every control visibly reacts ---- */
/* :active covers the press itself (mouse + keyboard + most touch browsers). */
.btn:active,
.tab:active,
.preset-chip:active,
.step-btn:active,
.crit-x:active, .opt-x:active, .chip-x:active, .card-x:active,
.focus-x:active, .focus-done:active, .modal-x:active {
  transform: translateY(1px) scale(0.97);
}
.btn:active { background: #eef2ff; border-color: var(--brand); color: var(--brand); }
.btn-share:active { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-ko-fi:active { background: #e14c49; border-color: #e14c49; color: #fff; }
.btn-paypal:active { background: #022f7e; border-color: #022f7e; color: #fff; }
.tab:active { background: var(--brand); border-color: var(--brand); color: #fff; }
.preset-chip:active, .step-btn:active { background: #eef2ff; border-color: var(--brand); color: var(--brand); }
.crit-x:active, .opt-x:active, .chip-x:active, .card-x:active,
.focus-x:active, .focus-done:active, .modal-x:active { background: #fecaca; color: #dc2626; }

/* .clicked is added by app.js on every click (event delegation) so the flash
   also fires on touch where :active can be unreliable, then clears ~300ms later. */
@keyframes click-flash {
  0%   { filter: brightness(1.35) saturate(1.12); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3); }
  100% { filter: brightness(1); box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}
.clicked { animation: click-flash 320ms ease-out; }

/* decision matrix */
.mx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 760px) { .mx-grid { grid-template-columns: 1fr; } }
.mx-grid h3 { font-size: 15px; margin: 0 0 10px; color: var(--muted); }
.crit-row, .opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.crit-row .crit-name, .opt-row .opt-name { flex: 1; min-width: 0; }
.crit-weight { width: 70px; }
.opt-scores { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.opt-score { width: 58px; }

/* Steppers — [−] range [+] value badge, so scores/weights never need typing. */
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.step-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  width: 26px; height: 30px; border-radius: 7px; cursor: pointer;
  font-size: 16px; line-height: 1; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.12s ease; flex: none;
}
.step-btn:hover { border-color: var(--brand); color: var(--brand); }
.step-val {
  min-width: 22px; text-align: center; font-weight: 700; font-size: 13px;
  color: var(--ink); background: #f3f4f6; border-radius: 6px; padding: 4px 3px;
}
input[type="range"].opt-score, input[type="range"].crit-weight {
  width: 74px; height: 22px; margin: 0; cursor: pointer;
  accent-color: var(--brand); background: transparent;
}
input[type="range"].opt-score:focus-visible, input[type="range"].crit-weight:focus-visible {
  outline: 2px solid #c7d2fe;
}

/* Quick-add presets — tap a chip instead of typing a name. */
.mx-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.preset-chip {
  border: 1px solid var(--line); background: #f9fafb; color: var(--ink);
  border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.12s ease;
}
.preset-chip:hover { border-color: var(--brand); color: var(--brand); }
.preset-chip.selected { background: var(--brand); border-color: var(--brand); color: #fff; }
.crit-x, .opt-x, .chip-x, .card-x, .focus-x, .focus-done, .modal-x {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.crit-x:hover, .opt-x:hover, .chip-x:hover, .card-x:hover, .focus-x:hover, .modal-x:hover { background: #fee2e2; color: #dc2626; }

.result-card { border-top: 1px solid var(--line); padding-top: 14px; }
.recommendation { background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.mx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mx-table th, .mx-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.mx-table th { background: #f9fafb; font-size: 13px; color: var(--muted); }

/* eisenhower */
.quad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .quad-grid { grid-template-columns: 1fr; } }
.quadrant { border: 1px solid var(--line); border-top: 4px solid var(--gray); border-radius: 12px; padding: 14px; min-height: 150px; }
.quadrant h3 { margin: 0 0 2px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.count { background: #f3f4f6; border-radius: 999px; padding: 1px 9px; font-size: 12px; color: var(--muted); }
.quad-blurb { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.quad-list { display: flex; flex-direction: column; gap: 8px; }
.task-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px;
}
.chip-title { flex: 1; }

/* kanban */
.kan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .kan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .kan-grid { grid-template-columns: 1fr; } }
.kan-col { background: #f9fafb; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; max-height: 470px; }
.kan-col h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex: none; }
.kan-list { min-height: 80px; flex: 1; overflow-y: auto; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; padding: 4px; transition: background 0.15s ease; }
.kan-list.over { background: #eef2ff; outline: 2px dashed #c7d2fe; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px;
  cursor: grab; display: flex; align-items: center; gap: 8px; font-size: 14px; box-shadow: var(--shadow);
}
.card.dragging { opacity: 0.5; }
.card-title { flex: 1; }
.pill { border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.pill-1 { background: #dc2626; }
.pill-2 { background: var(--amber); }
.pill-3 { background: #2563eb; }
.pill-4 { background: var(--gray); }

/* morning */
.morning-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.streak-badge { background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.date-label { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; font-weight: 400; }
.cand-list, .focus-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.cand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.tag { background: #eef2ff; color: var(--brand); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.focus-slot { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.focus-slot .n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.focus-title { flex: 1; }
.focus-slot.done { background: #f0fdf4; border-color: #bbf7d0; }
.focus-slot.done .focus-title { text-decoration: line-through; color: var(--muted); }
.focus-slot.done .n { background: var(--green); }
.complete-banner { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; border-radius: 10px; padding: 14px 16px; font-weight: 600; }

/* faq */
.faq { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; margin: 0 0 28px; }
.faq h2 { margin: 0 0 14px; font-size: 22px; }
.faq-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: 1fr; } }
.faq-grid h3 { margin: 0 0 4px; font-size: 16px; }
.faq-grid p { margin: 0; color: var(--muted); font-size: 14px; }

/* footer */
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding: 26px 0 30px; margin-top: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid .footer-links { flex-direction: column; gap: 6px; }
.footer-donate { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.fineprint { color: var(--muted); font-size: 13px; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.modal-card { background: #fff; border-radius: 14px; max-width: 640px; width: 100%; max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.2); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-x { font-size: 20px; }
#print-text { margin: 0; padding: 18px; overflow: auto; background: #f9fafb; font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.modal-actions { display: flex; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); justify-content: flex-end; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 60;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}


/* Hub rail — internal links across the tool network */
.hub { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; justify-content: center; }
.hub a {
  color: inherit; opacity: 0.92; text-decoration: none; font-size: 0.9em;
  font-size: 0.8em; padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px;
}
.hub a:hover { opacity: 1; }

/* Mobile-native (Design Principles.md #1): 44px touch targets on coarse
   pointers — steppers (26x30) and small icon buttons fall below the Apple/Google
   minimum; enlarge hit area on touch devices without changing desktop layout. */
@media (pointer: coarse) {
  .step-btn { width: 44px; height: 44px; font-size: 19px; }
  .tab { padding: 12px 18px; }
  .preset-chip, .chip-x, .crit-x, .opt-x, .card-x { min-height: 44px; min-width: 44px; }
}

/* >>> theme-by-name (2026-11-02) >>> */
/* Theme derived from the site's MEANING, not a random variant.
 * Planning = structure and order. Slate with one decisive accent reads as a plan, not a mood.
 * Ad layout is deliberately NOT set here — container width and rail geometry are
 * measured and verified separately by check-ad-layout.mjs.
 */
:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --ink: #2b3648;
  --muted: #5b6675;
  --line: #dde2e9;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --accent: #2563eb;
  --radius: 8px;
  --font-sans: 'Inter', 'Segoe UI', system-ui, sans-serif;
}
body { font-family: var(--font-sans); background: var(--bg); color: var(--ink); }
h1, h2, h3 { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.015em; }
.card, .panel, section[class*="card"] { border-radius: var(--radius); }
/* <<< theme-by-name <<< */

/* Privacy architecture section (2026-11-08) — the selling point of every site. */
.privacy-section{margin-top:34px;padding-top:24px;border-top:2px solid #e2e8f0}
.privacy-section h2{font-size:1.35em;margin-bottom:10px}
.privacy-section h3{font-size:1.05em;margin:20px 0 8px}
.privacy-steps{margin:10px 0 14px;padding-left:22px}
.privacy-steps li{margin-bottom:8px;line-height:1.6}
.privacy-section kbd{background:#f1f5f9;border:1px solid #cbd5e1;border-bottom-width:2px;
  border-radius:4px;padding:1px 5px;font-size:.85em;font-family:ui-monospace,Menlo,monospace}
