/* AIA's display face (the AIA Design System's), for headlines in
 * capitals: one italic, semi-condensed cut, so it's declared italic and
 * the browser never slants it again. */
@font-face {
  font-family: 'United Italic';
  src: url('../fonts/UnitedItalicSmCdBk.otf') format('opentype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* Athletes in Action theme for Cornerstone.
 *
 * Loaded after cornerstone.css. These rules sit outside Cornerstone's cascade
 * layers, so they win over its Cru (gold) theme without !important.
 *
 * Staff screens: navy is the brand color (main buttons, focus rings) and red
 * is for headers and accents. Public pages (group page, quotes, invoices) put
 * class="aia-public" on a wrapper, which makes red the brand color. Real
 * problems use Cornerstone's danger variant plus an icon, never brand red
 * alone, because AIA red reads as a warning in a booking app.
 *
 * Another ministry running its own copy swaps this file for its own theme.
 */

:root {
  --aia-red: #990000;
  --aia-navy: #003366;
  --aia-gray: #58595b;
  --aia-brand: var(--aia-navy);

  --cs-font-family-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --cs-font-family-heading: 'Sora', system-ui, sans-serif;

  /* The page background: the finance app's cool off-white, not Cru's warm
   * gray (#f0efee), which clashes with AIA's navy and red. */
  --cs-color-surface-lowered: #f7f9fc;

  /* Motion and depth from the AIA design system: fast and purposeful,
   * ease-out, no bounce; shadows minimal. */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.14);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.18);

  /* Links are AIA navy, not Cru's teal. */
  --cs-color-text-link: var(--aia-navy);

  /* Success (Paid, saved, done) is AIA's deeper green, not Cru's bright mint.
   * Same light-to-dark scale as the brand colors, with AIA's green at 40. */
  --aia-green: #2e7d32;
  --cs-color-success-95: color-mix(in oklab, var(--aia-green) 6%, white);
  --cs-color-success-90: color-mix(in oklab, var(--aia-green) 12%, white);
  --cs-color-success-80: color-mix(in oklab, var(--aia-green) 28%, white);
  --cs-color-success-70: color-mix(in oklab, var(--aia-green) 45%, white);
  --cs-color-success-60: color-mix(in oklab, var(--aia-green) 62%, white);
  --cs-color-success-50: color-mix(in oklab, var(--aia-green) 80%, white);
  --cs-color-success-40: var(--aia-green);
  --cs-color-success-30: color-mix(in oklab, var(--aia-green) 80%, black);
  --cs-color-success-20: color-mix(in oklab, var(--aia-green) 62%, black);
  --cs-color-success-10: color-mix(in oklab, var(--aia-green) 45%, black);
  --cs-color-success-05: color-mix(in oklab, var(--aia-green) 30%, black);
  --cs-color-success-fill-loud: var(--cs-color-success-40);
  --cs-color-success-border-loud: var(--cs-color-success-40);
  --cs-color-success-on-loud: white;

  /* Cornerstone's gray scale (text, borders, neutral buttons), rebuilt from
   * AIA's grays in place of Cru's warm ones. Named steps are AIA design
   * system values; the rest are plain grays between them. */
  --cs-color-neutral-95: #f5f5f5; /* AIA Off-White */
  --cs-color-neutral-90: #e7e7e8;
  --cs-color-neutral-80: #d8d8d8; /* AIA Border */
  --cs-color-neutral-70: #b2b3b3;
  --cs-color-neutral-60: #8c8d8d; /* AIA Silver */
  --cs-color-neutral-50: #727374;
  --cs-color-neutral-40: #58595b; /* AIA Gray */
  --cs-color-neutral-30: #444547;
  --cs-color-neutral-20: #2e2f30;
  --cs-color-neutral-10: #1a1a1a; /* AIA Near-Black */
  --cs-color-neutral-05: #111111; /* AIA Black */

  /* Chart colors (David, Nov 2, 2026: the Money tab's areas in
   * Cornerstone's muted hues were hard to like and hard to tell apart).
   * Eight hues, checked in this order so neighbors in a stacked bar stand
   * apart, for color-blind readers too; series take them in order, never
   * skipping. 3, 4, and 5 are light on white, so a chart using them shows
   * its numbers too. AIA and outside groups are 1 and 2. */
  --chart-1: #2a78d6;
  --chart-2: #eb6834;
  --chart-3: #1baf7a;
  --chart-4: #eda100;
  --chart-5: #e87ba4;
  --chart-6: #008300;
  --chart-7: #6250d6;
  --chart-8: #e34948;
  --chart-none: var(--cs-color-neutral-70);
  /* Each reporting area's own color, picked on Settings > Areas by name,
   * so an area keeps its color however the list is ordered (David, Nov
   * 19, 2026: Soft, with AIA red for Banquet Center and maple for
   * Wooden). The first six, in that order, pass the color-blind checks
   * side by side; the last four are spares for new areas. */
  --area-slate: #3d6fb6;
  --area-aia-red: #992222;
  --area-pine: #338a59;
  --area-maple: #d9a441;
  --area-periwinkle: #6a5cc8;
  --area-rose: #d36a9c;
  --area-sky: #4aa8e0;
  --area-apricot: #eb9a6a;
  --area-brown: #9a5b25;
  --area-plum: #8a4f8f;

  /* Camp registration's family pages (AIASCRC-124) take the website's
   * look: its headlines are AIA's display face, United Italic, in
   * capitals (licensed for athletesinaction.org and its subdomains, David,
   * Nov 19, 2026; the @font-face below). Each kid has a color for their
   * badge, from the chart colors, darkened so a white letter reads on it. */
  --camp-display-font: 'United Italic', Impact, 'Arial Narrow', sans-serif;
  --camp-kid-0: color-mix(in oklab, var(--chart-1) 85%, black);
  --camp-kid-1: color-mix(in oklab, var(--chart-2) 80%, black);
  --camp-kid-2: color-mix(in oklab, var(--chart-3) 70%, black);
  --camp-kid-3: color-mix(in oklab, var(--chart-7) 90%, black);
  --camp-kid-4: color-mix(in oklab, var(--chart-5) 70%, black);
  --camp-kid-5: color-mix(in oklab, var(--chart-4) 65%, black);
}

