/* EnemoAi design system: tokens and shared components for the app (/), the How-To Guide (/guide) and other pages.
   Brand: ink #050817, blue #0043F9, white. Every text color here meets 4.5:1 on the surfaces it is used on.
   --faint is for borders and decoration only, never text. */
:root {
  /* color */
  --ink: #050817; --blue: #0043f9; --blue-hover: #0037d0; --blue-deep: #0030b0; --blue-2: #3d73ff; --chart-blue: #7290d8;
  --blue-soft: #edf2ff; --blue-line: #d5e0ff; --blue-on-ink: #9fb6ff;
  --bg: #e8eff8; --surface: #fff; --panel: #dee8f4; --line: #e3e6ee; --line-strong: #cfd3e1;
  --fg: var(--ink); --muted: #5b6070; --faint: #9aa0ad; --on-ink-muted: #c9cfe3;
  --ok: #1b7f4b; --bad: #c62828; --bad-bg: #fdecec; --bad-line: #f5c2c2;
  --amber: #8a4b00; --amber-bg: #fff6e8; --amber-line: #f3d9ad;
  --green: #146c43; --green-bg: #ecf8f1; --green-line: #bfe3cf;
  /* type */
  --sans: system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --t-xs: .76rem; --t-sm: .86rem; --t-base: 1rem; --t-md: 1.15rem; --t-lg: 1.4rem; --t-xl: 1.75rem; --t-2xl: clamp(1.6rem, 4.5vw, 2.2rem);
  /* space, radius, depth */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(5,8,23,.04), 0 8px 24px rgba(5,8,23,.06);
  --shadow-lg: 0 18px 40px rgba(5,8,23,.14);
  --focus-ring: 0 0 0 3px rgba(0,67,249,.4);
  --tap: 44px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
html { -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font-family: inherit; }
body { font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r); font-weight: 650; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }

.wrap { max-width: 820px; margin: 0 auto; padding: var(--s5) var(--s4) 0; }

/* ---------- header ---------- */
header.bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap;
  position: sticky; top: 0; z-index: 5; background: rgba(232,239,248,.92); backdrop-filter: blur(8px); padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--fg); min-height: var(--tap); }
