/* Eazy Pizzy — site + shared component design system. Tokens only (see tokens.css). */

/* ============================================================ base */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
main { flex: 1 0 auto; }
main:focus { outline: none; box-shadow: none; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 var(--s-3); font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--fs-4xl); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }
::selection { background: var(--primary-soft); color: var(--ink); }
body.has-modal, body.nav-open { overflow: hidden; }
@media (min-width: 900px) { body.nav-open { overflow: auto; } }

.skip-link {
  position: absolute; left: var(--s-4); top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: var(--s-2) var(--s-4);
  border-radius: var(--r-sm); box-shadow: var(--shadow-md); font-weight: 600; text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: var(--s-3); }

/* ============================================================ layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-4); }
@media (min-width: 640px) { .container { padding-inline: var(--s-5); } }
.container--narrow { max-width: 760px; }
.container--form { max-width: 880px; }

.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--muted { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.section--surface { background: var(--surface); border-block: 1px solid var(--border); }
.section--brand { background: var(--surface-brand); color: var(--on-brand); }
.section--brand h2, .section--brand h3 { color: var(--on-brand); }
.section__head { max-width: 680px; margin-bottom: var(--s-7); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--split { max-width: none; display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: flex-end; justify-content: space-between; }
.section__head--split > div { max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: var(--s-3);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; opacity: .7; }
.section--brand .eyebrow { color: var(--cream-300); }
.lead { font-size: clamp(1.05rem, 1.6vw, var(--fs-xl)); color: var(--ink-soft); line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }

.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.split { display: grid; gap: var(--s-7); align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } .split--wide-left { grid-template-columns: 1.15fr .85fr; } }

/* ============================================================ buttons */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); border-radius: var(--r-pill);
  border: 1px solid var(--btn-bd); background: var(--btn-bg); color: var(--btn-fg);
  font: inherit; font-weight: 600; font-size: var(--fs-md); line-height: 1; text-decoration: none; white-space: nowrap;
  cursor: pointer; user-select: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { color: var(--btn-fg); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { border-radius: var(--r-pill); }
.btn .glyph, .btn svg { flex: none; }
.btn--primary { --btn-bg: var(--primary); --btn-fg: var(--on-brand); --btn-bd: var(--primary); box-shadow: var(--shadow-sm); }
.btn--primary:hover { --btn-bg: var(--primary-hover); --btn-bd: var(--primary-hover); box-shadow: var(--shadow-md); }
:root[data-theme="dark"] .btn--primary { --btn-fg: var(--blue-950); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--primary { --btn-fg: var(--blue-950); } }
.btn--secondary { --btn-bg: var(--surface); --btn-fg: var(--primary); --btn-bd: var(--border-strong); }
.btn--secondary:hover { --btn-bg: var(--primary-soft); --btn-bd: var(--primary); --btn-fg: var(--primary); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink-soft); --btn-bd: transparent; }
.btn--ghost:hover { --btn-bg: var(--surface-muted); --btn-fg: var(--ink); }
.btn--danger { --btn-bg: var(--bad); --btn-fg: var(--surface); --btn-bd: var(--bad); }
.btn--danger:hover { filter: brightness(0.94); }
.btn--on-brand { --btn-bg: var(--cream-100); --btn-fg: var(--blue-900); --btn-bd: var(--cream-100); }
.btn--on-brand:hover { --btn-bg: var(--cream-50); --btn-fg: var(--blue-950); }
.btn--outline-light { --btn-bg: transparent; --btn-fg: var(--on-brand); --btn-bd: rgba(255, 253, 248, 0.38); }
.btn--outline-light:hover { --btn-bg: rgba(255, 253, 248, 0.08); --btn-fg: var(--on-brand); --btn-bd: var(--cream-300); }
.btn--sm { min-height: 36px; padding: 0 var(--s-4); font-size: var(--fs-sm); }
.btn--lg { min-height: 52px; padding: 0 var(--s-6); font-size: var(--fs-lg); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: var(--r-pill);
  border: 1px solid transparent; background: transparent; color: var(--ink-soft); cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-muted); color: var(--ink); }
