:root {
  color-scheme: dark;
  --bg: #070a10;
  --bg-soft: #0a0f18;
  --surface: rgba(15, 21, 33, 0.82);
  --surface-solid: #0f1521;
  --surface-2: #141c2b;
  --surface-3: #1b2537;
  --border: rgba(148, 163, 184, 0.13);
  --border-strong: rgba(148, 163, 184, 0.24);
  --text: #e9eef8;
  --text-soft: #c7d2e3;
  --muted: #8c9ab0;
  --faint: #617089;
  --accent: #7aa2ff;
  --accent-2: #a78bfa;
  --accent-3: #22d3ee;
  --accent-ink: #08101f;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.14);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, 0.25);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fc;
  --bg-soft: #eef3fb;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --surface-2: #f2f6fc;
  --surface-3: #e8eef8;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.15);
  --text: #0f172a;
  --text-soft: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-3: #0891b2;
  --accent-ink: #ffffff;
  --success: #059669;
  --warning: #b45309;
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.1);
  --shadow: 0 26px 80px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scrollbar-color: var(--surface-3) transparent;
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(122, 162, 255, 0.17), transparent 62%),
    radial-gradient(900px 520px at 102% 2%, rgba(167, 139, 250, 0.14), transparent 58%),
    radial-gradient(700px 420px at 52% 110%, rgba(34, 211, 238, 0.08), transparent 60%),
    var(--bg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[data-theme="light"] body {
  background:
    radial-gradient(1000px 520px at 8% -12%, rgba(37, 99, 235, 0.1), transparent 60%),
    radial-gradient(820px 480px at 102% 0%, rgba(124, 58, 237, 0.08), transparent 58%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 72%);
}

[hidden] {
  display: none !important;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

img,
svg {
  display: block;
}

::selection {
  background: rgba(122, 162, 255, 0.32);
}

.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;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

/* Boot */

.boot {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: var(--bg);
  color: var(--muted);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.boot.is-done {
  opacity: 0;
  visibility: hidden;
}

.boot-mark {
  position: relative;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.boot-orbit {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
}

.boot-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 24px rgba(122, 162, 255, 0.55);
}

/* Login */

.login-shell {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
}

.ambient {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.42;
  pointer-events: none;
  animation: float 12s ease-in-out infinite alternate;
}

.ambient-a {
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(122, 162, 255, 0.55), transparent 66%);
}

.ambient-b {
  right: -140px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.42), transparent 66%);
  animation-delay: -5s;
}

.login-card {
  position: relative;
  width: min(440px, 100%);
  padding: 34px 34px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  animation: rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(122, 162, 255, 0.75), rgba(167, 139, 250, 0.55), transparent);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 20px rgba(122, 162, 255, 0.24));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
}

.login-brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.login-brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.login-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 24px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  transition: all 0.25s ease;
}

.step-dot.is-active {
  width: 26px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px rgba(122, 162, 255, 0.35);
}

