/* ============================================================================
   PDFeSign — Swiss grid, authority navy, single gold accent.

   The visual argument this interface has to make is "this is a legal
   instrument, not a web toy". That means: a strict grid, one accent colour
   used sparingly, a serif reserved for headings, and generous whitespace
   around the document itself, which is the thing that matters on the page.
   ========================================================================= */

:root {
  /* Colour — navy carries authority, gold marks the single decisive action. */
  --navy-900: #14265c;
  --navy-800: #1e3a8a;
  --navy-700: #1e40af;
  --navy-50:  #eef2fb;
  --gold-700: #92400e;
  --gold-600: #b45309;
  --gold-50:  #fffaf0;

  --bg:            #f8fafc;
  --surface:       #ffffff;
  --surface-sunk:  #f1f5f9;
  --ink:           #0f172a;
  --ink-muted:     #475569;
  --ink-faint:     #64748b;
  --border:        #cbd5e1;
  --border-soft:   #e2e8f0;

  --success:     #15803d;
  --success-bg:  #f0fdf4;
  --warning:     #a16207;
  --warning-bg:  #fefce8;
  --danger:      #b91c1c;
  --danger-bg:   #fef2f2;

  --focus-ring: 0 0 0 3px rgba(30, 58, 138, 0.28);

  /* Type — a serif for headings, a humanist sans for everything operational. */
  --font-display: 'EB Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --font-ui: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  /* 8px base. Every gap in the interface is one of these. */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px;  --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --radius:    6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow:    0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px -8px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 4px 12px rgba(15, 23, 42, 0.08), 0 24px 48px -16px rgba(15, 23, 42, 0.18);

  --header-h: 60px;

  /* Light only. The palette is declared once and never inverted: this
     interface is read carefully before someone signs, and a dark surface is a
     worse place to read a contract. Declaring the scheme also keeps native
     controls and scrollbars light on a device set to dark. */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
h3 { font-size: 1.15rem; }

p { max-width: 68ch; }
a { color: var(--navy-800); text-decoration-thickness: 1px; text-underline-offset: 2px; }

img, svg { max-width: 100%; }
svg { display: block; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 200;
  background: var(--navy-800); color: #fff; padding: var(--s-3) var(--s-4);
  border-radius: var(--radius); font-weight: 700; transition: top 0.15s ease-out;
}
.skip-link:focus { top: var(--s-4); }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.shell { max-width: 1360px; margin-inline: auto; padding-inline: var(--s-4); }
@media (min-width: 768px)  { .shell { padding-inline: var(--s-6); } }
@media (min-width: 1280px) { .shell { padding-inline: var(--s-7); } }

/* ── Masthead ────────────────────────────────────────────────────────────── */

.masthead {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.masthead__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.wordmark {
  display: inline-flex; align-items: center; gap: var(--s-3);
  min-height: 44px; /* it is a link, so it needs a real touch target */
  text-decoration: none; color: inherit;
}
.wordmark__mark { width: 30px; height: 30px; flex: none; color: var(--navy-800); }
.wordmark__text {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 700;
  letter-spacing: -0.015em; color: var(--ink);
}
.wordmark__text b { font-weight: 700; color: var(--gold-600); }

.masthead__meta { display: flex; align-items: center; gap: var(--s-3); }
.masthead__legal {
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700; color: var(--ink-muted); white-space: nowrap;
}
@media (max-width: 719px) { .masthead__legal { display: none; } }

/* ── Notices ─────────────────────────────────────────────────────────────── */

.notice {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--border-soft); border-left-width: 3px;
  border-radius: var(--radius); font-size: 0.875rem; line-height: 1.5;
}
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.notice--info    { background: var(--navy-50);    border-left-color: var(--navy-800); color: var(--ink); }
.notice--warning { background: var(--warning-bg); border-left-color: var(--warning); color: var(--ink); }
.notice--danger  { background: var(--danger-bg);  border-left-color: var(--danger);  color: var(--ink); }
.notice--success { background: var(--success-bg); border-left-color: var(--success); color: var(--ink); }
.notice strong { font-weight: 700; }

.demo-banner {
  background: var(--warning-bg);
  border-bottom: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  font-size: 0.83rem; color: var(--ink);
}
.demo-banner__inner {
  display: flex; gap: var(--s-3); align-items: center;
  padding-block: var(--s-2); min-height: 40px;
}
.demo-banner svg { flex: none; width: 17px; height: 17px; color: var(--warning); }

/* ── Page intro ──────────────────────────────────────────────────────────── */

.intro { padding-block: var(--s-6) var(--s-5); }
@media (min-width: 1024px) { .intro { padding-block: var(--s-7) var(--s-6); } }
.intro__eyebrow {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-600); margin-bottom: var(--s-3);
}
.intro__lede { margin-top: var(--s-3); color: var(--ink-muted); font-size: 1.03rem; }

