/*
 * UmmahArmy design wave 2, round 3 (FIX), Nov 24 2026.
 * Canvas: https://claude.ai/artifact/N8tPevgdkW85dPjzgbwzdf (boards exported to
 * /root/handoffs/2026-11-24/design-wave1/ummaharmy/boards/).
 *
 * Loads AFTER app.css and estate-refresh.css, so a tie goes to this file. Static on purpose:
 * no Vite build, so the round ships and rolls back as one file plus Blade.
 *
 *  1. UmmahArmy's slot on the UMG Estate Kit roles (--k-*). The kit has no UmmahArmy brand file;
 *     the values are the live purple theme (r3800) and the live dark tokens, not new colours.
 *  2. One radius variable. 4, 8, 16 and the pill, all derived from --ua-radius (kit pick r4997 pending).
 *  3. One action colour: the filled primary is purple; every secondary button is ink.
 *  4. Focus, selection, caret and checkbox colours, themed.
 *  5. Footer zone: the site faces and the site accent on the estate footer; the colour switch joins Band 3.
 *  6. Contrast fixes the round 2 seats measured.
 */

/* ---------- 1. Kit roles, UmmahArmy values ---------- */
:root {
  --k-ground: #F7F8FC;
  --k-surface: #FFFFFF;
  --k-sunken: #F0F1F9;
  --k-text: #1B1E2B;          /* 15.6:1 on ground */
  --k-muted: #54586A;         /* 6.6:1 on ground */
  --k-border: #E3E5F3;
  --k-border-strong: #6B6F80; /* 4.7:1 on ground, a UI edge */
  --k-accent: var(--ua-primary, #8B2FC9);           /* 6.27:1 with white text */
  --k-accent-hover: var(--ua-primary-hover, #6F1FA6);
  --k-on-accent: #FFFFFF;
  --k-focus: #1B1E2B;         /* ink ring: reads on white, the hero gradient and a purple fill */
  --k-dur-2: 160ms;
  --k-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ua-radius: 8px;
  --ua-radius-sm: calc(var(--ua-radius) / 2);   /* 4 */
  --ua-radius-lg: calc(var(--ua-radius) * 2);   /* 16 */
  --ua-radius-pill: 9999px;
}
html[data-umg-theme="dark"] {
  --k-ground: #12141C;
  --k-surface: #1B1E2B;
  --k-sunken: #171A26;
  --k-text: #F8FAFC;
  --k-muted: #A8B6C8;         /* 8.0:1 on surface */
  --k-border: #2A2E3F;
  --k-border-strong: #7A87A3; /* 4.6:1 on surface */
  --k-focus: #F2F3F8;
}

/* ---------- 2. Radii from one variable ---------- */
html body .rounded-sm,
html body .rounded { border-radius: var(--ua-radius-sm); }
html body .rounded-md,
html body .rounded-lg { border-radius: var(--ua-radius); }
html body .rounded-xl,
html body .rounded-2xl,
html body .rounded-3xl { border-radius: var(--ua-radius-lg); }
@media (min-width: 1024px) { html body .lg\:rounded-\[24px\] { border-radius: var(--ua-radius-lg); } }
html body .rounded-l-md { border-radius: var(--ua-radius) 0 0 var(--ua-radius); }
html body .rounded-r-md { border-radius: 0 var(--ua-radius) var(--ua-radius) 0; }
html body .ua-seg, html body .ua-plate, html body .form-input, html body textarea,
html body .ua-check-box, html body .ua-palette-btn,
html body .umgf-block :is(input, textarea, select, button, .umgf-panel) { border-radius: var(--ua-radius); }
html body .ua-card { border-radius: var(--ua-radius-lg); }   /* was 12px, off the scale */

/* ---------- 3. One action colour ---------- */
/* Ink outline: the secondary action everywhere. Self-contained, so it needs no new Tailwind class. */
.ua-btn-ink {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px;
  border-radius: var(--ua-radius);
  border: 1.5px solid var(--k-border-strong);
  background: transparent; color: var(--k-text);
  font-weight: 600; line-height: 1.25; text-decoration: none;
  transition: background-color var(--k-dur-2) var(--k-ease-out), border-color var(--k-dur-2) var(--k-ease-out);
}
@media (min-width: 1024px) { .ua-btn-ink { padding: 0 20px; } }
.ua-btn-ink:hover { border-color: var(--k-text); background: rgba(27, 30, 43, 0.06); color: var(--k-text); }
html[data-umg-theme="dark"] .ua-btn-ink:hover { background: rgba(248, 250, 252, 0.08); }
/* The hero stays a light gradient in both themes ("frozen light", app.css), so its ink button stays ink. */
html body [data-hero] .ua-btn-ink { color: #1B1E2B; border-color: #1B1E2B; background: rgba(255, 255, 255, 0.6); }
html body [data-hero] .ua-btn-ink:hover { background: rgba(255, 255, 255, 0.9); }

/* The library's secondary buttons were an indigo outline: a second action colour on the purple theme. */
html body .btn-secondary,
html body .btn-outline,
html body .btn-tertiary {
  color: var(--k-text);
  border-width: 1.5px;
  border-color: var(--k-border-strong);
  background-color: transparent;
}
html body .btn-secondary:hover,
html body .btn-outline:hover,
html body .btn-tertiary:hover { border-color: var(--k-text); background-color: rgba(27, 30, 43, 0.06); }
html[data-umg-theme="dark"] body .btn-secondary:hover,
html[data-umg-theme="dark"] body .btn-outline:hover,
html[data-umg-theme="dark"] body .btn-tertiary:hover { background-color: rgba(248, 250, 252, 0.08); }
/* On a dark band in light mode the outline turns light ink, not the old pale indigo. The header's ink
   sign-up link joins it: the dark-header pages (/draft, /enlist) set bg-gray-950 on <body>. */
html body :is(.bg-ua-void, .bg-dark-800, .bg-dark-900, .bg-dark-950, .bg-gray-900, .bg-gray-950) :is(.btn-outline, .btn-secondary, .btn-tertiary, .ua-btn-ink) {
  color: #F8FAFC; border-color: rgba(248, 250, 252, 0.6);
}
html body :is(.bg-ua-void, .bg-dark-800, .bg-dark-900, .bg-dark-950, .bg-gray-900, .bg-gray-950) .ua-btn-ink:hover {
  border-color: #F8FAFC; background: rgba(248, 250, 252, 0.08);
}

/* Count notes: a readable measure at 1440 (65 characters), and the read time never splits from its date. */
html body .ua-note { max-width: 65ch; text-wrap: pretty; }
html body .ua-when { white-space: nowrap; }

/* Open now: a live dot, not a tracked caps label. Green is status, never an action. */
html body .ua-live { display: inline-flex; align-items: center; gap: 8px; }
html body .ua-live::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: var(--ua-radius-pill); background: #15803D; }

/* ---------- 4. Focus, selection, caret, checkboxes ---------- */
/* Specificity (0,1,1) on purpose: it replaces app.css's 2px ink ring (a tie, and this file loads later) but
   still loses to an element's own focus utilities, such as the mission card's after-outline. */
html :where(a, button, summary, [tabindex], input, select, textarea):focus-visible {
  outline: 3px solid var(--k-focus);
  outline-offset: 2px;
}
/* Dark grounds inside a light page: an ink ring would vanish on them. */
html :where(.bg-ua-void, .bg-dark-800, .bg-dark-900, .bg-dark-950, .bg-gray-900, .bg-gray-950, .ua-palette-strip) :where(a, button, summary, [tabindex], input, select, textarea):focus-visible {
  outline-color: #F2F3F8;
}
html body ::selection { background: #E9DDF7; color: #1B1E2B; }
html[data-umg-theme="dark"] body ::selection { background: #4A2E78; color: #F8FAFC; }
html body :is(input, textarea) { caret-color: var(--k-accent); }
html body { accent-color: var(--k-accent); }
html body .font-ledger, html body .ua-num { font-variant-numeric: tabular-nums; }

/* ---------- 5. Footer zone ---------- */
/* The estate footer asks for Literata and Instrument Sans; UmmahArmy serves neither, so its headings fell
   back to a stray serif (seat B r2 item 1). Variables are set on the footer's children, which every
   footer rule reads, so the footer file's own high-specificity theme blocks stay untouched. Gold was the
   footer's night accent; UmmahArmy's accent is purple (9.5:1 on the footer ground). */
html body .umgf > * {
  --umgf-font-display: 'Inter', 'InterFallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --umgf-font-ui: 'Inter', 'InterFallback', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --umgf-accent: #C3B1F2;
  --umgf-focus: #C3B1F2;
  --umgf-star: #C3B1F2;
  font-family: var(--umgf-font-ui);
}
/* The colour switch shares Band 3's ground instead of a pale strip between two dark bands. */
html body .ua-palette-strip { background: #1B1E2B; border-top: 1px solid rgba(255, 255, 255, 0.1); }
html body .ua-palette-strip .ua-palette-label { color: #AAB4C8; font-size: 14px; }
html body .ua-palette-strip .ua-palette-btn {
  min-height: 44px; padding: 0 12px; font-size: 14px;
  background: transparent; border-color: rgba(255, 255, 255, 0.22); color: #E2E8F0;
}
html body .ua-palette-strip .ua-palette-btn[aria-pressed="true"] { border-color: #F8FAFC; color: #FFFFFF; }
html body .ua-palette-strip .ua-palette-btn:hover { background: rgba(255, 255, 255, 0.08); }