.icon-btn:focus-visible { border-radius: var(--r-pill); }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--primary); }
.link-arrow::after { content: "→"; transition: transform var(--dur) var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ============================================================ forms */
.form { display: grid; gap: var(--s-5); }
.form-row { display: grid; gap: var(--s-5); }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } .form-row--3 { grid-template-columns: 1fr 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field__label, .field > label, legend.field__label {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink); padding: 0;
}
.field__optional { font-weight: 400; color: var(--muted); }
.field__hint { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.input, .select, .textarea,
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font: inherit; font-size: var(--fs-md); line-height: 1.4;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}
.textarea, .field textarea { min-height: 120px; resize: vertical; }
.select, .field select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.input::placeholder, .textarea::placeholder, .field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.input:hover, .select:hover, .textarea:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--primary); }
.input:focus, .select:focus, .textarea:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
.field [aria-invalid="true"], .input[aria-invalid="true"] { border-color: var(--bad); }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--bad-soft); }
.field input[disabled], .field select[disabled], .field textarea[disabled] { background: var(--surface-muted); color: var(--muted); cursor: not-allowed; }
.input-affix { position: relative; }
.input-affix .input, .input-affix input { padding-right: 84px; }
.input-affix__btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 34px; padding: 0 12px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--primary); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
}
.input-affix__btn:hover { background: var(--primary-soft); }

.field-error {
  display: flex; align-items: flex-start; gap: 6px; margin: 2px 0 0;
  font-size: var(--fs-sm); color: var(--bad); font-weight: 500;
}
.field-error .glyph { margin-top: 2px; flex: none; }
.has-error > .choice-grid .choice__body { border-color: var(--bad); }

fieldset.field, fieldset.choice-group { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.field > legend, fieldset.choice-group > legend { margin-bottom: 8px; float: left; width: 100%; }
fieldset.field > legend + *, fieldset.choice-group > legend + * { clear: both; }

/* Radio / checkbox cards */
.choice-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.choice-grid--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice__body {
  display: flex; align-items: flex-start; gap: var(--s-3); height: 100%;
  padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-size: var(--fs-sm); line-height: 1.4;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.choice__body::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 1px;
  border: 1.5px solid var(--border-strong); border-radius: 50%; background: var(--surface);
  transition: all var(--dur) var(--ease);
}
.choice__input[type="checkbox"] + .choice__body::before { border-radius: 5px; }
.choice:hover .choice__body { border-color: var(--primary); }
.choice__input:checked + .choice__body { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
.choice__input:checked + .choice__body::before { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px var(--surface); }
.choice__input[type="checkbox"]:checked + .choice__body::before {
  box-shadow: none;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffdf8' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.choice__input:focus-visible + .choice__body { box-shadow: var(--ring); }
.choice__input:disabled + .choice__body { opacity: .5; cursor: not-allowed; }
.choice__text { display: grid; gap: 2px; }
.choice__title { font-weight: 600; font-size: var(--fs-sm); }
.choice__desc { color: var(--muted); font-size: var(--fs-xs); }

/* Inline checkbox */
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }

/* 1–5 segmented scale */
.segmented { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.segmented .choice__body { border: 0; border-radius: 0; justify-content: center; padding: 12px 0; font-weight: 600; font-size: var(--fs-md); }
.segmented .choice__body::before { display: none; }
.segmented .choice + .choice .choice__body { border-left: 1px solid var(--border); }
.segmented .choice__input:checked + .choice__body { background: var(--primary); color: var(--on-brand); box-shadow: none; }
:root[data-theme="dark"] .segmented .choice__input:checked + .choice__body { color: var(--blue-950); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .segmented .choice__input:checked + .choice__body { color: var(--blue-950); } }
.segmented .choice__input:focus-visible + .choice__body { box-shadow: inset 0 0 0 3px var(--blue-400); }
.scale-labels { display: flex; justify-content: space-between; gap: var(--s-4); font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }

/* Live rule checklist (password) */
.rules { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-sm); color: var(--muted); }
.rules li { display: inline-flex; align-items: center; gap: 6px; }
.rules li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--border-strong); transition: all var(--dur) var(--ease); }
.rules li.is-met { color: var(--good); }
.rules li.is-met::before { background: var(--good); border-color: var(--good); }

