/* ==========================================================================
   PassOnsite — Authentic LeetCode Light & Dark Design System
   ========================================================================== */
:root,
html[data-theme="light"] {
  --bg: #f7f8fa;
  --ws-bg: #ebedf0;
  --panel: #ffffff;
  --panel-2: #f2f3f5;
  --panel-3: #e6e8ec;
  --row-alt: #f8f9fb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #262626;
  --text-2: #525252;
  --muted: #8c8c8c;
  --brand: #ffa116;
  --brand-soft: rgba(255, 161, 22, 0.14);
  --submit: #2cbb5d;
  --submit-hover: #26a652;
  --submit-ink: #ffffff;
  --accent: #ffa116;
  --accent-ink: #1a1a1a;
  --accent-soft: rgba(255, 161, 22, 0.14);
  --link: #007aff;
  --easy: #00af9b;
  --easy-bg: rgba(0, 175, 155, 0.12);
  --medium: #ffb800;
  --medium-ink: #c98a00;
  --medium-bg: rgba(255, 184, 0, 0.14);
  --hard: #ff2d55;
  --hard-bg: rgba(255, 45, 85, 0.12);
  --ok: #2cbb5d;
  --ok-soft: rgba(44, 187, 93, 0.12);
  --bad: #ef4743;
  --bad-soft: rgba(239, 71, 67, 0.11);
  --warn: #d9822b;
  --warn-soft: rgba(255, 161, 22, 0.14);
  --code-bg: #f5f6f8;
  --editor-bg: #ffffff;
  --editor-gutter: #f9fafb;
  --editor-line: #f3f6fc;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.14);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #1a1a1a;
  --ws-bg: #0f0f0f;
  --panel: #282828;
  --panel-2: #303030;
  --panel-3: #3a3a3a;
  --row-alt: #232323;
  --border: #3d3d3d;
  --border-strong: #505050;
  --text: #eff1f6;
  --text-2: #bdbdbd;
  --muted: #8a8a8a;
  --brand: #ffa116;
  --brand-soft: rgba(255, 161, 22, 0.16);
  --submit: #2cbb5d;
  --submit-hover: #35c966;
  --submit-ink: #ffffff;
  --accent: #ffa116;
  --accent-ink: #1a1a1a;
  --accent-soft: rgba(255, 161, 22, 0.16);
  --link: #4da3ff;
  --easy: #00b8a3;
  --easy-bg: rgba(0, 184, 163, 0.15);
  --medium: #ffc01e;
  --medium-ink: #ffc01e;
  --medium-bg: rgba(255, 192, 30, 0.15);
  --hard: #ff375f;
  --hard-bg: rgba(255, 55, 95, 0.15);
  --ok: #2cbb5d;
  --ok-soft: rgba(44, 187, 93, 0.16);
  --bad: #ff375f;
  --bad-soft: rgba(255, 55, 95, 0.14);
  --warn: #ffc01e;
  --warn-soft: rgba(255, 192, 30, 0.15);
  --code-bg: #1f1f1f;
  --editor-bg: #282828;
  --editor-gutter: #282828;
  --editor-line: #323232;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 38px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.in-workspace { background: var(--ws-bg); overflow: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
code, pre, .mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* ---------- LeetCode Top Navbar ---------- */
.lc-navbar {
  position: sticky; top: 0; z-index: 30;
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--border);
  gap: 12px;
}
body.in-workspace .lc-navbar { background: var(--ws-bg); border-bottom: 0; height: 44px; padding: 4px 10px 0; }
.lc-nav-left, .lc-nav-right, .lc-nav-center { display: flex; align-items: center; gap: 8px; }
.lc-nav-left { min-width: 0; }
.lc-nav-center { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; }
.lc-brand {
  display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 16px;
  color: var(--text); letter-spacing: -0.02em; white-space: nowrap;
}
.lc-brand:hover { text-decoration: none; }
.lc-brand-text span { color: var(--brand); margin-left: 2px; font-weight: 700; }
.lc-navlinks { display: flex; align-items: center; gap: 4px; margin-left: 12px; height: 48px; }
.lc-navlinks a {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  height: 48px; padding: 0 12px; color: var(--text-2); font-size: 14px; font-weight: 500;
  white-space: nowrap; transition: color 0.15s;
}
.lc-navlinks a:hover { color: var(--text); text-decoration: none; }
.lc-navlinks a.active { color: var(--text); font-weight: 600; }
.lc-navlinks a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px;
  background: var(--brand); border-radius: 2px 2px 0 0;
}
.lc-hot-badge {
  font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); line-height: 1.3;
}
.lc-divider { width: 1px; height: 16px; background: var(--border); margin: 0 2px; }
.lc-ws-nav { display: inline-flex; align-items: center; gap: 3px; }
.lc-nav-btn, .lc-icon-nav {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 10px; border-radius: 6px; border: 0;
  background: transparent; color: var(--text-2); cursor: pointer; font-size: 13.5px; font-weight: 500;
  white-space: nowrap; text-decoration: none;
}
.lc-icon-nav { width: 30px; padding: 0; font-size: 17px; }
.lc-nav-btn:hover, .lc-icon-nav:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.lc-icon-nav.disabled { opacity: 0.35; pointer-events: none; }

