/* Calculators: Flow Revenue Gap and Launch Math (Oct 2026). Site tokens only, so light and dark both work.
   Every rule is scoped to .tk-calc so it beats the generic .box p sizes in app.css. */
.tk-calc .tkc-box { display: grid; gap: 8px; }
.tk-calc .tkc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(18px, 3vw, 36px); align-items: start; }
.tk-calc .tkc-in { display: grid; gap: 18px; min-width: 0; }
.tk-calc .tkc-ex { margin: 0; font-size: 15px; color: var(--fg-soft); }
.tk-calc .tkc-set { margin: 0; padding: 0; border: 0; display: grid; gap: 14px; min-width: 0; }
.tk-calc .tkc-set > legend { padding: 0; margin-bottom: 12px; font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-soft); }
.tk-calc .tkc-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tk-calc .tkc-two[hidden], .tk-calc [data-mode][hidden] { display: none; }
.tk-calc .tkc-f { display: grid; gap: 6px; align-content: start; min-width: 0; }
.tk-calc .tkc-f.is-off { opacity: .5; }
.tk-calc .tk-field { font-size: 16px; line-height: 1.3; }
.tk-calc .tkc-hint { display: block; margin: 0; font-size: 14px; line-height: 1.45; color: var(--fg-soft); }
.tk-calc .tkc-hint .tk-chip { margin-top: 4px; vertical-align: middle; }

/* inputs with a $ or % */
.tk-calc .tkc-aff { position: relative; }
.tk-calc .tkc-aff > span { position: absolute; top: 50%; transform: translateY(-50%); color: var(--fg-soft); font-size: 17px; pointer-events: none; }
.tk-calc .tkc-aff--pre > span { left: 16px; }
.tk-calc .tkc-aff--pre .input { padding-left: 34px; }
.tk-calc .tkc-aff--post > span { right: 16px; }
.tk-calc .tkc-aff--post .input { padding-right: 46px; }
.tk-calc .tkc-aff .input { background: var(--bg); font-variant-numeric: tabular-nums; }
.tk-calc .tkc-aff .input:disabled { cursor: not-allowed; }
.tk-calc .tkc-aff--sm .input { min-height: 44px; font-size: 16px; }
.tk-calc .tkc-aff--sm > span { font-size: 14px; }