.trust-row {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5);
  margin-top: var(--s-5); padding-top: var(--s-4);
  border-top: 1px solid var(--border-soft);
}
.trust-row__item {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: 0.8rem; font-weight: 700; color: var(--ink-muted);
}
.trust-row__item svg { width: 16px; height: 16px; color: var(--navy-800); flex: none; }

/* ── The signing workspace ───────────────────────────────────────────────── */

.workspace { display: grid; gap: var(--s-5); align-items: start; padding-bottom: var(--s-8); }
@media (min-width: 1024px) {
  /* Document dominant, controls in a narrower rail. */
  .workspace { grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr); gap: var(--s-6); }
}
@media (min-width: 1280px) { .workspace { grid-template-columns: minmax(0, 1.75fr) 420px; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--border-soft);
}
.panel__title { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); }
.panel__body { padding: var(--s-5); }

/* ── Document stage ──────────────────────────────────────────────────────── */

.stage { position: relative; }
.stage__viewport {
  background: var(--surface-sunk);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: var(--s-4);
  min-height: 380px;
  max-height: min(78dvh, 900px);
  overflow: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}
@media (min-width: 1024px) { .stage__viewport { min-height: 560px; } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-3); text-align: center;
  min-height: 340px; padding: var(--s-6) var(--s-5);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--navy-800); background: var(--navy-50); }
