/* tools.css — standalone interactive tool pages on phdjourneysimplified.com.
 *
 * These pages live in public/ and are served by Cloudflare Pages as plain static
 * files at /tools/<slug> — they are deliberately OUTSIDE the React SPA. That is
 * the point: a calculator should render instantly with no framework boot, and
 * stay indexable without depending on the prerender step.
 *
 * So this file must be self-sufficient. It does NOT load Tailwind (the CDN build
 * used by index.html is ~300KB of blocking JS that would buy these pages
 * nothing). Instead the tokens below mirror the `brand` / `accent` palette from
 * index.html's tailwind.config so a tool page and a React page read as one site.
 *
 * Class contract: the tool bodies ported from the static-tool set expect
 * .site/.wrap/.brand, .breadcrumbs, h1.title, .sub, .hr, .card (+ .inside, .faq),
 * .feature-list, .btn (+ .secondary), .bottom-nav, .meta, .hint, and the
 * .site-footer-* trio. Each tool then layers its own prefixed classes on top via
 * an inline <style> block, so keep these generic.
 */

:root {
  --ink: #0f172a;
  --muted: #64748b;
  --muted-2: #475569;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-900: #1e3a8a;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

/* ---------- Header (mirrors the React <Navbar>: white, blurred, sticky) ---- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
header.site .brand a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  text-decoration: none;
}
header.site .brand svg { color: var(--brand-700); flex: none; }
header.site nav { display: flex; align-items: center; flex-wrap: wrap; }
header.site nav a {
  color: var(--muted-2);
  text-decoration: none;
  font-weight: 500;
  margin-left: 1.4rem;
}
header.site nav a:hover { color: var(--brand-700); }
@media (max-width: 640px) {
  header.site .brand a { font-size: .95rem; }
  header.site nav a { margin-left: .9rem; font-size: .9rem; }
}

/* ---------- Layout ------------------------------------------------------- */

main { max-width: 820px; margin: 0 auto; padding: 1.75rem 1rem 3rem; }

.breadcrumbs { font-size: .875rem; color: var(--muted); margin: 0 0 1rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand-700); text-decoration: underline; }

h1.title, .title {
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 800;
  margin: 0 0 .6rem;
}
.sub { color: var(--muted-2); font-size: 1.05rem; margin: 0 0 .25rem; }
.hint { color: var(--muted); font-size: .875rem; }
.meta { display: flex; gap: .4rem; flex-wrap: wrap; margin: .15rem 0 .1rem; }
.hr { height: 1px; background: var(--line); margin: 1.75rem 0; border: 0; }

/* ---------- Cards -------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}
@media (max-width: 560px) { .card { padding: 1.1rem; } }

.card h2 { font-size: 1.35rem; letter-spacing: -.01em; margin: 0 0 .7rem; }
.card h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.card.inside p { color: var(--muted-2); }

.feature-list { padding-left: 1.15rem; margin: .6rem 0; color: var(--muted-2); }
.feature-list li { margin: .35rem 0; }

/* ---------- Buttons ------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: .68rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--brand-700);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--brand-900); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn.secondary:hover { background: var(--bg); border-color: #cbd5e1; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.bottom-nav { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.75rem; }

/* ---------- FAQ ---------------------------------------------------------- */

.card.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem 1rem;
  background: #fff;
}
.card.faq details + details { margin-top: .6rem; }
.card.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.card.faq summary::-webkit-details-marker { display: none; }
.card.faq summary::after {
  content: "+";
  color: var(--brand-700);
  font-size: 1.25rem;
  line-height: 1;
  flex: none;
}
.card.faq details[open] summary::after { content: "\2212"; }
.card.faq details[open] { background: var(--brand-50); border-color: var(--brand-200); }
.card.faq p { margin: .6rem 0 0; color: var(--muted-2); }

/* ---------- Lead-magnet block ------------------------------------------- */

.magnet-msg:empty { display: none; }

/* ---------- Footer (mirrors the React <Footer>: slate-900) --------------- */

footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 2.5rem;
  padding: 2rem 1rem;
}
.site-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer-copy { font-size: .9rem; color: #94a3b8; }
.site-footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-footer-links a { color: #cbd5e1; text-decoration: none; font-size: .9rem; }
.site-footer-links a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 640px) {
  .site-footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Companion workbook -------------------------------------------
 * A commercial block, so it is deliberately quieter than the page's own
 * calls to action: no fill, a single accent edge, and it sits at the end of
 * the reading flow rather than interrupting it.
 */

.companion-book {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-600);
  border-radius: var(--radius);
  background: #fff;
  padding: 1.15rem 1.35rem;
  margin: 2rem 0 0;
}
.companion-label {
  margin: 0 0 .3rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-700);
}
.companion-book h2 { font-size: 1.1rem; margin: 0 0 .35rem; }
.companion-value { margin: 0 0 1rem; color: var(--muted-2); font-size: .95rem; }