.step-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-heading h1 {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.login-heading .muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span:first-child {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field input::placeholder {
  color: var(--faint);
}

.field input:focus {
  border-color: rgba(122, 162, 255, 0.65);
  background: var(--surface-3);
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.12);
}

.input-wrap {
  position: relative;
  display: block;
}

.input-wrap input {
  padding-right: 48px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
}

.totp-input {
  height: 58px !important;
  font-family: var(--font-mono);
  font-size: 26px !important;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.form-error {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 11px;
}

.floating {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, #9bb8ff, #b9a3ff 52%, #73e0ef);
  box-shadow: 0 12px 28px rgba(122, 162, 255, 0.22);
}

[data-theme="light"] .btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed 55%, #0891b2);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.2);
}

.btn-ghost {
  color: var(--text-soft);
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 0 10px 24px rgba(244, 63, 94, 0.2);
}

.btn-block {
  width: 100%;
}

.btn-compact {
  height: 38px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-compact svg {
  width: 15px;
  height: 15px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.icon-btn:hover {
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn.tiny {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  border-color: transparent;
}

.icon-btn.tiny svg {
  width: 14px;
  height: 14px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* App shell */

.app-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0 28px 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, transparent), color-mix(in srgb, var(--bg) 62%, transparent));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.brand-text strong {
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 30vw);
  height: 40px;
  padding: 0 10px 0 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-box:focus-within {
  border-color: rgba(122, 162, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.1);
}

.search-box svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.search-box input {
  min-width: 0;
  flex: 1;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.search-box input::placeholder {
  color: var(--faint);
}

.search-box kbd {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.workspace {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 28px;
  padding: 32px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -300px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(122, 162, 255, 0.2), transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  bottom: -280px;
  left: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12), transparent 65%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero h1 span {
  color: transparent;
  background: linear-gradient(110deg, var(--accent) 8%, var(--accent-2) 56%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 650px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.hero-side {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  min-width: 0;
  padding: 14px 14px 12px;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.stat strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code-card {
  padding: 13px 14px;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.code-row strong {
  font-family: var(--font-mono);
  font-size: 25px;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}

.code-countdown {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  color: var(--accent);
  background: rgba(122, 162, 255, 0.1);
  border: 1px solid rgba(122, 162, 255, 0.2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.code-card p {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.5;
}

.code-card code {
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 10px;
}

/* Upload */

.upload-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-style: dashed;
  border-width: 1.5px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.upload-card:hover,
.upload-card:focus-visible,
.upload-card.is-dragover {
  border-color: rgba(122, 162, 255, 0.65);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.upload-card.is-dragover {
  transform: scale(1.005);
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.1);
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  color: var(--accent);
  background: linear-gradient(145deg, rgba(122, 162, 255, 0.16), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(122, 162, 255, 0.18);
  border-radius: 16px;
}

.upload-icon svg {
  width: 25px;
  height: 25px;
}

.upload-copy {
  flex: 1;
  min-width: 0;
}

.upload-copy h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.upload-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Section head */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 3px 0 0;
  font-size: 12px;
}

/* Queue */

.queue-card {
  padding: 20px 22px;
}

.queue-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.queue-item {
  display: grid;
  gap: 8px;
  padding: 12px 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.queue-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.queue-file-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--accent);
  background: rgba(122, 162, 255, 0.1);
  border-radius: 10px;
}

.queue-file-icon svg {
  width: 17px;
  height: 17px;
}

.queue-info {
  flex: 1;
  min-width: 0;
}

.queue-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-meta {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.queue-actions {
  display: flex;
  gap: 4px;
}

.queue-actions .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.queue-actions .icon-btn svg {
  width: 14px;
  height: 14px;
}

.queue-bar {
  height: 5px;
  overflow: hidden;
  background: var(--surface-3);
  border-radius: 999px;
}

.queue-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: inherit;
  transition: width 0.18s linear;
}

.queue-item.is-error .queue-bar span {
  background: var(--danger);
}

.queue-item.is-done .queue-bar span {
  background: var(--success);
}

.queue-error {
  color: var(--danger);
  font-size: 11px;
}

/* Files */

.files-card {
  padding: 22px;
}

.files-head {
  margin-bottom: 16px;
}

.files-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  height: 38px;
  padding: 0 30px 0 12px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  font-size: 12px;
  appearance: none;
  cursor: pointer;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 12px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.segment {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  transition: color 0.16s ease, background 0.16s ease;
}

.segment svg {
  width: 15px;
  height: 15px;
}

.segment:hover {
  color: var(--text);
}

.segment.is-active {
  color: var(--text);
  background: var(--surface-3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 11px;
}

.file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.file-card:hover {
  transform: translateY(-2px);
  background: var(--surface-3);
  border-color: var(--border-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.file-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(135deg, #31528f, #5b4aa8 60%, #256d7c);
  border-radius: 11px;
}

.file-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, transparent 0 55%, rgba(255, 255, 255, 0.08) 55% 56%, transparent 56%);
  pointer-events: none;
}

.file-thumb svg {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.25));
}

.file-thumb.kind-image {
  background: linear-gradient(135deg, #2563eb, #7c3aed 60%, #db2777);
}

.file-thumb.kind-video {
  background: linear-gradient(135deg, #0f766e, #0e7490 55%, #4338ca);
}

.file-thumb.kind-audio {
  background: linear-gradient(135deg, #b45309, #be123c 55%, #6d28d9);
}

.file-thumb.kind-pdf {
  background: linear-gradient(135deg, #b91c1c, #e11d48 55%, #7f1d1d);
}

.file-thumb.kind-text {
  background: linear-gradient(135deg, #334155, #475569 55%, #1e293b);
}

.file-thumb.kind-archive {
  background: linear-gradient(135deg, #854d0e, #a16207 55%, #713f12);
}

.file-thumb.kind-file {
  background: linear-gradient(135deg, #1d4ed8, #4f46e5 55%, #0e7490);
}

.file-info {
  min-width: 0;
}

.file-name {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.file-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

.file-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.file-card:hover .file-actions,
.file-card:focus-within .file-actions {
  opacity: 1;
  transform: translateY(0);
}

.file-action {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  color: #fff;
  background: rgba(6, 10, 18, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  transition: background 0.16s ease, transform 0.16s ease;
}

.file-action:hover {
  background: rgba(6, 10, 18, 0.82);
  transform: scale(1.05);
}

.file-action.danger:hover {
  background: rgba(190, 18, 60, 0.85);
}

.file-action svg {
  width: 14px;
  height: 14px;
}

/* List view */

.files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.files-list .file-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
}

.files-list .file-thumb {
  width: 42px;
  height: 42px;
  aspect-ratio: 1;
  border-radius: 10px;
}

.files-list .file-thumb svg {
  width: 19px;
  height: 19px;
}

.files-list .file-actions {
  position: static;
  opacity: 1;
  transform: none;
}

.files-list .file-action {
  color: var(--text-soft);
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
}

.files-list .file-action:hover {
  color: var(--text);
  background: var(--surface-3);
}

.files-list .file-action.danger:hover {
  color: #fff;
  background: var(--danger);
}

.files-list .file-name {
  font-size: 12.5px;
}

/* Empty / skeleton / load more */

.empty-state {
  display: grid;
  justify-items: center;
  padding: 56px 20px 44px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.empty-icon svg {
  width: 29px;
  height: 29px;
}

.empty-state h3 {
  margin: 14px 0 4px;
  font-size: 15px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.skeleton-grid {
  margin-top: 2px;
}

.skeleton-card {
  height: 176px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: linear-gradient(100deg, var(--surface-2) 20%, var(--surface-3) 40%, var(--surface-2) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

.load-more {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

/* Footer */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 4px 0;
  color: var(--faint);
  font-size: 11px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.16s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Preview */

.preview-dialog {
  width: min(1120px, 94vw);
  height: min(86dvh, 900px);
  max-width: none;
  max-height: none;
  padding: 0;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.preview-dialog::backdrop {
  background: rgba(2, 5, 10, 0.7);
  backdrop-filter: blur(8px);
}

.preview-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-solid);
}

.preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.preview-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.preview-icon svg {
  width: 19px;
  height: 19px;
}

.preview-title-wrap h2 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-title-wrap p {
  margin: 1px 0 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.preview-body {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: auto;
  background: #080b12;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.035) 75%);
  background-position: 0 0, 12px 12px;
  background-size: 24px 24px;
}

.preview-body.bg-dark {
  background-color: #05070b;
  background-image: none;
}

.preview-body.bg-light {
  background-color: #eef2f8;
  background-image: none;
}

.preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.18s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.preview-body img.actual {
  max-width: none;
  max-height: none;
  object-fit: none;
}

.preview-body img.fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-body video {
  max-width: 100%;
  max-height: 100%;
  background: #000;
  border-radius: 6px;
}

.preview-body audio {
  width: min(580px, 86%);
}

.preview-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.text-view {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-solid);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.58;
}

.text-gutter {
  min-width: 50px;
  margin: 0;
  padding: 14px 10px;
  overflow: hidden;
  color: var(--faint);
  background: var(--surface-2);
  border-right: 1px solid var(--border);
  text-align: right;
  user-select: none;
  white-space: pre;
}

.text-content {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
  overflow: auto;
  color: var(--text);
  outline: none;
  tab-size: 2;
  white-space: pre;
}

.text-content.wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-loading,
.preview-error {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

.preview-error svg {
  width: 34px;
  height: 34px;
  color: var(--danger);
}

.preview-error p {
  max-width: 420px;
  margin: 0;
  font-size: 12px;
}

.preview-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-solid);
}

.preview-tools:empty {
  display: none;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.tool-btn:hover {
  color: var(--text);
  background: var(--surface-3);
  border-color: var(--border-strong);
}

.tool-btn.is-active {
  color: var(--accent);
  background: rgba(122, 162, 255, 0.1);
  border-color: rgba(122, 162, 255, 0.3);
}

.tool-btn svg {
  width: 14px;
  height: 14px;
}

.tool-sep {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: var(--border);
}

.tool-label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

/* Confirm */

.confirm-dialog {
  padding: 0;
  background: transparent;
  border: 0;
}

.confirm-dialog::backdrop {
  background: rgba(2, 5, 10, 0.65);
  backdrop-filter: blur(7px);
}

.confirm-card {
  width: min(410px, 90vw);
  padding: 24px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.confirm-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 14px;
}

.confirm-icon svg {
  width: 23px;
  height: 23px;
}

.confirm-card h2 {
  margin: 14px 0 5px;
  font-size: 17px;
}

.confirm-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Toasts */

.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: 11px;
  box-shadow: var(--shadow-soft);
  font-size: 12px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 0.25s ease both;
}

.toast.is-success {
  border-left-color: var(--success);
}

.toast.is-error {
  border-left-color: var(--danger);
}

.toast.is-warning {
  border-left-color: var(--warning);
}

.toast.is-leaving {
  animation: toast-out 0.2s ease both;
}

/* Animations */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(20px, 26px, 0) scale(1.06);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shimmer {
  from {
    background-position: 180% 0;
  }
  to {
    background-position: -80% 0;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

/* Responsive */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-side {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }

  .stats {
    height: 100%;
  }

  .search-box {
    width: min(260px, 28vw);
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 0 14px 28px;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }

  .topbar-actions {
    flex: 0 0 auto;
    margin-left: auto;
    justify-content: flex-end;
  }

  .search-box {
    order: 5;
    width: 100%;
    flex: 1 0 100%;
  }

  .brand-text small {
    display: none;
  }

  .workspace {
    gap: 12px;
    margin-top: 14px;
  }

  .hero {
    padding: 22px;
  }

  .hero h1 {
    font-size: clamp(24px, 6.2vw, 28px);
  }

  .hero-lead {
    font-size: 13px;
  }

  .hero-side {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-card {
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px;
  }

  .upload-copy {
    flex: 1 1 calc(100% - 70px);
  }

  .upload-card .btn {
    width: 100%;
  }

  .files-card,
  .queue-card {
    padding: 16px;
  }

  .files-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .files-toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .select-wrap {
    flex: 1;
  }

  .select-wrap select {
    width: 100%;
  }

  .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 8px;
  }

  .file-card {
    padding: 9px;
  }

  .file-thumb {
    aspect-ratio: 4 / 3;
  }

  .file-actions {
    position: static;
    opacity: 1;
    transform: none;
    margin-top: 2px;
    justify-content: flex-end;
  }

  .file-action {
    color: var(--text-soft);
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
  }

  .file-action:hover {
    color: var(--text);
    background: var(--surface-3);
  }

  .files-list .file-card {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .files-list .file-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 16px;
  }

  .preview-dialog {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .preview-head {
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .preview-tools {
    padding: 8px 10px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .preview-head-actions .btn span {
    display: none;
  }

  .preview-head-actions .btn {
    width: 38px;
    padding: 0;
  }

  .text-view {
    font-size: 12px;
  }

  .toast-root {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
  }

  .login-shell {
    padding: 18px;
  }

  .login-card {
    padding: 26px 22px 20px;
  }

  .floating {
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 480px) {
  .brand-mark.small {
    width: 34px;
    height: 34px;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .icon-btn {
    width: 36px;
    height: 36px;
  }

  .topbar-actions .btn-compact {
    height: 36px;
    padding: 0 9px;
  }

  .topbar-actions .btn-compact span {
    display: none;
  }

  .hero {
    padding: 18px;
  }

  .hero-badges {
    gap: 5px;
  }

  .pill {
    height: 26px;
    font-size: 10px;
  }

  .stat strong {
    font-size: 21px;
  }

  .code-row strong {
    font-size: 21px;
  }

  .files-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-name {
    font-size: 12px;
  }

  .file-meta {
    font-size: 10px;
  }

  .file-actions {
    gap: 1px;
  }

  .file-action {
    width: 27px;
    height: 27px;
  }

  .file-action svg {
    width: 13px;
    height: 13px;
  }

  .search-box kbd {
    display: none;
  }

  .login-heading h1 {
    font-size: 26px;
  }

  .totp-input {
    font-size: 23px !important;
  }
}

@media (hover: none) {
  .file-actions {
    opacity: 1;
    transform: none;
  }
}

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

/* Agent documentation */

.doc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px 28px;
}

.doc-topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.doc-shell {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: 0 28px 40px;
}

.doc-hero {
  padding: 36px 0 24px;
}

.doc-hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.doc-hero h1 span {
  color: transparent;
  background: linear-gradient(110deg, var(--accent) 8%, var(--accent-2) 56%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.doc-lead {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.doc-callout {
  margin: 8px 0 18px;
  padding: 14px 16px;
  color: var(--text-soft);
  background: color-mix(in srgb, var(--warning) 7%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 22%, var(--border));
  border-left: 3px solid var(--warning);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.7;
}

.doc-callout strong {
  color: var(--text);
}

.doc-card {
  padding: 8px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.doc-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.doc-section:last-child {
  border-bottom: 0;
}

.doc-section h2 {
  margin: 0 0 12px;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.doc-section h3 {
  margin: 20px 0 8px;
  color: var(--text-soft);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.doc-section p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.doc-section p strong {
  color: var(--text-soft);
}

.doc-section p code,
.doc-section li code,
.doc-table code {
  padding: 1px 5px;
  color: var(--text-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

.doc-code {
  margin: 10px 0 14px;
  padding: 13px 15px;
  overflow-x: auto;
  color: var(--text-soft);
  background: #090e17;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  tab-size: 2;
}

[data-theme="light"] .doc-code {
  color: #243044;
  background: #f5f8fd;
}

.doc-code code {
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
  white-space: pre;
}

.doc-table-wrap {
  margin: 12px 0 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.doc-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 12px;
}

.doc-table th,
.doc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc-table th {
  color: var(--text-soft);
  background: var(--surface-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.doc-table td {
  color: var(--muted);
  line-height: 1.6;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td:first-child {
  color: var(--text-soft);
  white-space: nowrap;
}

.doc-note {
  margin: 14px 0;
  padding: 12px 14px;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-2));
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.7;
}

.doc-note strong {
  color: var(--text-soft);
}

.doc-list {
  margin: 10px 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.doc-list li {
  margin: 4px 0;
}

.doc-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-footer-note {
  padding: 22px 4px 0;
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}

@media (max-width: 760px) {
  .doc-topbar {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .doc-topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .doc-topbar-actions .btn-compact {
    height: 34px;
    padding: 0 10px;
  }

  .doc-shell {
    padding: 0 16px 28px;
  }

  .doc-hero {
    padding: 26px 0 18px;
  }

  .doc-card {
    padding: 4px 18px;
  }

  .doc-section {
    padding: 20px 0;
  }

  .doc-section h2 {
    font-size: 18px;
  }

  .doc-code {
    padding: 11px 12px;
    font-size: 11px;
  }

  .doc-table {
    min-width: 520px;
  }
}