.dropzone.is-dragging { border-color: var(--gold-600); background: var(--gold-50); border-style: solid; }
.dropzone__icon { width: 44px; height: 44px; color: var(--navy-800); }
.dropzone__title { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.dropzone__hint { font-size: 0.83rem; color: var(--ink-faint); }

.page-canvas {
  --page-scale: 1;
  position: relative;
  width: 100%;
  /* max-width and aspect-ratio are set inline from the real page dimensions,
     so the box is reserved before render and the viewport never jumps. */
  margin-inline: auto;
  margin-bottom: var(--s-4);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: crosshair;
  transition: box-shadow 0.2s ease;
}
.page-canvas:hover { box-shadow: var(--shadow-lg); }
.page-canvas canvas { display: block; width: 100%; height: auto; }
.page-canvas__label {
  position: absolute; top: var(--s-2); left: var(--s-2);
  background: rgba(15, 23, 42, 0.72); color: #fff;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 2px var(--s-2); border-radius: 3px;
  pointer-events: none;
}

/* The draggable signature preview. Mirrors the vector stamp the server
   embeds, so what the user positions is what ends up in the PDF. */
.stamp {
  position: absolute; z-index: 5;
  /* Authored at the server's own 210pt design size, then scaled to whatever
     fraction of natural size the page is currently displayed at. */
  width: 210px;
  height: 82px;
  transform: scale(var(--page-scale, 1));
  transform-origin: 0 0;
  background: #fff;
  border: 1px solid var(--navy-800);
  border-left: 3px solid var(--gold-600);
  box-shadow: var(--shadow-lg);
  cursor: grab;
  touch-action: none;
  font-size: 10px; line-height: 1.35; color: #0f172a;
  user-select: none;
}
.stamp:active { cursor: grabbing; }
.stamp.is-locked { cursor: default; }
.stamp__band {
  background: var(--navy-800); color: #fff;
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  padding: 3px 7px; font-size: 8px; font-weight: 700; letter-spacing: 0.07em;
}
.stamp__body { padding: 5px 7px; height: 67px; overflow: hidden; }
.stamp__name { font-weight: 700; font-size: 11px; letter-spacing: 0.01em; color: #0f172a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stamp__role { color: #64748b; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stamp__rule { height: 1px; background: #cbd5e1; margin: 4px 0; }
.stamp__meta { color: #64748b; font-size: 8px; line-height: 1.3; }
/* Counter-scaled against the page zoom: the stamp shrinks with the page, but
   its controls must stay a usable size at every zoom level. */
.stamp__handle {
  position: absolute;
  bottom: calc(100% + 6px); right: 0;
  display: flex; gap: 6px;
  transform: scale(calc(1 / var(--page-scale, 1)));
  transform-origin: 100% 100%;
}
.stamp__btn {
  position: relative;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
  padding: 0;
}
/* Extends the hit area to 44px without growing the visible control. */
.stamp__btn::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
.stamp__btn svg { width: 15px; height: 15px; }
.stamp__btn:hover { background: var(--surface-sunk); }
.stamp.is-locked .stamp__handle { display: none; }

/* ── Stepper ─────────────────────────────────────────────────────────────── */

.steps { display: grid; gap: var(--s-1); list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3);
  padding: var(--s-3) 0;
  align-items: start;
}
.step + .step { border-top: 1px solid var(--border-soft); }
.step__num {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.78rem; font-weight: 700;
  border: 1.5px solid var(--border); color: var(--ink-faint); background: var(--surface);
}
.step__label { font-weight: 700; font-size: 0.92rem; color: var(--ink-faint); }
.step__hint { font-size: 0.81rem; color: var(--ink-faint); margin-top: 2px; }
.step[data-state='active'] .step__num { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }
.step[data-state='active'] .step__label { color: var(--ink); }
.step[data-state='done'] .step__num { border-color: var(--success); background: var(--success); color: #fff; }
.step[data-state='done'] .step__label { color: var(--ink-muted); }
.step__num svg { width: 14px; height: 14px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */

.field + .field, .field-row + .field, .field + .field-row { margin-top: var(--s-4); }
.field-row { display: grid; gap: var(--s-4); }
@media (min-width: 480px) { .field-row { grid-template-columns: 1fr 1fr; } }

.label {
  display: block; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: var(--s-2);
}
.label .req { color: var(--danger); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  /* 16px keeps iOS Safari from zooming the viewport on focus. */
  font: inherit; font-size: 16px;
  padding: 11px var(--s-3);
  min-height: 44px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--ink-faint); opacity: 0.75; }
.input:hover, .select:hover { border-color: var(--ink-faint); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--navy-800); box-shadow: var(--focus-ring);
}
.input[aria-invalid='true'], .select[aria-invalid='true'] { border-color: var(--danger); }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
  padding-right: 36px;
}
.help { font-size: 0.79rem; color: var(--ink-faint); margin-top: var(--s-2); }
.error {
  display: none; align-items: center; gap: 6px;
  font-size: 0.81rem; font-weight: 700; color: var(--danger); margin-top: var(--s-2);
}
.error svg { width: 14px; height: 14px; flex: none; }
.error.is-shown { display: flex; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 46px; padding: 0 var(--s-5);
  font: inherit; font-size: 0.94rem; font-weight: 700; letter-spacing: 0.01em;
  border: 1px solid transparent; border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.08s ease;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn--primary { background: var(--navy-800); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--navy-900); }
/* The one gold control on the page: the irreversible one. */
.btn--commit { background: var(--gold-600); color: #fff; }
.btn--commit:hover:not(:disabled) { background: var(--gold-700); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-sunk); }
.btn--quiet {
  background: none; border: none; color: var(--ink-muted);
  min-height: 40px; padding: 0 var(--s-3); font-size: 0.85rem;
}
.btn--quiet:hover:not(:disabled) { color: var(--ink); text-decoration: underline; }
.btn--block { width: 100%; }

.btn__spinner {
  width: 16px; height: 16px; flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: currentColor;
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.actions .btn { flex: 1 1 auto; }

/* ── File summary ────────────────────────────────────────────────────────── */

.filecard {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3);
  background: var(--surface-sunk);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
}
.filecard__icon { width: 34px; height: 34px; flex: none; color: var(--navy-800); }
.filecard__name { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filecard__meta { font-size: 0.78rem; color: var(--ink-faint); }
.filecard__meta code { font-family: var(--font-mono); font-size: 0.72rem; }

/* ── OTP entry ───────────────────────────────────────────────────────────── */

.otp { display: flex; gap: var(--s-2); }
.otp input {
  flex: 1 1 0; min-width: 0;
  height: 52px; padding: 0;
  font-family: var(--font-mono); font-size: 20px; font-weight: 700; text-align: center;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  -webkit-appearance: none; appearance: none;
}
.otp input:focus { outline: none; border-color: var(--navy-800); box-shadow: var(--focus-ring); }
.otp input[data-filled='true'] { border-color: var(--navy-800); background: var(--navy-50); }

.countdown { font-size: 0.82rem; color: var(--ink-faint); margin-top: var(--s-3); }
.countdown b { font-family: var(--font-mono); color: var(--ink); }

/* ── Data table (audit) ──────────────────────────────────────────────────── */

.datalist { display: grid; gap: 0; }
.datalist__row {
  display: grid; gap: var(--s-1);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--border-soft);
}
@media (min-width: 560px) { .datalist__row { grid-template-columns: 190px minmax(0, 1fr); gap: var(--s-4); align-items: baseline; } }
.datalist__key { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-faint); }
.datalist__val { font-size: 0.9rem; color: var(--ink); overflow-wrap: anywhere; }
.datalist__val code, .mono { font-family: var(--font-mono); font-size: 0.82rem; }

