
:root {
  --ink:#101828;--ink-2:#0b1220;--text:#344054;--text-strong:#101828;
  --paper:#f4f6f8;--surface:#ffffff;--surface-soft:#f8fafc;--white:#ffffff;
  --line:#e4e7ec;--line-strong:#d0d5dd;--muted:#667085;--muted-2:#98a2b3;
  --primary:#d71937;--primary-dark:#b7112c;--primary-strong:#971024;--primary-soft:#fff0f3;--primary-faint:#fff7f8;
  --accent:#d71937;--accent-dark:#b7112c;--accent-soft:#fff0f3;--brand-red:#d71937;
  --danger:#b42318;--warning:#b54708;--success:#067647;--info:#175cd3;
  --radius:18px;--radius-sm:12px;--radius-lg:26px;
  --shadow-xs:0 1px 2px rgba(16,24,40,.04);--shadow-sm:0 10px 30px rgba(16,24,40,.07);--shadow:0 22px 60px rgba(16,24,40,.12);
  --font:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --font-heading:"Plus Jakarta Sans",Inter,ui-sans-serif,system-ui,sans-serif;--content-width:1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; width: 100%; max-width: 100%; overflow-x: hidden; }
body { margin: 0; width: 100%; max-width: 100%; min-width: 0; overflow-x: hidden; font-family: var(--font); color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
img, svg, video, canvas { display: block; max-width: 100%; }
pre, code { overflow-wrap: anywhere; }
p, h1, h2, h3, h4, li, td, th, a, span, strong, small { overflow-wrap: anywhere; }

.container { width: min(var(--content-width), calc(100% - 48px)); margin-inline: auto; }
.logo-wordmark { width: auto; height: 42px; max-width: 210px; object-fit: contain; object-position: left center; }
.logo-mark { width: 40px; height: 40px; object-fit: contain; }
.brand-inline { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-inline > span { display: grid; gap: 2px; line-height: 1; }
.brand-inline strong { font-family:var(--font-heading); font-size:13px; letter-spacing:-.02em; }
.brand-inline small { color:var(--muted); font-size:9px; letter-spacing:.08em; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; transition: background-color .14s ease, border-color .14s ease, color .14s ease; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--primary); color: var(--white); }
.button-primary:hover { background: var(--primary-dark); }
.button-dark { background: var(--primary); color: var(--white); }
.button-dark:hover { background: var(--primary-dark); }
.button-light { background: var(--white); color: var(--primary); }
.button-light:hover { background: #fff7f8; }
.button-ghost { border-color: rgba(255,255,255,.42); color: var(--white); background: transparent; }
.button-ghost:hover { background: rgba(255,255,255,.09); }
.button-outline { border-color: var(--primary); color: var(--primary); background: var(--white); }
.button-outline:hover { background: var(--primary-faint); }
.button-danger { background: #fff4f3; color: var(--danger); border-color: #ffd5d3; }
.button-small { min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: 13px; }
.icon-button { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--white); color: var(--primary); }
.icon-button:hover { border-color: var(--primary); background: var(--primary-faint); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #20c779; display: inline-block; }
.eyebrow, .section-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #d7d0ff; }
.section-kicker { color: var(--primary); }
.section-kicker.light { color: #fecdd3; }

.field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; }
label { min-width: 0; display: grid; gap: 8px; color: var(--text-strong); font-size: 13px; font-weight: 700; }
input, textarea, select { width: 100%; min-width: 0; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--white); color: var(--text-strong); outline: none; padding: 12px 14px; transition: border-color .14s, box-shadow .14s; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(215,25,55,.12); }
input::placeholder, textarea::placeholder { color: #98a2b3; }
.form-status { min-height: 20px; margin: 0; font-size: 12px; color: var(--muted); }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }

.badge { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; border-radius: 999px; padding: 5px 9px; background: var(--primary-faint); color: var(--primary); border: 1px solid #fecdd3; font-size: 10px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.badge-success { background: #f1f9f3; color: #007a49; border-color: #b8f1c9; }
.badge-warning { background: #fff8e9; color: #9b5b00; border-color: #ffe399; }
.badge-danger { background: #fff4f3; color: #be1025; border-color: #ffd5d3; }
.badge-info { background: #f3f7ff; color: #315eb7; border-color: #d6e3ff; }
.empty-state { min-width: 0; display: grid; place-items: center; gap: 8px; padding: 44px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-soft); }
.empty-state strong { color: var(--text-strong); }
.spinner { width: 20px; height: 20px; border: 2px solid rgba(215,25,55,.18); border-top-color: var(--primary); border-radius: 50%; animation: spin .65s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast-stack { position: fixed; top: 82px; right: 18px; z-index: 1200; display: grid; gap: 8px; width: min(360px, calc(100% - 36px)); }
.toast { background: var(--text-strong); color: var(--white); border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow-sm); display: flex; gap: 9px; align-items: flex-start; font-size: 13px; }
.toast.error { background: #9f252d; }
.toast.success { background: #176d50; }

.modal-backdrop { position: fixed; inset: 0; z-index: 1000; background: rgba(15,23,42,.52); display: grid; place-items: center; padding: 18px; }
.modal { width: min(680px, 100%); max-height: calc(100dvh - 36px); overflow: auto; overscroll-behavior: contain; background: var(--white); border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal-wide { width: min(980px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: var(--white); }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { min-width: 0; padding: 20px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 767px) {
  .container { width: min(100% - 32px, var(--content-width)); }
  .field-row { grid-template-columns: minmax(0,1fr); }
  .button { min-height: 46px; }
  .modal-backdrop { padding: 8px; align-items: end; }
  .modal { width: 100%; max-height: calc(100dvh - 16px); border-radius: 16px 16px 0 0; }
  .modal-body { padding: 17px; }
  .modal-actions .button { flex: 1; }
}

/* MAIRA Project brand lockup: symbol image only, text remains HTML. */
.brand-inline--light strong { color:#fff; }
.brand-inline--light small { color:rgba(255,255,255,.68); }
