/* ============================================================
 * Satya v26 — Centralized Base Stylesheet
 * ============================================================
 * The single sheet every v26 view inherits from. Load order:
 *   core/reset.css → core/theme-system.css → themes/{theme}.css
 *   → components/button.css → v26/base.css → (per-view css, if justified)
 *
 * Rules of the system:
 *  - NO Tailwind, no utility soup. Semantic component classes, prefix .s-.
 *  - Color comes ONLY from theme tokens (--bg-*, --text-*, --border-*,
 *    --brand-*, state colors). Never a raw hex in a rule — themes and
 *    dark mode must keep working by swapping :root values alone.
 *  - Structure comes from the :root vars below — tweak them to retune
 *    the whole site.
 *  - A view may add a small css file for classes truly specific to it;
 *    the exception must be justified in that file's header comment.
 *  - Buttons are components/button.css (.sat-btn + variants) — do not
 *    redefine buttons here.
 * ============================================================ */

/* ── Structural parameters (site-wide tuning knobs) ────────── */
:root {
  /* Spacing scale */
  --s-space-1: 0.25rem;   /* 4px  */
  --s-space-2: 0.5rem;    /* 8px  */
  --s-space-3: 0.75rem;   /* 12px */
  --s-space-4: 1rem;      /* 16px */
  --s-space-5: 1.5rem;    /* 24px */
  --s-space-6: 2rem;      /* 32px */
  --s-space-7: 3rem;      /* 48px */
  --s-space-8: 4rem;      /* 64px */

  /* Chrome + layout */
  --s-nav-height: 4rem;
  --s-content-max: 72rem;      /* main content column */
  --s-content-narrow: 46rem;   /* reading/forms column */
  --s-rail-width: 15rem;       /* studio/admin left rail */
  --s-gutter: clamp(1rem, 3vw, 2rem);

  /* Type scale (page-level; hero scales stay in theme-system.css) */
  --s-text-xs: 0.75rem;
  --s-text-sm: 0.875rem;
  --s-text-base: 1rem;
  --s-text-lg: 1.125rem;
  --s-h1: 2.125rem;
  --s-h2: 1.5rem;
  --s-h3: 1.1875rem;

  /* Motion — one calm speed everywhere */
  --s-transition: 180ms ease;

  /* Component metrics */
  --s-card-pad: var(--s-space-5);
  --s-control-h: 2.75rem;      /* inputs + touch targets ≥44px */
  --s-icon-btn: 2.5rem;
}

@media (prefers-reduced-motion: reduce) {
  :root { --s-transition: 0ms; }
}

/* ── Page scaffold ─────────────────────────────────────────── */
.s-main {
  max-width: var(--s-content-max);
  margin-inline: auto;
  padding: var(--s-space-5) var(--s-gutter) var(--s-space-8);
}
.s-main--narrow { max-width: var(--s-content-narrow); }

/* Calm page headings: Satoshi comes from theme-system.css; v26 pages
 * use a moderate scale (the 68px global h1 is homepage-hero sizing). */
.s-main h1 { font-size: var(--s-h1); font-weight: 700; }
.s-main h2 { font-size: var(--s-h2); font-weight: 700; }
.s-main h3 { font-size: var(--s-h3); font-weight: 500; }

.s-page-head { margin-bottom: var(--s-space-6); }
.s-page-head h1 { margin-bottom: var(--s-space-2); }
.s-page-head__sub {
  color: var(--text-tertiary);
  font-size: var(--s-text-base);
  max-width: 60ch;
}

.s-section { margin-bottom: var(--s-space-6); }
.s-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-space-3);
  margin-bottom: var(--s-space-4);
}
.s-section__head h2 { font-size: var(--s-h2); }
.s-section__more {
  font-size: var(--s-text-sm);
  font-weight: 500;
  color: var(--brand-primary);
  text-decoration: none;
  white-space: nowrap;
}
.s-section__more:hover { text-decoration: underline; }