/* LeetCode Top-Center Run & Submit Cluster */
.lc-run-group {
  display: inline-flex; align-items: center; gap: 2px;
}
.lc-top-run, .lc-top-submit {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
  border: 0; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
}
.lc-top-run {
  background: var(--panel-2); color: var(--text); border-radius: 6px 2px 2px 6px;
}
.lc-top-run:hover:not(:disabled) { background: var(--panel-3); }
.lc-top-submit {
  background: var(--panel-2); color: var(--submit); border-radius: 2px 6px 6px 2px;
}
.lc-top-submit:hover:not(:disabled) { background: rgba(44, 187, 93, 0.18); }
.lc-top-run:disabled, .lc-top-submit:disabled { opacity: 0.55; cursor: default; }
.lc-timer-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 9px;
  margin-left: 6px; border-radius: 6px; border: 0; background: var(--panel-2);
  color: var(--text-2); font: 12.5px ui-monospace, Menlo, monospace; cursor: pointer;
}
.lc-timer-btn:hover { background: var(--panel-3); color: var(--text); }
.lc-timer-btn.active { color: var(--brand); background: var(--brand-soft); }

.lc-pill-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px;
  border-radius: 6px; border: 1px solid var(--border); background: var(--panel-2);
  color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.lc-pill-btn:hover { background: var(--panel-3); color: var(--text); }
.lc-solved-pill {
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap;
}
.lc-runner-pill {
  font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--muted); background: var(--panel-2); white-space: nowrap;
}
.lc-runner-pill.ok { color: var(--ok); border-color: rgba(44, 187, 93, 0.35); background: var(--ok-soft); }
.lc-runner-pill.pyodide { color: var(--easy); border-color: rgba(0, 184, 163, 0.3); background: var(--easy-bg); }
.lc-icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center;
  border-radius: 6px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 15px;
}
.lc-icon-btn:hover { background: var(--panel-2); color: var(--text); }

