/* ==========================================================================
   Orbit design system — shared core

   This block is identical in Orbit AI (static/css/app.css) and Orbit Mission
   Control (static/css/auth.css). Each app appends its own components after
   it. Keep the two copies in sync.

   Direction
   ---------
   The brand mark is a navy planet, so the interface is built around that
   navy rather than denying it: it is the accent for primary actions, focus,
   selection and links. Neutrals are cool-tinted so the navy sits naturally
   on them. Everything else is quiet.

   Theming follows the operating system by default; the theme control sets
   `data-theme` on <html>:

     (no attribute)      -> follow the system
     data-theme="light"  -> force light
     data-theme="dark"   -> force dark

   Dark values are defined twice on purpose — once for the system preference
   and once for the explicit override — so the two can never drift apart.
   Every text token clears WCAG AA (4.5:1) on the surfaces it is used on.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens — light
   -------------------------------------------------------------------------- */

:root {
  color-scheme: light;

  /* Surfaces, flattest to most raised. */
  --bg: #ffffff;
  --bg-subtle: #f6f8fb;
  --bg-raised: #ffffff;
  --bg-inset: #eef1f6;
  --bg-hover: #f1f4f9;
  --bg-active: #e5eaf2;
  --sidebar-bg: #f6f8fb;

  /* Hairlines. */
  --border: #e4e8ef;
  --border-strong: #d0d7e2;

  /* Text. */
  --text: #0f172a;
  --text-muted: #4a556a;   /* 7.2:1 on --bg */
  --text-faint: #657189;   /* 4.9:1 on --bg */

  /* Brand navy, sampled from the logo. */
  --brand: #0b2a5b;
  --brand-bright: #1a56c9;

  /* The accent is the brand. */
  --accent: #0b2a5b;
  --accent-hover: #143a7a;
  --accent-soft: #e8eefa;
  --accent-soft-text: #0b2a5b;
  --accent-text: #ffffff;
  --accent-ring: rgba(11, 42, 91, 0.22);
  --link: #1a56c9;

  --danger: #b42318;
  --danger-hover: #912018;
  --danger-soft: #fef3f2;
  --danger-text: #ffffff;

  --success: #067647;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fffaeb;

  /* User message bubble (Orbit AI). */
  --bubble-user: #e8eefa;
  --bubble-user-text: #0f172a;

  --scrim: rgba(15, 23, 42, 0.45);

  /* Radii — generous, to match the friendly mark. */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  /* Elevation. Navy-tinted so shadows read as depth, not dirt. */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px -12px rgba(11, 42, 91, 0.22);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, 0.05), 0 20px 48px -16px rgba(11, 42, 91, 0.28);

  --ring: 0 0 0 3px var(--accent-ring);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.2, 0, 0.13, 1);
  --dur-fast: 120ms;
  --dur: 180ms;
  --dur-slow: 260ms;
}