/* ── Layout primitives ─────────────────────────────────────── */
.s-grid {
  display: grid;
  gap: var(--s-space-4);
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.s-grid--2 { grid-template-columns: repeat(2, 1fr); }
.s-grid--3 { grid-template-columns: repeat(3, 1fr); }
.s-grid--4 { grid-template-columns: repeat(4, 1fr); }
.s-cols {
  display: grid;
  gap: var(--s-space-5);
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}
.s-stack { display: flex; flex-direction: column; gap: var(--s-space-4); }
.s-stack--tight { gap: var(--s-space-2); }
.s-row {
  display: flex;
  align-items: center;
  gap: var(--s-space-3);
  flex-wrap: wrap;
}
.s-row--between { justify-content: space-between; }

@media (max-width: 900px) {
  .s-cols,
  .s-grid--3,
  .s-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .s-cols,
  .s-grid--2,
  .s-grid--3,
  .s-grid--4 { grid-template-columns: 1fr; }
}

/* ── Surfaces ──────────────────────────────────────────────── */
.s-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--s-card-pad);
}
.s-card--flat { background: var(--bg-secondary); border-color: transparent; }
.s-card--pad-sm { padding: var(--s-space-4); }
.s-card__title {
  font-size: var(--s-text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--s-space-3);
}
a.s-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--s-transition), box-shadow var(--s-transition),
              transform var(--s-transition);
}
a.s-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Stat tile (dashboard / studio cockpit) */
.s-stat {
  display: flex;
  align-items: center;
  gap: var(--s-space-3);
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: var(--s-space-4);
}
.s-stat__icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  color: var(--brand-primary);
  font-size: 1.375rem;
}
.s-stat__label {
  font-size: var(--s-text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.s-stat__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}
.s-stat__hint { font-size: var(--s-text-xs); color: var(--text-quaternary); }

/* List rows (activity, requests, shortcuts) */
.s-list { list-style: none; margin: 0; padding: 0; }
.s-list__item {
  display: flex;
  align-items: center;
  gap: var(--s-space-3);
  padding: var(--s-space-3) var(--s-space-2);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--s-transition);
}
.s-list__item + .s-list__item { border-top: 1px solid var(--border-secondary); }
a.s-list__item:hover { background: var(--bg-secondary); }
.s-list__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--brand-primary);
  font-size: 1.125rem;
}
.s-list__body { flex: 1; min-width: 0; }
.s-list__title { font-weight: 500; font-size: var(--s-text-sm); }
.s-list__meta { font-size: var(--s-text-xs); color: var(--text-tertiary); }
.s-list__end { flex-shrink: 0; display: flex; align-items: center; gap: var(--s-space-2); }

/* Empty state — calm, inviting, never scolding */
.s-empty {
  text-align: center;
  padding: var(--s-space-7) var(--s-space-5);
  color: var(--text-tertiary);
}
.s-empty__icon {
  font-size: 2.25rem;
  color: var(--text-quaternary);
  margin-bottom: var(--s-space-3);
}
.s-empty__title {
  font-size: var(--s-text-lg);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--s-space-2);
}
.s-empty__text { font-size: var(--s-text-sm); max-width: 38ch; margin-inline: auto; }
.s-empty__code { font-size: var(--s-text-sm); font-weight: 600; letter-spacing: .08em; color: var(--text-quaternary); margin-bottom: var(--s-space-2); }
.s-empty .sat-btn { margin-top: var(--s-space-4); }

/* ── Small pieces ──────────────────────────────────────────── */
.s-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-space-1);
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius-pill);
  font-size: var(--s-text-xs);
  font-weight: 500;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
}
.s-chip--brand   { background: var(--primary-50); color: var(--brand-primary); border-color: transparent; }
.s-chip--success { background: var(--success-subtle); color: var(--success); border-color: transparent; }
.s-chip--warning { background: var(--warning-subtle); color: var(--warning); border-color: transparent; }
.s-chip--error   { background: var(--error-subtle); color: var(--error); border-color: transparent; }

.s-badge {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  border-radius: var(--radius-pill);
  background: var(--error);
  color: var(--text-inverse, #fff);
  font-size: 0.6875rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.s-alert {
  display: flex;
  gap: var(--s-space-3);
  align-items: flex-start;
  padding: var(--s-space-4);
  border-radius: var(--radius-md);
  font-size: var(--s-text-sm);
  background: var(--info-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
}
.s-alert--success { background: var(--success-subtle); }
.s-alert--warning { background: var(--warning-subtle); }
.s-alert--error   { background: var(--error-subtle); }

.s-divider { border: 0; border-top: 1px solid var(--border-secondary); margin: var(--s-space-4) 0; }

/* Progress (activation checklist, course progress) */
.s-progress {
  height: 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--bg-tertiary);
  overflow: hidden;
}
.s-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--brand-primary);
  transition: width var(--s-transition);
}