/* ---------- Slide-Over Problem List Drawer ---------- */
.lc-drawer-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.5);
  display: flex; justify-content: flex-start;
}
.lc-drawer {
  width: min(460px, 92vw); height: 100%; background: var(--panel);
  border-right: 1px solid var(--border); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.lc-drawer-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.lc-drawer-head strong { white-space: nowrap; font-size: 15px; }
.lc-drawer-head .lc-input { flex: 1; height: 32px; }
.lc-drawer-list { flex: 1; overflow-y: auto; padding: 6px 8px; }
.lc-drawer-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px;
  color: var(--text); font-size: 13.5px; text-decoration: none;
}
.lc-drawer-row:hover { background: var(--panel-2); text-decoration: none; }
.lc-drawer-row.current { background: var(--brand-soft); font-weight: 600; }
.lc-drawer-row .d-st { width: 16px; text-align: center; font-weight: 700; flex: none; }
.lc-drawer-row .d-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-drawer-row .d-co { color: var(--muted); font-size: 11.5px; flex: none; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-drawer-row .d-diff { font-size: 12px; font-weight: 600; flex: none; width: 48px; text-align: right; }

/* ---------- Boot / Error ---------- */
.lc-boot { display: grid; place-items: center; min-height: calc(100vh - 60px); color: var(--muted); }
.lc-boot-inner { display: inline-flex; align-items: center; gap: 10px; font-size: 14.5px; }

/* ---------- LeetCode Problemset Page (#/) ---------- */
.lc-page {
  max-width: 1280px; margin: 0 auto; padding: 20px 20px 64px;
}

/* Study Plan Cards Row */
.lc-plans-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.lc-plans-head h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.lc-plans-sub { font-size: 12.5px; color: var(--muted); }
.lc-plans {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px;
}
.lc-plan-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); cursor: pointer; text-align: left;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  box-shadow: var(--shadow);
}
.lc-plan-card:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.lc-plan-card.active {
  border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset;
}
.lc-plan-icon {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff;
}
.lc-plan-icon.p-all { background: linear-gradient(135deg, #ffa116, #ff6b00); }
.lc-plan-icon.p-oai { background: linear-gradient(135deg, #10a37f, #0b6e56); }
.lc-plan-icon.p-oaibank { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.lc-plan-icon.p-frontier { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.lc-plan-icon.p-bigtech { background: linear-gradient(135deg, #f43f5e, #be123c); }
.lc-plan-icon.p-anthropic { background: linear-gradient(135deg, #d97757, #a8492a); }
.lc-plan-icon.p-meta { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.lc-plan-icon.p-google { background: linear-gradient(135deg, #22c55e, #15803d); }
.lc-plan-body { min-width: 0; flex: 1; }
.lc-plan-title { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-plan-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Two-Column LeetCode Problemset Grid */
.lc-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start;
}

/* Topic Tags Strip */
.lc-topics {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.lc-topic-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border-radius: 999px; border: 0; background: var(--panel-2); color: var(--text-2);
  font-size: 12.5px; cursor: pointer; transition: background 0.14s, color 0.14s;
}
.lc-topic-pill span {
  font-size: 11px; color: var(--muted); background: var(--panel); padding: 0 6px; border-radius: 999px;
}
.lc-topic-pill:hover { background: var(--panel-3); color: var(--text); }
.lc-topic-pill.active { background: var(--text); color: var(--bg); font-weight: 600; }
.lc-topic-pill.active span { background: rgba(128, 128, 128, 0.28); color: inherit; }

/* Filter Bar */
.lc-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}
.lc-select, .lc-input {
  height: 34px; padding: 0 11px; border-radius: 7px; border: 1px solid transparent;
  background: var(--panel-2); color: var(--text); font-size: 13px;
  transition: border-color 0.15s, background 0.15s;
}
.lc-select:hover, .lc-input:hover { background: var(--panel-3); }
.lc-select:focus, .lc-input:focus {
  outline: none; border-color: var(--brand); background: var(--panel);
}
.lc-search-wrap {
  position: relative; flex: 1 1 220px; min-width: 190px;
}
.lc-search-wrap .lc-input { width: 100%; padding-left: 32px; }
.lc-search-ic {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px; pointer-events: none;
}
.lc-active-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px;
}
.lc-filter-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 500; border: 0; cursor: pointer;
}
.lc-reset-link {
  background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 2px 6px;
}
.lc-reset-link:hover { color: var(--text); text-decoration: underline; }

/* LeetCode Problem Table */
.lc-table-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; box-shadow: var(--shadow);
}
table.lc-table { width: 100%; border-collapse: collapse; }
.lc-table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  padding: 11px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.lc-table td {
  padding: 11px 12px; vertical-align: middle; font-size: 13.8px;
}
.lc-table tbody tr:nth-child(even) { background: var(--row-alt); }
.lc-table tbody tr { cursor: pointer; transition: background 0.1s; }
.lc-table tbody tr:hover { background: var(--panel-2); }
.lc-table .col-st { width: 42px; text-align: center; }
.lc-table .col-co { width: 130px; }
.lc-table .col-type { width: 105px; }
.lc-table .col-diff { width: 84px; }
.lc-table .col-freq { width: 138px; }

.st-check { font-weight: 700; font-size: 14px; }
.st-check.solved { color: var(--ok); }
.st-check.attempted { color: var(--medium-ink); }

.lc-row-title {
  font-weight: 500; color: var(--text); line-height: 1.38;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.lc-table tbody tr:hover .lc-row-title-txt { color: var(--link); }
.lc-row-sub {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.lc-oai-pill {
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
  background: var(--brand-soft); color: var(--brand);
}
.lc-co-pill {
  display: inline-block; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--text-2);
  font-size: 12px; text-decoration: none;
}
.lc-co-pill:hover { background: var(--panel-3); color: var(--text); text-decoration: none; }
.lc-kind-badge {
  display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11.5px;
  background: var(--panel-2); color: var(--text-2); white-space: nowrap;
}
.lc-kind-badge.k-sql { color: #3b82f6; background: rgba(59, 130, 246, 0.13); }
.lc-kind-badge.k-code { color: var(--easy); background: var(--easy-bg); }
.lc-kind-badge.k-design { color: #a855f7; background: rgba(168, 85, 247, 0.14); }

.diff-Easy { color: var(--easy); font-weight: 500; }
.diff-Medium { color: var(--medium-ink); font-weight: 500; }
.diff-Hard { color: var(--hard); font-weight: 500; }

/* Frequently Asked Badge */
.lc-freq { display: flex; align-items: center; gap: 6px; }
.lc-freq-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500;
  background: var(--brand-soft); color: var(--brand); white-space: nowrap;
}
.lc-freq-muted { font-size: 12px; color: var(--muted); opacity: 0.45; }

.lc-empty { padding: 48px 20px; text-align: center; color: var(--muted); }

/* Pagination */
.lc-pager {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; margin-top: 14px; color: var(--muted); font-size: 13px;
}
.lc-page-btns { display: flex; align-items: center; gap: 4px; }
.lc-page-btn {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 6px; border: 0;
  background: var(--panel); color: var(--text-2); cursor: pointer; font-size: 13px;
  border: 1px solid var(--border);
}
.lc-page-btn:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.lc-page-btn.active { background: var(--panel-3); color: var(--text); font-weight: 700; border-color: var(--brand); }
.lc-page-btn:disabled { opacity: 0.4; cursor: default; }

/* ---------- LeetCode Right Sidebar ---------- */
.lc-side { display: flex; flex-direction: column; gap: 16px; }
.lc-side-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; box-shadow: var(--shadow);
}
.lc-side-title {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; font-size: 14px; margin-bottom: 12px; color: var(--text);
}
.lc-side-title a { font-size: 12px; font-weight: 500; color: var(--muted); }
.lc-progress-box {
  display: flex; align-items: center; gap: 16px;
}
.lc-ring-wrap { position: relative; width: 96px; height: 96px; flex: none; }
.lc-ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.15;
}
.lc-ring-center strong { font-size: 20px; font-weight: 700; color: var(--text); }
.lc-ring-center small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.lc-diff-stats { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lc-diff-row { font-size: 12px; }
.lc-diff-row-top { display: flex; justify-content: space-between; margin-bottom: 3px; }
.lc-diff-bar { height: 5px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.lc-diff-bar > i { display: block; height: 100%; border-radius: 999px; }

.lc-co-cloud {
  display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; max-height: 340px; overflow-y: auto;
}
.lc-co-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 999px; border: 0; background: var(--panel-2); color: var(--text-2);
  font-size: 12px; cursor: pointer; text-decoration: none;
}
.lc-co-tag:hover { background: var(--panel-3); color: var(--text); text-decoration: none; }
.lc-co-tag.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lc-co-tag b {
  background: var(--brand); color: #1a1a1a; border-radius: 999px;
  padding: 0 6px; font-size: 11px; font-weight: 700; line-height: 16px;
}

/* ---------- Companies Directory & Company Hub ---------- */
.lc-co-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px;
}
.lc-co-card {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px 16px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); text-decoration: none; box-shadow: var(--shadow);
  transition: border-color 0.14s, transform 0.14s;
}
.lc-co-card:hover { border-color: var(--brand); transform: translateY(-1px); text-decoration: none; }
.lc-co-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-co-card-name { font-weight: 600; font-size: 15px; }
.lc-co-card-cnt {
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
}
.lc-co-card-sub { font-size: 12px; color: var(--muted); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.breakdowns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0 22px; }
.bd { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.bd-h { font-weight: 600; font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.bd-row { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr 34px; gap: 8px; align-items: center; font-size: 12.5px; padding: 3px 0; }
.bd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.bd-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.bd-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.exps { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.exp { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 0 14px; }
.exp > summary { cursor: pointer; padding: 11px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; list-style: none; }
.exp > summary::-webkit-details-marker { display: none; }
.exp-t { font-weight: 600; }
.exp-m { color: var(--muted); font-size: 12.5px; }
.exp p { margin: 0 0 12px; color: var(--text-2); line-height: 1.7; white-space: pre-line; }

/* ---------- LeetCode Split-Pane Workspace ---------- */
.workspace {
  --left: 48%;
  --console: 36%;
  height: calc(100vh - 44px);
  display: grid; grid-template-columns: var(--left) 8px 1fr;
  padding: 6px 8px 8px; gap: 0; background: var(--ws-bg);
}
.pane {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; min-width: 0; min-height: 0; display: flex; flex-direction: column;
}
.vsplit { cursor: col-resize; position: relative; }
.hsplit { cursor: row-resize; position: relative; height: 8px; }
.vsplit::after, .hsplit::after {
  content: ""; position: absolute; border-radius: 4px; background: var(--border); transition: background 0.15s;
}
.vsplit::after { top: 44%; bottom: 44%; left: 3px; width: 2px; }
.hsplit::after { left: 46%; right: 46%; top: 3px; height: 2px; }
.vsplit:hover::after, .hsplit:hover::after, .dragging::after { background: var(--brand); }
.right-col { display: grid; grid-template-rows: 1fr 8px var(--console); min-height: 0; min-width: 0; }

/* Pane Header Bar (LeetCode Card Tabs) */
.lc-pane-tabs {
  display: flex; align-items: center; gap: 2px; height: 38px; padding: 0 8px;
  background: var(--panel-2); border-bottom: 1px solid var(--border);
  overflow-x: auto; flex: none; scrollbar-width: none;
}
.lc-pane-tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px;
  border: 0; border-radius: 5px; background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--text); background: rgba(128, 128, 128, 0.12); }
.tab.active { color: var(--text); background: var(--panel-3); font-weight: 600; }
.tab-ic { font-size: 13px; opacity: 0.9; }
.tab-body { flex: 1; overflow: auto; padding: 18px 20px 40px; }

/* Problem Description Header (Authentic LeetCode Pills) */
.phead h1 { margin: 0 0 10px; font-size: 21px; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.phead .zh { color: var(--muted); font-size: 13.5px; margin: -4px 0 10px; }
.lc-meta-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; }
.lc-pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--panel-2); color: var(--text-2); text-decoration: none;
}
.lc-pill:hover { text-decoration: none; }
a.lc-pill:hover { background: var(--panel-3); color: var(--text); }
.lc-pill.diff-Easy { color: var(--easy); background: var(--easy-bg); font-weight: 600; }
.lc-pill.diff-Medium { color: var(--medium-ink); background: var(--medium-bg); font-weight: 600; }
.lc-pill.diff-Hard { color: var(--hard); background: var(--hard-bg); font-weight: 600; }
.lc-pill.hot { color: var(--brand); background: var(--brand-soft); }
.lc-pill.solved-badge { color: var(--ok); background: var(--ok-soft); font-weight: 600; }

/* Markdown Content & LeetCode Code Blocks */
.md { font-size: 14.5px; line-height: 1.72; color: var(--text); overflow-wrap: anywhere; }
.md h1, .md h2, .md h3, .md h4 { line-height: 1.38; margin: 20px 0 8px; font-weight: 600; }
.md h3 { font-size: 15.5px; padding-bottom: 5px; border-bottom: 1px solid var(--border); }
.md h4 { font-size: 14.5px; }
.md p { margin: 9px 0; }
.md ul, .md ol { padding-left: 22px; margin: 7px 0; }
.md li { margin: 3px 0; }
.md code {
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 1px 5px; border-radius: 5px; font-size: 12.8px;
}
.md pre {
  position: relative; background: var(--code-bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; margin: 10px 0; overflow-x: auto;
  font-size: 13px; line-height: 1.58;
}
.md pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.code-copy-btn {
  position: absolute; top: 7px; right: 8px; padding: 2px 8px; height: 24px;
  border-radius: 5px; border: 1px solid var(--border); background: var(--panel-2);
  color: var(--muted); font-size: 11.5px; cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
.md pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover { color: var(--text); background: var(--panel-3); }
.md blockquote {
  margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--border-strong);
  background: var(--panel-2); border-radius: 0 6px 6px 0; color: var(--text-2);
}
.md table { border-collapse: collapse; margin: 10px 0; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 11px; text-align: left; vertical-align: top; font-size: 13px; }
.md th { background: var(--panel-2); font-weight: 600; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

/* Client Syntax Highlighter Tokens (Python & SQL) */
html[data-theme="light"] .sh-kw { color: #cf222e; font-weight: 600; }
html[data-theme="light"] .sh-fn { color: #8250df; }
html[data-theme="light"] .sh-str { color: #0a3069; }
html[data-theme="light"] .sh-num { color: #0550ae; }
html[data-theme="light"] .sh-cmt { color: #6e7781; font-style: italic; }
html[data-theme="light"] .sh-dec { color: #953800; }
html[data-theme="dark"] .sh-kw { color: #ff7b72; font-weight: 600; }
html[data-theme="dark"] .sh-fn { color: #d2a8ff; }
html[data-theme="dark"] .sh-str { color: #a5d6ff; }
html[data-theme="dark"] .sh-num { color: #79c0ff; }
html[data-theme="dark"] .sh-cmt { color: #8b949e; font-style: italic; }
html[data-theme="dark"] .sh-dec { color: #ffa657; }

/* LeetCode Bottom Accordions inside Description */
.lc-accordions { margin-top: 24px; border-top: 1px solid var(--border); }
.lc-acc { border-bottom: 1px solid var(--border); }
.lc-acc > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 4px; cursor: pointer; font-weight: 500; font-size: 13.5px; color: var(--text-2);
}
.lc-acc > summary::-webkit-details-marker { display: none; }
.lc-acc > summary:hover { color: var(--text); }
.lc-acc-body { padding: 2px 4px 14px; font-size: 13.5px; color: var(--text-2); }
.tag {
  display: inline-block; font-size: 12px; color: var(--text-2);
  background: var(--panel-2); border-radius: 999px; padding: 2px 10px; margin: 2px 5px 2px 0;
}

/* Step-by-Step Editorial Cards */
.steps-bar { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.steps-bar .spacer { flex: 1; }
.steps-count { color: var(--muted); font-size: 13px; }
.steps-intro {
  border: 1px dashed var(--border-strong); border-radius: 8px; padding: 14px 16px; margin: 0 0 12px;
  background: var(--panel-2); color: var(--text-2); font-size: 13.5px;
}
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.step { border: 1px solid var(--border); border-radius: 8px; background: var(--panel); overflow: hidden; }
.step-h {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; cursor: pointer;
  background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 600; text-align: left;
}
.step-h:hover { background: var(--panel-3); }
.step-n {
  flex: none; width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 700;
}
.step-t { flex: 1; min-width: 0; }
.step-chev { flex: none; color: var(--muted); transition: transform 0.15s; }
.step.collapsed .step-chev { transform: rotate(-90deg); }
.step.collapsed .step-b { display: none; }
.step-b { padding: 6px 14px 8px; border-top: 1px solid var(--border); }
.step-next { margin: 12px 0 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; color: var(--text);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--panel-3); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--submit); border-color: var(--submit); color: var(--submit-ink); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--submit-hover); }
.btn.brand { background: var(--brand); border-color: var(--brand); color: #1a1a1a; font-weight: 600; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--panel-3); color: var(--text); }
.kbd { font: 11px ui-monospace, Menlo, monospace; opacity: 0.7; }

/* Editor Pane */
.toolbar {
  display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px;
  border-bottom: 1px solid var(--border); background: var(--panel-2); flex: none;
}
.toolbar .lang {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  padding: 3px 8px; border-radius: 5px; background: var(--panel-3);
}
.toolbar .spacer { flex: 1; }
.toolbar .autosave { font-size: 11.5px; color: var(--muted); }
.editor-host { flex: 1; min-height: 0; position: relative; background: var(--editor-bg); }
.editor-host > .cm-editor { position: absolute !important; inset: 0; height: auto; }
.editor-host textarea.fallback, .notes-area {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; resize: none; padding: 12px 14px;
  background: var(--editor-bg); color: var(--text); font: 13.5px/1.6 ui-monospace, Menlo, monospace; outline: none; tab-size: 4;
}
.notes-area { font-family: inherit; font-size: 14.5px; line-height: 1.7; }

/* CodeMirror 6 Mobile Token Colors */
html[data-theme="light"] .cm-editor .tok-keyword { color: #cf222e; }
html[data-theme="light"] .cm-editor .tok-definition, html[data-theme="light"] .cm-editor .tok-className { color: #8250df; }
html[data-theme="light"] .cm-editor .tok-string, html[data-theme="light"] .cm-editor .tok-string2 { color: #0a3069; }
html[data-theme="light"] .cm-editor .tok-number, html[data-theme="light"] .cm-editor .tok-bool, html[data-theme="light"] .cm-editor .tok-atom { color: #0550ae; }
html[data-theme="light"] .cm-editor .tok-comment { color: #6e7781; font-style: italic; }
html[data-theme="dark"] .cm-editor .tok-keyword { color: #ff7b72; }
html[data-theme="dark"] .cm-editor .tok-definition, html[data-theme="dark"] .cm-editor .tok-className { color: #d2a8ff; }
html[data-theme="dark"] .cm-editor .tok-string, html[data-theme="dark"] .cm-editor .tok-string2 { color: #a5d6ff; }
html[data-theme="dark"] .cm-editor .tok-number, html[data-theme="dark"] .cm-editor .tok-bool, html[data-theme="dark"] .cm-editor .tok-atom { color: #79c0ff; }
html[data-theme="dark"] .cm-editor .tok-comment { color: #8b949e; font-style: italic; }

/* ---------- LeetCode Console (Testcase / Test Result) ---------- */
.console .tab-body { padding: 14px 16px 24px; }
.verdict { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.verdict .big { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.verdict .rt-pill {
  font-size: 12.5px; color: var(--text-2); background: var(--panel-2);
  padding: 2px 9px; border-radius: 999px;
}
.v-accepted { color: var(--ok); }
.v-wrong_answer, .v-runtime_error, .v-compile_error { color: var(--bad); }
.v-timeout { color: var(--warn); }

.lc-case-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.lc-case-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px;
  border-radius: 6px; border: 1px solid transparent; background: var(--panel-2);
  color: var(--text-2); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.lc-case-pill:hover { background: var(--panel-3); color: var(--text); }
.lc-case-pill.active { background: var(--panel-3); color: var(--text); border-color: var(--border-strong); font-weight: 600; }
.lc-case-dot { width: 6px; height: 6px; border-radius: 50%; }
.lc-case-dot.pass { background: var(--ok); }
.lc-case-dot.fail, .lc-case-dot.error { background: var(--bad); }
.lc-case-dot.timeout { background: var(--warn); }

.lc-case-box {
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px;
}
.lc-case-label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 4px; }
.errbox {
  background: var(--bad-soft); border: 1px solid rgba(255, 55, 95, 0.3); color: var(--text);
  border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; font-size: 12.5px; overflow-x: auto; margin: 8px 0;
}
.outbox {
  background: var(--code-bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
  white-space: pre-wrap; font-size: 12.5px; overflow-x: auto; margin: 6px 0; min-height: 36px;
}
.notice {
  border: 1px solid rgba(255, 192, 30, 0.35); background: var(--warn-soft);
  color: var(--text); border-radius: 8px; padding: 8px 12px; margin: 10px 0 14px; font-size: 13px;
}
.placeholder { color: var(--muted); padding: 16px 4px; font-size: 13.5px; }
.spinner {
  display: inline-block; width: 15px; height: 15px;
  border: 2px solid var(--border-strong); border-top-color: var(--brand);
  border-radius: 50%; animation: spin 0.75s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 9px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 500;
  transition: opacity 0.2s, transform 0.2s; pointer-events: none; z-index: 80; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive (Tablets & Phones) ---------- */
.mtabs { display: none; }
@media (max-width: 1060px) {
  .lc-plans { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .lc-grid { grid-template-columns: 1fr; }
  .lc-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  body.in-workspace { overflow: auto; }
  .lc-nav-center { position: static; transform: none; }
  .lc-runner-pill, .hide-sm { display: none; }
  .lc-table .col-type, .lc-table .col-freq { display: none; }

  .workspace { height: auto; display: flex; flex-direction: column; gap: 8px; padding: 6px; }
  .vsplit, .hsplit { display: none; }
  .right-col { display: flex; flex-direction: column; }
  .workspace > .pane.left, .right-col > .pane { height: calc(100dvh - 110px); }
  .workspace[data-view="left"] .right-col { display: none; }
  .workspace[data-view="editor"] .pane.left, .workspace[data-view="editor"] .pane.console { display: none; }
  .workspace[data-view="console"] .pane.left, .workspace[data-view="console"] .pane.editor { display: none; }
  .mtabs {
    display: flex; gap: 4px; padding: 4px; position: sticky; top: 44px; z-index: 15;
    background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  }
  .mtabs button {
    flex: 1; height: 34px; border: 0; border-radius: 6px; background: none; cursor: pointer;
    color: var(--muted); font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  }
  .mtabs button.active { background: var(--panel-3); color: var(--text); font-weight: 600; }
  .mdot { width: 7px; height: 7px; border-radius: 50%; display: none; }
  .mdot.ok { display: inline-block; background: var(--ok); }
  .mdot.bad { display: inline-block; background: var(--bad); }
}
@media (max-width: 600px) {
  .lc-page { padding: 14px 12px 48px; }
  .lc-table .col-co { display: none; }
  .lc-solved-pill { display: none; }
  .lc-navlinks a { padding: 0 8px; font-size: 13px; }
  .lc-select, .lc-input, .notes-area, .editor-host textarea.fallback { font-size: 16px; }
}
@media (pointer: coarse) {
  .kbd { display: none; }
}

/* ==========================================================================
   Accounts, subscriptions and locked questions (saas.js)
   ========================================================================== */
.saas-nav { display: flex; align-items: center; gap: 6px; }
.saas-nav:empty { display: none; }
.saas-go-pro { color: var(--brand); border-color: rgba(255, 161, 22, 0.45); background: var(--brand-soft); font-weight: 600; }
.saas-go-pro:hover { text-decoration: none; color: var(--brand); background: rgba(255, 161, 22, 0.24); }
.saas-pro-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px;
  background: var(--brand); color: #1a1a1a; font-size: 11px; font-weight: 800; letter-spacing: 0.06em;
}
a.saas-pro-badge:hover { text-decoration: none; }
.saas-mock-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 4px;
  border: 1px dashed var(--border-strong); color: var(--muted);
}
.saas-avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--panel-3); color: var(--text); font-size: 13px; font-weight: 700;
}
.saas-avatar:hover { text-decoration: none; outline: 2px solid var(--brand); }
.saas-lock { font-size: 12px; margin-left: 6px; opacity: 0.75; }

/* Sign-in dialog */
.saas-backdrop {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}
.saas-backdrop[hidden] { display: none; }
.saas-modal {
  position: relative; width: min(400px, 100%); background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; padding: 26px 24px 18px; box-shadow: var(--shadow-lg);
}
.saas-modal h2 { margin: 0 0 6px; font-size: 19px; }
.saas-close { position: absolute; top: 10px; right: 10px; }
.saas-reason { margin: 0 0 16px; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.saas-google { width: 100%; height: 40px; justify-content: center; gap: 10px; font-weight: 600; }
.saas-or { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.saas-or::before, .saas-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.saas-email { display: grid; gap: 8px; }
.saas-email label { font-size: 12.5px; color: var(--text-2); }
.saas-email .lc-input { width: 100%; height: 38px; }
.saas-email .btn { height: 38px; justify-content: center; }
.saas-sent { margin: 12px 0 0; padding: 9px 11px; border-radius: 8px; background: var(--ok-soft); font-size: 13px; }
.saas-fine { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 14px 0 0; }
.saas-mock-note { margin-top: 6px; }

/* Locked question */
.saas-locked { max-width: 860px; }
.saas-crumbs { margin: 0 0 12px; font-size: 13px; }
.saas-tags { margin: -6px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.lc-pill.saas-pill-pro { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.saas-lock-wrap { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--panel); }
.saas-blur {
  padding: 18px 22px; filter: blur(6px); opacity: 0.7; user-select: none; pointer-events: none;
  max-height: 560px; overflow: hidden;
}
.saas-fake-tabs { display: flex; gap: 18px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.saas-fake-tabs .on { color: var(--text); font-weight: 600; }
.saas-lock-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 32px));
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px 22px 16px;
  text-align: center; box-shadow: var(--shadow-lg);
}
.saas-lock-ic { font-size: 28px; line-height: 1; margin-bottom: 8px; }
.saas-lock-card h2 { margin: 0 0 8px; font-size: 18px; }
.saas-lock-card p { margin: 0 0 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.saas-lock-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.saas-lock-actions .btn { height: 36px; padding: 0 14px; }
.saas-lock-card .saas-price-line { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.saas-free-list { margin-top: 22px; }
.saas-free-list h3 { font-size: 15px; margin: 0 0 8px; }
.saas-free-list ul { margin: 0; padding-left: 20px; line-height: 1.9; font-size: 14px; }
.saas-free-list li span { font-size: 12px; margin-left: 6px; }
.saas-co-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 16px; padding: 10px 14px;
  border: 1px solid rgba(255, 161, 22, 0.35); background: var(--brand-soft); border-radius: 8px; font-size: 13.5px;
}
.saas-co-banner .btn { margin-left: auto; }

/* Pricing */
.saas-pricing { max-width: 880px; text-align: center; }
.saas-pricing h1 { font-size: 30px; margin: 18px 0 8px; letter-spacing: -0.02em; }
.saas-lead { color: var(--text-2); font-size: 15px; max-width: 620px; margin: 0 auto 20px; line-height: 1.6; }
.saas-toggle { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); margin-bottom: 20px; }
.saas-toggle button { border: 0; background: none; padding: 6px 14px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-size: 13.5px; }
.saas-toggle button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: var(--shadow); }
.saas-toggle em { font-style: normal; color: var(--ok); font-size: 12px; margin-left: 4px; }
.saas-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.saas-plan { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; }
.saas-plan.pro { border: 2px solid var(--brand); }
.saas-plan h2 { margin: 0; font-size: 16px; color: var(--text-2); }
.saas-price { margin: 8px 0 14px; display: flex; align-items: baseline; gap: 6px; }
.saas-price strong { font-size: 34px; letter-spacing: -0.02em; }
.saas-price span { color: var(--muted); font-size: 14px; }
.saas-plan ul { margin: 0 0 18px; padding-left: 18px; line-height: 1.75; font-size: 14px; flex: 1; }
.saas-wide { width: 100%; height: 40px; justify-content: center; }
.saas-plan > .btn { height: 40px; justify-content: center; }
.saas-current { display: block; text-align: center; padding: 10px; color: var(--muted); font-size: 13.5px; border: 1px dashed var(--border); border-radius: 8px; }
.saas-faq { margin: 30px auto 0; max-width: 680px; text-align: left; }
.saas-faq details { border-bottom: 1px solid var(--border); padding: 12px 2px; }
.saas-faq summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.saas-faq p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }

/* Account and legal pages */
.saas-account, .saas-legal { max-width: 720px; }
.saas-account h1, .saas-legal h1 { font-size: 24px; margin: 10px 0 14px; }
.saas-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.saas-card dl { display: grid; grid-template-columns: 90px 1fr; gap: 10px 14px; margin: 0 0 18px; font-size: 14px; }
.saas-card dt { color: var(--muted); }
.saas-card dd { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.saas-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.saas-actions .btn { height: 36px; padding: 0 14px; }
.notice.saas-ok { border-color: rgba(44, 187, 93, 0.4); background: var(--ok-soft); }
.notice .spinner { vertical-align: -3px; margin-right: 6px; }
.saas-legal .md h3 { margin-top: 22px; }

/* Footer (list pages only) */
.saas-footer { max-width: 1280px; margin: 0 auto; padding: 18px 20px 30px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.saas-footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 6px; }
.saas-footer nav a { color: var(--text-2); }
.saas-footer p { margin: 0; }
body.in-workspace .saas-footer { display: none; }

/* The account buttons need room in the header: drop the less important items first. */
@media (max-width: 1240px) {
  body.saas-on .lc-runner-pill { display: none; }
}
@media (max-width: 1060px) {
  body.saas-on #randomBtn .hide-sm { display: none; }
}
@media (max-width: 900px) {
  .saas-go-pro { padding: 0 8px; }
  .saas-mock-tag { display: none; }
}
@media (max-width: 600px) {
  .saas-plans { grid-template-columns: 1fr; }
  .saas-pricing h1 { font-size: 24px; }
  .saas-lock-card { position: static; transform: none; width: auto; margin: -380px 12px 16px; }
  .saas-blur { max-height: 400px; }
  .saas-co-banner .btn { margin-left: 0; }
  /* Phones: the nav links scroll sideways instead of running under the buttons on the right. */
  .lc-nav-left { flex: 1 1 auto; overflow: hidden; }
  .lc-nav-right { flex: 0 0 auto; gap: 6px; }
  .lc-brand-text { display: none; }
  .lc-navlinks { flex: 1 1 auto; min-width: 0; margin-left: 2px; overflow-x: auto; scrollbar-width: none; }
  .lc-navlinks::-webkit-scrollbar { display: none; }
  .lc-navlinks .lc-hot-badge { display: none; }
  body.saas-on #randomBtn { display: none; }
}

/* Static pages built by seo_build.py (/q/, /p/, /c/, /companies) */
.seo-page { max-width: 860px; margin: 0 auto; padding: 24px 20px 48px; color: var(--text); line-height: 1.6; }
.seo-page h1 { font-size: 26px; margin: 8px 0 6px; }
.seo-page h2 { font-size: 18px; margin: 28px 0 10px; }
.seo-page h3 { font-size: 15px; margin: 6px 0; }
.seo-crumbs, .seo-facts, .seo-muted { color: var(--muted); font-size: 13px; }
.seo-list { padding-left: 20px; }
.seo-list li { margin: 4px 0; }
.seo-cols { columns: 3 220px; }
.seo-pro { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 161, 22, .15); color: #ffa116; }
.seo-locked { padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
.seo-steps > li { margin-bottom: 14px; }
.seo-page pre { overflow-x: auto; }

.seo-lead { color: var(--text-2, var(--text)); }
.seo-more { margin: 12px 0 20px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.seo-more > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.seo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px; margin: 12px 0; }
.seo-stats dt { font-size: 12px; color: var(--muted); }
.seo-stats dd { margin: 2px 0 0; font-size: 13px; }
.seo-faq { margin: 6px 0; }
.seo-faq > summary { cursor: pointer; font-size: 14px; }
.seo-faq > p { margin: 6px 0 10px 16px; font-size: 13.5px; }
.seo-popular { font-size: 12.5px; color: var(--muted); margin: 18px 0 0; line-height: 1.8; }
.lc-boot .seo-popular { text-align: center; margin-top: 28px; }
.seo-intro-app { margin-top: 22px; font-size: 14px; }
.seo-intro-app .seo-lead { margin: 0; color: var(--muted); }
.saas-popular { font-size: 12.5px; }
