/* /dc/va-healthcare-income-limits. hix- = health income limits.
   Builds on the pcx worksheet chrome in dc-pension-calculator.css, which is
   not changed. Sizes follow the owner-approved mockup of 2026-11-17. */
.hix-skip-note { margin: 0 0 1.2rem; }
.hix-skip-note a { font-weight: 600; white-space: nowrap; }
#hix-stale { margin: 0 0 1rem; }

/* The family styles input[type="number"] only. Money here is typed as text so
   "56,400" is accepted; restate the same control so both look identical. */
.pcx-field input[type="text"] { background: var(--color-surface); border: 1px solid var(--color-control-border); border-radius: var(--radius-sm); color: var(--color-text); font: inherit; min-height: 46px; padding: .6rem .7rem; width: 100%; }
.pcx-field .pcx-money input[type="text"] { padding-left: 1.5rem; }
.pcx-field input[aria-invalid="true"] { border-color: var(--surface-warning-border); box-shadow: 0 0 0 1px var(--surface-warning-border); }
#hix-zip { font-size: 1.15rem; font-weight: 600; letter-spacing: .08em; max-width: 220px; }
.pcx-main .pcx-note { font-size: .78rem; }
.hix-field-err { color: var(--surface-warning-text); display: block; font-size: .8rem; font-weight: 600; margin-top: .3rem; }
.hix-field-err[hidden] { display: none; }

.hix-place-label { color: var(--color-text); display: block; font-size: .9rem; font-weight: 600; margin-bottom: .35rem; }
.hix-place { align-items: center; background: var(--surface-success); border: 1px solid var(--surface-success-border); border-radius: var(--radius-sm); color: var(--surface-success-text); display: flex; font-weight: 600; gap: .5rem; margin: 0; min-height: 46px; padding: .5rem .75rem; }
.hix-place[data-state="none"] { background: var(--surface-warning); border-color: var(--surface-warning-border); color: var(--surface-warning-text); font-weight: 500; }
.hix-place[data-state="idle"] { background: var(--color-bg-alt); border-color: var(--color-border); color: var(--color-text-muted); font-weight: 500; }

