/* Giving Hope shared layer: brand fonts plus the HIG accessibility fixes used on every page.
   Loaded after each page's own styles so these rules win where they overlap. */

@font-face{font-family:"GT America";src:url("/fonts/GT-America-Standard-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"GT America";src:url("/fonts/GT-America-Standard-Medium.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"GT America";src:url("/fonts/GT-America-Standard-Bold.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root{
  --font:"GT America",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --err-ink:#9b1c1c; --err-bg:#fdecec;
  --ring:#1f4d3a;
}
body{font-size-adjust:from-font}
h1,h2,h3{letter-spacing:-.01em}

/* Errors: their own deeper red, a tinted box and an icon, so they never look like a berry action */
.err:not([hidden]),.banner.err{color:var(--err-ink)}
.banner.err,.err:not([hidden]):not(:empty){display:flex;gap:8px;align-items:flex-start}
.banner.err{background:var(--err-bg)}
.banner.err::before,.err:not(:empty)::before{content:"";flex:0 0 auto;width:1.1em;height:1.1em;margin-top:.15em;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center/contain no-repeat}

/* Buttons: centered labels, a press state, and room for a fingertip */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;text-align:center;min-height:36px}
@media (pointer:coarse){.btn{min-height:44px}}
.btn:not(:disabled):active{transform:translateY(1px);filter:brightness(.9)}
.btn.line:not(:disabled):active,.btn.ghost:not(:disabled):active,.btn.back2:not(:disabled):active{background:#eef4f0;filter:none}
button:not(.btn):not(:disabled):active{filter:brightness(.92)}

/* Keyboard focus: a solid ring that passes contrast on light and dark surfaces */
:where(a,button,summary,[tabindex]):focus-visible{outline:3px solid var(--ring);outline-offset:2px}
input:focus,select:focus,textarea:focus{outline:3px solid var(--ring);outline-offset:1px;border-color:var(--ring)}
:where(.hero,.topbar,.top) :where(a,button):focus-visible{--ring:#fff}

/* Text links that act like buttons get a full-size target */
a.back{display:inline-flex;align-items:center;min-height:44px}
footer a{display:inline-block;padding:12px 6px;margin:-12px -6px}

/* Toasts sit above the home indicator; errors stay until closed */
.toast{bottom:calc(22px + env(safe-area-inset-bottom,0px));width:max-content;max-width:calc(100vw - 32px)}
.toast.err{display:flex;align-items:center;gap:10px;background:var(--err-bg);color:var(--err-ink);border:1px solid #f1c4c4;padding:6px 6px 6px 14px}
.toast .tx{width:44px;height:44px;flex:0 0 auto;border:0;background:transparent;color:inherit;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}

/* Reduce Motion: no pulsing, sliding or falling */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
  .choice:hover{transform:none!important}
}
