/* Ashario Partner Intake — design system
   Derived from ashario.com: black canvas, white type, Inter / SF Pro,
   blue #0071e3 pill buttons, soft translucent surfaces. */

:root {
  --bg: #000000;
  --bg-elev: #0a0a0b;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --text: #ffffff;
  --text-2: #d9d9de;
  --muted: #a1a1a6;
  --dim: #8e8e93;
  --accent: #0071e3;
  --accent-hover: #0a7cf0;
  --accent-soft: rgba(0, 113, 227, 0.18);
  --link: #2997ff;
  --gold: #d1ba98;
  --success: #30d158;
  --success-soft: rgba(48, 209, 88, 0.14);
  --warn: #ffd60a;
  --warn-soft: rgba(255, 214, 10, 0.12);
  --danger: #ff453a;
  --danger-soft: rgba(255, 69, 58, 0.14);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 22px;
  --pill: 999px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1180px;
  --gutter: 20px;
  /* Theme roles for the black theme; the white theme overrides them below. */
  color-scheme: dark;
  --text-strong: #ffffff;
  --on-success: #04210c;
  --info-text: #9cc9ff;
  --danger-text: #ffb4ae;
  --alert-info-text: #d6e8ff;
  --alert-warn-text: #fff2b3;
  --alert-danger-text: #ffd1ce;
  --alert-success-text: #c9f5d6;
  --overlay: rgba(255, 255, 255, 0.02);
  --overlay-2: rgba(255, 255, 255, 0.03);
  --input-bg: rgba(255, 255, 255, 0.06);
  --input-bg-focus: rgba(255, 255, 255, 0.08);
  --placeholder: rgba(255, 255, 255, 0.32);
  --yesno-no: rgba(255, 255, 255, 0.18);
  --raised: #0d0d0f;
  --toast-bg: #141416;
  --option-bg: #111111;
  --header-bg: rgba(0, 0, 0, 0.82);
  --header-solid: rgba(0, 0, 0, 0.92);
  --backdrop: rgba(0, 0, 0, 0.7);
  --avatar-bg: linear-gradient(140deg, #1c1c1e, #3a3a3c);
  --logo-filter: none;
  --viewer-bg: #060608;
  --viewer-control: rgba(0, 0, 0, 0.45);
  --viewer-control-strong: rgba(0, 0, 0, 0.6);
  --viewer-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

/* White theme: the same layout on white, chosen with the sun/moon switch in the top bar (js/theme.js). */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elev: #f5f5f7;
  --surface: rgba(0, 0, 0, 0.035);
  --surface-2: rgba(0, 0, 0, 0.06);
  --surface-3: rgba(0, 0, 0, 0.09);
  --border: rgba(0, 0, 0, 0.12);
  --border-strong: rgba(0, 0, 0, 0.24);
  --text: #1d1d1f;
  --text-2: #3a3a3c;
  --muted: #5f5f64;
  --dim: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0062c4;
  --accent-soft: rgba(0, 113, 227, 0.10);
  --link: #0066cc;
  --gold: #8a6d3b;
  --success: #1d7d36;
  --success-soft: rgba(29, 125, 54, 0.10);
  --warn: #9a5b00;
  --warn-soft: rgba(255, 159, 10, 0.16);
  --danger: #c9190b;
  --danger-soft: rgba(201, 25, 11, 0.08);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.14);
  --text-strong: #000000;
  --on-success: #ffffff;
  --info-text: #0a58b0;
  --danger-text: #b3261e;
  --alert-info-text: #0b4f9c;
  --alert-warn-text: #6b4100;
  --alert-danger-text: #9b1c12;
  --alert-success-text: #17602c;
  --overlay: rgba(0, 0, 0, 0.02);
  --overlay-2: rgba(0, 0, 0, 0.025);
  --input-bg: #ffffff;
  --input-bg-focus: #ffffff;
  --placeholder: rgba(0, 0, 0, 0.38);
  --yesno-no: rgba(0, 0, 0, 0.12);
  --raised: #ffffff;
  --toast-bg: #1d1d1f;
  --option-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.86);
  --header-solid: rgba(255, 255, 255, 0.95);
  --backdrop: rgba(0, 0, 0, 0.32);
  --avatar-bg: linear-gradient(140deg, #ececf0, #d8d8dd);
  --logo-filter: brightness(0);
  --viewer-bg: #ffffff;
  --viewer-control: rgba(255, 255, 255, 0.9);
  --viewer-control-strong: rgba(255, 255, 255, 0.94);
  --viewer-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
}

