/* Diversity Officer Magazine — design tokens + base reset + shared primitives.
   Extracted from the DiversityOfficerMagazineDesignSystem bundler export.
   Navy primary, blue secondary, gold accent; Playfair Display + Inter. */

:root {
  /* Palette */
  --color-primary: #163A5F;
  --color-primary-hover: #0F2B48;
  --color-primary-soft: #E8EEF5;
  --color-secondary: #2B6CB0;
  --color-secondary-soft: #EAF1F9;
  --color-accent: #D4AF37;
  --color-accent-hover: #A8862B;
  --color-accent-soft: #F8F2DC;
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-surface-2: #F1F5F9;
  --color-text: #1E293B;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --color-success: #16A34A;
  --color-warning: #F59E0B;
  --color-danger: #DC2626;

  /* Semantic aliases */
  --text-heading: var(--color-primary);
  --text-body: var(--color-text);
  --text-link: var(--color-secondary);
  --surface-page: var(--color-bg);
  --surface-card: var(--color-surface);
  --surface-inverse: var(--color-primary);

  /* Type */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --type-display: clamp(44px, 6vw, 72px);
  --type-h1: 44px;
  --type-h2: 32px;
  --type-h3: 24px;
  --type-h4: 20px;
  --type-body-lg: 19px;
  --type-body: 17px;
  --type-body-sm: 15px;
  --type-caption: 13px;
  --type-overline: 12px;
  --leading-body: 1.7;
  --leading-heading: 1.2;
  --tracking-overline: 0.08em;

  /* Spacing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 40px; --space-8: 56px;
  --space-9: 72px; --space-10: 96px;

  /* Radius */
  --radius-button: 12px;
  --radius-input: 12px;
  --radius-card: 18px;
  --radius-image: 20px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-2: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-3: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 16px 40px rgba(15, 23, 42, 0.14);

  /* Motion + layout */
  --dur-fast: 120ms; --dur-base: 220ms; --dur-slow: 420ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --grid-max: 1200px;
  --grid-gutter: 24px;
  --grid-margin: clamp(16px, 4vw, 48px);
  --focus-ring: 0 0 0 3px rgba(43, 108, 176, 0.35);
}

/* Base reset (the artifact/site reset is minimal; this is the app one). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: var(--leading-heading);
  margin: 0 0 var(--space-4);
  font-weight: 700;
}
/* No underlines on links anywhere — links are identified by colour / hover
   effects, never a default underline. `!important` also strips underlines that
   come from inline styles in imported (scraped) article HTML. */
a { color: var(--text-link); text-decoration: none !important; }
a:hover { text-decoration: none !important; }
img, svg, video { max-width: 100%; }
img { height: auto; }
button { font-family: inherit; }