/* ── Result page ─────────────────────────────────────────────────────────── */

.result { max-width: 760px; margin-inline: auto; padding-block: var(--s-7) var(--s-9); }
.result__seal {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: var(--s-5);
  background: var(--success-bg); color: var(--success);
  border: 2px solid color-mix(in srgb, var(--success) 40%, transparent);
}
.result__seal svg { width: 30px; height: 30px; }
.result__seal--fail { background: var(--danger-bg); color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent); }

/* ── Reference content (the indexable part of the page) ──────────────────── */

.reference { border-top: 1px solid var(--border-soft); padding-block: var(--s-7) var(--s-8); }
.reference__grid { display: grid; gap: var(--s-6); margin-top: var(--s-5); }
@media (min-width: 768px)  { .reference__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .reference__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.reference h3 { font-family: var(--font-ui); font-size: 0.95rem; font-weight: 700;
  letter-spacing: 0.02em; margin-bottom: var(--s-2); }
.reference p { font-size: 0.9rem; color: var(--ink-muted); max-width: 60ch; }
.reference p + p { margin-top: var(--s-3); }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  padding-block: var(--s-6);
  font-size: 0.84rem; color: var(--ink-faint);
}
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; }

/* ── Toast ───────────────────────────────────────────────────────────────── */

.toast-region {
  position: fixed; z-index: 100;
  left: var(--s-4); right: var(--s-4); bottom: calc(var(--s-4) + env(safe-area-inset-bottom));
  display: grid; gap: var(--s-2); justify-items: center;
  pointer-events: none;
}
@media (min-width: 640px) { .toast-region { left: auto; right: var(--s-5); justify-items: end; max-width: 420px; } }
.toast {
  display: flex; align-items: flex-start; gap: var(--s-3);
  width: 100%; max-width: 420px;
  padding: var(--s-3) var(--s-4);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-soft); border-left: 3px solid var(--navy-800);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  font-size: 0.88rem; line-height: 1.45;
  pointer-events: auto;
  animation: toast-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.toast--success { border-left-color: var(--success); } .toast--success svg { color: var(--success); }
.toast--error   { border-left-color: var(--danger); }  .toast--error svg   { color: var(--danger); }
.toast--info svg { color: var(--navy-800); }

/* ── Utility ─────────────────────────────────────────────────────────────── */

[hidden] { display: none !important; }
.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.text-muted { color: var(--ink-muted); }
.text-small { font-size: 0.85rem; }


.page-canvas__failed {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
  padding: var(--s-5);
  font-size: 0.85rem; color: var(--ink-faint);
  background: var(--surface-sunk);
}
