/* ================================================================
   Caldra Learning — the search surface (wave 1)
   Intent pages under /for/, the ICSE class and subject pages, /about.

   Loaded ONLY by those pages, after site.css. It adds classes; it
   overrides nothing in site.css or landing.css, so nothing already
   shipped can move because of this file.
   ================================================================ */

/* No automatic hyphenation anywhere on these pages. A broken word
   ("Environ-mental", "Number Op-erations") is the first thing a parent
   sees. Where a name is too long for its bay, the bay grows or the type
   steps down — the word never splits. */
.surface, .surface h1, .surface h2, .surface h3, .surface p, .surface li {
  hyphens: manual;
  -webkit-hyphens: manual;
}

/* ---------------- the page's own lede ---------------- */
/* The real answer lives in the first 120 words, so it is set at reading
   size and given the full measure before any structure appears. */
.surface .answer-first {
  font-size: 19px;
  line-height: 1.62;
  color: var(--ink);
  max-width: 62ch;
}
.surface .answer-first + p { margin-top: 1rem; }
.surface .prose > p + p { margin-top: 1rem; }

/* ---------------- tappable words ---------------- */
/* Nothing here is blue and nothing is underlined. A standalone action is
   a quiet outline pill at the page's tap height; an ink word inside a
   sentence stays the prose rule in site.css (coral-deep, weight 600). */
.pill-link {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1.5px solid rgba(42, 33, 24, 0.22);
  border-radius: 999px; padding: 12px 22px;
  font-size: 15px; font-weight: 600; color: var(--ink);
  background: transparent;
  transition: border-color .2s, color .2s, background .2s;
}
.pill-link:hover { border-color: var(--coral); color: var(--coral-deep); }
.pill-link:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

/* The chevron is drawn, never a character from a font and never an emoji:
   two hairlines rotated into a corner, so it inherits the ink colour and
   scales with the type. */
.chev {
  width: 7px; height: 7px; flex: 0 0 auto;
  border-right: 1.6px solid currentColor;
  border-top: 1.6px solid currentColor;
  transform: rotate(45deg);
  margin-left: 1px;
}

/* ---------------- the one ask ---------------- */
.surface-cta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  margin-top: 2.6rem; padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.surface-cta .cta-terms {
  flex-basis: 100%;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--ink-soft); margin: 0;
}

/* ---------------- sibling pages ---------------- */
/* minmax(min(100%, 260px), 1fr): a bare 260px floor overflows the wrap on
   a 360px phone once the gutter is counted. Capping the floor at the
   grid's own width removes the horizontal scroll and changes nothing
   above 260px — the same fix .real-panels carries in landing.css. */
.sib-row {
  display: grid; gap: 14px; margin-top: 2.4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.sib {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  column-gap: 14px; row-gap: 4px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--paper-3); padding: 16px 18px;
  transition: border-color .2s, transform .2s;
}
.sib:hover { border-color: var(--coral); transform: translateY(-2px); }
.sib:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.sib b { font-weight: 600; font-size: 15.5px; color: var(--ink); line-height: 1.35; }
.sib span:not(.chev) {
  grid-column: 1 / 2; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
}
.sib .chev { grid-column: 2 / 3; grid-row: 1 / 3; color: var(--ink-mute); }

/* ---------------- chapter list (subject pages) ---------------- */
/* One row per chapter, in the Council's own order. The row has no fixed
   height: a long chapter name and its sentence both get as many lines as
   they need. */
.chapters { margin-top: 2.2rem; border-top: 1px solid var(--line); }
.chapter {
  display: grid; grid-template-columns: auto 1fr; column-gap: 18px;
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
  align-items: start;
}
.chapter .n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px; font-weight: 600; color: #8A6733;
  padding-top: 6px; font-variant-numeric: tabular-nums;
}
.chapter h3 { font-size: 20px; margin: 0; max-width: 24ch; }
.chapter p { color: var(--ink-soft); font-size: 15.5px; margin-top: 0.5rem; max-width: 58ch; }

/* The mark. Two states, two words each at most — never a third line. */
.mark {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 0.7rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px; padding: 5px 12px;
  max-width: 100%;
}
.mark::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: currentColor;
}
.mark.live { color: #9E3620; background: rgba(232, 93, 60, 0.12); }
.mark.soon { color: var(--ink-soft); background: rgba(42, 33, 24, 0.06); }
.mark.soon::before { background: transparent; box-shadow: inset 0 0 0 1.6px currentColor; }

/* ---------------- the form-less ask ---------------- */
.ask {
  border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 20px; padding: 1.6rem 1.7rem; margin: 2.6rem 0 0;
}
.ask h2 { font-size: 22px; margin: 0 0 0.5rem; }
.ask p { color: var(--ink-soft); font-size: 15.5px; margin-bottom: 1.1rem; }
.ask .pill-link { background: var(--paper-3); }

/* ---------------- plain comparison rows ---------------- */
/* Used where a parent is doing arithmetic in their head. Two columns of
   words, never a priced table we cannot stand behind. */
.weigh { margin-top: 1.8rem; border-top: 1px solid var(--line); }
.weigh div {
  display: grid; grid-template-columns: 13ch 1fr; gap: 6px 20px;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.weigh dt {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: #8A6733; padding-top: 4px;
}
.weigh dd { margin: 0; color: var(--ink-soft); font-size: 15.5px; max-width: 54ch; }
@media (max-width: 560px) {
  .weigh div { grid-template-columns: minmax(0, 1fr); }
  .weigh dd { max-width: none; }
}

/* ---------------- the honest boundary ---------------- */
/* Every page says plainly what is not there yet. It gets its own block so
   a reader skimming can find it, and it is never softened into a promise. */
.not-yet {
  border-left: 3px solid rgba(176, 137, 84, 0.55);
  padding: 0.2rem 0 0.2rem 1.3rem; margin: 2rem 0;
}
.not-yet h2 { font-size: 21px; margin: 0 0 0.5rem; }
.not-yet p { color: var(--ink-soft); }
.not-yet p + p { margin-top: 0.7rem; }

/* ---------------- subject cards (class page) ---------------- */
.subject-cards {
  display: grid; gap: 16px; margin-top: 2.2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}
.subject-card {
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--paper-3); padding: 1.5rem 1.6rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: border-color .2s, transform .2s;
}
.subject-card:hover { border-color: var(--coral); transform: translateY(-2px); }
.subject-card:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.subject-card h3 { font-size: 21px; margin: 0; }
.subject-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
.subject-card .mark { margin-top: 0.3rem; align-self: flex-start; }

/* ---------------- the page's question list on /faq ---------------- */
.asking { margin-top: 1.6rem; display: grid; gap: 0.7rem; }
.asking a { color: var(--coral-deep); font-weight: 600; }

/* ---------------- responsive ---------------- */
@media (max-width: 560px) {
  .surface .answer-first { font-size: 17.5px; }
  .chapter { grid-template-columns: minmax(0, 1fr); row-gap: 0.2rem; }
  .chapter .n { padding-top: 0; }
  .chapter h3 { max-width: none; }
  .surface-cta { gap: 12px; }
  .surface-cta .btn, .surface-cta .pill-link { width: 100%; justify-content: center; }
}
