/* KoreaGrant identity, drawn from the existing red and blue favicon. */
:root {
  --ink: #14243e;
  --muted: #4c5d76;
  --line: #d7e2f0;
  --soft: #f3f7fc;
  --brand: #1157a5;
  --brand-dark: #0c3b76;
  --brand-light: #e9f2fe;
  --accent: #fce7eb;
  --accent-red: #b91935;
  --danger: #a92739;
  --shadow: 0 18px 48px rgba(15, 51, 98, .11);
  --kg-red: #b91935;
  --kg-red-bright: #ed1532;
  --kg-navy: #0e2548;
  --kg-sky: #bdd8f9;
  --kg-hero-paper: #f3f7fc;
  --kg-hover-line: #9ebce1;
  --kg-action-cursor: url("/assets/favicon/koreagrant-pointer-20261115.png") 10 4, pointer;
  accent-color: var(--brand);
}

::selection { background: #fbdce5; color: var(--kg-navy); }

.site-header .brand {
  gap: 10px;
  min-width: 0;
  color: var(--kg-navy);
}

.brand img.identity-symbol,
.footer-brand img.identity-symbol {
  display: block;
  flex: none;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.site-header .brand strong {
  color: var(--kg-navy);
  font-size: 23px;
  font-weight: 880;
  line-height: 1.04;
  letter-spacing: -.055em;
}

.identity-grant { color: var(--kg-red); }
.brand .identity-grant { display: inline; }

.site-header .brand small {
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: -.015em;
}

.site-footer {
  background: var(--kg-navy);
  color: #dce9fb;
}

.footer-grid .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 22px;
  line-height: 1.1;
}

.footer-brand img.identity-symbol {
  width: 33px;
  height: 33px;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
}

.footer-brand .identity-grant { color: var(--kg-sky); }
.footer-grid p, .site-footer .footer-note { color: #bdcce3; }
.footer-grid nav a { color: #dce9fb; }
.footer-grid nav a:hover { color: #fff; text-decoration: underline; }

.grant-hero { background: var(--kg-hero-paper); border-color: var(--line); }
.grant-hero-photo::after {
  background: linear-gradient(90deg, var(--kg-hero-paper), rgba(243,247,252,.96) 7%, rgba(243,247,252,.65) 21%, rgba(243,247,252,0) 40%);
}

.grant-hero h1 { color: var(--kg-navy); }
.grant-hero h1 em { color: var(--brand); }
.grant-hero-kicker { color: var(--brand-dark); }
.grant-hero-kicker::before { background: var(--kg-red-bright); }
.grant-hero-description, .grant-hero-topics > span, .grant-hero-topics a,
.grant-overview-intro div > span, .grant-overview-stats dt { color: var(--muted); }
.grant-hero .search-box { border-color: var(--line); box-shadow: 0 8px 28px rgba(15,51,98,.09); }
.grant-hero .search-box input::placeholder, .grant-hero-search-icon { color: #586c86; }
.grant-hero .search-box button, .grant-hero-primary { background: var(--brand); }
.grant-hero-primary { border-color: var(--brand); }
.grant-hero-secondary { color: var(--brand-dark); }
.grant-overview-icon { background: var(--brand-light); color: var(--brand); }
.grant-overview-stats > div + div { border-color: var(--line); }
.grant-overview-stats dd { color: var(--brand-dark); }

.hero { background: linear-gradient(135deg, var(--brand-light), #fbfdff 55%, #fcf1f3); }
.hero::before { background: rgba(17,87,165,.07); }
.hero-panel, .search-box { border-color: var(--line); box-shadow: var(--shadow); }
.page-hero { background: linear-gradient(125deg, var(--soft) 35%, #fff 69%, #fcf0f3); }
.article-layout, .tool-layout { background: linear-gradient(var(--soft), #fff 320px); }
.popular-section, .region-section { background: var(--soft); }
.browse-grid .browse-card-empty, .region-cloud .region-empty { background: var(--soft); }
.grant-org, .grant-card-facts dt, .grant-card-facts dd, .finder-reasons { color: var(--muted); }
.grant-card:hover { border-color: var(--kg-hover-line); box-shadow: var(--shadow); }
.action-grid a:hover, .browse-grid a:hover, .article-card:hover { border-color: var(--kg-hover-line); }
.eligibility-banner, .trust-strip { background: var(--kg-navy); }
.eligibility-banner .eyebrow, .eligibility-banner p, .trust-grid span { color: var(--kg-sky); }
.usage-guide .container { background: var(--line); }
.usage-guide .container > div { background: #f8fbff; }
.grant-filters input, .grant-filters select, .select-field select { border-color: var(--line); }
.option-grid label > span { background: #f8fbff; }
.option-grid input:checked + span { background: var(--brand-light); }
.checker-result, .article-cta, .tool-notice { background: var(--brand-light); border-color: var(--line); }
.result-warning, .grant-core { border-color: var(--line); }
.grant-core { border-top-color: var(--brand); box-shadow: var(--shadow); }
.status-badge.status-open { color: #0a6048; background: #e4f5ed; }

.eitc-widget {
  --eitc-ink: var(--ink);
  --eitc-muted: var(--muted);
  --eitc-line: var(--line);
  --eitc-blue: var(--brand);
  --eitc-wash: var(--soft);
}

.site-nav a:not(.nav-cta):hover,
.grant-hero-topics a:hover,
.grant-hero-secondary:hover,
.grant-card h3 a:hover,
.grant-card-link:hover,
.section-heading > a:hover,
.article-content a:not(.primary-link, .official-apply, .shortcut, .article-action-button):hover {
  color: var(--kg-red);
}

.site-nav .nav-cta:hover,
.search-box button:hover,
.grant-hero .search-box button:hover,
.grant-hero-primary:hover,
.grant-filters button:hover,
.official-apply:hover,
.checker-submit:hover {
  color: #fff;
  background-color: var(--brand-dark);
}

a[href]:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
.grant-hero a:focus-visible, .grant-overview a:focus-visible,
.eitc-widget :is(select,input,button,summary,a):focus-visible,
.option-grid input:focus-visible + span, .shortcut:focus-visible {
  outline: 2px solid var(--kg-red);
  outline-offset: 3px;
}

.shortcut:focus-visible { outline-color: var(--kg-red) !important; }
.search-box:focus-within, .grant-hero .search-box:focus-within {
  outline: 2px solid var(--kg-red);
  outline-offset: 3px;
}
.search-box input:focus-visible { outline: 0; }
.site-footer a:focus-visible { outline-color: #ff9eae; }

@media (hover: hover) and (pointer: fine) and (forced-colors: none) {
  a[href], button:enabled, select:enabled, summary,
  .option-grid label, input[type="checkbox"]:enabled, input[type="radio"]:enabled {
    cursor: var(--kg-action-cursor);
  }
  .shortcut { cursor: var(--kg-action-cursor) !important; }
}

@media (max-width: 860px) {
  .grant-hero-photo::after {
    background: linear-gradient(0deg, var(--kg-hero-paper), rgba(243,247,252,0) 22%);
  }
}

@media (max-width: 760px) {
  .brand img.identity-symbol { width: 38px; height: 38px; }
  .site-header .brand strong { font-size: 21px; }
}