/* ── Wordmark ─────────────────────────────────────────────────────────────── */
.dom-wordmark { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; }
.dom-wordmark:hover { text-decoration: none; }
.dom-wordmark .dom-wordmark__top {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-primary);
}
.dom-wordmark .dom-wordmark__bottom {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 3px;
}
.dom-wordmark--inverse .dom-wordmark__top { color: #fff; }
.dom-wordmark--inverse .dom-wordmark__bottom { color: rgba(255, 255, 255, 0.72); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.dom-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: var(--type-body-sm);
  padding: 11px 20px; border-radius: var(--radius-button);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.dom-btn:hover { text-decoration: none; }
.dom-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.dom-btn--primary { background: var(--color-primary); color: #fff; }
.dom-btn--primary:hover { background: var(--color-primary-hover); }
.dom-btn--accent { background: var(--color-accent); color: #23303f; }
.dom-btn--accent:hover { background: var(--color-accent-hover); color: #fff; }
.dom-btn--ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.dom-btn--ghost:hover { background: var(--color-surface-2); }
.dom-btn--danger { background: transparent; color: var(--color-danger); border-color: rgba(220, 38, 38, 0.35); }
.dom-btn--danger:hover { background: rgba(220, 38, 38, 0.08); }
.dom-btn--lg { padding: 14px 26px; font-size: var(--type-body); }
.dom-btn--block { width: 100%; }
.dom-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ── Form fields ──────────────────────────────────────────────────────────── */
.dom-field { margin-bottom: var(--space-4); }
.dom-field > label { display: block; font-size: var(--type-caption); font-weight: 600; color: var(--color-primary); margin-bottom: 6px; }
.dom-input, .dom-select, .dom-textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--type-body-sm);
  color: var(--color-text); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-input);
  padding: 11px 13px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.dom-textarea { min-height: 120px; resize: vertical; }
.dom-input:focus, .dom-select:focus, .dom-textarea:focus { outline: none; border-color: var(--color-secondary); box-shadow: var(--focus-ring); }
.dom-field__hint { font-size: var(--type-caption); color: var(--color-muted); margin-top: 5px; }

/* ── Status pills ─────────────────────────────────────────────────────────── */
.dom-pill { display: inline-flex; align-items: center; gap: 5px; font-size: var(--type-caption); font-weight: 600; padding: 3px 10px; border-radius: var(--radius-pill); }
.dom-pill--published { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.dom-pill--draft { background: rgba(100, 116, 139, 0.14); color: #475569; }
.dom-pill--scheduled { background: rgba(212, 175, 55, 0.18); color: #92700f; }
.dom-pill--featured { background: var(--color-primary-soft); color: var(--color-primary); }

/* ── Flash messages ───────────────────────────────────────────────────────── */
.dom-flash { border-radius: var(--radius-button); padding: 12px 16px; font-size: var(--type-body-sm); margin-bottom: var(--space-4); }
.dom-flash--notice { background: var(--color-secondary-soft); color: #1e4e79; border: 1px solid rgba(43, 108, 176, 0.25); }
.dom-flash--alert { background: rgba(220, 38, 38, 0.08); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.25); }

/* ── Flash toasts (dom/shared/_toasts) ─────────────────────────────────────
   Lives in tokens.css because it is the one stylesheet EVERY Dom layout loads
   (public application, admin, auth) — the toast must look identical in all three.
   Fixed to the top-centre so it never widens to the content column and never
   pushes the page down. Success auto-fades; errors persist until dismissed. */
.dom-toasts {
  position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  width: min(420px, calc(100vw - 40px));
  pointer-events: none;
}
.dom-toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 10px; padding: 12px 14px;
  font: 500 14px/1.45 var(--font-body);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
  animation: dom-toast-in 0.22s cubic-bezier(.22, 1, .36, 1);
}
.dom-toast--ok  { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.dom-toast--err { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }
/* Only success auto-hides: 4s read time, then a 0.4s fade. */
.dom-toast--ok {
  animation: dom-toast-in 0.22s cubic-bezier(.22, 1, .36, 1),
             dom-toast-out 0.4s ease-in 4s forwards;
}
.dom-toast__msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dom-toast__x {
  flex: none; background: none; border: 0; padding: 0 2px; cursor: pointer;
  color: inherit; opacity: 0.55; font-size: 18px; line-height: 1.2; border-radius: 4px;
}
.dom-toast__x:hover { opacity: 1; }
.dom-toast__x:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.dom-toast.is-hiding { animation: dom-toast-out 0.25s ease-in forwards; }

@keyframes dom-toast-in  { from { opacity: 0; transform: translateY(-8px); } }
@keyframes dom-toast-out { to   { opacity: 0; transform: translateY(-8px); visibility: hidden; } }

/* Motion-sensitive users: no slide, and longer to read before the fade. */
@media (prefers-reduced-motion: reduce) {
  .dom-toast { animation: none; }
  .dom-toast--ok { animation: dom-toast-out 0.01s linear 6s forwards; }
}

@media (max-width: 640px) {
  /* Full-bleed with a gutter; left/right override the centring offset, so the
     translateX must be cancelled or the bar would sit half off-screen. */
  .dom-toasts { top: 68px; left: 12px; right: 12px; transform: none; width: auto; }
  .dom-toast { width: 100%; }
}
