/* ---------- Base ---------- */
:root {
  --sb-blue:       #0e3d6a;   /* header background */
  --sb-blue-dark:  #142f6c;
  --sb-accent:     #0d6efd;   /* button / heading blue */
  --sb-bg:         #f4f6f9;
  --sb-text:       #222;
  --sb-muted:      #6c757d;
  --sb-border:     #ced4da;
  --container:     1536px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: var(--sb-text);
  background: var(--sb-bg);
  line-height: 1.5;
}

/* ---------- Header (100% width) ---------- */

.site-header {
  width: 100%;
  background: #0d3e6d;
  color: #fff;
  border-bottom: 3px solid #34afff;   /* ← matches main site header */
}

.site-header__inner {
  max-width: 1536px;
  margin: 0 auto;
  padding: 40px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo img {
  height: 30px;
  width: auto;
  display: block;
}

.site-header__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.site-header__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: .2px;
}

.site-header__tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(255, 255, 255, .18);
  border-radius: 10px;
  vertical-align: middle;
}

.site-nav { display: flex; gap: 4px; }

.site-nav a {
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-size: .85rem;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background .15s, color .15s;
}

.site-nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.site-nav a.is-active { background: rgba(255, 255, 255, .2); color: #fff; font-weight: 600; }
.site-nav__logout { margin-left: 8px; opacity: .8; }

/* ---------- Centered container ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px 32px 64px;
}

.page-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 30px 0 32px;
  padding: 0;
}

.page-badges li {
  padding: 7px 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--sb-blue);
  background: #e8f4fd;
  border: 1px solid #b9dffb;
  border-radius: 999px;
  white-space: nowrap;
}

/* Optional: make the strongest benefit pop with your orange */
.page-badges li:last-child {
  color: #fff;
  background: #ed5131;
  border-color: #ed5131;
}


.page-title {
  text-align: center;
  color: var(--sb-blue);
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.page-subtitle {
  font-size:20px;
  font-weight:600;
  text-align: center;
  color: var(--sb-muted);
  margin: 0 0 32px;
}

/* ---------- Card ---------- */
.card {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
  padding: 40px 48px 32px;
}

/* ---------- Form ---------- */
.grant-form label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 18px;
}

.grant-form input:not([type=hidden]),
.grant-form select,
.grant-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 12px;
  font: inherit;
  font-weight: 400;
  color: var(--sb-text);
  background: #fff;
  border: 1px solid var(--sb-border);
  border-radius: 5px;
  transition: border-color .15s, box-shadow .15s;
}

.grant-form input:focus,
.grant-form select:focus,
.grant-form textarea:focus {
  outline: none;
  border-color: var(--sb-accent);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .18);
}

.grant-form textarea { resize: vertical; min-height: 110px; }

.grant-form .hp { display: none; }   /* honeypot */

/* ---------- Two-column rows (desktop) ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;           /* no row-gap; labels already carry margin-bottom */
}

/* Variant: narrow field on the left, wider on the right */
.form-row--1-2 {
  grid-template-columns: 1fr 2fr;
}

/* Make paired fields bottom-align even when one label wraps to two lines */
.form-row > label {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;          /* prevents long placeholders/selects from blowing out the grid */
}

/* ---------- Form sections ---------- */
.form-section {
  border: 0;
  padding: 0;
  margin: 0 0 28px;
  min-width: 0;          /* fieldsets ignore min-width by default and can overflow */
}

.form-section:last-of-type {
  margin-bottom: 20px;
}



.form-section > legend {
  display: block;        /* lets padding/margin behave like a normal heading */
  width: 100%;
  padding: 0 0 8px;
  margin: 0 0 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #34afff;
  border-bottom: 1px solid #e2e8f0;
}

.form-section > :last-child { margin-bottom: 0; }


/* Optional one-line helper under the heading */
.form-section__hint {
  margin: -10px 0 16px;
  font-size: 0.9rem;
  color: #718096;
}

@media (max-width: 640px) {
  .form-section {
    margin-bottom: 22px;
  }
  .form-section > legend {
    margin-bottom: 14px;
  }
}



