/* User-friendly pass (10 Nov): page headers, forms, campaign tracker, home, health line.
   Loaded after app.css, research.css and pages.css. */
.page { padding-top: 1.6rem; }
.card { padding: 1.2rem 1.35rem; margin-bottom: 1.25rem; overflow-x: visible; }
.page-head { margin-bottom: 1.1rem; }
.page-head h1 { margin: 0.1rem 0 0.25rem; font-size: 1.6rem; }
.page-head .purpose { margin: 0; color: var(--muted); font-size: 0.98rem; max-width: 70ch; }
.meta { margin: -0.4rem 0 1.1rem; font-size: 0.9rem; }
.nowrap { white-space: nowrap; }
.small { font-size: 0.85rem; }
.table-wrap { overflow-x: auto; max-width: 100%; }
h3 { font-size: 0.95rem; margin: 0 0 0.5rem; }

/* buttons: <a class="button"> looks like a button */
a.button { display: inline-block; border: 1px solid #c3cad3; background: #fff; color: var(--ink); border-radius: 6px; padding: 0.42rem 0.9rem; text-decoration: none; }
a.button:hover { background: #f0f3f6; text-decoration: none; }
a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
a.button.primary:hover { background: #194f9f; }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 0.4rem; }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 600; border-radius: 999px; padding: 0.1rem 0.6rem; margin: 0.1rem 0; }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-warn:hover { text-decoration: none; filter: brightness(0.97); }

/* forms */
form.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form fieldset { display: flex; flex-direction: column; gap: 1rem; padding: 0.9rem 1.1rem 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.field > label, .field > .label { font-size: 0.92rem; font-weight: 600; color: var(--ink); display: block; }
.field .optional { font-weight: 400; color: var(--muted); font-size: 0.8rem; margin-inline-start: 0.3rem; }
.hint { margin: 0; font-size: 0.82rem; color: var(--muted); }
.error-text { margin: 0; font-size: 0.85rem; color: var(--crit); font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea, .field.has-error .picker { border-color: var(--crit); }
.form-errors { background: var(--crit-bg); color: #7d1a14; border-radius: var(--radius); padding: 0.7rem 1rem; margin: 0.4rem 0 1rem; }
.form-errors ul { margin: 0.3rem 0 0; padding-inline-start: 1.2rem; }
.form-errors a { color: #7d1a14; text-decoration: underline; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.custom-input { margin-top: 0.35rem; }
.toggles { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.toggles.stacked { flex-direction: column; align-items: flex-start; }
label.toggle { flex-direction: row; align-items: center; gap: 0.45rem; color: var(--ink); font-size: 0.92rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; cursor: pointer; background: #fff; }
label.toggle:has(input:checked) { border-color: var(--accent); background: var(--info-bg); }
label.toggle input { margin: 0; }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
details.form-toggle > summary, .card > details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
details.form-toggle > summary::-webkit-details-marker, .card > details > summary::-webkit-details-marker { display: none; }
details.form-toggle > summary::before, .card > details > summary::before { content: "▸"; color: var(--muted); font-size: 0.9rem; }
details[open].form-toggle > summary::before, .card > details[open] > summary::before { content: "▾"; }
details > summary h2 { display: inline; margin: 0; }
.card > details[open] > summary { margin-bottom: 0.6rem; }

/* searchable country picker */
.picker { border: 1px solid #c9d0d8; border-radius: 6px; padding: 0.35rem; background: #fff; position: relative; }
.chips { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chip-btn { font-size: 0.85rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--info-bg); border-color: #c5d6ef; color: var(--accent); }
input.picker-search { border: 0; outline: none; width: 100%; padding: 0.35rem 0.3rem; font: inherit; }
.picker-list { list-style: none; margin: 0; padding: 0.25rem 0; position: absolute; inset-inline: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px rgba(20, 30, 45, 0.12); max-height: 16rem; overflow-y: auto; z-index: 5; }
.picker-list li { padding: 0.35rem 0.75rem; cursor: pointer; }
.picker-list li:hover { background: var(--info-bg); }

/* campaign progress tracker */
ol.ptrack { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.4rem; }
.ptrack .pt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.25rem; position: relative; }
.ptrack .pt:not(:last-child)::after { content: ""; position: absolute; top: 0.95rem; inset-inline-start: calc(50% + 1.1rem); width: calc(100% - 1.8rem); height: 2px; background: var(--line); }
.ptrack .pt-done:not(:last-child)::after { background: var(--ok); }
.ptrack .dot { width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; background: #eef1f5; color: var(--muted); border: 2px solid var(--line); }
.ptrack .pt-done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.ptrack .pt-current .dot { background: #fff; border-color: var(--accent); color: var(--accent); }
.ptrack .pt-waiting .dot { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.ptrack .pt-label { font-size: 0.82rem; font-weight: 600; line-height: 1.25; }
.ptrack .pt-note { font-size: 0.75rem; color: var(--muted); line-height: 1.2; }
.ptrack .pt-waiting .pt-note { color: var(--warn); font-weight: 600; }
.waiting { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.waiting p { margin: 0; }
ul.waiting-list { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* home */
.attention { border-inline-start: 4px solid var(--warn); }
.all-clear { margin: 0; color: var(--ok); font-weight: 600; }
.attn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
ul.attn-list { display: flex; flex-direction: column; gap: 0.5rem; }
ul.campaign-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.9rem; }
.campaign-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.45rem; }
.campaign-card p { margin: 0; }
.cc-head { display: flex; flex-direction: column; gap: 0.1rem; }
.mini-track { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.mini-track .seg { height: 6px; border-radius: 3px; background: #e6e9ee; }
.mini-track .seg-done { background: var(--ok); }
.mini-track .seg-current { background: var(--accent); }
.mini-track .seg-waiting { background: var(--warn); }

/* one-line health status under the top bar (details live on Home > System health) */
.health-line { padding: 0.3rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.8rem; }
.hl { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); }
.hl::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--muted); }
.hl-ok::before { background: var(--ok); }
.hl-warn { color: var(--warn); }
.hl-warn::before { background: var(--warn); }
.hl-bad { color: var(--crit); font-weight: 600; }
.hl-bad::before { background: var(--crit); }
.hl-demo::before { background: #8b95a1; }

@media (max-width: 900px) {
  ol.ptrack { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 1rem; }
  .ptrack .pt:nth-child(4)::after { display: none; }
  .attn-grid, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  ol.ptrack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptrack .pt::after { display: none; }
}

/* declutter (11 Nov): grouped nav, testing-mode chip */
.nav .more { position: relative; }
.nav .more summary { list-style: none; cursor: pointer; color: #c9d3de; padding: 0.3rem 0.65rem; border-radius: 6px; }
.nav .more summary::-webkit-details-marker { display: none; }
.nav .more summary::after { content: " \25BE"; font-size: 0.8em; }
.nav .more summary:hover, .nav .more[open] summary { background: #24303f; }
.nav .more summary.active { background: #2c3b4f; color: #fff; }
.more-menu { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 11rem; margin-top: 0.25rem; padding: 0.3rem; display: flex; flex-direction: column; background: #17202c; border: 1px solid #2c3b4f; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.25); }
.more-menu a { display: block; padding: 0.4rem 0.7rem; }
.chip-test { background: #5b4a14; color: #ffe9a6; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.8rem; font-weight: 600; text-decoration: none; }
.chip-test:hover { background: #75601a; text-decoration: none; }