.aia-public {
  --aia-brand: var(--aia-red);
}

/* A public page's quieter part (David, Nov 13, 2026: the group page was red
 * all over): navy is its brand, so its headings, icons, boxes, and smaller
 * buttons are navy. Red stays on its main buttons, each marked aia-public,
 * and on the line under the logo. */
.aia-quiet {
  --aia-brand: var(--aia-navy);
}

/* The brand scale runs light (95) to dark (05), with the AIA color at 40.
 * It's declared on both selectors because a custom property is worked out
 * where it's declared: .aia-public needs its own copy to pick up red, and
 * .aia-quiet its own to go back to navy. */
:root,
.aia-public,
.aia-quiet {
  --cs-color-brand-95: color-mix(in oklab, var(--aia-brand) 6%, white);
  --cs-color-brand-90: color-mix(in oklab, var(--aia-brand) 12%, white);
  --cs-color-brand-80: color-mix(in oklab, var(--aia-brand) 28%, white);
  --cs-color-brand-70: color-mix(in oklab, var(--aia-brand) 45%, white);
  --cs-color-brand-60: color-mix(in oklab, var(--aia-brand) 62%, white);
  --cs-color-brand-50: color-mix(in oklab, var(--aia-brand) 80%, white);
  --cs-color-brand-40: var(--aia-brand);
  --cs-color-brand-30: color-mix(in oklab, var(--aia-brand) 80%, black);
  --cs-color-brand-20: color-mix(in oklab, var(--aia-brand) 62%, black);
  --cs-color-brand-10: color-mix(in oklab, var(--aia-brand) 45%, black);
  --cs-color-brand-05: color-mix(in oklab, var(--aia-brand) 30%, black);
  --cs-color-brand: var(--aia-brand);
  --cs-color-brand-on: white;

  /* Cru's theme fills with light gold and dark text; AIA fills with the dark
   * brand color and white text. */
  --cs-color-focus: var(--cs-color-brand-40);
  --cs-color-brand-fill-quiet: var(--cs-color-brand-95);
  --cs-color-brand-fill-normal: var(--cs-color-brand-90);
  --cs-color-brand-fill-loud: var(--cs-color-brand-40);
  --cs-color-brand-border-quiet: var(--cs-color-brand-90);
  --cs-color-brand-border-normal: var(--cs-color-brand-80);
  --cs-color-brand-border-loud: var(--cs-color-brand-40);
  --cs-color-brand-on-quiet: var(--cs-color-brand-40);
  --cs-color-brand-on-normal: var(--cs-color-brand-30);
  --cs-color-brand-on-loud: white;
}

/* A contact's staff badge wears their ministry's color, by its key in
 * staff_email_domains (David, Oct 30, 2026): AIA navy; Cru's gold with
 * dark text, as Cornerstone's Cru theme fills (its yellow-80); and
 * FamilyLife's dark green, its Cornerstone theme's brand (dark-green-40).
 * A ministry with no rule here wears the badge's gray. */
.staff-badge[data-ministry="aia"] {
  --staff-fill: var(--aia-navy);
  --staff-on: white;
}

.staff-badge[data-ministry="cru"] {
  --staff-fill: #ffd000;
  --staff-on: #1a1a1a;
}

.staff-badge[data-ministry="familylife"] {
  --staff-fill: #006c5b;
  --staff-on: white;
}