/* ============================================================ cards, chips, pills */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-5); box-shadow: var(--shadow-sm);
}
.card--pad-lg { padding: clamp(var(--s-5), 4vw, var(--s-7)); }
.card--flat { box-shadow: none; }
.card--muted { background: var(--bg-elevated); }
.card--hover { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card__title { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.card__text { color: var(--ink-soft); font-size: var(--fs-sm); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface);
  color: var(--ink-soft); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--primary); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-brand); }
:root[data-theme="dark"] .chip[aria-pressed="true"] { color: var(--blue-950); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip[aria-pressed="true"] { color: var(--blue-950); } }
.chip:focus-visible { border-radius: var(--r-pill); }
.chip__count { font-size: var(--fs-xs); opacity: .75; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--surface-muted); color: var(--ink-soft); font-size: var(--fs-xs); font-weight: 600;
}
.badge {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--r-pill);
  background: var(--primary-soft); color: var(--primary); font-size: var(--fs-xs); font-weight: 700;
}

.pill {
  --pill-fg: var(--neutral); --pill-bg: var(--neutral-soft);
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: var(--r-pill);
  background: var(--pill-bg); color: var(--pill-fg); font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill--good { --pill-fg: var(--good); --pill-bg: var(--good-soft); }
.pill--warn { --pill-fg: var(--warn); --pill-bg: var(--warn-soft); }
.pill--bad { --pill-fg: var(--bad); --pill-bg: var(--bad-soft); }
.pill--info { --pill-fg: var(--info); --pill-bg: var(--info-soft); }
.pill--neutral { --pill-fg: var(--neutral); --pill-bg: var(--neutral-soft); }

/* Inline notices */
.alert {
  --a-fg: var(--info); --a-bg: var(--info-soft);
  display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-md);
  background: var(--a-bg); color: var(--ink); border: 1px solid color-mix(in srgb, var(--a-fg) 25%, transparent); font-size: var(--fs-sm);
}
.alert > .glyph { color: var(--a-fg); flex: none; margin-top: 1px; }
.alert--good { --a-fg: var(--good); --a-bg: var(--good-soft); }
.alert--warn { --a-fg: var(--warn); --a-bg: var(--warn-soft); }
.alert--bad { --a-fg: var(--bad); --a-bg: var(--bad-soft); }
.alert[hidden] { display: none; }

/* ============================================================ tables */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--bg-elevated); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: var(--bg-elevated); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-clickable { cursor: pointer; }