/* ── Forms (calm, roomy, token-driven) ─────────────────────── */
.s-field { display: flex; flex-direction: column; gap: var(--s-space-2); }
.s-label {
  font-size: var(--s-text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}
.s-input,
.s-select,
.s-textarea {
  width: 100%;
  min-height: var(--s-control-h);
  padding: 0 var(--s-space-3);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: var(--s-text-sm);
  transition: border-color var(--s-transition), box-shadow var(--s-transition);
}
.s-textarea { padding: var(--s-space-3); min-height: 6rem; resize: vertical; }
.s-input:focus,
.s-select:focus,
.s-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--primary-100);
}
.s-input::placeholder,
.s-textarea::placeholder { color: var(--text-quaternary); }
.s-hint { font-size: var(--s-text-xs); color: var(--text-tertiary); }
.s-error-text { font-size: var(--s-text-xs); color: var(--error); }

/* ── Tables ────────────────────────────────────────────────── */
.s-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
}
.s-table { width: 100%; border-collapse: collapse; font-size: var(--s-text-sm); }
.s-table th {
  text-align: left;
  font-weight: 500;
  font-size: var(--s-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  padding: var(--s-space-3) var(--s-space-4);
}
.s-table td {
  padding: var(--s-space-3) var(--s-space-4);
  border-top: 1px solid var(--border-secondary);
  color: var(--text-primary);
  vertical-align: middle;
}

/* ── Global chrome: top nav ────────────────────────────────── */
.s-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--s-nav-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-secondary);
}
.s-nav__inner {
  max-width: var(--s-content-max);
  margin-inline: auto;
  height: 100%;
  padding-inline: var(--s-gutter);
  display: flex;
  align-items: center;
  gap: var(--s-space-4);
}
.s-nav__logo {
  display: flex;
  align-items: center;
  gap: var(--s-space-2);
  text-decoration: none;
  flex-shrink: 0;
}
.s-nav__logo img { width: 2rem; height: 2rem; }
.s-nav__logo-text {
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.s-nav__search { flex: 1; max-width: 26rem; position: relative; }
.s-nav__search .s-input { min-height: 2.5rem; border-radius: var(--radius-pill); padding-left: 2.5rem; }
.s-nav__search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-quaternary);
  pointer-events: none;
}
.s-nav__spacer { flex: 1; }
.s-nav__actions { display: flex; align-items: center; gap: var(--s-space-2); }

.s-icon-btn {
  position: relative;
  width: var(--s-icon-btn);
  height: var(--s-icon-btn);
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.375rem;
  cursor: pointer;
  transition: background var(--s-transition), color var(--s-transition);
}
.s-icon-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* Studio entry: quiet text link in the chrome; invitation styling when the
 * account has no seller signal yet (the door is always visible). */
.s-nav__studio {
  display: inline-flex;
  align-items: center;
  gap: var(--s-space-2);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: var(--s-text-sm);
  font-weight: 500;
  color: var(--brand-primary);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--s-transition), border-color var(--s-transition);
}
.s-nav__studio:hover { background: var(--primary-50); }
.s-nav__studio--invite { border-color: var(--border-primary); color: var(--text-secondary); }
.s-nav__studio--invite:hover { border-color: var(--brand-primary); color: var(--brand-primary); background: transparent; }

/* ── Dropdown (avatar menu + Explore) — labeled groups ─────── */
.s-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 15rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--s-space-2);
  z-index: 110;
}
.s-dropdown__group + .s-dropdown__group {
  border-top: 1px solid var(--border-secondary);
  margin-top: var(--s-space-2);
  padding-top: var(--s-space-2);
}
.s-dropdown__label {
  display: block;
  padding: var(--s-space-1) var(--s-space-3);
  font-size: var(--s-text-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-quaternary);
}
.s-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--s-space-3);
  width: 100%;
  padding: var(--s-space-2) var(--s-space-3);
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  font-size: var(--s-text-sm);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--s-transition);
}
.s-dropdown__item:hover { background: var(--bg-secondary); }
.s-dropdown__item.is-active { color: var(--brand-primary); font-weight: 500; }
.s-dropdown__item i { font-size: 1.125rem; color: var(--text-tertiary); }
.s-dropdown__item.is-active i { color: var(--brand-primary); }