/* Monica's colors (AIASCRC-26), from her design: each shape's own bright
 * color, so she stands out, and her gear in AIA's navy, red, and grays. */
.monica-figure {
  --monica-ink: #1a1a1a;
  --monica-mouth: #4a1414;
}

.monica-figure[data-shape="gumdrop"] { --monica-body: #d62b2b; }
.monica-figure[data-shape="pebble"] { --monica-body: #1f5faf; --monica-ink: #ffffff; }
.monica-figure[data-shape="cushion"] { --monica-body: #f2b124; }
.monica-figure[data-shape="star"] { --monica-body: #f26b1d; }
.monica-figure[data-shape="cloud"] { --monica-body: #2e9be0; }
.monica-figure[data-shape="drop"] { --monica-body: #22b07d; }
.monica-figure[data-shape="ball"] { --monica-body: #a6d62a; }
.monica-figure[data-shape="sprite"] { --monica-body: #7a4bd1; }

.monica-figure .m-fill { fill: var(--monica-body); stroke: var(--monica-body); }
.monica-figure .m-shine { fill: #ffffff; opacity: 0.2; }
.monica-figure .m-shadow { fill: #000000; opacity: 0.1; }
.monica-figure .m-face path { fill: none; stroke: var(--monica-ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.monica-figure .m-face :is(.m-mouth-smile, .m-mouth-big, .m-mouth-flat) { stroke-width: 4; }
.monica-figure .m-face .m-mouth-big { fill: var(--monica-mouth); }
.monica-figure :is(.m-eye, .m-eye-peek) { fill: var(--monica-ink); }
.monica-figure .m-mouth-yawn { fill: var(--monica-mouth); }
.monica-figure .m-white { fill: #ffffff; }
.monica-figure .m-navy { fill: var(--aia-navy); }
.monica-figure .m-navy-line { fill: none; stroke: var(--aia-navy); }
.monica-figure .m-red { fill: var(--aia-red); }
.monica-figure .m-cap { fill: #cc0000; }
.monica-figure .m-silver { fill: var(--cs-color-neutral-60); }
.monica-figure .m-gray { fill: var(--aia-gray); }
.monica-figure .m-medal { fill: #f2b124; stroke: #b37d0a; }
.monica-figure .m-ink { fill: #1a1a1a; }
.monica-figure .m-ink-line { fill: none; stroke: #1a1a1a; }
.monica-figure .m-lens { fill: #9fd8ff; stroke: var(--aia-navy); }

/* Monica herself (David, Nov 5, 2026): the girl from his pictures, her
 * headband in AIA's navy, and the things each of her looks carries. */
.monica-figure[data-girl] {
  --monica-ink: #3a2216;
  --monica-mouth: #8c3a32;
  --girl-skin: #f7c6aa;
  --girl-cheek: #f19d9a;
  --girl-hair: #8c5a36;
  --girl-hair-line: #5e3920;
  --girl-red: #d62b2b;
  --girl-nose: #c98466;
  --girl-chin: #e2a184;
}

.monica-figure[data-girl] .m-face path,
.monica-figure[data-girl] .m-face :is(.m-mouth-smile, .m-mouth-big, .m-mouth-flat) { stroke-width: 3; }
.monica-figure .m-face .m-mouth-o { fill: var(--monica-mouth); }
.monica-figure .m-face path.g-mouth-fill { fill: var(--monica-mouth); stroke: var(--monica-ink); stroke-width: 1.4; }
.monica-figure .m-face path.g-teeth { fill: #ffffff; stroke: none; }
.monica-figure .g-tongue { fill: #e66b6b; }
.monica-figure .g-skin { fill: var(--girl-skin); }
.monica-figure .g-cheek { fill: var(--girl-cheek); opacity: 0.55; }
.monica-figure .g-hair { fill: var(--girl-hair); }
.monica-figure .g-hair-line { fill: none; stroke: var(--girl-hair-line); stroke-width: 1.6; stroke-linecap: round; opacity: 0.7; }
.monica-figure .g-red { fill: var(--girl-red); }
.monica-figure .g-white { fill: #ffffff; }
.monica-figure .g-navy { fill: var(--aia-navy); }
.monica-figure .g-chin { fill: none; stroke: var(--girl-chin); stroke-width: 1.8; stroke-linecap: round; opacity: 0.8; }
.monica-figure .g-brow { fill: none; stroke: var(--girl-hair-line); stroke-width: 2.4; stroke-linecap: round; }
.monica-figure .g-brow-sly { fill: none; stroke: var(--girl-hair-line); stroke-width: 2.6; stroke-linecap: round; }
.monica-figure .g-nose { fill: none; stroke: var(--girl-nose); stroke-width: 1.8; stroke-linecap: round; }
.monica-figure .g-lashes { fill: none; stroke: var(--monica-ink); stroke-width: 1.6; stroke-linecap: round; }
.monica-figure .g-eye-shine { fill: #ffffff; }
.monica-figure[data-girl] .m-shadow { opacity: 0.08; }

/* What her looks carry. */
.monica-figure .ml-ink-line { fill: none; stroke: var(--monica-ink); }
.monica-figure .ml-ink-fill { fill: var(--monica-ink); stroke: var(--monica-ink); }
.monica-figure .ml-white-line { fill: none; stroke: #ffffff; }
.monica-figure .ml-basketball { fill: #e8742a; }
.monica-figure .ml-soccer { fill: #ffffff; stroke: var(--monica-ink); }
.monica-figure .ml-tennis { fill: #c9e04a; }
.monica-figure .ml-baseball { fill: #ffffff; stroke: #c9c9c9; }
.monica-figure .ml-stitch { fill: none; stroke: var(--aia-red); }
.monica-figure .ml-money { fill: #6cbf6f; }
.monica-figure .ml-money-dark { fill: #5aa860; }
.monica-figure .ml-money-line { fill: none; stroke: #3f8a45; }
.monica-figure .ml-money-ink { fill: #3f8a45; }
.monica-figure .ml-paper { fill: #efe6cf; }
.monica-figure .ml-card { fill: #ffffff; stroke: #c9c9c9; }
.monica-figure .ml-suit-red { fill: var(--aia-red); }
.monica-figure .ml-suit-black { fill: #1a1a1a; }
.monica-figure .ml-chip-blue { fill: #1f5faf; }
.monica-figure .ml-chip-red { fill: var(--aia-red); }
.monica-figure .ml-chip-white { fill: #ffffff; stroke: #1f5faf; }
.monica-figure .ml-lens { fill: #2b211f; opacity: 0.78; }
.monica-figure .ml-glint { fill: none; stroke: #ffffff; stroke-linecap: round; opacity: 0.35; }
.monica-figure .ml-frame { fill: none; stroke: #1c2236; stroke-linejoin: round; }
.monica-figure .ml-stones circle,
.monica-figure :is(.ml-glimmer, .ml-sparkle) path { fill: #ffffff; }
.monica-figure .ml-sparkle path { fill: #9cc3ee; }
.monica-figure .ml-hat-yellow { fill: #f2b124; }
.monica-figure .ml-purple { fill: #7a4bd1; }
.monica-figure .ml-green { fill: #22b07d; }
.monica-figure .ml-red { fill: var(--aia-red); }
.monica-figure .ml-blue { fill: #1f5faf; }
.monica-figure .ml-sky { fill: #2e9be0; }
.monica-figure .ml-orange { fill: #f26b1d; }
.monica-figure .ml-curl { fill: none; stroke: #2e9be0; }
.monica-figure .ml-bug-red { fill: #c9302c; }
.monica-figure .ml-bug-ink { fill: #2a2a2e; }
.monica-figure .ml-bug-line { fill: none; stroke: #2a2a2e; }
.monica-figure .ml-bottle { fill: #f2c230; }
.monica-figure .ml-label { fill: #5aa0e0; }
.monica-figure .ml-nozzle { fill: var(--aia-red); }
.monica-figure .ml-handle { fill: none; stroke: #9aa3ad; }
.monica-figure .ml-bucket { fill: #d93a3a; }
.monica-figure .ml-bucket-rim { fill: #b82626; }
.monica-figure .ml-bubble { fill: #ffffff; }
.monica-figure .ml-bubble-blue { fill: #eef6ff; }
.monica-figure .ml-feather-pink { fill: #f06aa0; }
.monica-figure .ml-feather-orange { fill: #f7a23a; }
.monica-figure .ml-feather-yellow { fill: #f5d23a; }
.monica-figure .ml-feather-green { fill: #6cc96a; }
.monica-figure .ml-feather-blue { fill: #5aa0e0; }
.monica-figure .ml-feather-purple { fill: #a77ad8; }
.monica-figure .ml-glove { fill: #f5c63a; }
.monica-figure .ml-towel { fill: #5aa0e0; }
.monica-figure .ml-steam { fill: none; stroke: #c9d3de; stroke-linecap: round; }
.monica-figure .ml-pot { fill: #9aa3ad; }
.monica-figure .ml-pot-dark { fill: #7d8791; }
.monica-figure .ml-pot-line { fill: none; stroke: #7d8791; stroke-linecap: round; }
.monica-figure .ml-wood { fill: #b07a46; }
.monica-figure .ml-wood-line { fill: none; stroke: #b07a46; }
.monica-figure .ml-hat { fill: #ffffff; stroke: #e1e4ea; }
.monica-figure .ml-hat-line { fill: none; stroke: #e1e4ea; }
.monica-figure .m-seams { fill: none; stroke: #ffffff; opacity: 0.9; }
.monica-zz { color: #004d99; }
