/* Epsilon Engage foundations.
   Palette: ink navy + brand gold on a neutral paper. Newsreader (light) for display and reading,
   Hanken Grotesk for interface text. Type scale: 12 / 14 / 16 / 20 / 26 / 34 / 48 / 64. */
:root {
  --paper: #f6f6f4;
  --sheet: #ffffff;
  --ink: #0b2144;
  --ink-deep: #06142c;
  --text: #172033;
  --text-2: #3f4757;
  --muted: #5d6474;
  --rule: rgba(11, 33, 68, .09);
  --rule-strong: rgba(11, 33, 68, .16);
  --gold: #b8904f;
  --gold-light: #d8bd8a;
  --gold-wash: #f7f1e6;
  --link: #24489a;
  --ok: #2c6e4f; --ok-wash: #e8f1ec;
  --warn: #93601f; --warn-wash: #f8efe1;
  --info: #2d4f8f; --info-wash: #eaeff8;
  --danger: #a8352b; --danger-wash: #f9eae8;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, sans-serif;
  --r-lg: 22px; --r: 14px; --r-sm: 9px;
  --lift: 0 1px 0 rgba(11, 33, 68, .03), 0 18px 40px -26px rgba(11, 33, 68, .28);
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* legacy aliases used by admin */
  --bg: var(--paper); --surface: var(--sheet); --line: var(--rule); --line-2: rgba(11, 33, 68, .06);
  --navy: var(--ink); --navy-2: #17315e; --ink-2: var(--text-2); --chip: #eeefee; --side: var(--sheet);
  --gold-soft: var(--gold-wash); --blue: var(--link); --radius: var(--r); --shadow: var(--lift);
  --ok-soft: var(--ok-wash); --warn-soft: var(--warn-wash); --info-soft: var(--info-wash); --danger-soft: var(--danger-wash);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--gold-light); color: var(--ink-deep); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.serif { font-family: var(--serif); }
.label { font-size: 14px; color: var(--muted); }
.spaced { font-size: 14px; color: var(--muted); }
.nums { font-variant-numeric: tabular-nums lining-nums; }

/* Surfaces */
.card { background: var(--sheet); border-radius: var(--r); box-shadow: var(--lift); border: 1px solid var(--rule); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 26px 30px 8px; }
.card-head h2 { margin: 0; font: 600 22px/1.25 var(--serif); letter-spacing: -.005em; color: var(--ink); }
.card-body { padding: 16px 30px 28px; }

.round {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule-strong); background: transparent;
  display: grid; place-items: center; flex-shrink: 0; cursor: pointer; color: var(--ink); transition: background .2s var(--ease), border-color .2s var(--ease);
}
.round.sm { width: 28px; height: 28px; border-color: var(--rule); }
.round svg { width: 15px; height: 15px; }
.round.sm svg { width: 11px; height: 11px; }
a:hover > .round, .round:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 999px; padding: 12px 24px;
  background: var(--ink); color: #fff; border: 1px solid var(--ink); font-weight: 600; font-size: 15px;
  cursor: pointer; white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--ink-deep); }
.btn svg { width: 15px; height: 15px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { background: #a57e40; }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(168, 53, 43, .3); }
.btn.danger:hover { background: var(--danger-wash); }
.btn.sm { padding: 8px 16px; font-size: 14px; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.link { color: var(--link); font-weight: 500; cursor: pointer; background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: rgba(36, 72, 154, .3); text-underline-offset: 4px; }
.link:hover { text-decoration-color: currentColor; }

/* Status */
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--text-2); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.badge.info { color: var(--info); }
.badge.neutral { color: var(--muted); }
.badge.danger { color: var(--danger); }

.progress { height: 5px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--gold); border-radius: 2px; transition: width .4s var(--ease); }

/* Forms */
label.field { display: grid; gap: 7px; font-size: 14px; font-weight: 600; color: var(--text); }
.input, textarea, select {
  width: 100%; border: 1px solid var(--rule-strong); background: var(--sheet); border-radius: var(--r-sm); padding: 11px 13px; font-size: 15px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 144, 79, .18); }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }

.notice { border-radius: var(--r-sm); padding: 13px 16px; font-size: 14px; border-left: 2px solid currentColor; }
.notice.ok { background: var(--ok-wash); color: var(--ok); }
.notice.warn { background: var(--warn-wash); color: var(--warn); }
.notice.info { background: var(--info-wash); color: var(--info); }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); opacity: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 16px 40px -12px rgba(6, 20, 44, .5); transition: .25s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; text-align: center; }
.gate .card { max-width: 440px; padding: 44px 36px; display: grid; gap: 14px; justify-items: center; }
.gate h1 { font: 600 30px/1.2 var(--serif); margin: 0; color: var(--ink); }
.gate p { margin: 0; color: var(--text-2); }
.gate img { width: 210px; height: auto; margin-bottom: 10px; }

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