/* ── Studio shell: left rail + content ─────────────────────── */
.s-shell {
  display: grid;
  grid-template-columns: var(--s-rail-width) minmax(0, 1fr);
  max-width: var(--s-content-max);
  margin-inline: auto;
  gap: var(--s-space-6);
  padding: var(--s-space-5) var(--s-gutter) var(--s-space-8);
}
.s-rail { position: sticky; top: calc(var(--s-nav-height) + var(--s-space-4)); align-self: start; }
.s-rail__title {
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: var(--s-text-lg);
  font-weight: 700;
  padding: var(--s-space-2) var(--s-space-3);
  margin-bottom: var(--s-space-2);
}
.s-rail__item {
  display: flex;
  align-items: center;
  gap: var(--s-space-3);
  padding: var(--s-space-2) var(--s-space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--s-text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: background var(--s-transition), color var(--s-transition);
}
.s-rail__item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.s-rail__item.is-active { background: var(--primary-50); color: var(--brand-primary); }
.s-rail__item i { font-size: 1.125rem; }

@media (max-width: 900px) {
  .s-shell { grid-template-columns: 1fr; }
  .s-rail {
    position: static;
    display: flex;
    gap: var(--s-space-1);
    overflow-x: auto;
    padding-bottom: var(--s-space-2);
    border-bottom: 1px solid var(--border-secondary);
  }
  .s-rail__title { display: none; }
  .s-rail__item { white-space: nowrap; }
}

/* ── Footer ────────────────────────────────────────────────── */
.s-footer {
  border-top: 1px solid var(--border-secondary);
  background: var(--bg-secondary);
  margin-top: var(--s-space-8);
  padding: var(--s-space-6) 0;
  font-size: var(--s-text-sm);
  color: var(--text-tertiary);
}
.s-footer__inner {
  max-width: var(--s-content-max);
  margin-inline: auto;
  padding-inline: var(--s-gutter);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-space-4) var(--s-space-6);
  align-items: center;
  justify-content: space-between;
}
.s-footer a { color: var(--text-secondary); text-decoration: none; }
.s-footer a:hover { color: var(--brand-primary); }

/* Avatar sizing wrapper — renderAvatar() emits Tailwind size classes that
 * don't resolve in v26; wrap its output in .s-avatar to size it. Promoted
 * from three per-view copies (.ps-avatar/.bk-avatar/.srch-avatar — those
 * remain locally until their views are next touched; new views use THIS). */
.s-avatar { display: inline-block; flex-shrink: 0; line-height: 0; }
.s-avatar img,
.s-avatar > div {
  display: block;
  width: var(--s-avatar-size, 2.5rem);
  height: var(--s-avatar-size, 2.5rem);
  border-radius: var(--radius-pill);
  object-fit: cover;
}
.s-avatar--sm { --s-avatar-size: 2rem; }
.s-avatar--md { --s-avatar-size: 3rem; }
.s-avatar--lg { --s-avatar-size: 4rem; }
.s-avatar--xl { --s-avatar-size: 5rem; }

/* Line clamps (promoted — dashboard/search local copies retire on next touch) */
.s-clamp-2,
.s-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.s-clamp-2 { -webkit-line-clamp: 2; }
.s-clamp-3 { -webkit-line-clamp: 3; }

/* ── Minimal utilities (kept deliberately tiny) ────────────── */
.s-muted { color: var(--text-tertiary); }
.s-small { font-size: var(--s-text-sm); }
.s-center { text-align: center; }
.s-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 640px) { .s-hide-mobile { display: none !important; } }
@media (min-width: 641px) { .s-hide-desktop { display: none !important; } }

/* Skip link (a11y) — first element inside <body> */
.s-skip-link {
  position: absolute;
  left: var(--s-space-3);
  top: -3rem;
  z-index: 200;
  padding: var(--s-space-2) var(--s-space-4);
  border-radius: var(--radius-md);
  background: var(--brand-primary);
  color: var(--text-inverse, #fff);
  text-decoration: none;
  transition: top var(--s-transition);
}
.s-skip-link:focus { top: var(--s-space-3); }

/* ============================================================
 * CHROME SECTION — owned by app/Views/v26/partials/{header,footer}.php
 * ------------------------------------------------------------
 * Small, tokens-only additions the global chrome needs on top of the
 * component classes above: JS-compat utilities (.hidden / [x-cloak]),
 * dropdown/menu positioning, avatar sizing (renderAvatar() emits legacy
 * utility classes that carry no size without Tailwind), the identity block,
 * the flash wrapper, the footer layout, and the mobile slide-in panel.
 * Keep this section minimal and theme-token-driven.
 * ============================================================ */

/* Chrome-local token. No theme ships a scrim/backdrop color, and a modal
 * backdrop is conventionally dark in BOTH light and dark themes, so the value
 * lives here (one tunable place) and the rule references it via var() — the
 * same literal-in-:root / var()-in-rule convention theme-system.css uses. */
:root { --s-overlay: rgba(17, 24, 39, 0.5); }

/* JS-compat: shared managers (NotificationManager, MessagingManager, cookie
 * consent, …) toggle a `.hidden` class that Tailwind used to supply. v26 has
 * no Tailwind, so define it here. [x-cloak] hides Alpine nodes pre-init. */
.hidden { display: none !important; }
[x-cloak] { display: none !important; }

/* Body scaffold */
.s-body {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-primary);
}