/* The black/white switch in the top bar: shows the theme it switches to. */
.theme-toggle {
  width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--border-strong);
  background: transparent; color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer;
  transition: color .15s, border-color .15s, background-color .15s;
}
.theme-toggle:hover { color: var(--text-strong); border-color: var(--text-strong); }
.theme-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 113, 227, .45); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }
.brand img { filter: var(--logo-filter); }


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 34px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; }
p { margin: 0; }
small { font-size: 12.5px; }
::selection { background: var(--accent); color: #fff; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; width: auto; }
.brand__divider { width: 1px; height: 22px; background: var(--border-strong); }
.brand__name { font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.topbar__right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }

.page { max-width: var(--maxw); margin: 0 auto; padding: 40px var(--gutter) 96px; }
.page--narrow { max-width: 760px; }

.footer {
  border-top: 1px solid var(--border);
  padding: 28px var(--gutter);
  color: var(--dim); font-size: 12.5px;
  text-align: center;
}
.footer a { color: var(--muted); }

/* ---------- Typography helpers ---------- */
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.eyebrow--accent { color: var(--link); }
.lead { font-size: 17px; color: var(--text-2); line-height: 1.55; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.gold { color: var(--gold); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92em; letter-spacing: 0.02em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; min-height: 44px;
  border-radius: var(--pill); border: 1px solid transparent;
  background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap;
  transition: background-color .2s, border-color .2s, transform .08s, opacity .2s;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn--secondary { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--secondary:hover { background: var(--surface-2); border-color: var(--text-strong); }
.btn--ghost { background: transparent; color: var(--link); padding-left: 12px; padding-right: 12px; }
.btn--ghost:hover { background: var(--surface); }
.btn--danger { background: transparent; border-color: rgba(255, 69, 58, .5); color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { padding: 8px 18px; min-height: 36px; font-size: 12px; }
/* Small phones: a long label ("Turn on two-step verification") wraps instead of running off the screen. */
@media (max-width: 420px) {
  .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.3; }
}
.btn--lg { padding: 16px 40px; min-height: 52px; font-size: 14px; }
.btn--block { width: 100%; }
.btn .spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font-size: 13px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}
.card--tight { padding: 24px; }
.card + .card { margin-top: 20px; }
.card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.card__title { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Form controls ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.field__req { color: var(--link); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.field__help { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: -2px; }
.field__error { font-size: 13px; color: var(--danger); display: none; }
.field.is-invalid .field__error { display: block; }
.field.is-invalid .input, .field.is-invalid .select, .field.is-invalid .textarea { border-color: rgba(255, 69, 58, .6); }

.input, .select, .textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
  min-height: 48px;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,113,227,.28); background: var(--input-bg-focus); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .55; cursor: not-allowed; }
.textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 40px; cursor: pointer;
}
.select option { background: var(--option-bg); color: var(--text); }
input[type="date"].input, input[type="month"].input { color-scheme: inherit; }
input[type="number"].input { -moz-appearance: textfield; }

.section-heading { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.section-heading h3 { font-size: 16px; }

/* Chips (multi-select) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--pill);
  border: 1px solid var(--border-strong); background: transparent; color: var(--text-2);
  font-size: 13.5px; font-weight: 500; cursor: pointer; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { background: var(--surface-2); border-color: var(--text-strong); color: var(--text-strong); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip[aria-pressed="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.chip:disabled { cursor: not-allowed; opacity: .6; }

/* Checkbox group */
.checkgroup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checkgroup--single { grid-template-columns: 1fr; }
.check {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); padding: 13px 16px; cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.check:hover { border-color: var(--border-strong); }
.check.is-checked { border-color: rgba(0,113,227,.7); background: var(--accent-soft); }
.check__row { display: flex; align-items: flex-start; gap: 12px; }
.check__box {
  flex: none; width: 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid var(--border-strong); border-radius: 6px; background: transparent;
  display: grid; place-items: center; transition: background-color .15s, border-color .15s;
}
.check__box svg { width: 12px; height: 12px; opacity: 0; transform: scale(.7); transition: opacity .12s, transform .12s; }
.check.is-checked .check__box { background: var(--accent); border-color: var(--accent); }
.check.is-checked .check__box svg { opacity: 1; transform: scale(1); }
.check__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.check__text small { color: var(--muted); }
.check input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.check__detail { display: none; }
.check.is-checked .check__detail { display: block; }
.check__detail .textarea { min-height: 72px; font-size: 14px; }
.check__detail .input { min-height: 42px; font-size: 14px; }

/* Yes / No segmented */
.yesno { display: inline-flex; align-self: flex-start; border: 1px solid var(--border-strong); border-radius: var(--pill); padding: 3px; background: var(--surface); gap: 3px; }
.yesno button {
  border: 0; background: transparent; color: var(--muted);
  padding: 9px 26px; border-radius: var(--pill); cursor: pointer;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .15s, color .15s;
}
.yesno button:hover { color: var(--text-strong); }
.yesno button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.yesno button[aria-pressed="true"].no { background: var(--yesno-no); }
.yesno button:disabled { cursor: not-allowed; }

/* Repeater table */
.repeater { display: flex; flex-direction: column; gap: 10px; }
.repeater__head, .repeater__row { display: grid; gap: 10px; align-items: center; }
.repeater__head { padding: 0 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.repeater__row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.repeater__row .input, .repeater__row .select { min-height: 42px; padding: 9px 12px; font-size: 14px; }
.repeater__remove {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; transition: all .15s;
}
.repeater__remove:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.repeater__add {
  border: 1px dashed var(--border-strong); background: transparent; color: var(--text-2);
  border-radius: var(--radius); padding: 13px; cursor: pointer; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: all .15s;
}
.repeater__add:hover { border-color: var(--link); color: var(--link); background: var(--surface); }
.repeater__empty { color: var(--dim); font-size: 13.5px; padding: 6px 2px; }

/* Upload */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); padding: 36px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background-color .15s;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--link); background: var(--accent-soft); }
.dropzone svg { width: 36px; height: 36px; color: var(--link); }
.dropzone strong { font-weight: 600; }
.dropzone small { color: var(--muted); }
.dropzone input { display: none; }
.dropzone.is-disabled { cursor: not-allowed; opacity: .6; }

.filelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.file {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 10px 12px;
  position: relative; overflow: hidden;
}
.file__thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.file__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file__meta { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.file__name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file__sub { font-size: 12px; color: var(--dim); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.file__type { min-height: 30px; padding: 4px 28px 4px 10px; font-size: 12.5px; border-radius: 8px; width: auto; background-position: right 8px center; }
.file__actions { display: flex; flex-direction: column; gap: 6px; }
.file__progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); width: 0; transition: width .2s; }
.file.is-uploading { opacity: .85; }
.file.is-error { border-color: rgba(255,69,58,.6); }
.file.is-error .file__sub { color: var(--danger); }
.icon-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--text-strong); border-color: var(--text-strong); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

