:root {
  color-scheme: light;
  --paper: #f7f7f3;
  --white: #fff;
  --ink: #192c3b;
  --muted: #586772;
  --line: #e0e4e4;
  --coral: #bb503f;
  --coral-soft: #fbede8;
  --soft: #edf1f1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, summary, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a, summary, input { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 3px solid var(--coral); outline-offset: 4px; }
a { color: inherit; text-underline-offset: 3px; }
p, h1, h2, h3, h4 { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; border: 0; white-space: nowrap; clip-path: inset(50%); }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px 18px; background: var(--ink); color: white; z-index: 20; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.page-shell { max-width: 1104px; margin: 0 auto; padding: 0 40px; }
.site-header { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.wordmark { display: inline-flex; min-height: 44px; align-items: center; gap: 11px; text-decoration: none; font-size: 24px; font-weight: 750; letter-spacing: -1px; }
.brand-mark { position: relative; width: 25px; height: 28px; display: block; border: 2px solid var(--ink); border-radius: 3px; }
.brand-mark::before { content: ""; position: absolute; width: 12px; height: 12px; top: -3px; right: -3px; background: var(--paper); }
.brand-mark::after { content: ""; position: absolute; width: 12px; height: 12px; top: -3px; right: -3px; border-top: 3px solid var(--coral); border-right: 3px solid var(--coral); }
.wordmark-dot { color: var(--coral); }
.preview-label { color: var(--ink); background: var(--white); font-size: 12px; white-space: nowrap; border: 1px solid var(--line); padding: 5px 10px; border-radius: 100px; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 48px 0 36px; }
.eyebrow { font-size: 11px; letter-spacing: 1.6px; font-weight: 700; text-transform: uppercase; margin-bottom: 13px; color: var(--coral); }
h1 { font-size: 54px; line-height: 1.06; letter-spacing: -2.5px; font-weight: 680; }
.intro-description { color: var(--muted); margin-top: 18px; font-size: 16px; line-height: 1.65; }
.snapshot-note { display: flex; align-items: flex-start; gap: 12px; border-left: 1px solid #d4dad9; padding: 4px 0 4px 22px; font-size: 12px; line-height: 1.8; color: var(--muted); margin-bottom: 5px; }
.snapshot-symbol { font-size: 24px; line-height: 1.15; color: var(--coral); }
.snapshot-heading { color: var(--ink); font-size: 14px; font-weight: 650; }
.snapshot-caveat { font-size: 11px; }
.filters { display: flex; align-items: stretch; gap: 5px; width: fit-content; background: #e9eded; padding: 5px; border-radius: 12px; }
.filter-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; transition: background 150ms, color 150ms; white-space: nowrap; }
.filter-button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px #192c3b10; }
.filter-button:hover { color: var(--ink); }
.saved-count { display: inline-flex; justify-content: center; align-items: center; min-width: 19px; min-height: 19px; padding: 0 4px; background: #dde4e5; border-radius: 100px; font-size: 10px; font-variant-numeric: tabular-nums; }
.filter-context { margin-top: 12px; color: var(--muted); font-size: 12px; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; margin: 2px 0 4px; }
.results-count { font-size: 12px; color: var(--muted); }
.archive-control { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); cursor: pointer; }
.archive-control input { margin: 0; width: 16px; height: 16px; accent-color: var(--ink); }
.storage-notice { background: var(--coral-soft); color: #773c2e; font-size: 13px; padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; }
.calls-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.call-card { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: 0 2px 4px #192c3b02; }
.card-main { padding: 20px 24px 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; min-height: 44px; }
.call-status { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.call-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #798f93; flex-shrink: 0; }
.call-status--check { color: #8d442f; }
.call-status--check::before { background: var(--coral); }
.call-status--archived { color: var(--muted); }
.call-status--archived::before { background: #a6acad; }
.save-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; background: transparent; border: 1px solid var(--line); color: var(--ink); }
.save-button:hover { background: var(--soft); }
.save-button[aria-pressed="true"] { background: var(--coral-soft); color: var(--coral); border-color: #f0cdc2; }
.save-button[aria-pressed="true"] svg { fill: currentColor; }
.icon { width: 19px; height: 19px; display: inline-block; flex-shrink: 0; }
.call-title { font-size: 23px; line-height: 1.23; font-weight: 660; letter-spacing: -.6px; text-wrap: balance; overflow-wrap: anywhere; }
.organizer { color: var(--muted); font-size: 12px; margin-top: 9px; line-height: 1.55; }
.call-facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 23px 0 19px; }
.fact-label { display: block; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .65px; text-transform: uppercase; margin-bottom: 5px; }
.budget-value { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.7px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.budget-value--long { font-size: 21px; }
.deadline-fact { border-left: 1px solid var(--line); padding-left: 16px; }
.deadline-date { font-size: 21px; line-height: 1.35; font-weight: 650; letter-spacing: -.5px; display: block; }
.deadline-year { font-size: 10px; color: var(--muted); display: block; }
.card-eligibility { padding: 15px 0; border-top: 1px solid var(--line); }
.residency-line { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; font-weight: 650; line-height: 1.6; }
.residency-line .icon { width: 16px; height: 16px; margin-top: 2px; color: #64797e; }
.residency-extra { font-size: 12px; color: var(--muted); margin: 6px 0 0 24px; line-height: 1.6; }
.first-step { padding: 0 0 17px; }
.first-step p { font-size: 12px; line-height: 1.65; color: var(--muted); }
.brief-details { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.brief-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; min-height: 52px; font-size: 13px; font-weight: 650; }
.brief-details > summary:hover { background: #f8faf9; }
.details-hint { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: auto; }
.chevron { display: block; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin: 0 2px 0 2px; transition: transform 150ms; }
details[open] > summary .chevron { transform: rotate(225deg) translate(-1px, -1px); }
.detail-body { padding: 3px 24px 24px; }
.detail-section { padding-top: 19px; margin-top: 19px; border-top: 1px solid var(--line); }
.detail-section:first-child { padding-top: 5px; margin-top: 0; border-top: 0; }
.detail-heading { font-size: 13px; font-weight: 700; margin-bottom: 9px; }
.detail-section p, .detail-section li { font-size: 12px; line-height: 1.8; color: var(--muted); }
.detail-section p + p { margin-top: 8px; }
.detail-list { margin: 8px 0 0; padding-left: 19px; }
.detail-list li { padding-left: 3px; }
.detail-list li + li { margin-top: 7px; }
.budget-note { margin-top: 10px; padding: 9px 12px; border-left: 2px solid #e6afa0; background: #fcf5f1; }
.detail-section .detail-label { color: var(--ink); font-weight: 650; }
.check-section { background: #f8f6f2; padding: 15px; border-radius: 9px; border-top: 0; }
.check-section .detail-heading { display: flex; align-items: center; gap: 7px; }
.check-section .detail-heading::before { content: ""; height: 6px; width: 6px; background: var(--coral); border-radius: 50%; }
.source-meta { margin: 20px 0 12px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.source-link, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; border-radius: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); padding: 11px 18px; font-size: 13px; font-weight: 600; text-decoration: none; }
.source-link { width: 100%; }
.source-link:hover, .primary-button:hover { background: #2d4655; }
.card-source-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 24px 10px; color: var(--muted); font-size: 10px; }
.quick-source-link { display: inline-flex; align-items: center; min-height: 44px; gap: 5px; color: var(--ink); text-decoration: none; font-size: 11px; }
.quick-source-link:hover { text-decoration: underline; }
.quick-source-link .icon { width: 13px; height: 13px; }
.call-card--archived { background: #fcfcfa; }
.empty-state, .error-state { text-align: center; padding: 52px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.empty-symbol { display: flex; width: 48px; height: 48px; justify-content: center; align-items: center; margin: 0 auto 20px; background: var(--coral-soft); color: var(--coral); border-radius: 50%; font-size: 24px; }
.empty-state h3, .error-state h3 { font-size: 23px; line-height: 1.3; letter-spacing: -.5px; }
.empty-state p, .error-state p { max-width: 410px; font-size: 14px; color: var(--muted); margin: 12px auto 22px; }
.pilot-section { margin-top: 36px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.install-section { margin-top: 24px; }
.install-section:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
.install-section p { max-width: 640px; margin-top: 12px; font-size: 13px; color: var(--muted); line-height: 1.75; }
.pilot-details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 65px; font-weight: 600; font-size: 13px; }
.plus-icon { height: 13px; width: 13px; position: relative; }
.plus-icon::before, .plus-icon::after { content: ""; position: absolute; top: 6px; left: 0; width: 13px; height: 1px; background: var(--ink); }
.plus-icon::after { transform: rotate(90deg); }
.pilot-details[open] .plus-icon::after { transform: rotate(0); }
.pilot-copy { max-width: 690px; padding: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.pilot-copy p + p { margin-top: 14px; }
.pilot-copy .pilot-status { color: var(--ink); font-weight: 600; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 26px 0 34px; font-size: 11px; color: var(--muted); }
.site-footer > span:first-child { font-size: 15px; color: var(--ink); font-weight: 650; letter-spacing: -.5px; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translate(-50%, 12px); width: max-content; max-width: calc(100% - 32px); background: var(--ink); color: white; border-radius: 10px; padding: 12px 18px; text-align: center; font-size: 13px; box-shadow: 0 4px 24px #192c3b28; opacity: 0; pointer-events: none; transition: opacity 180ms, transform 180ms; z-index: 10; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .page-shell { padding: 0 20px; max-width: 520px; }
  .site-header { min-height: 64px; }
  .wordmark { font-size: 21px; gap: 9px; }
  .brand-mark { width: 22px; height: 25px; }
  .preview-label { font-size: 10px; padding: 4px 8px; }
  .intro { display: block; padding: 20px 0 18px; }
  .eyebrow { margin-bottom: 8px; font-size: 10px; letter-spacing: 1.4px; }
  h1 { font-size: 34px; letter-spacing: -1.3px; }
  .intro-description { display: none; }
  .snapshot-note { margin-top: 13px; margin-bottom: 0; padding: 0 0 0 11px; gap: 0; font-size: 11px; line-height: 1.7; }
  .snapshot-symbol, .snapshot-heading { display: none; }
  .snapshot-caveat { font-size: 11px; }
  .filters { width: 100%; gap: 2px; padding: 4px; }
  .filter-button { font-size: 11px; padding: 0 10px; flex: 1; min-width: 0; gap: 4px; }
  .filter-button[data-filter="national"] { flex: 1.65; }
  .filter-context { font-size: 11px; margin-top: 10px; line-height: 1.6; }
  .results-toolbar { min-height: 51px; margin: 2px 0 5px; }
  .results-count, .archive-control { font-size: 11px; }
  .calls-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card-main { padding: 14px 19px 0; }
  .card-top { margin-bottom: 8px; }
  .call-title { font-size: 22px; }
  .call-facts { gap: 10px; margin: 20px 0 17px; }
  .budget-value { font-size: 24px; }
  .budget-value--long { font-size: 20px; }
  .deadline-fact { padding-left: 13px; }
  .deadline-date { font-size: 20px; }
  .brief-details > summary { padding-left: 19px; padding-right: 19px; }
  .detail-body { padding-left: 19px; padding-right: 19px; }
  .card-source-footer { padding-left: 19px; padding-right: 19px; }
  .details-hint { font-size: 10px; }
  .pilot-section { margin-top: 26px; }
  .site-footer { padding-bottom: 25px; }
}

@media (max-width: 374px) {
  .page-shell { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 32px; }
  .filter-button { padding-left: 7px; padding-right: 7px; }
  .card-main, .detail-body { padding-left: 17px; padding-right: 17px; }
  .budget-value--long { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
