/* /seguro-medico/ (apps/seguro). Kit tokens plus the two brand tag tones from
   docs/brand/GUIDELINES.md section 4: Salvia #E3EFE8 (where Medicaid may come first) and
   Cempasúchil claro #FBE7C4 with #5A3A05 text (no help at all). The one bold element is the family
   table: amounts in the display face, and a Selva step line where each household passes 400% of
   the poverty line, so the cliff reads as a staircase across the rows. 48px targets, 17px floor
   for reading text, 15px only for captions and sources. */

.seg-form { display: grid; gap: 4px; }
.seg-form select { min-height: 52px; }

.seg-layout { display: grid; gap: 28px; }
@media (min-width: 64rem) { .seg-layout { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; gap: 48px; } }
.seg-layout > * { min-width: 0; }

/* The 2027 law in one small table, beside the form. */
.seg-ley { padding: 20px 22px; border: 1px solid var(--color-line); border-radius: 18px; background: var(--color-surface-2); }
.seg-ley h2 { margin: 0 0 6px; font-size: 21px; line-height: 1.25; }
.seg-ley > p { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.seg-ley table { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.seg-ley th, .seg-ley td { padding: 9px 4px; border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: top; }
.seg-ley thead th { font-size: 15px; font-weight: 600; color: var(--color-muted); }
.seg-ley td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.seg-ley tr.seg-ley__off td { color: var(--color-muted); font-weight: 400; }

.seg-src { font-size: 15px; line-height: 1.5; color: var(--color-muted); }
.seg-src a { color: inherit; }

/* The family table. */
.seg-grid { margin-top: 8px; }
.seg-grid__hint { margin: 0 0 10px; font-size: 15px; color: var(--color-muted); }
@media (min-width: 64rem) { .seg-grid__hint { display: none; } }
.seg-grid__scroll { overflow-x: auto; border: 1px solid var(--color-line); border-radius: 18px; background: var(--color-card); }
.seg-grid__scroll:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.seg-grid table { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
.seg-grid__cap { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.seg-grid thead th:first-child { width: 10.5rem; }
.seg-grid thead th { padding: 12px 10px; border-bottom: 2px solid var(--color-ink); text-align: right; font-size: 15px; font-weight: 600; color: var(--color-muted); }
.seg-grid thead th small { display: block; font-size: 14px; font-weight: 400; }
.seg-grid thead th:first-child { text-align: left; }
.seg-grid tbody th { position: sticky; left: 0; z-index: 1; padding: 12px 14px; border-bottom: 1px solid var(--color-line); background: var(--color-card); text-align: left; font-weight: 700; font-size: 16px; white-space: nowrap; }
.seg-grid tbody th span { display: block; font-size: 14px; font-weight: 400; color: var(--color-muted); }
.seg-grid td { padding: 12px 10px; border-bottom: 1px solid var(--color-line); text-align: right; vertical-align: middle; }
.seg-grid td b { font-family: var(--font-display); font-weight: var(--font-weight-display); font-size: 22px; line-height: 1; color: #0B3D2E; }
.seg-grid td.is-medicaid { background: #E3EFE8; }
.seg-grid td.is-bajo { background: #E3EFE8; font-size: 14px; line-height: 1.3; color: #0B3D2E; }
.seg-grid td.is-sin { background: #FBE7C4; font-size: 15px; font-weight: 700; line-height: 1.3; color: #5A3A05; }
.seg-grid td.is-cliff { box-shadow: inset 3px 0 0 #0B3D2E; }
.seg-grid tbody tr:last-child > * { border-bottom: 0; }

.seg-key { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 15px; line-height: 1.45; }
.seg-key li { display: flex; align-items: flex-start; gap: 8px; max-width: 36rem; }
.seg-key i { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 5px; border: 1px solid var(--color-line); }
.seg-key i.k-medicaid { background: #E3EFE8; }
.seg-key i.k-sin { background: #FBE7C4; }
.seg-key i.k-cliff { background: var(--color-card); box-shadow: inset 3px 0 0 #0B3D2E; }

/* Plain data tables (Texas cities, New York prices, statuses). They stack into cards on a phone. */
.seg-tabla { width: 100%; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.seg-tabla caption { margin: 0 0 8px; text-align: left; font-size: 16px; line-height: 1.45; }
.seg-tabla th, .seg-tabla td { padding: 12px 10px; border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: top; }
.seg-tabla thead th { font-size: 15px; font-weight: 600; color: var(--color-muted); }
.seg-tabla td.num, .seg-tabla th.num { text-align: right; white-space: nowrap; }
.seg-tabla tbody th { font-weight: 700; }
.seg-tabla tbody th span { display: block; font-size: 15px; font-weight: 400; color: var(--color-muted); }
.seg-tabla .is-pay { font-weight: 700; color: #0B3D2E; }
@media (max-width: 47.99rem) {
  .seg-tabla thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .seg-tabla, .seg-tabla caption, .seg-tabla tbody, .seg-tabla tr, .seg-tabla th, .seg-tabla td { display: block; }
  .seg-tabla caption { width: auto; font-weight: 700; }
  .seg-tabla tr { padding: 8px 0 12px; border-bottom: 1px solid var(--color-line); }
  .seg-tabla th, .seg-tabla td { padding: 4px 0; border: 0; }
  .seg-tabla td { display: flex; justify-content: space-between; gap: 16px; text-align: right; }
  .seg-tabla td.num { white-space: normal; }
  .seg-tabla td::before { content: attr(data-label); flex: 1 1 auto; text-align: left; color: var(--color-muted); }
  .seg-tabla td { flex-wrap: wrap; }
  .seg-tabla td small { flex-basis: 100%; margin-top: 0; text-align: right; }
}

/* Status answers on /inmigrantes/. Words carry the answer; the tone only repeats it. */
.seg-tag { display: inline-block; padding: 2px 10px; border-radius: 10px; font-weight: 700; line-height: 1.5; }
.seg-tag--si { background: #E3EFE8; color: #0B3D2E; }
.seg-tag--parcial { background: #FBE7C4; color: #5A3A05; }
.seg-tag--no { background: var(--color-surface-2); color: var(--color-ink); border: 1px solid var(--color-line-strong); }
.seg-tabla small { display: block; margin-top: 4px; font-size: 14px; color: var(--color-muted); }
.seg-tabla small a { color: inherit; }
/* On a phone each status answer stacks: the column name, the answer, then its document. */
@media (max-width: 47.99rem) {
  .seg-tabla--estatus td { display: grid; justify-items: start; gap: 4px; padding: 6px 0; text-align: left; }
  .seg-tabla--estatus td::before { font-size: 15px; }
  .seg-tabla--estatus td small { margin-top: 0; }
}

/* The reader's result. */
.seg-result { display: grid; gap: 14px; padding: 22px 24px; border: 1px solid var(--color-line); border-left: 6px solid var(--color-brand); border-radius: 18px; background: var(--color-card); }
.seg-result--sin { border-left-color: #A66817; }
.seg-result p { margin: 0; }
.seg-result__lead { font-family: var(--font-display); font-weight: var(--font-weight-display); font-size: 28px; line-height: 1.2; color: #0B3D2E; }
.seg-result dl { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--color-line); }
.seg-result dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--color-line); }
.seg-result dt { color: var(--color-muted); }
.seg-result dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

/* A finding set apart: one sentence of the page's own arithmetic. */
.seg-hallazgo { margin: 18px 0; padding: 18px 22px; border-left: 4px solid #0B3D2E; border-radius: 0 14px 14px 0; background: #E3EFE8; }
.seg-hallazgo p { margin: 0 0 8px; }
.seg-hallazgo p:last-child { margin: 0; }

.seg-fuentes ol { margin: 0; padding-left: 1.4em; font-size: 15px; line-height: 1.5; color: var(--color-muted); }
.seg-fuentes li { margin: 0 0 8px; }
.seg-fuentes a { color: var(--color-ink); }

.seg-next { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .seg-next { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.seg-next li { display: grid; gap: 6px; align-content: start; padding: 18px 20px; border: 1px solid var(--color-line); border-radius: 18px; background: var(--color-card); }
.seg-next li p { margin: 0; }
.seg-next a { display: inline-flex; min-height: 48px; align-items: center; font-weight: 700; }

.seg-states li, .pk-prose .seg-states li { margin: 0; padding: 0; }
.seg-states { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.seg-states a { display: inline-flex; min-height: 48px; align-items: center; padding: 0 18px; border: 1px solid var(--color-line-strong); border-radius: 999px; background: var(--color-card); font-weight: 700; text-decoration: none; }
.seg-states a:hover { border-color: var(--color-brand); }
.seg-layout > .pk-section { margin-top: 0; }

/* The cluster map: the pillar lists every page, each spoke lists the pillar and its siblings. */
.seg-seccion ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .seg-seccion ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .seg-seccion ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.seg-seccion a { display: grid; gap: 2px; min-height: 48px; height: 100%; padding: 14px 16px; border: 1px solid var(--color-line); border-radius: 14px; background: var(--color-card); text-decoration: none; }
.seg-seccion a:hover { border-color: var(--color-brand); }
.seg-seccion strong { color: var(--color-ink); }
.seg-seccion span { font-size: 15px; line-height: 1.45; color: var(--color-muted); }