.brand .mark { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.brand .word { height: 17px; width: auto; display: block; }

/* ---------- headings and text ---------- */
h1, h2, h3 { font-weight: 600; line-height: 1.25; text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
h2 { font-size: var(--t-md); margin: 0 0 var(--s3); }
h3 { font-size: var(--t-base); margin: var(--s6) 0 var(--s2); }
.serif { font-weight: 600; }
.hint { color: var(--muted); font-size: var(--t-sm); }
.eyebrow { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 750; }
.mt0 { margin-top: 0 !important; } .mt2 { margin-top: var(--s2); } .mt3 { margin-top: var(--s3); } .mt4 { margin-top: var(--s4); }
.error, .err { color: var(--bad); font-size: .88rem; margin-top: 10px; }

/* ---------- buttons: one family ---------- */
.btn, button.primary, button.secondary, button.ghost, button.danger {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: var(--tap);
  padding: 0 18px; border-radius: var(--r); border: 1px solid transparent; font: inherit; font-weight: 600;
  line-height: 1.2; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, color .2s, transform .08s; }
.btn-primary, button.primary { background: var(--blue); color: #fff; }
.btn-primary:hover, button.primary:hover { background: var(--blue-hover); color: #fff; }
.btn-secondary, button.secondary { background: var(--surface); color: var(--fg); border-color: var(--line-strong); font-weight: 500; }
.btn-secondary:hover, button.secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost, button.ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover, button.ghost:hover { background: var(--blue-soft); }
.btn-danger, button.danger { background: var(--surface); color: var(--bad); border-color: var(--bad-line); }
.btn-danger:hover, button.danger:hover { background: var(--bad-bg); }
.btn:active, button.primary:active, button.secondary:active { transform: scale(.98); }
button:disabled { opacity: .5; cursor: not-allowed; }
/* Continue with WorkPair: ink button, WorkPair logo at 26px */
.wp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; min-width: min(260px, 100%);
  background: var(--ink); color: #fff; border: 0; border-radius: var(--r); padding: 0 22px; font: inherit; font-weight: 600; cursor: pointer; }
.wp-btn:hover { background: #1b2436; } .wp-btn:disabled { opacity: .5; cursor: default; }
.wp-btn .wp-mark { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: none; }
.linkish { background: none; border: 0; color: var(--blue); font: inherit; font-size: var(--t-xs); font-weight: 500; cursor: pointer; padding: 4px 0; min-height: 32px; }
.linkish:hover { text-decoration: underline; }
.how { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-xs); font-weight: 500; white-space: nowrap; text-decoration: none; }
.how:hover { text-decoration: underline; }
.how::before { content: "? "; display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; border-radius: 50%;
  border: 1px solid currentColor; font-size: .82em; font-weight: 600; line-height: 1; }

/* ---------- cards, notices, chips ---------- */
.card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); margin-top: var(--s5); background: var(--surface); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.card-head h2 { margin: 0; }
@media (max-width: 560px) { .card { padding: var(--s5) var(--s4); } }
.notice { margin: 14px 0 0; padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--blue-soft); color: var(--fg); font-size: .92rem; }
.notice.warn { background: var(--amber-bg); border: 1px solid var(--amber-line); color: var(--amber); }
.chip { display: inline-block; background: var(--blue-soft); color: var(--blue); border-radius: var(--r-pill); padding: 4px 12px; font-size: .8rem; font-weight: 650; }
.disclaimer { color: var(--muted); font-size: .8rem; line-height: 1.5; text-align: center; margin: var(--s3) auto 0; max-width: 640px; }
.banner { margin: var(--s4) 0 0; padding: 10px 14px; border-left: 3px solid var(--blue); background: var(--panel); color: var(--muted); font-size: .82rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ---------- forms ---------- */
label { display: block; font-size: .82rem; color: var(--muted); margin: var(--s3) 0 var(--s1); }
input, select, textarea { width: 100%; background: #f3f6fb; color: var(--fg); border: 1px solid var(--line-strong);
  border-radius: 10px; padding: 10px 12px; font: inherit; min-height: var(--tap); }
textarea { min-height: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; accent-color: var(--blue); }
.check-row { display: flex; gap: var(--s2); align-items: center; color: var(--fg); font-size: .92rem; min-height: var(--tap); margin: var(--s1) 0; cursor: pointer; }
.check-row input { flex: none; margin: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s3); }
.row.start { justify-content: flex-start; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s3); }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* ---------- brand lockup and footer (decision #191: EnemoAi / …corporate owl. / by Enemo Consulting Group; replaces #32's order) ---------- */
.lockup { display: flex; flex-direction: column; align-items: center; gap: var(--s1); margin: 14px 0 var(--s1); }
.lockup .l1 { height: 30px; width: auto; display: block; }
.lockup .l2 { color: var(--muted); font-size: var(--t-sm); letter-spacing: .02em; }
.lockup .l3 { font-size: 1.2rem; font-weight: 500; color: var(--fg); }
.lockup.small { gap: 2px; margin: 10px 0 0; }
.lockup.small .l1 { height: 15px; } .lockup.small .l2 { font-size: var(--t-xs); } .lockup.small .l3 { font-size: .85rem; }
footer.site { margin: 36px 0 var(--s6); color: var(--muted); font-size: .85rem; text-align: center; }
.foot-links { display: flex; gap: 2px 6px; justify-content: center; flex-wrap: wrap; margin-top: 10px; font-size: .8rem; }
.foot-links a { color: var(--muted); text-decoration: none; padding: 10px 6px; }
.foot-links a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- dialogs and toasts ---------- */
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); width: min(440px, calc(100% - 32px)); padding: 22px; color: var(--fg); background: var(--surface); }
dialog::backdrop { background: rgba(5,8,23,.35); }
.dlg-title { font-size: var(--t-md); margin: 0 0 var(--s2); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: var(--r-pill); font-size: .85rem; z-index: 40; animation: toastIn .2s ease both; max-width: calc(100vw - 32px); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
h2.sub { font-size: var(--t-base); margin: var(--s6) 0 var(--s2); }
.corp { margin: 10px 0 0; font-size: .8rem; color: var(--muted); text-align: center; }

/* Brand art has a white background baked in: blend it into the page tint (white becomes the background color). */
img[src*="/brand/enemoai-"] { mix-blend-mode: multiply; }
/* A page heading styled as a section heading (the link and intake screens: one h1 per screen). */
h1.h2 { font-size: var(--t-md); margin: 0 0 var(--s3); }