/* ---------- Intake shell ---------- */
.intake { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.stepper { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 4px; }
.stepper__title { padding: 0 14px 14px; }
.step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 12px; border: 0; background: transparent; color: var(--muted);
  text-align: left; cursor: pointer; font-size: 14px; width: 100%; transition: background-color .15s, color .15s;
}
.step:hover { background: var(--surface); color: var(--text-strong); }
.step[aria-current="step"] { background: var(--surface-2); color: var(--text-strong); font-weight: 500; }
.step__num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border-strong);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.step[aria-current="step"] .step__num { border-color: var(--accent); background: var(--accent); color: #fff; }
.step.is-done .step__num { border-color: var(--success); color: var(--success); }
.step.is-done .step__num svg { width: 12px; height: 12px; }
.step.is-missing .step__num { border-color: var(--warn); color: var(--warn); }
.stepper__progress { margin: 14px 14px 0; }
.progress { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.stepper__meta { padding: 10px 14px 0; font-size: 12.5px; color: var(--dim); }

.stepbar { display: none; }

.pane { min-width: 0; }
.pane__header { margin-bottom: 26px; display: flex; flex-direction: column; gap: 8px; }
.pane__header h2 { font-size: 28px; }
.pane__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }

.save-state { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); white-space: nowrap; }
/* Phones: the coloured dot alone shows the save status, so the top bar fits beside the theme switch. */
@media (max-width: 480px) { .save-state__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.save-state.is-saving .dot { background: var(--warn); animation: pulse 1s infinite; }
.save-state.is-saved .dot { background: var(--success); }
.save-state.is-error .dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- Alerts / badges ---------- */
.alert { border-radius: var(--radius); padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; border: 1px solid; }
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.alert--info { background: var(--accent-soft); border-color: rgba(0,113,227,.4); color: var(--alert-info-text); }
.alert--warn { background: var(--warn-soft); border-color: rgba(255,214,10,.35); color: var(--alert-warn-text); }
.alert--danger { background: var(--danger-soft); border-color: rgba(255,69,58,.45); color: var(--alert-danger-text); }
.alert--success { background: var(--success-soft); border-color: rgba(48,209,88,.4); color: var(--alert-success-text); }
.alert a, .alert .link-btn { color: inherit; text-decoration: underline; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--pill); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; border: 1px solid; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--submitted { color: var(--success); border-color: rgba(48,209,88,.4); background: var(--success-soft); }
.badge--draft { color: var(--warn); border-color: rgba(255,214,10,.35); background: var(--warn-soft); }
.badge--locked { color: var(--muted); border-color: var(--border-strong); background: var(--surface-2); }

/* ---------- Review / summary ---------- */
.summary { display: flex; flex-direction: column; gap: 18px; }
.summary__section { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.summary__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); background: var(--overlay); }
.summary__head h3 { font-size: 15px; }
.summary__body { padding: 8px 22px 14px; }
/* "Founder / owner", "Sales representative" and other sections within a step, over their answers. */
.summary__subhead { margin: 18px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.summary__body > .summary__subhead:first-child { margin-top: 8px; }
.kv { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 6px 20px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv--block { grid-template-columns: 1fr; gap: 10px; }
.kv--block .kv__table { table-layout: auto; }
.kv__table th { white-space: nowrap; }
.kv__k { color: var(--muted); }
.kv__v { color: var(--text); white-space: pre-wrap; word-break: break-word; }
.kv__v.is-empty { color: var(--dim); font-style: italic; }
.kv.is-missing .kv__k { color: var(--danger); }
.kv.is-missing .kv__v { color: var(--danger); font-style: normal; }
.kv__list { margin: 0; padding-left: 18px; }
.kv__list li { margin: 2px 0; }
.kv__table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.kv__table th, .kv__table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.kv__table th { color: var(--dim); font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.kv__table tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: 3px 10px; border-radius: var(--pill); background: var(--surface-3); font-size: 12.5px; margin: 2px 4px 2px 0; }
.yn { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.yn--yes { color: var(--success); }
.yn--no { color: var(--text-2); }

.attest { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.attest.is-checked { border-color: rgba(48,209,88,.5); background: var(--success-soft); }
.attest .check__box { margin-top: 2px; }
.attest.is-checked .check__box { background: var(--success); border-color: var(--success); }
.attest.is-checked .check__box svg { opacity: 1; transform: scale(1); }
.attest p { font-size: 14px; line-height: 1.5; }

/* ---------- Confirmation ---------- */
.confirm { text-align: center; padding: 56px 32px; }
.confirm__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--success-soft); border: 1px solid rgba(48,209,88,.4); display: grid; place-items: center; margin: 0 auto 22px; color: var(--success); }
.confirm__icon svg { width: 32px; height: 32px; }
.confirm h2 { font-size: 30px; margin-bottom: 10px; }
.confirm__ref { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 22px; }
.confirm__ref strong { display: block; font-size: 26px; letter-spacing: .06em; color: var(--gold); margin-top: 4px; font-weight: 600; }

/* ---------- Landing ---------- */
.hero { padding: 72px 0 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.hero h1 { font-size: 46px; letter-spacing: -0.03em; margin: 14px 0 16px; }
.hero .lead { max-width: 520px; }
.hero__list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.hero__list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 14.5px; }
.hero__list svg { flex: none; width: 18px; height: 18px; color: var(--link); margin-top: 2px; }
.hero__card { box-shadow: var(--shadow); }
.hero__card .form-grid { grid-template-columns: 1fr; gap: 16px; }
/* Two-step sign-in (public/js/login.js): setting up an authenticator app, then its 6-digit code. */
.setup { margin-bottom: 18px; }
.setup__steps { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.setup__qr { display: flex; justify-content: center; margin: 4px 0 12px; }
.setup__qr img { width: 176px; height: 176px; padding: 10px; border-radius: 14px; background: #fff; } /* the code needs a white quiet zone in both themes */
.setup__key { font-size: 13px; color: var(--muted); line-height: 1.5; text-align: center; overflow-wrap: anywhere; }
.setup__key code { color: var(--text-strong); white-space: nowrap; }
.input--code { font-size: 22px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; padding-left: 24px; }
.link-button { justify-self: center; margin-top: 2px; padding: 4px 6px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--link); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.meta-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 30px; }
.meta-row div { display: flex; flex-direction: column; gap: 2px; }
.meta-row strong { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.meta-row span { font-size: 12px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Admin ---------- */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .input { max-width: 320px; min-height: 42px; padding: 9px 14px; }
.table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: auto; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 860px; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; background: var(--overlay); position: sticky; top: 0; }
.table tbody tr { cursor: pointer; transition: background-color .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .ref { font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.table .company { font-weight: 500; color: var(--text-strong); }
.table .sub { color: var(--dim); font-size: 12.5px; }
.empty { padding: 48px; text-align: center; color: var(--dim); }

.detail-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 26px; }
.detail-head h1 { font-size: 30px; }
.detail-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.detail-meta div { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-meta span { font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.detail-meta strong { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.events { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.events li { display: grid; grid-template-columns: 170px 110px 1fr; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.events li:last-child { border-bottom: 0; }
.events .t { color: var(--dim); }
.events .k { color: var(--link); font-weight: 500; text-transform: capitalize; }

.modal-backdrop { position: fixed; inset: 0; background: var(--backdrop); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 520px; background: var(--raised); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow); }
.modal h3 { margin-bottom: 6px; }
.modal .form-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 18px; }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 22px; }
/* Small phones: dialog buttons stack full width, the main action on top. */
@media (max-width: 420px) {
  .modal__actions { flex-direction: column-reverse; align-items: stretch; }
  .modal__actions .btn { width: 100%; }
}
.copybox { display: flex; gap: 8px; align-items: center; }
.copybox .input { font-size: 13px; }

.login { max-width: 420px; margin: 80px auto; }
.login .form-grid { grid-template-columns: 1fr; gap: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg); color: #f5f5f7; border: 1px solid var(--border-strong); border-radius: var(--pill);
  padding: 12px 20px; font-size: 13.5px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 200; max-width: calc(100vw - 40px);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--error { border-color: rgba(255,69,58,.6); color: #ffd1ce; }
.toast--success { border-color: rgba(48,209,88,.5); color: #c9f5d6; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .intake { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .intake { grid-template-columns: 1fr; gap: 20px; }
  .stepper { display: none; }
  .stepbar { display: block; position: sticky; top: 64px; z-index: 40; background: var(--header-solid); backdrop-filter: blur(14px); margin: 0 calc(-1 * var(--gutter)); padding: 12px var(--gutter); border-bottom: 1px solid var(--border); }
  .stepbar__row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
  .stepbar__row strong { color: var(--text-strong); font-weight: 500; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .hero h1 { font-size: 36px; }
  .card { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .checkgroup { grid-template-columns: 1fr; }
  .repeater__head { display: none; }
  .repeater__row { grid-template-columns: 1fr !important; }
  .repeater__row .repeater__remove { justify-self: end; }
  .kv { grid-template-columns: 1fr; gap: 3px; }
  .pane__footer { flex-direction: column-reverse; align-items: stretch; }
  .pane__footer .btn { width: 100%; }
  .events li { grid-template-columns: 1fr; gap: 2px; }
  .topbar__right .hide-sm { display: none; }
  .page { padding-top: 24px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }
  .brand__name { display: none; }
  .brand__divider { display: none; }
  .yesno button { padding: 9px 18px; }
}

@media print {
  body { background: #fff; color: #000; }
  .topbar, .stepper, .stepbar, .pane__footer, .actions, .toolbar, .footer, .no-print { display: none !important; }
  .card, .summary__section, .kv, .detail-meta div { border-color: #ccc !important; background: #fff !important; color: #000 !important; }
  .kv__k, .summary__head, .eyebrow, .muted, .dim { color: #444 !important; }
  .kv__v, h1, h2, h3 { color: #000 !important; }
  .tag { background: #eee !important; color: #000 !important; }
  a { color: #000; }
  .page { padding: 0; max-width: none; }
}

/* ---------- Partnership deck (intake): cover card, sidebar shortcut and slide viewer ---------- */
.deck-card {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; align-items: center;
  padding: 16px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.deck-card + .field__label { margin-top: 6px; } /* "I have reviewed the deck" under the card, above Yes / No */
.deck-card__cover, .deck-mini__cover {
  position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--border); border-radius: 10px; background: #000; cursor: zoom-in;
}
.deck-card__cover img, .deck-mini__cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.deck-card__cover:hover img, .deck-mini__cover:hover img { transform: scale(1.03); }
.deck-card__cover:focus-visible, .deck-mini__cover:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 113, 227, .5); }
.deck-card__badge {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: var(--pill); background: rgba(0, 0, 0, .7); color: #fff; font-size: 11.5px; font-weight: 600;
}
.deck-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.deck-card__title { font-size: 17px; font-weight: 600; color: var(--text-strong); }
.deck-card__meta { font-size: 13px; color: var(--muted); }
.deck-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.deck-card__actions .btn, .deck-viewer__tools .btn { gap: 7px; }

.deck-mini { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.deck-mini__links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.deck-mini__links button, .deck-mini__links a { padding: 0; border: 0; background: none; font: inherit; color: var(--link); cursor: pointer; text-decoration: none; }
.deck-mini__links button:hover, .deck-mini__links a:hover { text-decoration: underline; }
/* Ashario's social media links in the intake sidebar: one compact row right under the deck's Preview link, the
   width of the deck image (public/js/social.js). Kept to one row so the sticky sidebar still fits a laptop screen.
   Below 861px, where the sidebar is hidden, the footer row shows them instead. */
.side-social { margin-top: 14px; }
.stepper__meta + .side-social { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); } /* no deck above */
.side-social .social { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 4px; margin: 0; }
.side-social .social .social__link { width: 28px; height: 28px; }
.side-social .social svg { width: 13px; height: 13px; }
@media (min-width: 861px) { body.has-side-social .footer .social { display: none; } }
@media print { .side-social { display: none !important; } }

/* The viewer follows the site theme: black around the slides in the black theme, white in the white theme.
   The slides themselves are shown exactly as designed. */
.deck-viewer {
  position: fixed; inset: 0; z-index: 300; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr); /* never wider than the screen, even with a 1600px slide inside */
  background: var(--viewer-bg); color: var(--text);
}
.deck-viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.deck-viewer__title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.deck-viewer__title strong { font-size: 14px; font-weight: 600; color: var(--text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck-viewer__count { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.deck-viewer__tools { display: flex; align-items: center; gap: 8px; flex: none; }
.deck-viewer__close, .deck-viewer__nav {
  display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-strong);
  background: var(--viewer-control); color: var(--text-strong); cursor: pointer; transition: background-color .15s, border-color .15s, opacity .15s;
}
.deck-viewer__close { width: 38px; height: 38px; flex: none; }
.deck-viewer__close:hover, .deck-viewer__nav:hover:not(:disabled) { border-color: var(--text-strong); background: var(--surface-2); }
.deck-viewer__close svg, .deck-viewer__nav svg { width: 18px; height: 18px; }
.deck-viewer__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 18px 76px; }
.deck-viewer__img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 6px; background: #111; box-shadow: var(--viewer-shadow);
}
.deck-viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; }
.deck-viewer__nav--prev { left: 16px; }
.deck-viewer__nav--next { right: 16px; }
.deck-viewer__nav:disabled { opacity: .25; cursor: default; }
.deck-viewer button:focus-visible, .deck-viewer a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(41, 151, 255, .7); }
.deck-viewer__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 18px 14px; border-top: 1px solid var(--border); scrollbar-width: thin; }
.deck-viewer__thumb {
  flex: none; width: 120px; aspect-ratio: 16 / 9; padding: 0; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; border-radius: 6px; background: #111; opacity: .55; transition: opacity .15s, border-color .15s;
}
.deck-viewer__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.deck-viewer__thumb:hover { opacity: .9; }
.deck-viewer__thumb.is-current { border-color: var(--accent); opacity: 1; }
/* Preview only: the deck's slides can't be dragged out or long-pressed to save. */
.deck-viewer img, .deck-card__cover img, .deck-mini__cover img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

@media (max-width: 720px) {
  .deck-card { grid-template-columns: 1fr; }
  .deck-viewer__stage { padding: 10px 8px; }
  .deck-viewer__nav { width: 40px; height: 40px; background: var(--viewer-control-strong); }
  .deck-viewer__nav--prev { left: 12px; }
  .deck-viewer__nav--next { right: 12px; }
  .deck-viewer__thumbs { display: none; }
  .deck-viewer__tools .hide-sm { display: none; }
}
@media print { .deck-viewer, .deck-mini { display: none !important; } }

/* ---------- Partnership plans (intake): four cards from the partnership deck ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 16px 16px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.plan-card:hover { border-color: var(--border-strong); }
.plan-card.is-selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-card__radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.plan-card:focus-within { box-shadow: 0 0 0 3px rgba(0, 113, 227, .35); }
.plan-card.is-selected:focus-within { box-shadow: 0 0 0 1px var(--accent) inset, 0 0 0 3px rgba(0, 113, 227, .35); }
.plan-card__check {
  position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--border-strong); color: transparent;
}
.plan-card__check svg { width: 12px; height: 12px; }
.plan-card.is-selected .plan-card__check { background: var(--accent); border-color: var(--accent); color: #fff; }
.plan-card__numeral { font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--gold); }
.plan-card__name { font-size: 17px; font-weight: 600; color: var(--link); } /* the plan names in blue */
.plan-card__price { font-size: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--text-strong); margin-bottom: 4px; }
.plan-card__scope, .plan-card__includes { font-size: 13px; color: var(--text-2); }
.plan-card__detail { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.5; color: var(--muted); }
.plan-footnote { margin: 10px 0 0; font-size: 12.5px; color: var(--dim); }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } }
@media print { .plan-card { break-inside: avoid; } }

/* ---------- Chat button (partner-facing pages): starts an email to hr@ashario.ca ---------- */
/* Above the page, below drawers (90), dialogs (100), toasts (200), the deck viewer (300) and calendar cards (400). */
.chat-fab {
  position: fixed; z-index: 80;
  right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px 0 18px;
  border-radius: var(--pill); background: var(--accent); color: #fff; text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .32), 0 2px 8px rgba(0, 0, 0, .18);
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.chat-fab:hover { transform: translateY(-2px); background: var(--accent-hover); color: #fff; text-decoration: none; }
.chat-fab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--accent); }
.chat-fab svg { width: 22px; height: 22px; flex: none; }
body.has-chat { padding-bottom: 88px; } /* room to scroll the last of the page above the button */
@media (max-width: 640px) {
  .chat-fab { width: 56px; height: 56px; padding: 0; justify-content: center; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
  .chat-fab svg { width: 24px; height: 24px; }
  .chat-fab__label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .chat-fab { transition: none; } .chat-fab:hover { transform: none; } }
@media print { .chat-fab { display: none !important; } body.has-chat { padding-bottom: 0; } }

/* ---------- Social media links (top of the footer on the partner-facing pages; public/js/social.js) ---------- */
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto 18px; }
.social .social__link {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); color: var(--muted); background: transparent; text-decoration: none;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.social .social__link:hover { color: var(--text-strong); border-color: var(--border-strong); background: var(--surface-2); text-decoration: none; }
.social .social__link:focus-visible { outline: none; color: var(--text-strong); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
/* Phones: two even rows of four instead of six and two. */
@media (max-width: 420px) { .social { display: grid; grid-template-columns: repeat(4, 40px); justify-content: center; gap: 12px 16px; } }
@media (prefers-reduced-motion: reduce) { .social .social__link { transition: none; } }
@media print { .social { display: none; } }