/* Menu wrapper (positioning context for an .s-dropdown trigger) */
.s-nav__menu { position: relative; display: inline-flex; }
.s-dropdown--left { left: 0; right: auto; }
.s-dropdown--up { top: auto; bottom: calc(100% + 0.5rem); }

/* Let the spacer, not the search box, absorb slack so actions sit far right
 * and the search keeps a calm fixed width (base sets .s-nav__search flex:1). */
.s-nav__search { flex: 0 1 24rem; }
.s-nav__search-dropdown {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  z-index: 110;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 24rem;
  overflow-y: auto;
}

/* Avatar button + avatar sizing (renderAvatar imgs have no intrinsic size
 * without Tailwind — size them within the chrome contexts here). */
.s-nav__avatar-btn {
  display: inline-grid;
  place-items: center;
  padding: 0.1875rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--s-transition);
}
.s-nav__avatar-btn:hover { background: var(--bg-secondary); }
.s-nav__avatar img,
.s-nav__avatar-fallback {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-pill);
  object-fit: cover;
}
.s-nav__avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--primary-50);
  color: var(--brand-primary);
  font-size: var(--s-text-sm);
  font-weight: 700;
}

/* Identity block (dropdown header + mobile panel header) */
.s-id {
  display: flex;
  align-items: center;
  gap: var(--s-space-3);
  padding: var(--s-space-2) var(--s-space-3) var(--s-space-3);
}
.s-id--panel {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: var(--s-space-2);
}
.s-id__avatar img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-pill);
  object-fit: cover;
}
.s-id__text { display: flex; flex-direction: column; min-width: 0; }
.s-id__name {
  font-weight: 700;
  font-size: var(--s-text-sm);
  color: var(--text-primary);
}
.s-id__handle { font-size: var(--s-text-xs); color: var(--text-tertiary); }

/* Sign-out item reads a touch quieter than navigation items */
.s-dropdown__item[type="submit"] { color: var(--text-secondary); }

/* Flash-messages wrapper: centers the v26-native flash partial
 * (v26/partials/flash-messages.php), which styles itself via .s-alert. */
.s-flash-wrap {
  max-width: var(--s-content-max);
  margin-inline: auto;
}

/* ── Footer layout ─────────────────────────────────────────── */
.s-footer__inner { align-items: center; }
.s-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--s-space-2);
  flex: 1 1 18rem;
  min-width: 0;
}
.s-footer__tagline {
  color: var(--text-tertiary);
  font-size: var(--s-text-sm);
  max-width: 42ch;
}
.s-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-space-4);
}
.s-footer__lang { position: relative; }
.s-footer__copyright {
  flex-basis: 100%;
  padding-top: var(--s-space-4);
  border-top: 1px solid var(--border-secondary);
  color: var(--text-quaternary);
  font-size: var(--s-text-xs);
}

/* ── Mobile slide-in panel ─────────────────────────────────── */
.s-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--s-overlay);
}
.s-mobile-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 160;
  height: 100%;
  width: 20rem;
  max-width: 88vw;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-secondary);
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform var(--s-transition);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.s-mobile-panel--open { transform: translateX(0); }
.s-mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-space-3);
  padding: var(--s-space-4) var(--s-gutter);
  border-bottom: 1px solid var(--border-secondary);
}
.s-mobile-panel__body { padding: var(--s-space-4); }
/* The panel is a mobile affordance only — never show it on desktop even when
 * Alpine's :class toggles the open modifier. */
@media (min-width: 641px) {
  .s-mobile-panel,
  .s-mobile-overlay { display: none !important; }
}
