/* Cabinet: strict dark theme with one warm orange accent, on top of activate.css. */
:root {
  --bg: #050508;
  --surface: rgba(14, 14, 20, 0.78);
  --surface-raised: rgba(255, 255, 255, 0.04);
  --text: #ececf1;
  --muted: #9b99ab;
  --faint: #6c6a7e;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --accent: #e8743a;
  --accent-2: #f5a878;
  --accent-deep: #b9561f;
  --glow: rgba(232, 116, 58, 0.22);
  --radius: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --glass: saturate(140%) blur(16px);
  --primary-bg:
    radial-gradient(70% 120% at 50% 125%, rgba(255, 240, 228, 0.95) 0%, rgba(248, 176, 150, 0.8) 32%, transparent 68%),
    radial-gradient(130% 170% at 50% 45%, #ec8d5c 0%, #d8692c 62%, #b2501b 100%);
}

body { background: var(--bg); caret-color: var(--accent-2); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
a { text-decoration-color: var(--line-strong); }

/* Background: almost black with a faint warm light at the top. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -12%, rgba(232, 116, 58, 0.10), rgba(232, 116, 58, 0.03) 45%, transparent 75%),
    var(--bg);
}

/* Shell: glass top bar with icon tabs and an icon logout on the right. */
.page, .topbar-inner { max-width: 1280px; }
.page { padding: 40px 32px 80px; }
.topbar-inner { padding: 0 32px; height: 68px; }
.topbar { background: rgba(5, 5, 8, 0.72); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border-color: var(--line); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; }
.tabs { gap: 20px; align-self: stretch; }
.tabs a { position: relative; min-height: 44px; padding: 0 4px; border-radius: 0; font-size: 14px; color: var(--muted); transition: color 0.2s, background 0.2s; }
.tabs a:hover { color: var(--text); }
.tabs a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0); opacity: 0; transition: transform 0.3s var(--ease), opacity 0.3s;
}
.tabs a[aria-current="page"] { color: var(--text); background: none; box-shadow: none; }
.tabs a[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }
.tabs { margin-left: auto; }
.tabs a { gap: 8px; }
.tabs a svg { width: 16px; height: 16px; opacity: 0.7; transition: opacity 0.2s; }
.tabs a[aria-current="page"] svg { opacity: 1; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
body:not([data-auth]) .logout, body:not([data-auth]) .profile { display: none; }
.topbar .profile { margin-left: 8px; }
.topbar .profile + .logout { margin-left: 8px; }
.topbar .profile[aria-current="page"] { color: var(--text); border-color: var(--line-strong); }

h1 { font-size: 32px; letter-spacing: -0.025em; }
h2 { font-size: 16px; }
.intro { max-width: 720px; margin-bottom: 24px; }
.intro p { line-height: 1.65; color: var(--muted); }
.login { max-width: 420px; margin: 72px auto 0; }
.login .intro { text-align: center; margin-left: auto; margin-right: auto; }
.narrow { max-width: 480px; }
.exitlag-form { min-width: 0; }
.exitlag-form textarea::placeholder { color: var(--muted); }
.exitlag-check { margin-top: 20px; }
.exitlag-preview { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.exitlag-preview li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 8px 12px; border-top: 1px solid var(--line); }
.exitlag-preview li:first-child { border-top: 0; }
.exitlag-preview .who { font-size: 14px; overflow-wrap: anywhere; }
.exitlag-preview input { min-width: 0; min-height: 36px; padding: 0 10px; font-family: var(--mono); font-size: 14px; }
.exitlag-preview input[aria-invalid="true"] { border-color: var(--danger); }
.exitlag-preview .form-error { grid-column: 1 / -1; margin: 0; font-size: 13px; }
@media (max-width: 560px) { .exitlag-preview li { grid-template-columns: minmax(0, 1fr) auto; } .exitlag-preview .who { grid-column: 1 / -1; } }

/* Cards: dark glass with a thin border. The activation page has bare .form cards too. */
.status, .form {
  /* activate.css makes cards sticky with top: 80px; relative + that top would shift every card down. */
  position: relative; top: auto; isolation: isolate;
  background: var(--surface); border-color: var(--line); border-radius: var(--radius);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.status-head { padding: 14px 20px; flex-wrap: wrap; border-color: var(--line); }
.form { padding: 20px; }
.form .field + .field, .form h2 + .field { margin-top: 16px; }
.form > .hint { margin-top: 16px; line-height: 1.6; }
.hint { color: var(--muted); }
label { color: var(--muted); }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }

input, textarea {
  min-height: 44px; background: rgba(255, 255, 255, 0.02); border-color: var(--line-strong); border-radius: 10px;
}
input::placeholder { color: var(--faint); }
input:hover { border-color: rgba(255, 255, 255, 0.22); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); outline: none; }