/* ============================================================ toasts */
.toast-region {
  position: fixed; z-index: 90; right: var(--s-4); bottom: var(--s-4); left: var(--s-4);
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); pointer-events: none;
}
.toast {
  --t-fg: var(--info);
  pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s-3); width: min(420px, 100%);
  padding: 12px 12px 12px 16px; border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-left: 4px solid var(--t-fg); box-shadow: var(--shadow-lg);
  animation: toast-in 220ms var(--ease);
}
.toast.is-leaving { animation: toast-out 200ms var(--ease) forwards; }
.toast--good { --t-fg: var(--good); } .toast--warn { --t-fg: var(--warn); } .toast--bad { --t-fg: var(--bad); }
.toast__icon { color: var(--t-fg); margin-top: 1px; }
.toast__text { flex: 1; margin: 0; font-size: var(--fs-sm); }
.toast__close { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 6px; display: grid; }
.toast__close:hover { color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ============================================================ modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: var(--s-4);
  background: rgba(11, 34, 57, 0.45); backdrop-filter: blur(3px); animation: fade-in 160ms var(--ease);
}
.modal-backdrop.is-leaving { animation: fade-out 160ms var(--ease) forwards; }
.modal {
  width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  animation: modal-in 200ms var(--ease);
}
.modal:focus { outline: none; box-shadow: var(--shadow-lg); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-5) var(--s-5) var(--s-3); }
.modal__title { font-size: var(--fs-xl); margin: 0; }
.modal__close { border: 0; background: transparent; color: var(--muted); width: 36px; height: 36px; border-radius: var(--r-pill); display: grid; place-items: center; cursor: pointer; flex: none; }
.modal__close:hover { background: var(--surface-muted); color: var(--ink); }
.modal__body { padding: var(--s-2) var(--s-5) var(--s-5); overflow-y: auto; color: var(--ink-soft); }
.modal__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--border); background: var(--bg-elevated); border-radius: 0 0 var(--r-xl) var(--r-xl); }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ============================================================ stepper */
.stepper { list-style: none; margin: 0 0 var(--s-6); padding: 0; display: flex; gap: var(--s-2); counter-reset: step; }
.stepper__item { flex: 1; min-width: 0; display: grid; gap: 8px; counter-increment: step; }
.stepper__bar { height: 4px; border-radius: 4px; background: var(--border); transition: background var(--dur) var(--ease); }
.stepper__label { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.stepper__label::before {
  content: counter(step); display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); font-size: var(--fs-xs); font-weight: 700; background: var(--surface);
}
.stepper__item.is-done .stepper__bar, .stepper__item.is-current .stepper__bar { background: var(--primary); }
.stepper__item.is-done .stepper__label::before { content: "✓"; background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.stepper__item.is-current .stepper__label { color: var(--ink); font-weight: 600; }
.stepper__item.is-current .stepper__label::before { background: var(--primary); border-color: var(--primary); color: var(--on-brand); }
.stepper-caption { display: none; margin: calc(var(--s-6) * -1 + var(--s-3)) 0 var(--s-5); font-size: var(--fs-sm); color: var(--muted); }
.stepper-caption strong { color: var(--ink); }
@media (max-width: 720px) {
  .stepper__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stepper-caption { display: block; }
}

/* ============================================================ empty / loading */
.empty-state {
  display: grid; justify-items: center; text-align: center; gap: var(--s-2);
  padding: var(--s-7) var(--s-5); border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--bg-elevated);
}
.empty-state__mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: var(--s-2); }
.empty-state__mark img { opacity: .9; }
.empty-state__title { font-weight: 700; font-size: var(--fs-lg); color: var(--ink); margin: 0; }
.empty-state__text { color: var(--muted); max-width: 46ch; margin: 0; }
.empty-state__action { margin-top: var(--s-3); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-muted); border-radius: var(--r-sm); }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ============================================================ header */
.announcement { background: var(--primary-soft); color: var(--ink); font-size: var(--fs-sm); border-bottom: 1px solid var(--border); }
.announcement__inner { display: flex; align-items: center; justify-content: center; gap: var(--s-2); padding-block: 10px; text-align: center; }
.announcement .glyph { color: var(--primary); flex: none; }
.announcement p { margin: 0; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__bar { display: flex; align-items: center; gap: var(--s-4); min-height: 72px; }
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; border-radius: var(--r-sm); }
.brand__logo { display: block; height: 44px; width: auto; }
.brand__logo--night { display: none; }
:root[data-theme="dark"] .site-header .brand__logo--day { display: none; }
:root[data-theme="dark"] .site-header .brand__logo--night { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header .brand__logo--day { display: none; }
  :root:not([data-theme="light"]) .site-header .brand__logo--night { display: block; }
}
.site-header__tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav { display: flex; align-items: center; gap: var(--s-5); flex: 1; }
.site-nav__links { list-style: none; display: flex; gap: 4px; margin: 0 auto; padding: 0; }
.site-nav__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--ink-soft); font-weight: 500; text-decoration: none; transition: all var(--dur) var(--ease);
}
.site-nav__link:hover { color: var(--ink); background: var(--surface-muted); }
.site-nav__link[aria-current="page"] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.site-nav__auth { display: flex; align-items: center; gap: var(--s-2); }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .site-header__bar { min-height: 64px; }
  .brand__logo { height: 38px; }
  .nav-toggle { display: inline-grid; }
  .site-header__tools { order: 2; }
  .site-nav {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: var(--s-5);
    padding: var(--s-5) var(--s-4) var(--s-7); background: var(--bg); border-top: 1px solid var(--border);
    overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility 0s linear var(--dur);
  }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .announcement ~ .site-header .site-nav { top: 64px; }
  .site-nav__links { flex-direction: column; margin: 0; gap: 2px; }
  .site-nav__link { min-height: 52px; font-size: var(--fs-lg); border-radius: var(--r-md); width: 100%; padding: 0 var(--s-4); }
  .site-nav__auth { flex-direction: column; align-items: stretch; padding-top: var(--s-5); border-top: 1px solid var(--border); }
  .site-nav__auth .btn { min-height: 48px; font-size: var(--fs-md); }
}

