/* Homepage shares the site's grid, controls and spacing scale. */
.home-heading { margin: 0 0 28px; }
.home-heading-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.home-heading h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; line-height: 1.3; }
.public-service-badge { padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--accent-strong); font-size: 12px; line-height: 1.5; }
.home-heading p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.home-tools { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; margin-bottom: 32px; }
.home-check, .home-history { min-width: 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.home-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.home-panel-heading h2, .home-section-heading h2 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.5; }
.home-panel-heading > span { font-size: 11px; letter-spacing: .05em; color: var(--muted); }
.home-panel-heading > svg { color: var(--muted); }
.home-protocols { display: flex; gap: 4px; min-width: 0; padding: 4px; margin: 22px 0; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.home-protocols label { position: relative; flex: 1; cursor: pointer; text-align: center; }
.home-protocols input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.home-protocols span { display: block; padding: 8px 12px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.home-protocols input:checked + span { background: var(--surface); color: var(--accent-strong); box-shadow: 0 1px 4px #20382c18; }
.home-protocols input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.home-check-fields { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 20px; }
.home-field { min-width: 0; }
.home-field > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.home-field > input, .home-history-form > input, .home-field > select { width: 100%; min-width: 0; height: 46px; border: 1px solid var(--control-line); border-radius: 8px; background: var(--surface); color: var(--text); padding: 0 13px; font: inherit; font-size: 14px; }
.home-field input::placeholder, .home-history-form input::placeholder { color: var(--muted); opacity: .8; }
.home-field > input:focus-visible, .home-history-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.home-field > p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.home-check-action { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.home-check-action .btn { min-width: 128px; justify-content: space-between; gap: 24px; }
.home-check-action p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.home-cost-note { margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.home-form-error { margin: 12px 0 0; color: var(--red); font-size: 13px; }
.home-history { display: flex; flex-direction: column; }
.home-history > p { color: var(--muted); font-size: 13px; margin: 12px 0 20px; }
.home-history-form { display: flex; gap: 8px; }
.home-history-form .btn { flex-shrink: 0; padding-inline: 16px; }
.home-history > .home-history-status:empty { display: none; }
.home-history > .home-history-status { margin: 12px 0 0; color: var(--accent-strong); overflow-wrap: anywhere; }
.home-history-summary { margin-top: auto; padding-top: 36px; }
.home-history-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-history-metrics > div { display: flex; flex-direction: column; gap: 6px; }
.home-history-metrics strong { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.home-history-metrics span { font-size: 12px; color: var(--muted); }
.home-history-meta { margin: 18px 0 22px; font-size: 12px; color: var(--muted); }
.home-observation-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.home-observation-link small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 400; }
.home-results { margin: 0 0 28px; }
.home-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.home-section-heading a { font-size: 13px; }
.home-section-note { font-size: 12px; color: var(--muted); margin: 8px 0 12px; }
.home-results-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.home-results-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.home-results-table th { padding: 12px 20px; background: var(--bg-soft); color: var(--muted); font-weight: 500; white-space: nowrap; }
.home-results-table td { padding: 14px 20px; border-top: 1px solid var(--line); white-space: nowrap; }
.home-results-table td:first-child { overflow-wrap: anywhere; white-space: normal; min-width: 160px; }
.home-results-table small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.home-results-table strong { color: var(--accent-strong); font-size: 17px; }
.home-results-empty { display: flex; align-items: center; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.home-empty-icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--bg-soft); color: var(--muted); }
.home-results-empty p { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.home-results-empty div > span { color: var(--muted); font-size: 12px; }
.home-results-empty a { margin-left: auto; font-size: 13px; white-space: nowrap; }
.home-notes { border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; }
.home-notes summary { width: fit-content; cursor: pointer; color: var(--muted); padding: 4px 0; }
.home-notes > div { max-width: 800px; padding-top: 4px; color: var(--muted); line-height: 1.8; }
.home-notes strong { font-weight: 600; color: var(--text); }
@media (max-width: 760px) {
  .home-heading { margin-bottom: 22px; }
  .home-heading h1 { font-size: 27px; }
  .home-heading p { max-width: 32em; line-height: 1.7; }
  .home-tools { grid-template-columns: 1fr; gap: 16px; margin-bottom: 26px; }
  .home-check, .home-history { padding: 22px; }
  .home-history-summary { padding-top: 28px; }
  .home-field > input, .home-history-form > input { font-size: 16px; }
  .home-results-empty { display: grid; grid-template-columns: 32px minmax(0,1fr); padding: 20px; gap: 12px; }
  .home-empty-icon { width: 32px; height: 36px; }
  .home-results-empty a { grid-column: 2; margin: 0; }
  .home-results-table th, .home-results-table td { padding: 12px; }
}
@media (max-width: 380px) {
  .home-check, .home-history { padding: 18px; }
  .home-check-action { align-items: stretch; flex-direction: column; gap: 10px; }
  .home-check-action .btn { justify-content: center; }
  .home-panel-heading { gap: 6px; }
}

/* One-page setup: core fields first, optional configuration stays collapsed. */
.home-model-fields { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 14px; }
.home-model-help { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.home-model-help p { flex: 1; min-width: 180px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.home-text-button { padding: 2px 0; border: 0; background: transparent; color: var(--accent-strong); font: inherit; font-size: 12px; cursor: pointer; }
.home-text-button:disabled { opacity: .5; cursor: default; }
.home-text-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.home-advanced { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.home-advanced summary { cursor: pointer; color: var(--muted); font-size: 12px; line-height: 1.7; }
.home-advanced summary > span { margin-left: 12px; color: var(--text); }
.home-option-fields { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; }
.home-advanced > p, .home-budget { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.home-check-action #quick-start { min-width: 146px; }
.home-check-action button:disabled { opacity: .6; cursor: default; }
@media (max-width: 420px) {
  .home-option-fields { grid-template-columns: 1fr; }
  .home-advanced summary > span { margin-left: 8px; }
}

@media (max-width: 360px) { .home-model-fields { grid-template-columns: 1fr; } }
#quick-check { scroll-margin-top: 104px; }