/* Buttons: solid accent for the main action, outlined for the rest. */
.primary, .secondary, .text-button { min-height: 44px; border-radius: 10px; }
.secondary.wide { width: 100%; margin-top: 8px; }
.text-button { display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }
.primary {
  /* Warm glow rising from the bottom edge into a burnt-orange rim. */
  background: var(--primary-bg);
  color: #fff; text-shadow: 0 1px 2px rgba(120, 45, 10, 0.35);
  border: 1px solid rgba(255, 214, 190, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(120, 45, 10, 0.25), 0 8px 24px -10px rgba(232, 116, 58, 0.55);
  transition: filter 0.2s, border-color 0.2s, box-shadow 0.25s, transform 0.12s var(--ease);
}
/* activate.css turns the hovered button white; keep the gradient and only add light. */
.primary:hover:not(:disabled) { background: var(--primary-bg); border-color: rgba(255, 224, 204, 0.5); filter: brightness(1.07) saturate(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(120, 45, 10, 0.25), 0 10px 32px -8px rgba(232, 116, 58, 0.7); }
.primary:disabled { background: rgba(255, 255, 255, 0.06); color: var(--faint); border-color: transparent; text-shadow: none; box-shadow: none; filter: none; }
.secondary, .text-button {
  background: transparent; color: var(--text); border-color: var(--line-strong);
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s, box-shadow 0.25s, transform 0.12s var(--ease);
}
.secondary:hover:not(:disabled), .text-button:hover:not(:disabled) { background: rgba(232, 116, 58, 0.08); border-color: rgba(245, 168, 120, 0.45); box-shadow: 0 0 18px rgba(232, 116, 58, 0.22); }
.secondary.danger, .text-button.danger { color: #f19a9a; border-color: rgba(241, 154, 154, 0.25); }
.secondary.danger:hover:not(:disabled), .text-button.danger:hover:not(:disabled) { background: rgba(241, 154, 154, 0.08); border-color: rgba(241, 154, 154, 0.45); box-shadow: 0 0 18px rgba(241, 154, 154, 0.2); }
.secondary:disabled, .text-button:disabled { opacity: 0.4; cursor: not-allowed; }
.primary:active:not(:disabled), .secondary:active:not(:disabled), .text-button:active:not(:disabled) { transform: scale(0.98); }

/* Icon buttons: a square outlined button, the label shows as a tooltip and is read by screen readers. */
.icon-button { position: relative; justify-content: center; width: 36px; min-height: 36px; border-color: var(--line); color: var(--muted); padding: 0; flex: none; }
.icon-button svg { width: 16px; height: 16px; pointer-events: none; }
.icon-button:hover:not(:disabled) { color: var(--text); }
@media (pointer: coarse) { .icon-button { width: 44px; min-height: 44px; } }
.icon-button::after {
  content: attr(aria-label); position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 5;
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: #16151d; color: var(--text); font-size: 12px; line-height: 1.3; white-space: nowrap;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.8); pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s var(--ease);
}
.icon-button:hover::after, .icon-button:focus-visible::after { opacity: 1; transform: none; }
/* Buttons on the right edge open the tooltip leftwards, the logout one opens it below the bar. */
.topbar .icon-button::after, .status-head > .icon-button::after, .field-head > .icon-button::after, .meta-id .icon-button::after, .result-actions .icon-button:last-child::after { left: auto; right: 0; }
.topbar .icon-button::after { bottom: auto; top: calc(100% + 8px); transform: translateY(-4px); }

/* Dropdown: the native select stays hidden as the value holder, see enhanceSelect. */
select { width: 100%; min-height: 44px; padding: 0 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; font: inherit; font-size: 14px; }
.picker { position: relative; min-width: 0; }
/* Lift the open menu, and its card, above later siblings with their own stacking context (buttons, pickers, cards). */
.picker:has(> .picker-face[aria-expanded="true"]), .status:has(.picker-face[aria-expanded="true"]) { z-index: 10; }
.picker-face {
  display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 40px 0 14px;
  background: rgba(255, 255, 255, 0.02); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.picker-face::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.25s var(--ease);
}
.picker-face[aria-expanded="true"]::after { transform: translateY(-30%) rotate(-135deg); }
.picker-face:hover { border-color: rgba(255, 255, 255, 0.22); }
.picker-face[aria-expanded="true"], .picker-face:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); outline: none; }
.picker-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5;
  margin: 0; padding: 4px; list-style: none; max-height: 280px; overflow-y: auto;
  background: rgba(20, 19, 27, 0.96); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
  transform-origin: top; animation: picker-in 0.18s var(--ease);
}
@keyframes picker-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.picker-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 0 12px; border-radius: 8px;
  font-size: 14px; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s;
}
.picker-search-row { position: sticky; top: -4px; z-index: 1; margin: -4px -4px 4px; padding: 4px; background: rgb(20, 19, 27); border-bottom: 1px solid var(--line); }
.picker-search { width: 100%; min-height: 38px; border-radius: 8px; padding: 0 10px; background: rgba(255, 255, 255, 0.04); color: var(--text); border: 1px solid var(--line); font: inherit; font-size: 14px; }
.picker-search:focus { border-color: var(--line-strong); outline: none; }
.picker-option[hidden] { display: none; }
.picker-option.active { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.picker-option[aria-selected="true"] { color: var(--text); }
.picker-option[aria-selected="true"]::after {
  content: ""; width: 9px; height: 5px; flex: none;
  border-left: 1.5px solid var(--accent-2); border-bottom: 1.5px solid var(--accent-2);
  transform: translateY(-2px) rotate(-45deg);
}

.rows { list-style: none; margin: 0; padding: 0 20px 4px; }
.row { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); min-width: 0; }
.row-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; min-width: 0; }
.row-title { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.row-meta { margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.row-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; line-height: 1.5; color: var(--muted); min-width: 0; }
.fact { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.fact svg { width: 14px; height: 14px; flex: none; color: var(--faint); }
.fact.mono { font-family: var(--mono); font-size: 12.5px; }
.fact.brand-claude svg { color: #d97757; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 24px 20px; border-top: 1px solid var(--line); }
.pager-text { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager .icon-button:last-child::after { left: auto; right: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.owned-bulk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 20px; border-top: 1px solid var(--line); }
.owned-check { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; cursor: pointer; }
.owned-check input, .row-title-check input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent-2); cursor: pointer; }
.row-title-check { display: inline-flex; align-items: flex-start; gap: 10px; min-width: 0; color: inherit; cursor: pointer; }
.row-title-check input { flex: none; margin-top: 3px; }
.squad-team-delete { justify-content: flex-end; }
.state { font-size: 12px; line-height: 1.5; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; color: var(--muted); transition: color 0.2s, background 0.2s; }
.state[data-status="unused"], .state[data-status="active"] { color: var(--success); background: var(--success-bg); border-color: rgba(52, 211, 153, 0.3); }
.state[data-status="reserved"], .state[data-status="review"] { color: var(--progress); background: var(--progress-bg); border-color: rgba(245, 165, 36, 0.3); }
.state[data-status="revoked"], .state[data-status="blocked"] { color: var(--danger); background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.3); }
.state[data-status="consumed"] { color: var(--muted); background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); }
.squad-panel { display: grid; gap: 10px; padding: 14px 20px 16px; }
.squad-status { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.squad-status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; font-size: 14px; background: rgba(255, 255, 255, 0.02); }
.squad-status-side { display: flex; align-items: center; gap: 10px; flex: none; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.squad-status ol { list-style: none; margin: 0; padding: 0; }
.squad-status li { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.squad-status .role { flex: none; width: 72px; color: var(--muted); font-size: 13px; }
.squad-status .who { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.squad-status li > .icon-button:last-child::after, .row-actions > .icon-button:last-child::after { left: auto; right: 0; }
/* A pulsing dot marks the step that is happening right now. */
.state.live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; vertical-align: 1px; border-radius: 50%; background: currentColor; animation: live-dot 1.2s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: 0.3; } }
.squad-teams { display: grid; gap: 10px; }
.squad-teams summary.squad-status-head { min-height: 44px; padding-right: 44px; }
.squad-team-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.squad-teams .squad-team-rename input { flex: 1; min-width: 0; min-height: 36px; border-radius: 8px; padding: 0 10px; background: transparent; color: inherit; border: 1px solid var(--line); font: inherit; font-size: 14px; font-weight: 600; }
.squad-teams .squad-team-rename input:focus { border-color: var(--line-strong); outline: none; }
.squad-line, .squad-connect-form { display: flex; flex-wrap: wrap; gap: 8px; }
.squad-role, .squad-connect-form input { flex: 1 1 260px; min-height: 44px; border-radius: 10px; padding: 0 12px; background: transparent; color: inherit; border: 1px solid var(--line-strong); font: inherit; font-size: 14px; }
.squad-members:empty { display: none; }
.squad-members { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.squad-members .busy { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.squad-connect { border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255, 255, 255, 0.02); transition: border-color 0.2s; }
.squad-connect:hover, .squad-connect[open] { border-color: rgba(255, 255, 255, 0.22); }
.squad-connect summary { min-height: 44px; padding: 0 44px 0 14px; font-size: 14px; color: var(--muted); }
.squad-connect[open] > :not(summary) { margin: 0 14px 14px; }
.row-actions .copy-group { display: flex; gap: 4px; padding-right: 8px; margin-right: 0; border-right: 1px solid var(--line); }
.row-actions .copy-group:last-child { border-right: 0; padding-right: 0; }
/* One disclosure for every details in the cabinet: no native marker, picker chevron, content rises in. */
details > summary { position: relative; display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; transition: color 0.2s; }
details > summary::-webkit-details-marker { display: none; }
details > summary:focus-visible { outline: none; }
details:has(> summary:focus-visible) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
details > summary:hover, details[open] > summary { color: var(--text); }
details > summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.25s var(--ease);
}
details[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
details[open] > :not(summary) { animation: rise 0.3s var(--ease); }
.rows-empty { margin: 0; padding: 20px; color: var(--muted); font-size: 14px; }
.badge { border-color: var(--line-strong); border-radius: 999px; }
.layout.sellers-layout { grid-template-columns: 320px minmax(0, 1fr); gap: 16px; }

/* Service settings: card form, Zovo pool, proxies */
.form .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.form .field-row .field + .field { margin-top: 0; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; margin-top: 12px; color: var(--text); font-size: 14px; cursor: pointer; }
.switch input {
  appearance: none; position: relative; flex: none; width: 36px; height: 20px; min-height: 0; margin: 0; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, 0.06); cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.switch input::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); transition: transform 0.2s var(--ease), background 0.2s;
}
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::before { transform: translateX(16px); background: #fff; }
.switch input:disabled { opacity: 0.5; cursor: not-allowed; }
.switch input:focus { box-shadow: none; }
.switch input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.pool-card { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0 0; font-size: 14px; }
.pool-card + .pool-card { border-top: 1px dashed var(--line); }
.pool-card .row-actions { margin: 0 0 0 auto; }
.uses { display: inline-flex; align-items: center; gap: 8px; }
.uses-label { font-size: 13px; color: var(--muted); }
.uses-value { min-width: 2ch; text-align: center; font-size: 15px; }
.uses-value.manual { color: var(--accent-2); }
.pager .icon-button::after, .pool-card .icon-button::after { left: auto; right: 0; }

/* One-time secret, toast, confirm dialog */
.secret {
  margin: 0 0 24px; padding: 20px 24px; border-radius: var(--radius);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
}
.secret pre { margin: 12px 0 0; padding: 16px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 40vh; overflow-y: auto; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0; padding: 12px 18px; z-index: 3;
  background: rgba(20, 19, 27, 0.96); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--line-strong); border-radius: 10px; font-size: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.ask {
  width: min(440px, calc(100% - 32px)); margin: auto; padding: 0;
  color: var(--text); background: rgba(20, 19, 27, 0.97);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}
.ask::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.ask form { padding: 24px; }
.ask h2 { margin: 0; font-size: 18px; letter-spacing: -0.015em; }
.ask p { margin: 12px 0 0; font-size: 14px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.ask-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.ask-actions button { min-width: 112px; }


/* Motion. activate.css shortens every duration under prefers-reduced-motion. */
html { scroll-behavior: smooth; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes leave { to { opacity: 0; transform: translateY(-6px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes picker-out { to { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@keyframes ask-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
@keyframes ask-out { to { opacity: 0; transform: translateY(4px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.page > section:not([hidden]), .secret:not([hidden]) { animation: rise 0.35s var(--ease); }
.row { animation: rise 0.35s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.form-error:not([hidden]) { animation: rise 0.2s var(--ease); }
.toast:not([hidden]) { animation: toast-in 0.25s var(--ease); }
.page [data-leaving] { animation: leave 0.18s var(--ease) forwards; pointer-events: none; }
.toast[data-leaving] { animation: toast-out 0.18s var(--ease) forwards; }
.picker-menu[data-leaving] { animation: picker-out 0.15s var(--ease) forwards; pointer-events: none; }
.ask[open] { animation: ask-in 0.25s var(--ease); }
.ask[open]::backdrop { animation: fade-in 0.25s var(--ease); }
.ask[data-leaving] { animation: ask-out 0.18s var(--ease) forwards; }
.ask[data-leaving]::backdrop { animation: fade-out 0.18s var(--ease) forwards; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .row { animation-delay: 0s; }
}

@media (max-width: 1000px) {
  .layout.sellers-layout { grid-template-columns: 280px minmax(0, 1fr); }
}
/* Below ~960px the tabs move to their own scrolling row under the title. */
@media (max-width: 960px) {
  .topbar-inner { height: auto; min-height: 64px; padding: 16px 20px 0; flex-wrap: wrap; gap: 8px; }
  .wordmark { flex: 1; min-height: 40px; }
  .tabs { order: 3; width: 100%; margin-left: 0; gap: 20px; overflow-x: auto; }
}
@media (max-width: 760px) {
  .page { padding: 32px 20px 64px; }
  h1 { font-size: 26px; }
  .intro { margin-bottom: 24px; }
  .layout.sellers-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .row-head { flex-wrap: wrap; gap: 8px; }
  .pool-card .row-actions { margin-left: 0; }
  .login { margin-top: 32px; }
}
@media (max-width: 480px) {
  .page { padding-left: 16px; padding-right: 16px; }
  .topbar-inner { padding-left: 16px; padding-right: 16px; }
  .form, .secret { padding: 20px; }
  .status-head { padding: 16px; }
  .rows { padding-left: 16px; padding-right: 16px; }
  .result-actions > .icon-button { flex: none; }
  .ask-actions button { flex: 1; min-width: 0; }
}

/* Activation page (index.html) reuses this theme; its sections line up with the 24px card head. */
.activate-page .meta, .activate-page .stages, .activate-page .checks { padding-left: 24px; padding-right: 24px; }
.activate-page .result { margin: 0 24px 24px; border-radius: 10px; }
.docs-nav a[aria-current] { color: var(--accent-2); background: rgba(232, 116, 58, 0.1); }
@media (max-width: 420px) { .tabs { gap: 12px; } }

/* Registration reuses the activation stages and the cabinet's surfaces. */
.exitlag-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.exitlag-traffic-panel { margin-bottom: 16px; }
.exitlag-traffic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 16px 20px; gap: 16px; }
.exitlag-traffic > div { display: grid; gap: 8px; }
.exitlag-traffic dt, .exitlag-connection, .exitlag-traffic-note { color: var(--muted); font-size: 13px; }
.exitlag-traffic dd { margin: 0; color: var(--text); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.exitlag-traffic-secondary { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.exitlag-traffic-secondary dd { font-size: 18px; }
.exitlag-traffic-note { margin: 0; padding: 0 20px 20px; line-height: 1.6; }
.exitlag-connection[data-state="offline"] { color: var(--danger); }
.exitlag-layout .meta, .exitlag-layout .stages, .exitlag-layout .result { padding-left: 20px; padding-right: 20px; }
.exitlag-layout .stage-desc { color: var(--muted); }
.exitlag-layout .meta dd { max-width: 60%; }
.exitlag-layout .result { padding-bottom: 24px; }
.exitlag-layout .result .secondary { margin-top: 16px; }
.exitlag-queue { margin-top: 16px; }
.exitlag-queue .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.exitlag-queue .row > span:first-child { overflow-wrap: anywhere; min-width: 0; }
@media (max-width: 760px) {
  .exitlag-layout { grid-template-columns: minmax(0, 1fr); }
  .exitlag-traffic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
}
@media (max-width: 480px) {
  .exitlag-traffic { padding: 20px; }
}

.exitlag-queue .state[data-status="created"] { color: var(--success); }
.exitlag-queue .state[data-status="running"] { color: var(--progress); }
.exitlag-queue .state[data-status="failed"], .exitlag-queue .state[data-status="rejected"], .exitlag-queue .state[data-status="unconfirmed"] { color: var(--danger); }

.exitlag-layout .stage-time, .exitlag-queue .state { color: var(--muted); }
@media (max-width: 760px) {
  .exitlag-layout[data-running="true"] .exitlag-form { order: 1; }
}

/* ExitLag screen: shared header with a segmented switch between its parts. */
.exitlag-head .intro { margin-bottom: 16px; }
.segmented { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); max-width: 100%; overflow-x: auto; }
.segmented a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color 0.2s, background 0.2s; }
.segmented a:hover { color: var(--text); }
.segmented a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* Cards stacked directly in a view keep one gap. */
section > .status + .status, section > .status + .hint, section > .status + .exitlag-layout, section > .exitlag-layout + .status { margin-top: 16px; }
.row-head { align-items: center; }
.state[data-status="connected"] { color: var(--success); background: var(--success-bg); border-color: rgba(52, 211, 153, 0.3); }
.state[data-status="queued"], .state[data-status="running"] { color: var(--progress); background: var(--progress-bg); border-color: rgba(245, 165, 36, 0.3); }
.state[data-status="failed"] { color: var(--danger); background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.3); }

.exitlag-proxy-settings { margin-bottom: 16px; }
.exitlag-proxy-settings summary { padding: 14px 44px 14px 20px; font-size: 16px; font-weight: 600; min-height: 44px; letter-spacing: -0.01em; }
.exitlag-proxy-settings[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.exitlag-proxy-settings summary .hint { margin: 0; font-size: 13px; font-weight: 400; }
.exitlag-proxy-settings form { padding: 0 20px 20px; }
.exitlag-proxy-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.exitlag-proxy-settings .hint { line-height: 1.6; margin-top: 12px; }
.exitlag-proxy-settings .row-actions { margin-top: 16px; }
@media (max-width: 960px) { .exitlag-proxy-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .exitlag-proxy-fields { grid-template-columns: minmax(0, 1fr); } }
.squad-line .picker { flex: 1 1 260px; }
