/* Styles for the tool pages: planner.html, session.html, fits.html, checklist.html.
 * Loaded after styles.css and built on its variables. Every class here starts with "tl-". */

/* ---- Links between the tools ---- */
.tl-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.tl-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500; }
.tl-nav a:hover { border-color: var(--accent); background: var(--surface-2); }
.tl-nav a[aria-current="page"] { border-color: var(--accent); background: rgba(99,102,241,.2); color: #fff; }

/* ---- Questions: radio groups drawn as large tap targets ---- */
.tl-form { max-width: 860px; }
.tl-q { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
.tl-q legend { font-size: 1.05rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.tl-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.tl-choices label { margin: 0; position: relative; }
.tl-choices input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tl-choices span { display: block; padding: 10px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 500; font-size: .92rem; min-height: 44px; line-height: 1.5; color: var(--text); }
.tl-choices input:hover + span { border-color: #3d3d52; }
.tl-choices input:checked + span { background: rgba(99,102,241,.22); border-color: var(--accent); color: #fff; }
.tl-choices input:focus-visible + span { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.tl-choices input:disabled + span { opacity: .45; }
.tl-text { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 16px; min-height: 44px; }
.tl-idea { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; margin-top: 14px; }
.tl-idea .tl-text { flex: 1 1 240px; width: auto; }
.tl-sublabel { font-size: .85rem; font-weight: 600; color: #cfcfe0; margin: 14px 0 0; display: block; }
.tl-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 8px 0 0; }
button.btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.tl-form input[type=number], .tl-form select { font-size: 16px; }
/* The tool forms are taller than the calculator form, so they scroll with the page instead of sticking. */
.tl-form.inputs { position: static; max-width: none; }

/* Control edges at 3:1 against the page (WCAG 1.4.11), and a selected state that does not rely on a faint tint.
 * The tokens are used when another stylesheet defines them; the fallbacks are the same values. */
.tl-choices span, .tl-text { border-color: var(--border-ctl, #6a6a84); }
.tl-choices input:hover + span, .tl-text:hover { border-color: #8d8da8; }
.tl-choices input:checked + span { border-color: var(--state-on, #a5b4fc); box-shadow: inset 0 0 0 1px var(--state-on, #a5b4fc); }
.tl-text::placeholder { color: var(--muted); opacity: 1; }
@media (forced-colors: active) {
  .tl-choices input:checked + span, .tl-nav a[aria-current="page"] { outline: 2px solid Highlight; outline-offset: -4px; }
}
/* The copy-status line under a starter message stays in the page while empty, so a screen reader
 * announces its first message. Empty, it takes no space. */
.copied-panel:empty { position: absolute; width: 1px; height: 1px; margin: 0 !important; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Results ---- */
.tl-result { padding-top: 8px; padding-bottom: 24px; }
.tl-plan { max-width: 860px; }
.tl-plan h3 { margin: 26px 0 10px; }
.tl-kicker { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #a5b4fc; font-weight: 600; margin: 0 0 4px; }
.tl-kicker .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.tl-path { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin: 0 0 10px; letter-spacing: -.01em; }
.tl-why { margin: 0 0 18px; color: #d0d0de; }
.tl-cost { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; }
.tl-figure { margin: 0 0 6px; font-size: 1rem; }
.tl-figure strong { font-size: 1.7rem; letter-spacing: -.02em; margin-right: 6px; }
.tl-lines { margin: 8px 0 0; padding-left: 20px; font-size: .92rem; color: #d0d0de; }
.tl-lines li { margin-bottom: 4px; }
.tl-steps { padding-left: 22px; color: #d0d0de; }
.tl-steps li { margin-bottom: 8px; }
.tl-share { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
.tl-share-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tl-share-row .tl-text { flex: 1 1 220px; width: auto; font-family: var(--mono); font-size: .82rem; color: #cfd0ff; }
.tl-fn { font-size: .8rem; color: var(--muted); max-width: 800px; margin-top: 16px; }
.tl-fn.tl-fn-wide { max-width: 1120px; }
.tl-print-only { display: none; }

/* ---- Session cost: what happens afterwards ---- */
.tl-after { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 12px; margin: 12px 0 0; }
.tl-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
.tl-card h4 { margin: 0 0 4px; font-size: .95rem; }
.tl-card p { margin: 0 0 6px; font-size: .88rem; color: #d0d0de; }
.tl-card .tl-big { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.tl-card.tl-good { border-color: rgba(52,211,153,.45); }
.tl-card.tl-watch { border-color: rgba(251,191,36,.45); }
.tl-kv { list-style: none; padding: 0; margin: 0; font-size: .88rem; color: #d0d0de; }
.tl-kv li { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.tl-kv li span:last-child { font-family: var(--mono); color: var(--text); }
.tl-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tl-presets .chip-btn { padding: 8px 14px; }
.tl-timer { background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.45); border-radius: 8px; padding: 12px 14px; margin: 16px 0 0; }
.tl-timer p { margin: 0; }

/* ---- What fits ---- */
.badge.tl-no { color: #fca5a5; border-color: rgba(252,165,165,.4); background: rgba(252,165,165,.08); }
.tl-gb { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.tl-fit-table .badge { white-space: nowrap; }
.tl-fit-table th, .tl-fit-table td { white-space: normal; vertical-align: top; padding: 10px 8px; }
.tl-fit-table thead th span { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .72rem; }
.tl-headline { font-size: 1.1rem; margin: 0 0 16px; }

/* ---- Checklists ---- */
.tl-list { max-width: 800px; padding-top: 8px; }
.tl-list h2 { margin-top: 32px; }
.tl-ticks li { padding-left: 0; }
.tl-ticks li::before { content: none; }
.tl-ticks label { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; font-weight: 400; color: #d0d0de; margin: 0; padding: 8px 0; min-height: 44px; cursor: pointer; }
.tl-ticks input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.tl-ticks input:checked + span { color: var(--muted); }
.tl-status { min-height: 1.5em; }

@media (max-width: 560px) {
  .tl-choices span { padding: 10px 12px; font-size: .9rem; }
  .tl-path { font-size: 1.15rem; }
  .tl-figure strong { display: block; font-size: 1.5rem; }
  .tl-fit-table th, .tl-fit-table td { padding: 8px 4px; font-size: .82rem; }
  .tl-fit-table th:first-child { padding-left: 8px; }
  .tl-fit-table .badge { padding: 2px 6px; font-size: .7rem; }
  .tl-gb { font-size: .72rem; }
}

/* ---- Print: one clean page of the result or the checklist ---- */
@media print {
  :root { color-scheme: light; }
  html, body { background: #fff !important; }
  body, body * { color: #000 !important; background: transparent !important; box-shadow: none !important; }
  body { font-size: 11pt; line-height: 1.4; }
  .follow-bar, .site-header, .skip, .tl-nav, .tl-noprint, .cta, .guide-art, .prompt-actions, .prompt-note, .prompt-badge, .copied-panel,
  .flinks, noscript, form.tl-form, .tl-share, .hero .lead, .crumb, .promptbox { display: none !important; }
  .hero { padding: 0 0 8px !important; }
  .hero::before { display: none !important; }
  .hero h1 { font-size: 18pt; margin: 0 0 6px; }
  .wrap { max-width: none; padding: 0; }
  .panel, .tl-cost, .tl-card, .tl-timer, .notice, .warn-box { border: 1px solid #999 !important; }
  .tl-print-only { display: block; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 9pt; border: 1px solid #999; padding: 8px; margin: 0; }
  a { text-decoration: none; }
  .ref-note, .site-footer, .tl-fn, .hint { font-size: 8pt !important; }
  .site-footer { margin-top: 12px; padding: 8px 0 0; border-top: 1px solid #999; }
  .tl-list h2 { font-size: 14pt; margin: 14px 0 6px; }
  .tl-list section { break-inside: avoid; }
  .tl-list section:not([hidden]) ~ section:not([hidden]) { break-before: page; }
  .tl-list section[hidden] { display: none !important; }
  .checklist li { break-inside: avoid; margin-bottom: 4px; }
  .checklist li::before { content: "\2610"; }
  .tl-ticks li::before { content: none; }
  .tl-ticks label { min-height: 0; padding: 3px 0; font-size: 11pt; }
  .tl-ticks input { width: 14px; height: 14px; }
  .badge { border: 1px solid #999 !important; }
}
