/* Research Budget Calculator: only what shell.css lacks. Palette and faces come from shell.css tokens. */

/* Form: the hand-off note at the top of the form, and the doubt choice under the two chances */
.rbc-handoff-note { margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius-tile); background: var(--soft-mint); color: var(--deep-plum); }
.rbc-doubt { margin-top: 24px; }

/* Verdict: the near-the-line note in smaller type; the care line is an ordinary verdict__sub, as on the other tools */
.verdict__sub.rbc-near { font-size: 0.9375rem; }


/* Flags: the hand-off link under the team-split flag */
.rbc-flag-link { margin: 10px 0 0; }

/* Key numbers: 2, 3, 5 or 6 tiles. Every row is filled edge to edge (6 = 3 + 3, 5 = 3 + 2, 3 = 3, 2 = 2). */
@media screen and (min-width: 641px) {
  .key-numbers { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; }
  .key-numbers > .stat { grid-column: span 2; }
  .key-numbers:has(> .stat:nth-child(5)):not(:has(> .stat:nth-child(6))) > .stat:nth-child(n+4),
  .key-numbers:not(:has(> .stat:nth-child(3))) > .stat { grid-column: span 3; }
}

/* Cards: the intro line under each icon heading, and the charts below the table */
.rbc-intro { max-width: 48rem; margin-bottom: 16px; }
.rbc-chart { margin-top: 28px; }
.rbc-wait-none { font-weight: 500; margin: 0; }

/* Worth table: the visitor's doubt setting is bold and named in words; a text cell may wrap */
.rbc-worth-table tr.rbc-mine th, .rbc-worth-table tr.rbc-mine td { background: rgba(199, 235, 225, 0.35); }
.rbc-worth-table tr.rbc-mine th:first-child { padding-left: 10px; }
.rbc-worth-table tr.rbc-mine td:last-child { padding-right: 10px; }
.rbc-worth-table td.rbc-cell-text { white-space: normal; min-width: 7rem; }

/* Wait chart on a narrow card: the waits no check pays for, listed under the chart */
.rbc-nopay { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.rbc-nopay li + li { margin-top: 0; }
.rbc-nopay__label { display: block; font-weight: 500; }
.rbc-nopay__text { display: block; color: var(--deep-plum); }

/* Methods: three tiles, one wide row each on a narrow card */
.rbc-methods .tile__title { margin: 0; }

@media screen and (max-width: 480px) {
  .rbc-worth-table { font-size: 15px; }
  .rbc-worth-table th, .rbc-worth-table td { padding: 8px; min-width: 0; }
  .rbc-worth-table th:first-child, .rbc-worth-table td:first-child { padding-left: 0; }
  .rbc-worth-table th:last-child, .rbc-worth-table td:last-child { padding-right: 0; }
  .rbc-worth-table tr.rbc-mine th:first-child { padding-left: 6px; }
  .rbc-worth-table tr.rbc-mine td:last-child { padding-right: 6px; }
  .rbc-worth-table td.rbc-cell-text { min-width: 0; }
}

@media print {
  .rbc-handoff-note { display: none; }
  .verdict { padding: 6pt 12pt; }
  .verdict__headline { font-size: 12pt; margin-bottom: 4pt; }
  .verdict__sub, .rbc-care { font-size: 9pt; line-height: 1.35; }
  .rbc-care { margin-top: 4pt; }
  .verdict__sub + .verdict__sub { margin-top: 3pt; }
  .flag { padding: 4pt 8pt; font-size: 9pt; }
  .key-numbers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4pt; }
  .stat { padding: 4pt 6pt; border-radius: 6pt; }
  .stat__value { font-size: 11pt; }
  .stat__label { font-size: 7.5pt; line-height: 1.3; }
  .results .card { padding: 6pt 10pt; }
  .card-head { margin-bottom: 4pt; gap: 6pt; }
  .card-head__icon { width: 16pt; height: 16pt; }
  .card-head .card-title { font-family: var(--font-text); font-size: 10.5pt; font-weight: 500; }
  .rbc-intro { font-size: 9pt; margin-bottom: 4pt; }
  .rbc-chart { margin-top: 6pt; }
  .rbc-worth-table th, .rbc-worth-table td { padding: 1pt 4pt; font-size: 8.5pt; line-height: 1.25; }
  .rbc-worth-table caption { padding-bottom: 2pt; font-size: 9pt; }
  .rbc-worth-table tr.rbc-mine th:first-child { padding-left: 4pt; }
  .flags { gap: 3pt; }
  .flag__title { margin-bottom: 1pt; }
  .flag p { margin: 0; }
  .limits p { font-size: 8pt; line-height: 1.3; }
  .limits h2 { margin-bottom: 2pt; }
  .stat { padding: 3pt 6pt; }
  .next-step, .card .next-step { padding: 3pt 8pt; }
  .print-footer { margin-top: 4pt; }
  .next-step, .card .next-step { padding: 4pt 8pt; border-radius: 6pt; font-size: 9pt; line-height: 1.35; border: 0; }
  .next-step h4 { font-size: 9.5pt; margin-bottom: 1pt; }
  .next-step p { font-size: 9pt; }
  .next-steps > * + * { margin-top: 4pt; }
  main > * + * { margin-top: 6pt; }
  .results-body > * + * { margin-top: 4pt; }
  .print-title { font-size: 16pt; }
  .print-sub { margin-bottom: 6pt; }
}