/* ============================================================ footer */
.site-footer {
  background: var(--blue-900); color: var(--cream-200); margin-top: auto; font-size: var(--fs-sm);
}
:root[data-theme="dark"] .site-footer { background: var(--surface-brand); border-top: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-footer { background: var(--surface-brand); border-top: 1px solid var(--border); } }
.site-footer a { color: var(--cream-50); text-decoration: none; }
.site-footer a:hover { color: var(--blue-200); text-decoration: underline; }
.site-footer__inner { padding-block: var(--s-8) var(--s-5); }
.site-footer__top { display: grid; gap: var(--s-7); grid-template-columns: 1fr; }
@media (min-width: 720px) { .site-footer__top { grid-template-columns: 1.2fr .8fr; } .site-footer__col--wide { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .site-footer__top { grid-template-columns: 1.3fr .7fr 1.6fr; } .site-footer__col--wide { grid-column: auto; } }
.site-footer__brand .brand__logo { height: 48px; }
.site-footer__tagline { margin-top: var(--s-4); max-width: 34ch; color: var(--blue-200); line-height: 1.6; font-size: var(--fs-md); }
.site-footer__title { font-size: var(--fs-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-400); margin-bottom: var(--s-4); font-weight: 700; }
.site-footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer__contacts { display: grid; gap: var(--s-4) var(--s-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.site-footer__contact { display: grid; gap: 2px; min-width: 0; }
.site-footer__contact a, .site-footer__contact span:not(.site-footer__label) { overflow-wrap: anywhere; }
.site-footer__label { font-size: var(--fs-xs); color: var(--blue-200); opacity: .85; }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid rgba(252, 248, 238, 0.14); color: var(--blue-200);
}
.site-footer__bottom p { margin: 0; }
.site-footer__legal { list-style: none; display: flex; gap: var(--s-5); margin: 0; padding: 0; }
.site-footer :focus-visible { box-shadow: 0 0 0 3px rgba(196, 218, 238, 0.6); }

/* ============================================================ hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 45% 65% at 82% 40%, color-mix(in srgb, var(--blue-200) 42%, transparent), transparent 72%);
}
:root[data-theme="dark"] .hero::before { background: radial-gradient(ellipse 45% 65% at 82% 40%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 72%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero::before { background: radial-gradient(ellipse 45% 65% at 82% 40%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 72%); } }
.hero > .container { position: relative; }
.hero__grid { position: relative; display: grid; gap: var(--s-7); align-items: center; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr .95fr; gap: var(--s-8); } }
.hero__title { margin-bottom: var(--s-5); max-width: 15ch; }
.hero__title em { font-style: normal; color: var(--primary); }
.hero__lead { max-width: 54ch; margin-bottom: var(--s-6); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-6); color: var(--muted); font-size: var(--fs-sm); list-style: none; padding: 0; }
.hero__meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.hero--page { padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 56px); }
.hero--page .hero__title { max-width: 20ch; }

/* Connected-departments illustration */
.ecosystem { position: relative; width: 100%; max-width: 560px; margin-inline: auto; }
.ecosystem svg { display: block; width: 100%; height: auto; overflow: visible; }
.eco-ring { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 2 6; }
.eco-ring--soft { stroke: var(--border); stroke-dasharray: none; }
.eco-link { fill: none; stroke: var(--blue-200); stroke-width: 2; }
.eco-flow { fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 14; animation: eco-flow 2.6s linear infinite; }
.eco-flow--slow { animation-duration: 3.6s; }
.eco-flow--rev { animation-direction: reverse; }
@keyframes eco-flow { to { stroke-dashoffset: -40; } }
.eco-hub-glow { fill: var(--blue-200); opacity: .45; animation: eco-pulse 3.2s var(--ease) infinite; transform-origin: 280px 230px; transform-box: view-box; }
@keyframes eco-pulse { 50% { opacity: .15; transform: scale(1.18); } }
.eco-hub { fill: var(--blue-900); }
.eco-hub-line { fill: none; stroke: var(--cream-200); stroke-width: 4.5; stroke-linecap: round; }
.eco-hub-dot { fill: var(--cream-50); }
.eco-hub-gold { fill: var(--cream-400); }
.eco-node { fill: var(--surface); stroke: var(--border-strong); stroke-width: 1; filter: drop-shadow(0 6px 12px rgba(16, 48, 79, 0.10)); }
.eco-node-dot { fill: var(--primary); }
.eco-node-dot--gold { fill: var(--series-2); }
.eco-node-dot--teal { fill: var(--series-3); }
.eco-label { fill: var(--ink); font-family: var(--font-sans); font-size: 14px; font-weight: 600; }
.eco-sub { fill: var(--muted); font-family: var(--font-sans); font-size: 11px; font-weight: 500; }
.eco-agent { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1; }
.eco-agent-text { fill: var(--primary); font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.eco-check { fill: var(--good-soft); stroke: var(--good); stroke-width: 1; }
.eco-check-text { fill: var(--good); font-family: var(--font-sans); font-size: 11px; font-weight: 700; }
:root[data-theme="dark"] .eco-hub { fill: var(--blue-700); }
:root[data-theme="dark"] .eco-link { stroke: var(--border-strong); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eco-hub { fill: var(--blue-700); }
  :root:not([data-theme="light"]) .eco-link { stroke: var(--border-strong); }
}

/* ============================================================ principle band */
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); counter-reset: pr; }
.principle {
  position: relative; counter-increment: pr; padding: var(--s-5); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
}
.principle::before {
  content: "0" counter(pr); display: block; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em;
  color: var(--primary); margin-bottom: var(--s-4);
}
.principle__title { font-size: var(--fs-xl); margin-bottom: var(--s-2); }
.principle__text { color: var(--ink-soft); font-size: var(--fs-sm); margin: 0; }
.principle-band { padding-block: var(--s-7); }
@media (min-width: 1000px) {
  .principles--band { gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); overflow: hidden; }
  .principles--band .principle { border: 0; border-radius: 0; background: transparent; padding: var(--s-6); }
  .principles--band .principle + .principle { border-left: 1px solid var(--border); }
  .principles--band .principle:not(:last-child)::after {
    content: ""; position: absolute; right: -7px; top: 50%; width: 12px; height: 12px; z-index: 1;
    border-top: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--surface); transform: translateY(-50%) rotate(45deg);
  }
}

