/* RA Ledger Solutions: Free Tools page.
   Loads after /style.css and only adds what the tools need. */

:root { --ease: cubic-bezier(.2, .7, .2, 1); }
[hidden] { display: none !important; }
/* Keep focused fields and jump targets clear of the sticky header */
html { scroll-padding-top: 96px; }

.print-meta { display: none; }
.noscript-note { margin: 24px auto 0; max-width: 780px; padding: 14px 18px; border-left: 4px solid var(--gold); background: #fdf8ef; border-radius: 6px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[tabindex="-1"]:focus { outline: none; }
.t-btn:focus-visible, .answer:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Buttons ---------- */
.t-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 1.02rem; font-weight: 700; line-height: 1.2;
  padding: 14px 30px; border-radius: 6px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.t-btn-primary { background: var(--gold); color: var(--navy-dark); border-color: var(--gold); }
.t-btn-primary:hover { background: #dcae57; border-color: #dcae57; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(11, 32, 56, .16); }
.t-btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.t-btn-secondary:hover { background: var(--navy); color: #fff; transform: translateY(-1px); }
.t-btn-on-navy { background: transparent; color: #fff; border-color: #fff; }
.t-btn-on-navy:hover { background: #fff; color: var(--navy); transform: translateY(-1px); }
.link-btn {
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--navy-light);
  text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--navy); }

/* ---------- Hero ---------- */
.tools-hero .eyebrow { color: var(--gold); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; margin-bottom: .75em; }
.tools-hero .hero-local { color: #fff; font-weight: 600; margin-bottom: 26px; text-wrap: balance; }
@media (min-width: 560px) {
  .tools-hero .hero-local { display: inline-flex; align-items: center; gap: 12px; }
  .tools-hero .hero-local::before, .tools-hero .hero-local::after { content: ""; width: 24px; height: 2px; background: var(--gold); }
}
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Sections ---------- */
.tool-section { scroll-margin-top: 80px; }
.kicker { color: var(--gold-text); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .82rem; margin-bottom: .4em; }
.disclaimer { color: var(--muted); font-size: .92rem; margin: 18px auto 0; max-width: 780px; }
.disclaimer p { color: var(--muted); margin: 0 0 .5em; }
.disclaimer strong { color: var(--ink); }

/* ---------- Books Checkup ---------- */
.checkup-card { max-width: 780px; margin: 0 auto; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); transform: translateY(-1px); }

.quiz-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); display: block; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 6; }
.ring-fill {
  fill: none; stroke: var(--gold); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 169.65; stroke-dashoffset: 169.65;
  transition: stroke-dashoffset .5s var(--ease);
}
.ring-text { position: absolute; inset: 0; display: grid; place-items: center; font-family: "Poppins", "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: .8rem; color: var(--navy); }
.quiz-count { margin: 0; color: var(--muted); font-weight: 600; }

.question { transition: opacity .22s ease, transform .22s ease; }
.question.is-leaving { opacity: 0; transform: translateY(6px); }
.question h3 { font-size: clamp(1.2rem, 4vw, 1.45rem); margin-bottom: .4em; }
.q-help { color: var(--muted); }
.answers { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 20px 0 14px; }
.answer {
  font: inherit; font-weight: 600; font-size: 1.05rem; color: var(--navy);
  background: #fff; border: 2px solid var(--line); border-radius: 8px;
  padding: 14px 18px; text-align: left; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.answer:hover { border-color: var(--gold); background: #fdf8ef; }
.answer[aria-pressed="true"] { border-color: var(--gold); background: #fbf1df; }
.q-friendly { color: var(--gold-text); font-style: italic; margin-bottom: 0; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); }

.report-head { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 20px; }
.report-head h3 { font-size: clamp(1.45rem, 5vw, 1.8rem); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.level-badge { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px #fbf1df; }
.report-summary { font-size: 1.1rem; margin: 0; }
.report-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.report-grid h4 { font-size: 1.05rem; }
.list-good, .list-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.list-good li { position: relative; padding-left: 30px; }
.list-good li::before {
  content: ""; position: absolute; left: 2px; top: .3em; width: 16px; height: 9px;
  border-left: 3px solid var(--gold-dark); border-bottom: 3px solid var(--gold-dark); transform: rotate(-45deg);
}
.list-steps { counter-reset: step; }
.list-steps li { counter-increment: step; position: relative; padding-left: 40px; }
.list-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif; font-weight: 600; font-size: .85rem; display: grid; place-items: center;
}

.answers-review { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 14px; }
.answers-review summary { cursor: pointer; font-weight: 600; color: var(--navy-light); text-decoration: underline; text-underline-offset: 3px; width: fit-content; }
.answers-review summary:hover { color: var(--navy); }
.answers-review ol { margin: 12px 0 0; padding-left: 1.4em; display: grid; gap: 8px; font-size: .98rem; }
.review-answer { display: inline-block; margin-left: 4px; padding: 0 9px; border-radius: 999px; background: #fbf1df; color: var(--gold-text); font-weight: 700; font-size: .86rem; white-space: nowrap; }

.copy-status { margin: 10px 0 0; font-size: .95rem; color: var(--ink); }
.copy-status:empty { display: none; }
.copy-buffer { position: fixed; top: 0; left: -9999px; opacity: 0; }

.cta-box { margin-top: 28px; padding: 20px; background: var(--bg-soft); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; }
.cta-box p { font-weight: 600; color: var(--navy); margin-bottom: 14px; }
.cta-box p.cta-creds { margin: 12px 0 0; font-weight: 400; font-size: .92rem; color: var(--muted); }
.cta-box p.cta-creds strong { color: var(--navy); font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }

/* ---------- Runway Check ---------- */
.runway-card { display: grid; grid-template-columns: 1fr; gap: 28px; }
.runway-form { display: grid; gap: 18px; align-content: start; }
.field label { display: block; font-weight: 600; color: var(--navy); font-size: 1.05rem; }
.hint { color: var(--muted); font-size: .95rem; margin: 2px 0 8px; }
.money { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 8px; background: #fff; transition: border-color .15s; }
.money:focus-within { border-color: var(--gold); }
.money span { padding-left: 14px; color: var(--muted); font-weight: 600; }
.money input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 12px 14px 12px 6px; font: inherit; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.money input:focus { outline: none; }
.money input::placeholder { color: #687684; opacity: 1; } /* 4.6:1 on white */
.runway-form .link-btn { justify-self: start; }

.runway-result { border-top: 1px solid var(--line); padding-top: 24px; }
.rw-title { margin-bottom: 14px; }
.rw-empty p { color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.stat { display: grid; gap: 2px; }
.stat-label { color: var(--muted); font-weight: 600; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-family: "Poppins", "Segoe UI", Arial, sans-serif; font-weight: 700; color: var(--navy); font-size: clamp(1.5rem, 6vw, 2rem); font-variant-numeric: tabular-nums; line-height: 1.2; }
.gauge { margin-bottom: 20px; }
.gauge-bar { position: relative; height: 18px; border-radius: 999px; background: var(--line); overflow: hidden; }
.gauge-fill { position: relative; z-index: 1; display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 999px; transition: width .6s var(--ease); }
/* Striped "ghost" shows how far the what-if would stretch the runway */
.gauge-whatif {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px;
  background: repeating-linear-gradient(135deg, rgba(201, 151, 63, .5) 0 6px, rgba(201, 151, 63, .22) 6px 12px);
  transition: width .4s var(--ease);
}

.whatif { margin: 4px 0 6px; padding: 16px 18px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; }
.whatif-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.whatif label { font-weight: 600; color: var(--navy); }
.whatif output { font-family: "Poppins", "Segoe UI", Arial, sans-serif; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.whatif input[type="range"] { width: 100%; margin: 12px 0 8px; accent-color: var(--gold-dark); cursor: pointer; }
.whatif-text { margin: 0; color: var(--ink); }
.whatif.is-idle .whatif-text { color: var(--muted); }

/* ---------- Good to know ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0 20px; }
.faq summary { position: relative; cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 600; font-size: 1.05rem; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--gold-dark); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 16px; }
.review-note { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); text-align: center; }
.review-note p { margin-bottom: 14px; }
/* Scale labels sit exactly under 0, 3, 6, 9 and 12 months */
.gauge-scale { position: relative; height: 1.5em; color: var(--muted); font-size: .85rem; margin-top: 6px; }
.gauge-scale span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.gauge-scale span:nth-child(1) { left: 0; transform: none; }
.gauge-scale span:nth-child(2) { left: 25%; }
.gauge-scale span:nth-child(3) { left: 50%; }
.gauge-scale span:nth-child(4) { left: 75%; }
.gauge-scale span:nth-child(5) { left: auto; right: 0; transform: none; }
.gauge-scale .scale-unit { position: static; transform: none; }
@media (max-width: 479px) { .gauge-scale .scale-unit { display: none; } }
.takeaway { font-size: 1.15rem; color: var(--navy); font-weight: 600; }
.tip strong { color: var(--gold-text); }

/* ---------- Footer note ---------- */
footer.site-footer .foot-note { max-width: 760px; margin: 14px auto 0; font-size: .82rem; color: #cfe0ee; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  /* Three answers, or four when "Doesn't apply" is offered, always share one row */
  .answers { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .answer { text-align: center; padding-left: 10px; padding-right: 10px; }
}
@media (min-width: 860px) {
  .report-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .runway-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; }
  .runway-result { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 40px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .t-btn, .ring-fill, .question, .gauge-fill, .gauge-whatif, .answer { transition: none !important; }
  .t-btn:hover { transform: none; }
}

/* ---------- Print ---------- */
@media print {
  @page { margin: 16mm; }
  body { font-size: 10.5pt; color: #000; }
  .print-meta { display: block; font-size: 8.5pt; color: #333; border-bottom: 1px solid #ccc; padding-bottom: 5pt; margin: 0 0 10pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .site-header, .tools-hero, .skip-link, .t-btn, .link-btn, .quiz-nav, .foot-links, .menu-toggle, noscript { display: none !important; }
  .tool-section { break-inside: auto; }
  .report-grid > div, .cta-box, .disclaimer, .stats, .gauge { break-inside: avoid; }
  section, section.soft { padding: 0 0 12pt !important; background: none !important; }
  .section-head { margin-bottom: 10pt; }
  .card { border: 1px solid #bbb; padding: 14pt; }
  body.print-checkup #runway, body.print-runway #checkup { display: none !important; }
  .runway-card, .report-grid { grid-template-columns: 1fr 1fr; }
  .runway-result { border-left: 1px solid #ccc; border-top: 0; padding: 0 0 0 14pt; }
  .gauge-bar, .gauge-fill, .gauge-whatif, .list-steps li::before, .level-badge, .review-answer { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  /* Answers list always prints, compact and in two columns */
  .answers-review { margin-top: 10pt; padding-top: 8pt; }
  .answers-review summary { display: none; }
  .answers-review::details-content { content-visibility: visible; display: block; }
  .answers-review ol { display: block; columns: 2; column-gap: 18pt; font-size: 8.5pt; margin: 0; }
  .answers-review li { break-inside: avoid; margin-bottom: 3pt; }
  .review-answer { font-size: 8pt; padding: 0 5pt; }
  .whatif input, .whatif.is-idle, .copy-status, .review-note, .cta-creds { display: none !important; }
  .whatif { background: none; border: 1px solid #ccc; padding: 6pt 8pt; margin: 0 0 6pt; }
  .whatif-top { display: none; }
  body.print-checkup #good-to-know, body.print-runway #good-to-know { display: none !important; }
  .cta-box { border: 1px solid #ccc; background: none; }
  .cta-box p::after { content: " calendar.app.google/5dUvX5a5fVK2CixQ8"; font-weight: 400; }
  /* Compact so each result and its disclaimer fit on one page */
  body { line-height: 1.45; }
  .section-head { margin-bottom: 8pt; }
  .section-head h2 { font-size: 18pt; margin-bottom: 0; }
  .section-head > p:last-child { display: none; }
  .card { padding: 12pt 14pt; }
  .report-head { padding-bottom: 8pt; margin-bottom: 10pt; }
  .report-head h3 { font-size: 16pt; }
  .report-summary { font-size: 11pt; }
  .report-grid { gap: 14pt; }
  .list-good, .list-steps { gap: 6pt; }
  .cta-box { margin-top: 10pt; padding: 8pt 10pt; }
  .cta-box p { margin: 0; }
  .runway-form { gap: 8pt; }
  .hint { font-size: 9pt; margin: 0 0 3pt; }
  .money input { font-size: 11pt; padding: 5pt 8pt 5pt 4pt; }
  .stats { margin-bottom: 10pt; }
  .stat-value { font-size: 18pt; }
  .gauge { margin-bottom: 10pt; }
  .gauge-scale { font-size: 8pt; }
  .takeaway { font-size: 11.5pt; }
  .disclaimer { margin-top: 10pt; font-size: 9pt; }
  footer.site-footer { background: none; color: #000; border-top: 1px solid #ccc; padding: 8pt 0 0; font-size: 8.5pt; break-inside: avoid; }
  /* The top line of each printout carries the business name, DBA and phone, so the footer stays on screen */
  footer.site-footer { display: none !important; }
  footer.site-footer a { color: #000; }
}
