/* Learn pages (academy lessons, blog posts, the two calculators, glossary,
 * changelog, roadmap): the "Where Ishara fits" aside, the calculators'
 * in-results card, presets and live answer bar, and the pillar chips.
 * Tokens come from knowledge.css; fallbacks keep the page readable alone. */

/* "Where Ishara fits": closes a lesson or a post with the pages it leads to. */
.fits {
  margin: 40px 0 8px;
  padding: 24px 24px 20px;
  border: 1px solid var(--line, #dce0e5);
  border-radius: var(--radius, 14px);
  background: var(--bg-raise, #f6f7f9);
}
.fits-kicker {
  margin: 0 0 6px !important;
  color: var(--brand-a, #14277c);
  font-size: 12px !important;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4 !important;
}
.ie-page .prose .fits h3 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.3;
}
.fits > p {
  margin: 0 0 14px;
  color: var(--ink-2, #2c3767);
}
.fits-links {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.fits-links li {
  margin: 0 !important;
  padding: 0 !important;
}
.fits-links li::before {
  display: none !important;
}
.ie-page .prose .fits-links a {
  display: block;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line, #dce0e5);
  border-radius: 10px;
  background: var(--panel, #fff);
  color: var(--ink, #121835);
  text-decoration: none;
  line-height: 1.45;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.ie-page .prose .fits-links a:hover {
  border-color: var(--brand-a, #14277c);
  transform: translateY(-1px);
}
.fits-links b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
}
.fits-links span {
  display: block;
  margin-top: 2px;
  color: var(--muted, #5c6478);
  font-size: 13px;
}
.fits .cta-pair {
  margin-top: 16px;
}

/* Calculators: the answer, then the next step, inside the results column. */
.calc-cta {
  display: grid;
  gap: 10px;
  padding: 20px 22px;
  border: 1px solid #bfcbdc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 26px #161e4312;
}
.calc-cta-kicker {
  margin: 0;
  color: var(--brand-a, #14277c);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.calc-cta-text {
  margin: 0;
  color: var(--ink, #121835);
  font-size: 15.5px;
  line-height: 1.55;
}
.calc-cta-text b {
  font-variant-numeric: tabular-nums;
}
.calc-cta .btn {
  justify-self: start;
}
.calc-cta-note {
  margin: 0;
  color: var(--muted, #5c6478);
  font-size: 13px;
  line-height: 1.5;
}

/* Presets sit under the field they set. */
.calc-presets-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.calc-presets-inline button {
  min-height: 34px;
  padding: 5px 11px;
  border: 1px solid #c8d2df;
  border-radius: 999px;
  background: #fff;
  color: #293461;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.calc-presets-inline button:hover,
.calc-presets-inline button[aria-pressed="true"] {
  border-color: #14277c;
  background: #eaeff5;
  color: #101f63;
}
.calc-presets-inline button:focus-visible {
  outline: 2px solid #14277c;
  outline-offset: 2px;
}

/* A formatted echo under each money field ("$2,000,000"). */
.calc-echo {
  margin: 4px 0 0;
  color: #293461;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* The live answer bar: phones only, pinned to the bottom while the inputs scroll. */
.calc-live {
  display: none;
}
@media (max-width: 800px) {
  .calc-live {
    position: sticky;
    bottom: 10px;
    z-index: 3;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #121a40;
    color: #edf2f8;
    font-size: 14px;
    box-shadow: 0 8px 24px #0d122a33;
  }
  .calc-live > span {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    line-height: 1.3;
  }
  .calc-live b {
    color: #fff;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
  }
  .calc-live a {
    color: #cad4e3;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* Pillar chips on the changelog and roadmap. */
.pillar-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--line, #dce0e5);
  background: var(--panel, #fff);
  color: var(--ink-2, #2c3767);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}
.pillar-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.pillar-market { color: #12236d; border-color: #bdc9db; background: #f2f6fa; }
.pillar-private { color: #5a5a12; border-color: #e1dcae; background: #fbf9ea; }
.pillar-agents { color: #4b3f8f; border-color: #d4cdee; background: #f5f3fc; }
.pillar-foundation { color: #293461; border-color: #ccd4e0; background: #f2f5f9; }

/* Changelog: chip beside the date, and the filter row. */
.release-head .pillar-chip {
  justify-self: start;
  align-self: center;
}
.pillar-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
}
.pillar-filter[hidden] {
  display: none;
}
.pillar-filter button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2, #2c3767);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.pillar-filter button[data-pillar-filter="all"] {
  padding: 4px 14px;
  border-color: var(--line, #dce0e5);
  background: var(--panel, #fff);
}
.pillar-filter button[aria-pressed="true"] {
  border-color: var(--brand-a, #14277c);
  box-shadow: 0 0 0 1px var(--brand-a, #14277c);
}
.pillar-filter button:focus-visible {
  outline: 2px solid var(--brand-a, #14277c);
  outline-offset: 2px;
}
.pillar-filter .pillar-chip {
  font-size: 13px;
  padding: 4px 12px;
}
.pillar-status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: var(--muted, #5c6478);
  font-size: 13px;
}
.release[hidden],
.release-month[hidden] {
  display: none !important;
}

/* Roadmap: shipped work grouped by pillar. */
.pillar-group {
  margin-top: 40px;
}
.pillar-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 14px;
  margin-bottom: 16px;
}
.pillar-group-head h3 {
  margin: 0;
  font-size: 22px;
}
.pillar-group-head p {
  margin: 0;
  color: var(--muted, #5c6478);
  font-size: 14.5px;
}

/* The inputs stay in view beside the charts on desktop. */
@media (min-width: 801px) {
  .calc-inputs { position: sticky; top: 96px; align-self: start; }
}

/* The table card's title reads like the chart titles above it. */
.calc-results .calc-out :is(h2, h3) { text-transform: none; letter-spacing: 0; font-size: 17px; font-weight: 600; color: #293461; margin-bottom: 8px; }