/* --------------------------------------------------------------------------
   Tokens — dark
   -------------------------------------------------------------------------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;

    --bg: #0b0e14;
    --bg-subtle: #0f131b;
    --bg-raised: #141a25;
    --bg-inset: #1a2130;
    --bg-hover: #1b2232;
    --bg-active: #242d40;
    --sidebar-bg: #0d1118;

    --border: #212938;
    --border-strong: #303a4f;

    --text: #eef2f8;
    --text-muted: #a4afc4;
    --text-faint: #8291ab;

    --brand: #7aa7ff;
    --brand-bright: #9bbcff;

    --accent: #6d9eff;
    --accent-hover: #86afff;
    --accent-soft: #172543;
    --accent-soft-text: #b6ccff;
    --accent-text: #061225;
    --accent-ring: rgba(109, 158, 255, 0.32);
    --link: #8fb3ff;

    --danger: #f87171;
    --danger-hover: #fca5a5;
    --danger-soft: #2a1515;
    --danger-text: #1a0808;

    --success: #4ade80;
    --success-soft: #0f2a1c;
    --warning: #fbbf24;
    --warning-soft: #2b2110;

    --bubble-user: #1a2742;
    --bubble-user-text: #e8eefa;

    --scrim: rgba(0, 0, 0, 0.62);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 56px -16px rgba(0, 0, 0, 0.75);
  }
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b0e14;
  --bg-subtle: #0f131b;
  --bg-raised: #141a25;
  --bg-inset: #1a2130;
  --bg-hover: #1b2232;
  --bg-active: #242d40;
  --sidebar-bg: #0d1118;

  --border: #212938;
  --border-strong: #303a4f;

  --text: #eef2f8;
  --text-muted: #a4afc4;
  --text-faint: #8291ab;

  --brand: #7aa7ff;
  --brand-bright: #9bbcff;

  --accent: #6d9eff;
  --accent-hover: #86afff;
  --accent-soft: #172543;
  --accent-soft-text: #b6ccff;
  --accent-text: #061225;
  --accent-ring: rgba(109, 158, 255, 0.32);
  --link: #8fb3ff;

  --danger: #f87171;
  --danger-hover: #fca5a5;
  --danger-soft: #2a1515;
  --danger-text: #1a0808;

  --success: #4ade80;
  --success-soft: #0f2a1c;
  --warning: #fbbf24;
  --warning-soft: #2b2110;

  --bubble-user: #1a2742;
  --bubble-user-text: #e8eefa;

  --scrim: rgba(0, 0, 0, 0.62);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 56px -16px rgba(0, 0, 0, 0.75);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.prose a,
.message a,
.notice a,
.text-link {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
.prose a:hover,
.message a:hover,
.notice a:hover,
.text-link:hover { text-decoration-color: var(--link); }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: 0.95rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

code, pre, kbd, samp {
  font-family: var(--mono);
  font-size: 0.875em;
}

code {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 0.1em 0.4em;
}

pre {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow-x: auto;
  line-height: 1.55;
}

pre code { background: none; border: none; padding: 0; font-size: 1em; }

kbd {
  display: inline-block;
  padding: 0.05em 0.45em;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--radius-xs);
  background: var(--bg-raised);
  font-size: 0.78em;
  line-height: 1.5;
}

blockquote {
  margin: 0 0 1em;
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
  color: var(--text-muted);
}

ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
li { margin: 0.2em 0; }

table { border-collapse: collapse; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection { background: var(--accent-soft); color: var(--text); }
::-moz-focus-inner { border: 0; }

/* Icons inherit colour and sit on the text baseline. */
.icon {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.18em;
}

/* --- Scrollbars --------------------------------------------------------- */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); background-clip: content-box; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

.btn:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.btn:active { background: var(--bg-active); transform: translateY(0.5px); }

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
}
.btn--primary:active { background: var(--accent); }

.btn--ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--text-muted);
}
.btn--ghost:hover { background: var(--bg-hover); color: var(--text); border-color: transparent; }

.btn--soft {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-soft-text);
  box-shadow: none;
}
.btn--soft:hover { background: var(--accent-soft); filter: brightness(0.97); }

.btn--danger {
  color: var(--danger);
  border-color: var(--border-strong);
}
.btn--danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.btn--danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--danger-text);
}
.btn--danger-solid:hover { background: var(--danger-hover); border-color: var(--danger-hover); color: var(--danger-text); }

.btn--block { width: 100%; }
.btn--sm { min-height: 32px; padding: 5px 11px; font-size: 0.8rem; gap: 6px; border-radius: var(--radius-xs); }
.btn--lg { min-height: 46px; padding: 11px 22px; font-size: 0.95rem; border-radius: var(--radius); }
.btn--pill { border-radius: var(--radius-pill); }

.btn .icon { margin: 0 -2px; }