/* The no-number choice (D3): national only, the state average, or the reader's own figure */
.hix-nolimit { border: 1px solid var(--surface-warning-border); border-radius: var(--radius-md); display: grid; gap: .5rem; margin: 1rem 0 0; padding: .8rem .9rem .9rem; }
.hix-nolimit[hidden] { display: none; }
.hix-nolimit legend { color: var(--color-text-strong); font-size: .95rem; font-weight: 700; padding: 0 .35rem; }
.hix-choice { align-items: flex-start; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); cursor: pointer; display: flex; gap: .7rem; min-height: 48px; padding: .65rem .8rem; }
.hix-choice[hidden] { display: none; }
.hix-choice input { accent-color: var(--color-primary); flex: none; height: 20px; margin: .15rem 0 0; width: 20px; }
.hix-choice strong { color: var(--color-text-strong); display: block; font-size: .95rem; }
.hix-choice small { color: var(--color-text-muted); display: block; font-size: .8rem; line-height: 1.4; margin-top: .1rem; }
.hix-choice:has(input:checked) { background: var(--surface-info); border-color: var(--color-primary); box-shadow: 0 0 0 1px var(--color-primary); }
.hix-own { margin-top: .2rem; max-width: 340px; }
.hix-own[hidden] { display: none; }
.hix-est { background: #d9a247; border-radius: 999px; color: #06162a; font-size: .75rem; letter-spacing: .04em; margin-left: .5rem; padding: .1rem .55rem; }
.hix-est[hidden] { display: none; }

.hix-other { margin-top: .9rem; }
.hix-other summary { color: var(--color-primary-light); cursor: pointer; font-size: .9rem; font-weight: 600; min-height: 44px; padding: .6rem 0; }
.hix-optional { background: var(--color-bg-alt); border-radius: 999px; color: var(--color-text-muted); font-family: var(--font-sans); font-size: .75rem; font-weight: 600; margin-left: .5rem; padding: .15rem .6rem; vertical-align: middle; }

.hix-addup { color: var(--color-text); display: grid; font-size: .875rem; gap: .25rem; line-height: 1.45; margin: .6rem 0 .2rem; padding-left: 1.15rem; }
.hix-addup strong { color: var(--color-text-strong); }
.hix-rules { color: var(--color-text-muted); display: grid; font-size: .8rem; gap: .25rem; line-height: 1.45; margin: 1rem 0 0; padding-left: 1.15rem; }

.hix-stepper { display: flex; gap: .5rem; max-width: 260px; }
.hix-stepper input { flex: 1; font-size: 1.15rem; font-weight: 600; min-width: 0; text-align: center; }
.hix-step { background: var(--color-surface); border: 1px solid var(--color-control-border); border-radius: var(--radius-sm); color: var(--color-primary); cursor: pointer; font-size: 1.4rem; font-weight: 600; height: 48px; line-height: 1; width: 48px; }
.hix-step:hover { background: var(--color-bg-alt); }

.hix-sum { border-top: 1px solid var(--color-border); display: grid; gap: .35rem .9rem; grid-template-columns: 1fr auto; margin: 1.1rem 0 0; padding-top: .9rem; }
.hix-sum:empty { display: none; }
.hix-sum dt { color: var(--color-text-muted); font-size: .9rem; }
.hix-sum dd { font-variant-numeric: tabular-nums; margin: 0; text-align: right; }
.hix-sum .hix-sum-total { border-top: 1px solid var(--color-border); color: var(--color-text-strong); font-size: 1.05rem; font-weight: 700; padding-top: .45rem; }

/* Result panel */
.hix-result { position: sticky; top: 1rem; }
.hix-status { background: #0e2a4d; border: 1px solid #254f7e; border-radius: var(--radius-md) var(--radius-md) 0 0; color: #fff; padding: 1rem 1.1rem; }
.hix-status-kicker { color: #d9a247; font-size: .75rem; font-weight: 700; letter-spacing: .06em; margin: 0 0 .25rem; text-transform: uppercase; }
.hix-status-head { color: #fff; font-size: 1.3rem; line-height: 1.2; margin: 0; }
.hix-status-sub { color: #cbd9e8; font-size: .85rem; line-height: 1.45; margin: .35rem 0 0; }
.hix-body { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 0 0 var(--radius-md) var(--radius-md); border-top: 0; padding: 1rem 1.1rem 1.1rem; }

.hix-figure { align-items: baseline; display: flex; flex-wrap: wrap; gap: .25rem .75rem; justify-content: space-between; margin-bottom: .7rem; }
.hix-figure-label { color: var(--color-text-muted); font-size: .8rem; font-weight: 600; }
.hix-figure-amount { color: var(--color-text-strong); font-family: var(--font-serif); font-size: 1.9rem; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1; }
.hix-figure-empty { color: var(--color-text-muted); font-size: .9rem; }
.hix-stale-line { flex-basis: 100%; margin: 0 0 .4rem; }

/* Segmented meter with a marker (the "where the figure sits" strip) */
.hix-meter { display: grid; gap: 3px; grid-auto-columns: 1fr; grid-auto-flow: column; margin-top: 1.6rem; position: relative; }
.hix-meter.is-idle { margin-top: .2rem; }
.hix-seg { border-radius: 3px; height: 12px; }
.hix-marker { background: var(--color-primary); border-radius: 999px; color: #fff; font-size: .75rem; font-weight: 700; left: 0; padding: .1rem .5rem; position: absolute; top: -1.55rem; transform: translateX(-50%); white-space: nowrap; }
.hix-marker::after { border: 5px solid transparent; border-top-color: var(--color-primary); content: ""; left: 50%; margin-left: -5px; position: absolute; top: 100%; }
.hix-meter-note { color: var(--color-text-muted); font-size: .75rem; margin: .3rem 0 .8rem; text-align: right; }
.hix-meter-note[hidden] { display: none; }
.hix-meter.is-idle + .hix-meter-note[hidden] + .hix-ladder { margin-top: .8rem; }

.hix-k1 { --hix-c: #2e7d32; --hix-bg: var(--surface-success); }
.hix-k2 { --hix-c: #1565c0; --hix-bg: var(--surface-info); }
.hix-k3 { --hix-c: #b07a1f; --hix-bg: var(--surface-warning); }
.hix-k4 { --hix-c: #a55a00; --hix-bg: var(--color-bg-alt); }
.hix-k5 { --hix-c: #767f8f; --hix-bg: var(--color-bg); }
.hix-seg { background: var(--hix-c); opacity: .35; }
.hix-seg.is-here { opacity: 1; }

/* The ladder: one row per income range, lowest first (VA's order) */
.hix-ladder { display: grid; gap: .45rem; list-style: none; margin: 0; padding: 0; }
.hix-row { background: var(--hix-bg); border: 1px solid var(--color-border); border-left: 6px solid var(--hix-c); border-radius: var(--radius-sm); padding: .6rem .75rem; position: relative; }
.hix-row.is-here { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary); }
.hix-row-range { color: var(--color-text-strong); font-size: 1rem; font-variant-numeric: tabular-nums; font-weight: 700; margin: 0; }
.hix-row-limit { color: var(--color-text-muted); font-size: .75rem; font-weight: 600; letter-spacing: .02em; margin: .1rem 0 .3rem; }
.hix-row-what { color: var(--color-text); font-size: .875rem; line-height: 1.45; margin: 0; }
.hix-row-group, .hix-row-note { color: var(--color-text-muted); font-size: .8rem; line-height: 1.4; margin: .35rem 0 0; }
.hix-row-group a { color: inherit; }
.hix-already { margin-top: .5rem; }
.hix-already-text { color: var(--color-text-muted); font-size: .875rem; line-height: 1.5; margin: 0 0 .5rem; }
.hix-here { background: var(--color-primary); border-radius: 999px; color: #fff; display: inline-block; font-size: .75rem; font-weight: 700; margin-bottom: .35rem; padding: .15rem .6rem; }
.hix-near { color: var(--surface-warning-text); font-size: .8rem; font-weight: 600; margin: .35rem 0 0; }

.hix-decides { background: var(--color-bg-alt); border-radius: var(--radius-sm); color: var(--color-text); font-size: .875rem; line-height: 1.5; margin-top: .9rem; padding: .7rem .8rem; }
.hix-decides-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .4rem; }
.hix-decides-links a { font-weight: 600; }
.hix-actions { display: flex; gap: .6rem; margin-top: 1rem; }
.hix-actions .btn { flex: 1; }
.hix-privacy { color: var(--color-text-muted); font-size: .75rem; line-height: 1.45; margin: .8rem 0 0; }
.hix-result .pcx-callout { font-size: .85rem; margin-top: .8rem; }
.hix-result .pcx-callout[hidden] { display: none; }

/* The navy head and gold pill are fixed colours on purpose (they sit on their
   own navy ground in both themes). Text on --color-primary, which flips with
   the theme, uses --color-on-primary, which flips with it (LANDMINES G). */
.hix-marker, .hix-here { color: var(--color-on-primary); }

/* One column (the family's 980px breakpoint): the ranges come right after
   step 2, before the optional income step, so a phone reader sees the answer
   without scrolling past a form they may not need. */
@media (max-width: 980px) {
  .hix-result { order: 3; position: static; }
  #hix-form { display: contents; }
  #hix-form > .pcx-card:nth-of-type(1) { order: 1; }
  #hix-form > .pcx-card:nth-of-type(2) { order: 2; }
  #hix-form > .pcx-card:nth-of-type(3) { order: 4; }
}
@media (max-width: 640px) {
  .hix-actions { flex-direction: column; }
  .hix-stepper { max-width: none; }
  .hix-figure-amount { font-size: 1.6rem; }
}

/* Print: only the generated sheet prints. Must out-shout the pension
   stylesheet's own print rule, which hides everything that is not its
   #print-worksheet (a node this page does not have). */
.hix-print-only { display: none; }
@media print {
  body > #hix-print-sheet { color: #000; display: block !important; font-size: 11pt; }
  #hix-print-sheet h1 { font-size: 15pt; margin: 0 0 4pt; }
  #hix-print-sheet h2 { font-size: 12pt; margin: 10pt 0 3pt; }
  #hix-print-sheet table { border-collapse: collapse; width: 100%; }
  #hix-print-sheet td, #hix-print-sheet th { border-bottom: 1px solid #999; padding: 3pt 4pt; text-align: left; vertical-align: top; }
  #hix-print-sheet td.hix-p-num { text-align: right; white-space: nowrap; }
  #hix-print-sheet .hix-p-muted { color: #444; font-size: 9pt; }
  #hix-print-sheet .hix-p-pill { border: 1px solid #000; border-radius: 8pt; font-size: 9pt; padding: 0 4pt; }
}