/* segmented pills and flow toggles: orange marks the selected state */
.tk-calc .tkc-seg { margin: 0; padding: 4px; border: 0; display: inline-flex; flex-wrap: wrap; gap: 4px; border-radius: 999px; background: var(--bg); justify-self: start; max-width: 100%; }
.tk-calc .tkc-pill, .tk-calc .tkc-tog { position: relative; cursor: pointer; }
.tk-calc .tkc-pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--fg); transition: background .2s var(--ease), color .2s var(--ease); }
.tk-calc .tkc-pill:hover span { background: color-mix(in srgb, var(--fg) 8%, transparent); }
.tk-calc .tkc-pill input:checked + span { background: var(--orange); color: #fff; }
.tk-calc .tkc-pill input:focus-visible + span, .tk-calc .tkc-tog input:focus-visible + span, .tk-calc .tkc-check input:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.tk-calc .tkc-togs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tk-calc .tkc-tog span { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px; border-radius: 14px; background: var(--bg); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fg) 10%, transparent); font-size: 15px; font-weight: 500; line-height: 1.25; transition: background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease); }
.tk-calc .tkc-tog span::before { content: ""; width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fg) 35%, transparent); }
.tk-calc .tkc-tog:hover span { box-shadow: inset 0 0 0 2px var(--fg); }
.tk-calc .tkc-tog input:checked + span { background: var(--orange); color: #fff; box-shadow: none; }
.tk-calc .tkc-tog input:checked + span::before { box-shadow: none; background: #fff no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.8 9 10 3' fill='none' stroke='%23c8430f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.tk-calc .tkc-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.tk-calc .tkc-check input { width: 22px; height: 22px; accent-color: var(--orange); flex-shrink: 0; margin: 0; }

/* assumptions */
.tk-calc .tkc-assume { border-radius: 16px; background: var(--bg); padding: 0 16px; }
.tk-calc .tkc-assume > summary { display: flex; align-items: center; min-height: 52px; font-weight: 500; cursor: pointer; list-style: none; }
.tk-calc .tkc-assume > summary::-webkit-details-marker { display: none; }
.tk-calc .tkc-assume > summary::after { content: "+"; margin-left: auto; font-size: 22px; font-weight: 300; }
.tk-calc .tkc-assume[open] > summary::after { content: "−"; }
.tk-calc .tkc-assume[open] { padding-bottom: 16px; display: grid; gap: 14px; }
.tk-calc .tkc-assume .tkc-aff .input { background: var(--tile); }
.tk-calc .tkc-wnote b { color: var(--fg); font-weight: 500; }
.tk-calc .tkc-wts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.tk-calc .tkc-wt { display: grid; grid-template-columns: minmax(0, 1fr) 6.4em; align-items: center; gap: 8px; font-size: 15px; }

/* result panel */
.tk-calc .tkc-out { min-width: 0; padding: clamp(18px, 2.4vw, 28px); border-radius: 18px; background: var(--bg); display: grid; gap: 14px; position: sticky; top: 92px; }
.tk-calc .tkc-out .tk-k { margin: 0; }
.tk-calc .tkc-big { font-size: clamp(56px, 7vw, 104px); overflow-wrap: anywhere; }
.tk-calc .tkc-out .tk-band { margin: 0; }
.tk-calc .tkc-sub { margin: 0; color: var(--fg-soft); font-size: 15px; line-height: 1.5; }
.tk-calc .tkc-sub:empty { display: none; }
.tk-calc .tkc-bars, .tk-calc .tkc-funnel { display: grid; gap: 10px; }
.tk-calc .tkc-bar { display: grid; grid-template-columns: minmax(0, 1fr) 3.6em; gap: 4px 10px; align-items: center; font-size: 15px; }
.tk-calc .tkc-bar__l { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tk-calc .tkc-bar__t, .tk-calc .tkc-fr__t { display: block; height: 12px; border-radius: 12px; background: color-mix(in srgb, var(--fg) 10%, transparent); overflow: hidden; }
.tk-calc .tkc-bar__t i, .tk-calc .tkc-fr__t i { display: block; height: 100%; border-radius: 12px; background: var(--fg); transition: width .5s var(--ease); }
.tk-calc .tkc-bar b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.tk-calc .tkc-bar.is-after i { background: var(--orange); }
.tk-calc .tkc-bar.is-bench i { background: transparent; box-shadow: inset 0 0 0 2px var(--fg); }
.tk-calc .tkc-fr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; font-size: 15px; }
.tk-calc .tkc-fr b { font-weight: 500; font-variant-numeric: tabular-nums; }
.tk-calc .tkc-fr__t { grid-column: 1 / -1; height: 22px; border-radius: 8px; background: none; display: flex; justify-content: center; }
.tk-calc .tkc-fr__t i { border-radius: 8px; min-width: 6px; }
.tk-calc .tkc-fr.is-side { color: var(--fg-soft); }
.tk-calc .tkc-fr.is-side .tkc-fr__t i { background: color-mix(in srgb, var(--fg) 35%, transparent); }
.tk-calc .tkc-fr.is-buy .tkc-fr__t i { background: var(--orange); }
.tk-calc .tkc-lever { display: grid; gap: 10px; padding: 16px; border-radius: 14px; background: var(--tile); }
.tk-calc .tkc-lever__s { margin: 0; font-size: 16px; line-height: 1.5; }
.tk-calc .tkc-lever__s .tlink { display: inline-flex; align-items: center; min-height: 44px; }
.tk-calc .tkc-lv { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.tk-calc .tkc-lv li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 15px; padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); }
.tk-calc .tkc-lv li > span { flex: 1 1 auto; }
.tk-calc .tkc-lv b { font-weight: 500; font-variant-numeric: tabular-nums; }
.tk-calc .tkc-lv li.is-best b { color: var(--orange); }
.tk-calc .tkc-lv__a { flex-basis: 100%; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.tk-calc .tkc-math { display: grid; gap: 8px; }
.tk-calc .tkc-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: 15px; line-height: 1.5; color: var(--fg-soft); }
.tk-calc .tkc-steps li::marker { color: var(--fg); font-weight: 500; }
.tk-calc .tkc-formula { margin: 0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 10px 12px; border-radius: 10px; background: var(--tile); overflow-wrap: anywhere; }
.tk-calc .tkc-formula:empty { display: none; }
.tk-calc .tkc-bench { margin: 0; font-size: 15px; line-height: 1.5; }
.tk-calc .tkc-bench .tk-chip { vertical-align: middle; }
.tk-calc .tkc-fine { margin: 0; }
.tk-calc .tk-next { padding-inline: 0; }
.tk-calc .tk-mail .input { background: var(--bg); }
.tk-calc .tk-mail .btn { min-height: 44px; }

@media (max-width: 960px) {
  .tk-calc .tkc-grid { grid-template-columns: 1fr; }
  .tk-calc .tkc-out { position: static; }
}
@media (max-width: 820px) {
  main .tk-calc .tkc-in, main .tk-calc .tkc-out, main .tk-calc .tkc-out p { text-align: left; margin-left: 0; }
}
@media (max-width: 520px) {
  .tk-calc .tkc-two, .tk-calc .tkc-togs, .tk-calc .tkc-wts { grid-template-columns: 1fr; }
  .tk-calc .tkc-seg { border-radius: 18px; }
  .tk-calc .tkc-pill { flex: 1 1 100%; }
  .tk-calc .tkc-pill span { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tk-calc .tkc-bar__t i, .tk-calc .tkc-fr__t i, .tk-calc .tkc-tog span, .tk-calc .tkc-pill span { transition: none; }
}
.tk-calc .tkc-steps li { font-size: 15px; }
.tk-calc .tkc-fine { font-size: var(--step-small); }
.tk-calc .tkc-funnel { gap: 12px; }
.tk-calc .tkc-fr { gap: 6px 10px; }
.tk-calc .tkc-fr__t { height: 26px; }
.tk-calc .tkc-assume .tkc-f + .tkc-f { margin-top: 6px; }