/* Icon-only buttons. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
  padding: 0;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.icon-btn:active { background: var(--bg-active); }
.icon-btn[aria-expanded="true"] { background: var(--bg-active); color: var(--text); }
.icon-btn--bordered { border: 1px solid var(--border-strong); background: var(--bg-raised); box-shadow: var(--shadow-sm); }
.icon-btn--lg { width: 38px; height: 38px; }
.icon-btn.is-success { color: var(--success); }

/* Segmented control. */
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.segmented .btn {
  min-height: 30px;
  padding: 4px 12px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted);
  font-weight: 500;
}
.segmented .btn:hover { background: var(--bg-raised); color: var(--text); }
.segmented .btn.is-active {
  background: var(--bg-raised);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.segmented .btn .count {
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.field__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field__hint {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 6px 0 0;
  line-height: 1.5;
}

.field__hint a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

.field__error {
  font-size: 0.78rem;
  color: var(--danger);
  margin: 6px 0 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
input:not([type]),
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

textarea { resize: vertical; min-height: 96px; line-height: 1.55; }

select {
  cursor: pointer;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23657189' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238291ab' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238291ab' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}

input:disabled, select:disabled, textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg-inset);
  box-shadow: none;
}

input::placeholder, textarea::placeholder { color: var(--text-faint); opacity: 1; }

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

input[type="checkbox"],
input[type="radio"] {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
  box-shadow: none;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  margin-bottom: 12px;
  cursor: pointer;
  line-height: 1.45;
  color: var(--text);
}
.checkbox:last-child { margin-bottom: 0; }
.checkbox input { margin-top: 2px; }
.checkbox__hint { display: block; font-size: 0.78rem; color: var(--text-faint); margin-top: 2px; }

/* Input with a leading icon. */
.input-icon { position: relative; }
.input-icon > .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}
.input-icon > input { padding-left: 36px; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }

.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.card__title .icon { color: var(--text-faint); }

.card__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}
.card__subtitle:last-child { margin-bottom: 0; }

.card--flush { padding: 0; overflow: hidden; }
.card--soft { background: var(--bg-subtle); box-shadow: none; }
.card--accent { border-color: var(--accent); box-shadow: var(--shadow); }

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.card__header > div:first-child { min-width: 0; }
.card__header .card__subtitle { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Badges
   -------------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  background: var(--bg-inset);
  color: var(--text-muted);
  border: 1px solid transparent;
  white-space: nowrap;
  vertical-align: middle;
}
.badge .icon { width: 12px; height: 12px; }