/* ---------- Collapse to one column on mobile ---------- */
@media (max-width: 640px) {
  .form-row,
  .form-row--1-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }
}


.note {
  color: var(--sb-muted);
  font-size: .82rem;
  margin: 4px 0 20px;
}

.btn-primary {
  background: var(--sb-accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: #0b5ed7; }

/* ---------- Errors ---------- */
.errors {
  background: #fdecea;
  border: 1px solid #f5c2c7;
  color: #842029;
  border-radius: 5px;
  padding: 12px 16px 12px 32px;
  margin: 0 0 24px;
  font-size: .9rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .site-header__inner { padding: 14px 16px; }
  .site-header__title { font-size: .9rem; }
  .site-header__logo img { height: 32px; }
  .container { padding: 24px 16px 48px; }
  .card { padding: 24px 20px; }
  .page-title { font-size: 1.4rem; }
}

/* ---------- Thank-you page ---------- */
.card--thanks {
  max-width: 640px;
  text-align: center;
  padding: 48px 40px 40px;
}

.thanks-icon {
  margin: 0 auto 20px;
  width: 64px;
  height: 64px;
}

.thanks-lead {
  margin: 0 0 8px;
  color: #6c757d;
  font-size: .95rem;
}

.ref-box {
  display: inline-block;
  font-family: Consolas, "Courier New", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #1b3f8f;
  background: #f4f6f9;
  border: 1px dashed #ced4da;
  border-radius: 6px;
  padding: 10px 24px;
  margin: 0 0 8px;
}

.thanks-muted {
  margin: 0 0 24px;
  color: #6c757d;
  font-size: .85rem;
}

.thanks-body {
  margin: 0 0 28px;
  font-size: 1rem;
  line-height: 1.6;
}

.btn-link {
  display: inline-block;
  text-decoration: none;
}

/* reCAPTCHA widget */
.grant-form .g-recaptcha {
  margin: 20px 0 8px;
}

/* keep it from overflowing on narrow phones */
@media (max-width: 360px) {
  .grant-form .g-recaptcha {
    transform: scale(.88);
    transform-origin: 0 0;
  }
}
/* ---------- Sticky footer layout ---------- */
html { height: 100%; }

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }          /* pushes footer to the bottom on short pages */

/* ---------- Footer (100% width) ---------- */
.site-footer {
  width: 100%;
  margin-top: 48px;
  background: #0d3e6d;
  color: rgba(255, 255, 255, .85);
  border-top: 3px solid #ed5131;   
  font-size: .8rem;
}

.site-footer__inner {
  max-width: 1536px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 0;
}

.site-footer__copy::after {
  content: "|";
  margin: 0 12px;
  color: rgba(255, 255, 255, .4);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.site-footer__links a {
  color: inherit;
  text-decoration: none;
  transition: color .15s;
}
.site-footer__links a:hover { color: #34afff; text-decoration: underline; }

.site-footer__links a + a::before {
  content: "|";
  margin: 0 12px;
  color: rgba(255, 255, 255, .4);
}

@media (max-width: 600px) {
  .site-footer__inner { flex-direction: column; text-align: center; padding: 16px 20px; }
  .site-footer__copy::after { display: none; }
  .site-footer__links { justify-content: center; }
}

/* ---------- Clickwrap (Terms & Conditions) ---------- */
.grant-form .clickwrap__label {          /* 0,2,0 — beats .grant-form label */
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  font-size: .92rem;
  line-height: 1.5;
  cursor: pointer;
  margin-bottom: 0;
}

.grant-form .clickwrap__label input[type="checkbox"] {   /* 0,3,1 — beats the global input rule */
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.2rem 0 0;      /* nudges the box to sit on the first text line */
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--sb-accent);
  cursor: pointer;
}

.grant-form .clickwrap__label input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .18);
  border-radius: 3px;
}

.grant-form .clickwrap__label span {
  flex: 1 1 auto;
  min-width: 0;
}

.grant-form .clickwrap__label a {
  color: var(--sb-accent);
  text-decoration: underline;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary:disabled:hover { background: var(--sb-accent); }  /* no hover colour change when disabled */


