/* The Invest page (src/pages/invest.js). Shared parts come from parts.css; this file only adds
   what the page itself needs: the purpose switch, the three ways and the comparison table's phone
   card layout. The listings and their tables are on the Opportunities page (opportunities.css).
   Tokens only, no typed colours. */

/* ---------- controls: big enough to hit with a thumb, and to read */
.page--invest .chips .chip { font-size: 1rem; padding: 0.5rem 1.05rem; min-height: 2.75rem; }

/* ---------- 1. page head and the purpose switch */
.purpose { margin-top: 2rem; }
.purpose__label { font-weight: 650; margin-bottom: 0.6rem; }
.purpose__chips { margin-bottom: 0.6rem; }
/* room for the longest message, so nothing below moves when it changes */
.purpose__status { min-height: 3.2em; color: var(--ink-soft); max-width: 44rem; }

.suits { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.45rem; margin: 0.4rem 0 1rem; font-size: 0.92rem; }
.suits__label { color: var(--ink-soft); font-weight: 600; }
/* the tags are labels, not buttons (clarity audit 2026-11-17): plain text, separated by a dot, never a border */
.suits__tag {
  padding: 0; border: 0; border-radius: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}
/* the dot ends a tag (a box of its own, so a chosen tag's underline stops at its words), and a wrapped line never
   starts with one */
.suits__tag:not(:last-child)::after { content: "·"; display: inline-block; margin-left: 0.45rem; color: var(--ink-soft); }
.suits__tag.is-on { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* ---------- 2. three ways */
/* three columns whose card, dream and fine print line up across the row (subgrid) */
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; gap: 2.3rem 1.4rem; }
.way { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 2.3rem; }
.way__card { display: flex; flex-direction: column; transition: outline-color 0.2s ease; outline: 3px solid transparent; outline-offset: 5px; }
.way__card .way__see { margin-top: auto; padding-top: 1.1rem; }
/* the colored-pencil vignette at the top of each card (scenes/invest.js); its paper is the card's */
.way__card:has(> .way__drawing) { padding-top: 0.9rem; }
.way__drawing { aspect-ratio: 4 / 3; margin: 0 -0.5rem 0.8rem; flex: none; }
.way.is-match .way__card { outline-color: var(--gold); }
.way__facts { margin: 1.1rem 0 0; display: grid; gap: 0.8rem; }
.way__facts dt { font-size: 0.82rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); }
.way__facts dd { margin: 0.15rem 0 0; }
.way__see { font-weight: 650; }
.way__pair { grid-row: span 2; grid-template-rows: subgrid; grid-template-columns: minmax(0, 1fr); gap: 2.3rem; }
.way__pair .pair__dream, .way__pair .pair__print { padding: 1.9rem 1.3rem 1.4rem; }
.way__pair .pair__title { margin: 0 0 0.6rem; font-family: var(--font-display); font-weight: 560; line-height: 1.12; font-size: 1.28rem; }
.print-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; }
.print-list li { position: relative; padding-left: 1.3rem; }
.print-list li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 0.7rem; border-top: 2px solid var(--gold-deep); transform: rotate(-8deg); }
.ways__how { margin-top: 2.2rem; font-size: 1.08rem; }
.invest-soon { font-weight: 650; }

/* ---------- 3. the three ways side by side */
.invest-compare { padding-bottom: 1rem; }

.invest-more { font-size: 1rem; }
.invest-more .invest-soon { color: var(--paper); }

/* ---------- smaller screens */
@media (max-width: 62rem) {
  .ways { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .way { grid-row: auto; grid-template-rows: none; }
  .way__pair { grid-row: auto; grid-template-rows: none; }
}
@media (max-width: 48rem) {
  .purpose__status { min-height: 4.8em; }
}
/* tables shown as cards below 1,200 px: on a tablet (900 to 1,100 px) the full table was wider than
   its box (words split inside cells, the last column cut off); it fits from 1,200 px */
@media (max-width: 74.99rem) {
  /* the comparison: one card per way (the roles keep it a table for screen readers) */
  .table-wrap--cards .table-wrap__hint { display: none; }
  .table-wrap--cards table, .table-wrap--cards tbody, .table-wrap--cards caption { display: block; }
  /* the header row stays for screen readers but takes no room: a table row group ignores overflow,
     so the cells themselves are hidden too, and nothing can widen the page */
  .table-wrap--cards thead, .table-wrap--cards thead tr, .table-wrap--cards thead th {
    display: block; position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .table-wrap--cards tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.55rem 0.9rem;
    padding: 0.95rem 1rem 1.05rem; border-bottom: 1.5px dashed var(--rule);
  }
  .table-wrap--cards tbody tr:last-child { border-bottom: 0; }
  .table-wrap--cards .table tbody th, .table-wrap--cards .table tbody td { display: block; padding: 0; border: 0; text-align: left; white-space: normal; }
  .table-wrap--cards td[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.8rem; font-weight: 650; color: var(--ink-soft);
  }
  /* the way's name on top, then each line under its label */
}
@media (prefers-reduced-motion: reduce) {
  .suits__tag, .way__card { transition: none; }
}
/* print (shared rules in parts.css): no controls */
@media print {
  .purpose, .way__see { display: none !important; }
  .way, .way__pair { grid-row: auto; grid-template-rows: none; }
  .ways { grid-template-columns: minmax(0, 1fr); }
}

/* the invitation under the three cards */
.ways__unsure { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 2.4rem; font-size: 1.15rem; font-weight: 600; }