.badge--accent { background: var(--accent-soft); color: var(--accent-soft-text); }
.badge--outline { background: transparent; border-color: var(--border-strong); color: var(--text-muted); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--premium { background: var(--accent-soft); color: var(--accent-soft-text); }
.badge--pro { background: var(--accent); color: var(--accent-text); }
.badge--free { background: var(--bg-inset); color: var(--text-muted); }
.badge--muted { background: var(--bg-inset); color: var(--text-muted); }
.badge--personal { background: var(--bg-inset); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Flash messages (Django messages framework)
   -------------------------------------------------------------------------- */

.messages { list-style: none; margin: 0 0 18px; padding: 0; }

.message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.message:last-child { margin-bottom: 0; }
.message > .icon { margin-top: 2px; flex: 0 0 auto; }

.message--success { border-color: color-mix(in srgb, var(--success) 35%, var(--border)); }
.message--success > .icon { color: var(--success); }
.message--info { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.message--info > .icon { color: var(--accent); }
.message--warning { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); }
.message--warning > .icon { color: var(--warning); }
.message--error {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 30%, transparent);
  color: var(--danger);
  font-weight: 500;
}
.message--error > .icon { color: var(--danger); }

/* --------------------------------------------------------------------------
   Avatars
   -------------------------------------------------------------------------- */

.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex: 0 0 auto;
  overflow: hidden;
  line-height: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--soft { background: var(--accent-soft); color: var(--accent-soft-text); }
.avatar--neutral { background: var(--bg-inset); color: var(--text-muted); }
.avatar--square { border-radius: var(--radius-sm); }
.avatar--sm { width: 24px; height: 24px; font-size: 0.6rem; }
.avatar--lg { width: 40px; height: 40px; font-size: 0.85rem; border-radius: 12px; }
.avatar--xl { width: 56px; height: 56px; font-size: 1.1rem; border-radius: 16px; }

/* --------------------------------------------------------------------------
   Dropdown menus
   -------------------------------------------------------------------------- */

.menu { position: relative; }

.menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
  display: none;
  max-height: min(440px, 70vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.menu__panel.is-open { display: block; animation: menu-in var(--dur) var(--ease); }
.menu__panel--up { top: auto; bottom: calc(100% + 6px); }
.menu__panel--left { right: auto; left: 0; }

@keyframes menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.menu__panel--up.is-open { animation-name: menu-in-up; }
@keyframes menu-in-up {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-xs);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.menu__item .icon { color: var(--text-faint); }
.menu__item:hover { background: var(--bg-hover); }
.menu__item:hover .icon { color: var(--text); }
.menu__item--danger { color: var(--danger); }
.menu__item--danger .icon { color: var(--danger); }
.menu__item--danger:hover { background: var(--danger-soft); color: var(--danger); }
.menu__item__value { margin-left: auto; color: var(--text-faint); font-weight: 500; font-size: 0.78rem; }
.menu__divider { height: 1px; background: var(--border); margin: 6px 4px; }
.menu__label {
  padding: 8px 10px 4px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   Meter
   -------------------------------------------------------------------------- */

.meter {
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-active);
  overflow: hidden;
}
.meter__fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width var(--dur-slow) var(--ease);
}
.meter__fill--warning { background: var(--warning); }
.meter__fill--danger { background: var(--danger); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  font-weight: 650;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table tr:last-child td { border-bottom: none; }
.table td:last-child, .table th:last-child { text-align: right; }
.table--numeric td, .table--numeric th { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Empty states
   -------------------------------------------------------------------------- */

.empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}
.empty__icon {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-inset);
  color: var(--text-faint);
  margin-bottom: 14px;
}
.empty__title {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.empty__body { max-width: 44ch; margin: 0 auto; font-size: 0.9rem; }
.empty .btn { margin-top: 18px; }

/* --------------------------------------------------------------------------
   Site chrome — marketing nav and footer
   -------------------------------------------------------------------------- */

.site {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.site__main { flex: 1 1 auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.nav__links {
  display: flex;
  gap: 6px;
  margin-left: auto;
  align-items: center;
  font-size: 0.875rem;
}

.nav__link {
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav__link:hover { background: var(--bg-hover); color: var(--text); }
.nav__link.is-active { color: var(--text); }

.nav__sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: -0.02em;
  min-width: 0;
  text-decoration: none;
}

.brand__logo {
  height: 28px;
  width: auto;
  flex: 0 0 auto;
  display: block;
}

/* In dark mode the navy mark becomes white: the standard treatment for a
   single-colour mark on a dark surface. brightness(0) keeps the alpha channel
   intact so the edges stay crisp. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand__logo { filter: brightness(0) invert(1); }
}
[data-theme="dark"] .brand__logo { filter: brightness(0) invert(1); }

.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand__sub {
  display: block;
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  margin-top: auto;
}
.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.footer__brand { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-weight: 600; }
.footer__links { display: flex; gap: 4px; flex-wrap: wrap; }
.footer__links a {
  color: var(--text-faint);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}
.footer__links a:hover { color: var(--text); background: var(--bg-hover); }

/* --------------------------------------------------------------------------
   Entrance — sign in, sign up, reset, and every other allauth screen
   -------------------------------------------------------------------------- */

.entrance {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 64px;
  position: relative;
}

.entrance__card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
}

.entrance__mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-soft);
  margin: 0 0 18px;
}
.entrance__mark img { height: 30px; width: auto; }

.entrance__title {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.entrance__lede {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 22px;
  line-height: 1.5;
}
.entrance__card form { margin: 0; }
.entrance__card .field { margin-bottom: 14px; }
.entrance__card .stack > * + * { margin-top: 14px; }
.entrance__actions { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.entrance__actions .btn { width: 100%; min-height: 42px; }
.entrance__card h1 { font-size: 1.45rem; letter-spacing: -0.025em; margin-bottom: 6px; }
.entrance__card h2 { font-size: 0.95rem; margin: 0 0 10px; color: var(--text-muted); font-weight: 600; }
.entrance__card p { font-size: 0.9rem; color: var(--text-muted); }
.entrance__card hr { margin: 18px 0; }

.entrance__footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.entrance__meta {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-faint);
}
.entrance__meta a { padding: 2px 6px; border-radius: var(--radius-xs); }
.entrance__meta a:hover { color: var(--text); background: var(--bg-hover); }

/* "or" divider between the password form and third-party providers. */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-faint);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.providers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.providers .btn { width: 100%; justify-content: center; min-height: 42px; font-weight: 550; }
.providers .btn .icon { width: 18px; height: 18px; }

/* Decorative orbit rings behind an entrance card. Pure CSS, no images. */
.orbit-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.orbit-bg::before,
.orbit-bg::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, transparent);
  transform: translate(-50%, -50%);
}
.orbit-bg::before { width: 680px; height: 680px; }
.orbit-bg::after { width: 1040px; height: 1040px; border-color: color-mix(in srgb, var(--accent) 8%, transparent); }
.orbit-bg__glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 720px;
  height: 520px;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.entrance > *:not(.orbit-bg) { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Prose (legal and about pages)
   -------------------------------------------------------------------------- */

.prose { max-width: 68ch; }
.prose h1 { font-size: 2rem; margin-bottom: 8px; }
.prose h2 { font-size: 1.15rem; margin: 36px 0 10px; }
.prose h3 { font-size: 0.98rem; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }
.prose ul, .prose ol { padding-left: 20px; }
.prose .lede { font-size: 1.05rem; color: var(--text-muted); }
.prose__meta { font-size: 0.8rem; color: var(--text-faint); margin-bottom: 28px; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.stack > * + * { margin-top: 16px; }
.stack--sm > * + * { margin-top: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.row--top { align-items: flex-start; }
.row--end { justify-content: flex-end; }
.row--center { justify-content: center; }
.row--tight { gap: 6px; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions--end { justify-content: flex-end; }
.actions--center { justify-content: center; }
.actions--spaced { margin-top: 20px; }
.grow, .flex-1 { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.accent { color: var(--accent); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.74rem; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); font-size: 0.85em; }
.tabular { font-variant-numeric: tabular-nums; }
.center, .text-center { text-align: center; }
.text-right { text-align: right; }
.text-danger { color: var(--danger); }
.gap-3 { gap: 14px; }
.weight-normal { font-weight: 500; }
.entrance__mark--center { margin-left: auto; margin-right: auto; }
.entrance__mark--danger { background: var(--danger-soft); }
.grid-span { grid-column: 1 / -1; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-1 { padding-left: 8px; padding-right: 8px; }
.pt-2 { padding-top: 16px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.shell { margin: 0 auto; width: 100%; }
.shell--xs { max-width: 420px; }
.shell--sm { max-width: 560px; }
.shell--md { max-width: 720px; }
.shell--lg { max-width: 960px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Eyebrow label above a heading. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Key/value definition rows. */
.kv { display: flex; flex-direction: column; gap: 0; }
.kv__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.kv__row:last-child { border-bottom: none; }
.kv__key { color: var(--text-muted); }
.kv__value { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

/* --------------------------------------------------------------------------
   Motion, contrast and print
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .btn, .card, .badge, .menu__panel, .entrance__card, .avatar { border: 1px solid CanvasText; }
  .meter__fill { background: Highlight; }
  .icon-btn { border: 1px solid transparent; }
}

@media (max-width: 640px) {
  .nav { padding: 12px 16px; gap: 12px; }
  .nav__links { gap: 2px; }
  .nav__link { padding: 7px 8px; }
  .footer { padding: 22px 16px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .entrance { padding: 24px 16px 48px; }
  .entrance__card { padding: 24px 20px; border-radius: var(--radius-lg); }
}


/* ==========================================================================
   Orbit Mission Control — identity-specific components
   ========================================================================== */

.site__main { padding: 32px 24px 64px; }

/* Signed-in page header. */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.page-header h1 { font-size: 1.7rem; margin: 0 0 4px; }
.page-header p { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* Sign-in hero card lives in the shared .entrance; this adds the family
   strip underneath. */
.family {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.family__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 550;
  box-shadow: var(--shadow-sm);
}
.family__item .avatar { width: 20px; height: 20px; font-size: 0.55rem; }
.family__item.is-soon { opacity: 0.7; }

.entrance__pending {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  font-size: 0.82rem;
  margin-bottom: 18px;
}
.entrance__pending .icon { flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   Account chooser — the "Personal or Acme Co?" screen
   -------------------------------------------------------------------------- */

.chooser { text-align: center; margin-bottom: 22px; }
.chooser__title {
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.chooser__subtitle { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.chooser__subtitle strong { color: var(--text); font-weight: 600; }

.account-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.account-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.account-tile:hover .account-tile__chevron { color: var(--accent); transform: translateX(2px); }
.account-tile:active { transform: scale(0.995); }
.account-tile--static { cursor: default; }
.account-tile--static:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.account-tile--current { border-color: var(--accent); background: var(--bg-raised); }

.account-tile__meta { flex: 1 1 auto; min-width: 0; }
.account-tile__name {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.account-tile__sub {
  font-size: 0.78rem;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.account-tile__chevron {
  color: var(--text-faint);
  flex: none;
  display: inline-flex;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.account-create {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.account-create:hover { background: var(--accent-soft); color: var(--accent-soft-text); border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Account switcher — the header dropdown
   -------------------------------------------------------------------------- */

.switcher { position: relative; }

.switcher__trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 550;
  cursor: pointer;
  max-width: 260px;
  box-shadow: var(--shadow-sm);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.switcher__trigger:hover { background: var(--bg-hover); border-color: var(--border-strong); }
.switcher__trigger[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); }
.switcher__trigger .avatar { width: 24px; height: 24px; font-size: 0.6rem; }
.switcher__trigger > .icon { color: var(--text-faint); }

.switcher__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.switcher__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  min-width: 280px;
  max-width: min(340px, calc(100vw - 32px));
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  box-shadow: var(--shadow-lg);
  display: none;
}
.switcher__menu.is-open { display: block; animation: menu-in var(--dur) var(--ease); }

.switcher__menu-header {
  padding: 8px 10px 6px;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.switcher__menu form { margin: 0; }
.switcher__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease);
}
.switcher__item:hover { background: var(--bg-hover); }
.switcher__item .avatar { width: 28px; height: 28px; font-size: 0.65rem; }
.switcher__item .avatar--icon { background: var(--bg-inset); color: var(--text-muted); }
.switcher__item .account-tile__name { font-size: 0.86rem; }
.switcher__item .account-tile__sub { margin-top: 0; }

.switcher__menu-footer {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
}

.switcher__backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
}
.switcher__backdrop.is-open { display: block; }

/* --------------------------------------------------------------------------
   Settings — side nav on desktop, tabs on phones
   -------------------------------------------------------------------------- */

.settings {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.settings__nav {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.settings__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.settings__nav a .icon { color: var(--text-faint); }
.settings__nav a:hover { background: var(--bg-hover); color: var(--text); }
.settings__nav a.is-active { background: var(--accent-soft); color: var(--accent-soft-text); font-weight: 600; }
.settings__nav a.is-active .icon { color: inherit; }
.settings__nav a.is-danger { color: var(--danger); }
.settings__nav a.is-danger .icon { color: var(--danger); }
.settings__nav a.is-danger:hover { background: var(--danger-soft); }

.settings__content { min-width: 0; }
.settings__content section { scroll-margin-top: 24px; }
.settings__content section + section { margin-top: 32px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 4px;
}
.section-sub { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 14px; }

.danger-zone { border-color: color-mix(in srgb, var(--danger) 30%, var(--border)); }
.danger-zone .card__title { color: var(--danger); }
.danger-zone .card__title .icon { color: var(--danger); }

.confirm-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.confirm-row input { flex: 1 1 200px; }

.pending-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.pending-row:last-child { border-bottom: none; }
.pending-row .grow { min-width: 0; }

.delete-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.delete-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.88rem; color: var(--text-muted); }
.delete-list .icon { color: var(--danger); margin-top: 3px; flex: 0 0 auto; }

/* --------------------------------------------------------------------------
   About / explainer
   -------------------------------------------------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature {
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-raised);
  box-shadow: var(--shadow-sm);
}
.feature__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.feature h3 { margin: 0 0 6px; font-size: 0.95rem; }
.feature p { margin: 0; font-size: 0.86rem; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .site__main { padding: 24px 16px 48px; }
  .settings { grid-template-columns: 1fr; gap: 20px; }
  .settings__nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .settings__nav a { white-space: nowrap; }
  .switcher__trigger { max-width: 180px; }
  .switcher__trigger .switcher__label { display: none; }
  .page-header h1 { font-size: 1.45rem; }
}

@media (forced-colors: active) {
  .account-tile, .switcher__menu, .switcher__trigger, .feature { border: 1px solid CanvasText; }
}
