/* Kadara Resources + Try Kadara (Slice 6).
   Consumes theme.css + rp-system.css + kadara-solutions.css (footer + sol- primitives).
   Namespaces: `rs-` (Resources hub, Learn, Explore) and `tk-` (Try Kadara tool shell). */

/* =========================================================
   RESOURCES HUB - deliberately unequal hierarchy
   ========================================================= */
.rs-lane { margin-top: 56px; }
.rs-lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.rs-lane-head h2 { font-family: var(--ff-heading); font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
.rs-lane-head .rs-lane-sub { font-size: 15px; color: var(--sub); }
.rs-lane-head a { font-family: var(--ff-mono); font-size: 12px; font-weight: 600; color: var(--brand-verdigris-text); text-decoration: none; white-space: nowrap; }
.rs-lane-head a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Try Kadara featured band (the strongest doorway) */
.rs-try { margin-top: 24px; border: 1px solid var(--brand-verdigris-line); border-radius: 22px; background: var(--brand-verdigris-soft); padding: 30px; }
.rs-try-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.rs-try-top h2 { font-family: var(--ff-heading); font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 6px; }
.rs-try-top p { margin: 0; font-size: 15.5px; color: var(--sub); max-width: 48ch; }
.rs-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rs-tool { display: flex; flex-direction: column; gap: 8px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.rs-tool:hover { border-color: var(--brand-verdigris-line); transform: translateY(-2px); }
.rs-tool .rt-tag { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-brass-text); }
.rs-tool .rt-title { font-family: var(--ff-heading); font-size: 20px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.rs-tool .rt-desc { font-size: 14.5px; line-height: 1.55; color: var(--sub); margin: 0; }
.rs-tool .rt-go { margin-top: 4px; font-family: var(--ff-mono); font-size: 12px; font-weight: 600; color: var(--brand-verdigris-text); }
@media (max-width: 720px) { .rs-tools { grid-template-columns: 1fr; } .rs-try { padding: 22px; } }

/* Learn / Explore editorial rows (not blog cards) */
.rs-rows { border-top: 1px solid var(--line); }
.rs-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 22px; align-items: center; padding: 20px 16px; border-bottom: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: background .15s ease; }
.rs-row:hover, .rs-row:focus-visible { background: var(--brand-brass-soft); }
.rs-row:focus-visible { outline: 2px solid var(--brand-brass-text); outline-offset: 2px; }
.rs-row:hover .rr-title, .rs-row:focus-visible .rr-title { color: var(--brand-brass-text); }
.rs-row:hover .rr-arrow, .rs-row:focus-visible .rr-arrow { color: var(--brand-brass-text); transform: translateX(4px); }
.rs-row .rr-cat { font-family: var(--ff-heading); font-weight: 600; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-brass-text); }
.rs-row .rr-title { font-family: var(--ff-heading); font-size: 19px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 4px; transition: color .15s ease; }
.rs-row .rr-desc { font-size: 14.5px; line-height: 1.5; color: var(--sub); margin: 0; }
.rs-row .rr-arrow { font-size: 18px; color: var(--faint); display: inline-block; transition: transform .15s ease, color .15s ease; }
.rs-row.is-soon { cursor: default; }
.rs-row.is-soon:hover, .rs-row.is-soon:focus-visible { background: transparent; }
.rs-row.is-soon .rr-title { color: var(--sub); }
.rs-soon { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 9px; }
@media (max-width: 720px) { .rs-row { grid-template-columns: 1fr auto; } .rs-row .rr-cat { grid-column: 1 / -1; margin-bottom: 2px; } }

/* Help / support doorway */
.rs-help { margin-top: 56px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 26px 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg-section); }
.rs-help h3 { font-family: var(--ff-heading); font-size: 21px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 6px; }
.rs-help p { margin: 0; font-size: 15px; color: var(--sub); max-width: 56ch; }
.rs-help .rs-help-soon { display: inline-block; margin-top: 8px; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand-brass-text); }
@media (max-width: 640px) { .rs-help { grid-template-columns: 1fr; } }