/* ============================================================ demo gallery */
.hub-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.hub-card {
  position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.hub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.hub-card:focus-within { border-color: var(--primary); }
.hub-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.hub-card__icon { width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.hub-card__num { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.hub-card__title { font-size: var(--fs-lg); margin: var(--s-2) 0 0; }
.hub-card__tagline { color: var(--ink-soft); font-size: var(--fs-sm); margin: 0; flex: 1; }
.hub-card__org { font-size: var(--fs-xs); color: var(--muted); margin: 0; }
.hub-card__org strong { color: var(--ink-soft); font-weight: 600; }
.hub-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--border); flex-wrap: wrap; }
.hub-card__stats { display: flex; gap: var(--s-3); font-size: var(--fs-xs); color: var(--muted); }
.hub-card__stats b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.hub-card__link { font-weight: 600; text-decoration: none; color: var(--primary); display: inline-flex; gap: 6px; align-items: center; }
.hub-card__link::after { content: "→"; transition: transform var(--dur) var(--ease); }
.hub-card__link::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.hub-card__link:focus-visible { box-shadow: none; }
.hub-card__link:focus-visible::before { box-shadow: var(--ring); }
.hub-card:hover .hub-card__link::after { transform: translateX(3px); }
.hub-card--skeleton { min-height: 250px; }
.hub-card--skeleton .skeleton { height: 14px; }

.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; justify-content: space-between; margin-bottom: var(--s-5); }
.toolbar--stacked { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.toolbar--stacked .chips { min-width: 0; max-width: calc(100% + 2 * var(--s-4)); }
.toolbar--stacked .search { max-width: 420px; flex: none; width: 100%; }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search .glyph { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.field.search input[type="search"] { padding-left: 42px; }
.result-count { font-size: var(--fs-sm); color: var(--muted); margin: 0 0 var(--s-4); }

/* ============================================================ feature blocks */
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.feature-list li { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.feature-list__icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.feature-list strong { display: block; color: var(--ink); font-size: var(--fs-md); }
.feature-list span { color: var(--ink-soft); font-size: var(--fs-sm); }
.callout {
  display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-5); border-radius: var(--r-lg);
  background: var(--good-soft); border: 1px solid color-mix(in srgb, var(--good) 22%, transparent); margin-top: var(--s-5);
}
.callout__icon { flex: none; color: var(--good); }
.callout p { margin: 0; color: var(--ink); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); counter-reset: st; }
.step-card { counter-increment: st; position: relative; padding: var(--s-6) var(--s-5) var(--s-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.step-card__num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--on-brand); font-weight: 700; margin-bottom: var(--s-4); }
:root[data-theme="dark"] .step-card__num { color: var(--blue-950); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step-card__num { color: var(--blue-950); } }
.step-card h3 { font-size: var(--fs-xl); }
.step-card p { color: var(--ink-soft); margin: 0; }

.trust { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.trust__item { display: flex; gap: var(--s-3); align-items: flex-start; }
.trust__icon { flex: none; width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface); color: var(--primary); border: 1px solid var(--border); }
.trust__item strong { display: block; color: var(--ink); margin-bottom: 2px; }
.trust__item p { color: var(--ink-soft); font-size: var(--fs-sm); margin: 0; }

.quote {
  margin: 0; padding: var(--s-6) var(--s-6) var(--s-6) calc(var(--s-6) + 6px); position: relative;
  font-size: clamp(1.25rem, 2.4vw, var(--fs-2xl)); line-height: 1.45; font-weight: 500; color: var(--ink); letter-spacing: -0.01em;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
}
.quote::before { content: ""; position: absolute; left: 0; top: var(--s-6); bottom: var(--s-6); width: 4px; border-radius: 0 4px 4px 0; background: var(--primary); }
.quote p { margin: 0; }
.quote footer { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--muted); font-weight: 500; letter-spacing: 0; }

/* Contact */
.contact-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); }
.contact-list li { display: grid; grid-template-columns: 40px 1fr; gap: var(--s-3); align-items: center; padding: var(--s-3); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.contact-list__icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.contact-list__label { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.contact-list a, .contact-list span { overflow-wrap: anywhere; }
.contact-list a { font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(var(--s-6), 6vw, var(--s-8)); background: var(--blue-900); color: var(--cream-100); }
:root[data-theme="dark"] .cta-band { background: var(--surface-brand); border: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-band { background: var(--surface-brand); border: 1px solid var(--border); } }
.cta-band::after {
  content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(252, 248, 238, 0.12); box-shadow: 0 0 0 60px rgba(252, 248, 238, 0.03), 0 0 0 120px rgba(252, 248, 238, 0.02);
  pointer-events: none;
}
.cta-band h2 { color: var(--cream-50); max-width: 22ch; }
.cta-band p { color: var(--blue-200); max-width: 56ch; }
.cta-band .hero__actions { margin-top: var(--s-5); position: relative; z-index: 1; }
.cta-band :focus-visible { box-shadow: 0 0 0 3px rgba(196, 218, 238, 0.6); }

/* About */
.value-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.value { padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.value h3 { margin-bottom: var(--s-2); }
.value p { margin: 0; color: var(--ink-soft); font-size: var(--fs-sm); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: var(--s-5); }
.timeline::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.timeline li { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: var(--s-4); }
.timeline__dot { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 2px solid var(--primary); color: var(--primary); display: grid; place-items: center; font-weight: 700; position: relative; }
.timeline h3 { margin: 8px 0 var(--s-2); font-size: var(--fs-xl); }
.timeline p { margin: 0; color: var(--ink-soft); }

/* Prose (privacy) */
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--fs-xl); margin-top: var(--s-7); }
.prose p, .prose li { color: var(--ink-soft); }
.prose li + li { margin-top: var(--s-2); }

/* ============================================================ auth pages */
.auth-page { padding-block: clamp(32px, 6vw, 72px) var(--s-8); }
.auth-card { width: min(460px, 100%); margin-inline: auto; padding: clamp(var(--s-5), 5vw, var(--s-7)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.auth-card__mark { display: block; width: 52px; height: 52px; margin-bottom: var(--s-5); }
.auth-card h1 { font-size: var(--fs-2xl); margin-bottom: var(--s-2); }
.auth-card__foot { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); text-align: center; }

.wizard { padding: clamp(var(--s-5), 4vw, var(--s-7)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); }
.wizard__panel { display: grid; gap: var(--s-5); }
.wizard__panel[hidden] { display: none; }
.wizard__head h2 { font-size: var(--fs-2xl); margin-bottom: var(--s-2); }
.wizard__head h2:focus { outline: none; box-shadow: none; }
.wizard__head p { color: var(--ink-soft); margin: 0; }
.wizard__nav { display: flex; justify-content: space-between; gap: var(--s-3); padding-top: var(--s-5); margin-top: var(--s-2); border-top: 1px solid var(--border); flex-wrap: wrap; }
.wizard__nav .btn--primary { margin-left: auto; }
.q-section { display: grid; gap: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--border); }
.q-section:first-of-type { border-top: 0; padding-top: 0; }
.q-section__head h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.q-section__head p { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.code-status { display: flex; align-items: center; gap: var(--s-2); min-height: 24px; font-size: var(--fs-sm); margin: 0; }
.code-status--good { color: var(--good); font-weight: 600; }
.code-status--bad { color: var(--bad); }
.code-status--info { color: var(--muted); }
.code-input { font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; max-width: 260px; }

.review { display: grid; gap: var(--s-4); }
.review__block { border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-4) var(--s-5); background: var(--bg-elevated); }
.review__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); }
.review__head h3 { margin: 0; font-size: var(--fs-md); }
.review dl { margin: 0; display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px var(--s-4); font-size: var(--fs-sm); }
.review dt { color: var(--muted); }
.review dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 520px) { .review dl { grid-template-columns: 1fr; gap: 2px; } .review dd { margin-bottom: 8px; } }