/* =========================================================
   TRY KADARA - shared tool shell (`tk-`)
   ========================================================= */
/* the four-question meta block on the Try Kadara hub */
.tk-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 36px; }
.tk-card { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); padding: 26px; display: flex; flex-direction: column; }
.tk-card h3 { font-family: var(--ff-heading); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 6px; }
.tk-card .tk-card-lead { font-size: 15px; line-height: 1.55; color: var(--sub); margin: 0 0 18px; }
.tk-meta { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.tk-meta li { display: grid; grid-template-columns: 130px 1fr; gap: 12px; font-size: 14px; line-height: 1.5; }
.tk-meta .tm-q { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); padding-top: 2px; }
.tk-meta .tm-a { color: var(--ink); }
.tk-meta li.tm-not .tm-q { color: var(--red); }
.tk-meta li.tm-not .tm-a { color: var(--sub); }
.tk-card .tk-card-cta { margin-top: auto; }
.tk-card .tk-card-cta a { font-family: var(--ff-mono); font-size: 12px; font-weight: 600; color: var(--brand-verdigris-text); text-decoration: none; }
.tk-card .tk-card-cta a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 820px) { .tk-cards { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .tk-meta li { grid-template-columns: 1fr; gap: 2px; } }

/* interactive stage */
.tk-stage { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--paper); }
.tk-stage-bar { display: flex; align-items: center; gap: 8px; padding: 13px 20px; border-bottom: 1px solid var(--line); background: var(--bg-section); font-family: var(--ff-mono); font-size: 12px; color: var(--sub); }
.tk-stage-bar .tk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-verdigris); }
.tk-stage-body { padding: 24px; }
@media (max-width: 560px) { .tk-stage-body { padding: 18px; } }

/* sample selector */
.tk-samples { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tk-sample { font-family: var(--ff-body); font-size: 14px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 16px; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.tk-sample:hover { border-color: var(--brand-verdigris-line); }
.tk-sample[aria-pressed="true"] { border-color: var(--brand-verdigris); background: var(--brand-verdigris-soft); color: var(--brand-verdigris-text); font-weight: 600; }
.tk-sample:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }

/* input / output split */
.tk-io { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tk-io .tk-io-label { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.tk-raw { border: 1px dashed var(--line); border-radius: 12px; background: var(--bg-section); padding: 16px; font-size: 14px; line-height: 1.6; color: var(--sub); white-space: pre-wrap; min-height: 120px; }
.tk-result { border: 1px solid var(--brand-verdigris-line); border-radius: 12px; background: var(--paper); padding: 16px; min-height: 120px; }
.tk-result[data-empty="true"] { display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 14px; text-align: center; border-style: dashed; border-color: var(--line); }
@media (max-width: 700px) { .tk-io { grid-template-columns: 1fr; } }

/* action button (uses shared .btn where possible; this is the in-stage primary) */
.tk-run { margin: 18px 0 6px; }

/* draft state row for the note builder */
.tk-draftstate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }

/* the persistent truth panel - non-negotiable on every tool */
.tk-truth { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 40px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tk-truth > div { padding: 22px 24px; }
.tk-truth .tt-yes { background: var(--brand-verdigris-soft); }
.tk-truth .tt-no { background: var(--red-bg); }
.tk-truth h4 { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 12px; }
.tk-truth .tt-yes h4 { color: var(--brand-verdigris-text); }
.tk-truth .tt-no h4 { color: var(--red); }
.tk-truth ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tk-truth li { font-size: 14px; line-height: 1.5; color: var(--ink); padding-left: 20px; position: relative; }
.tk-truth .tt-yes li::before { content: "\2713"; position: absolute; left: 0; color: var(--brand-verdigris-text); }
.tk-truth .tt-no li::before { content: "\00d7"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
@media (max-width: 640px) { .tk-truth { grid-template-columns: 1fr; } }

/* =========================================================
   CLAIM READINESS CHECKER - interactive checklist
   ========================================================= */
.tk-checklist { display: grid; gap: 10px; margin: 4px 0 18px; }
.tk-ci { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); cursor: pointer; text-align: left; transition: border-color .12s ease; }
.tk-ci:hover { border-color: var(--brand-verdigris-line); }
.tk-ci:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }
.tk-ci .tk-box { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: transparent; transition: all .12s ease; }
.tk-ci[aria-checked="true"] .tk-box { background: var(--brand-verdigris); border-color: var(--brand-verdigris); color: #fff; }
.tk-ci .tk-ci-label { font-size: 15px; color: var(--ink); }
.tk-ci .tk-ci-note { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }
.tk-readout { padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line); }
.tk-readout.is-complete { background: var(--brand-verdigris-soft); border-color: var(--brand-verdigris-line); }
.tk-readout.is-incomplete { background: var(--red-bg); border-color: var(--red); }
.tk-readout .tk-readout-state { font-family: var(--ff-heading); font-size: 18px; font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.tk-readout .tk-readout-detail { font-size: 14.5px; color: var(--sub); margin: 0; }

/* =========================================================
   CONSULTATION WALKTHROUGH - stepper
   ========================================================= */
.tk-stepper { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tk-step-btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 12px; color: var(--sub); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer; transition: all .12s ease; }
.tk-step-btn .tk-step-n { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-tint); color: var(--faint); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.tk-step-btn[aria-selected="true"] { border-color: var(--brand-verdigris); background: var(--brand-verdigris-soft); color: var(--brand-verdigris-text); }
.tk-step-btn[aria-selected="true"] .tk-step-n { background: var(--brand-verdigris); color: #fff; }
.tk-step-btn:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 2px; }
.tk-panel { display: none; }
.tk-panel.is-active { display: block; }
.tk-panel h4 { font-family: var(--ff-heading); font-size: 19px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 6px; }
.tk-panel > p { font-size: 15px; line-height: 1.6; color: var(--sub); margin: 0 0 16px; max-width: 60ch; }
.tk-navrow { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* =========================================================
   IMPACT CALCULATOR
   ========================================================= */
.tk-calc { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: start; }
.tk-fields { display: grid; gap: 16px; }
.tk-field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.tk-field input { width: 100%; font-family: var(--ff-body); font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; }
.tk-field input:focus-visible { outline: 2px solid var(--brand-verdigris); outline-offset: 1px; border-color: var(--brand-verdigris); }
.tk-field .tk-hint { font-size: 12px; color: var(--brand-brass-text); margin-top: 5px; min-height: 15px; }
.tk-calc-result { border: 1px solid var(--brand-verdigris-line); border-radius: 18px; background: var(--brand-verdigris-soft); padding: 28px; position: sticky; top: 96px; }
.tk-calc-result .tk-big { font-family: var(--ff-heading); font-size: clamp(40px, 6vw, 60px); font-weight: 700; letter-spacing: -0.03em; color: var(--brand-verdigris-text); line-height: 1; }
.tk-calc-result .tk-big-unit { font-size: 17px; font-weight: 600; color: var(--ink); margin-top: 6px; }
.tk-calc-result .tk-month { font-size: 14.5px; color: var(--sub); margin-top: 14px; }
.tk-calc-result .tk-empty { font-size: 15px; color: var(--sub); }
.tk-formula { margin-top: 22px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-section); font-size: 13.5px; line-height: 1.6; color: var(--sub); }
.tk-formula b { color: var(--ink); font-weight: 600; }
.tk-formula code { font-family: var(--ff-mono); font-size: 12.5px; color: var(--brand-verdigris-text); background: var(--brand-verdigris-soft); padding: 1px 6px; border-radius: 5px; }
@media (max-width: 820px) { .tk-calc { grid-template-columns: 1fr; } .tk-calc-result { position: static; } }

/* reduced motion: disable any staggered reveals */
@media (prefers-reduced-motion: reduce) {
  .tk-result, .tk-panel, .rs-tool, .ws-card { transition: none !important; }
}