/* ============================================================ utilities */
.mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--s-4); } .mt-5 { margin-top: var(--s-5); } .mt-6 { margin-top: var(--s-6); }
.mb-0 { margin-bottom: 0; } .mb-5 { margin-bottom: var(--s-5); }
[hidden] { display: none !important; }
.sk-w-40 { width: 40%; } .sk-w-60 { width: 60%; } .sk-w-70 { width: 70%; } .sk-w-90 { width: 90%; }
.hub-card--skeleton .hub-card__icon { background: var(--surface-muted); height: 48px; }
.alert > [data-icon] { color: var(--a-fg); flex: none; display: inline-grid; margin-top: 1px; }
.field > label.check { font-weight: 400; color: var(--ink-soft); }

/* Closing card that completes the hub grid */
.hub-card--cta { justify-content: center; background: var(--bg-elevated); border-style: dashed; box-shadow: none; }
.hub-card--cta:hover { transform: none; box-shadow: none; }
.hub-card--cta .hub-card__title { margin-top: 0; }
@media (min-width: 700px) { .hub-card--cta { grid-column: span 2; } }
@media (max-width: 480px) { .hero__actions .btn { width: 100%; } }
@media (max-width: 520px) { .choice-grid { grid-template-columns: 1fr 1fr; gap: var(--s-2); } .choice__body { padding: 10px 12px; } }
@media (max-width: 640px) {
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--s-4) * -1); padding: 2px var(--s-4) 6px; scrollbar-width: none; }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .toolbar .chip { flex: none; white-space: nowrap; }
}
@media (max-width: 640px) {
  .principle { padding: var(--s-4) var(--s-5); display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-4); }
  .principle::before { margin: 4px 0 0; grid-row: span 2; }
  .principle__title { font-size: var(--fs-lg); margin-bottom: 4px; }
  .principle-band { padding-block: var(--s-6); }
}

/* ---------- footer additions (also seen in portals) ---------- */
.site-footer__principle { margin-top: var(--s-3); max-width: 38ch; color: var(--cream-300); font-size: var(--fs-sm); line-height: 1.6; }
.site-footer__cta { margin-top: var(--s-5); }
.site-footer__works { list-style: none; margin: var(--s-7) 0 0; padding: var(--s-5) 0 0; border-top: 1px solid rgba(255, 253, 248, 0.12); display: flex; flex-wrap: wrap; gap: var(--s-3); }
.site-footer__works li { padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid rgba(255, 253, 248, 0.2); color: var(--blue-200); font-size: var(--fs-sm); font-weight: 600; }
@media (min-width: 1040px) { .site-footer__top { grid-template-columns: 1.4fr .6fr .6fr .6fr; } .site-footer__col--wide { grid-column: 1 / -1; } .site-footer__col--wide .site-footer__contacts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.site-footer a.site-footer__cta, .site-footer a.site-footer__cta:hover { color: var(--blue-900); text-decoration: none; }
