/* ===================================================
   DesktopPage — style.css
   =================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:           #0d0f14;
  --bg-surface:   #13161e;
  --bg-elevated:  #1a1d27;
  --bg-hover:     #21253a;
  --border:       rgba(255,255,255,0.07);
  --border-focus: rgba(108, 99, 255, 0.6);
  --accent:       #6c63ff;
  --accent-glow:  rgba(108, 99, 255, 0.35);
  --accent-dim:   rgba(108, 99, 255, 0.15);
  --text-primary: #f0f2ff;
  --text-secondary: #8890b0;
  --text-muted:   #4a5070;
  --success:      #3ecf8e;
  --danger:       #ff5c5c;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --shadow:       0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow:  0 0 40px rgba(108,99,255,0.2);
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --transition:   0.2s ease;
}

html { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ──────────────────────────────────── */

.bg-blur {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(108,99,255,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(62,207,142,0.07) 0%, transparent 55%),
    var(--bg);
  pointer-events: none;
}

/* ── Header ──────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 60px;
  background: rgba(13,15,20,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--accent));
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.header-nav {
  display: flex;
  gap: 6px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.nav-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--accent-dim);
  border-color: var(--border-focus);
  color: var(--accent);
}

/* ── Main Layout ─────────────────────────────────── */

.main-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

main {
  position: relative;
  z-index: 1;
}

/* ── Search Section ──────────────────────────────── */

.search-section {
  text-align: center;
  margin-bottom: 48px;
}

.greeting {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 28px;
  line-height: 1.1;
}

.search-form {
  max-width: 640px;
  margin: 0 auto;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 8px 6px 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow), 0 0 0 3px var(--accent-dim);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 12px;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  caret-color: var(--accent);
}

.search-box input::placeholder { color: var(--text-muted); }

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.search-btn:hover {
  background: #7d76ff;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.05);
}

.search-btn svg { width: 18px; height: 18px; }

/* ── Widgets Row ─────────────────────────────────── */

.widgets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
  min-height: 0;
}

.widgets-row:empty { display: none; }

/* Widget card base (widgets adopt this) */
.widget-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: var(--shadow);
  min-width: 180px;
}

/* ── Panel ───────────────────────────────────────── */

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.panel.hidden { display: none; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.panel-header h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 8px;
}

/* ── Buttons ─────────────────────────────────────── */

.btn-add {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--accent-dim);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-add svg { width: 14px; height: 14px; }

.btn-add:hover {
  background: rgba(108,99,255,0.28);
  box-shadow: 0 0 18px var(--accent-glow);
}

.btn-primary {
  padding: 10px 22px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: #7d76ff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-secondary {
  padding: 10px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ── Shortcuts Grid ──────────────────────────────── */

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
}

.shortcut-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition);
  overflow: hidden;
}

.shortcut-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition);
  background: var(--card-accent-bg, var(--accent-dim));
}

.shortcut-card:hover {
  border-color: var(--card-accent-border, var(--border-focus));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.shortcut-card:hover::before { opacity: 1; }

.shortcut-favicon {
  position: relative;
  z-index: 1;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.shortcut-favicon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.shortcut-name {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shortcut-edit-btn,
.shortcut-delete-btn {
  position: absolute;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 2;
}

.shortcut-edit-btn {
  right: 32px;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.shortcut-delete-btn {
  right: 6px;
  background: rgba(255,92,92,0.15);
  color: var(--danger);
}

.shortcut-edit-btn svg,
.shortcut-delete-btn svg { width: 11px; height: 11px; }

.shortcut-card:hover .shortcut-edit-btn,
.shortcut-card:hover .shortcut-delete-btn { opacity: 1; }

.shortcuts-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Notes Layout ────────────────────────────────── */

.notes-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  height: 560px;
}

.notes-list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.notes-list::-webkit-scrollbar { width: 4px; }
.notes-list::-webkit-scrollbar-track { background: transparent; }
.notes-list::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 4px; }

.note-item {
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.note-item:hover { background: var(--bg-hover); border-color: rgba(255,255,255,0.12); }

.note-item.active {
  background: var(--accent-dim);
  border-color: var(--border-focus);
}

.note-item-title {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-format-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.note-format-badge.md { background: rgba(108,99,255,0.2); color: var(--accent); }

.note-editor {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.note-editor-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
}

.note-editor-empty svg { width: 48px; height: 48px; opacity: 0.4; }

.note-editor-active {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.note-editor-active.hidden { display: none; }

.note-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

#note-title-input {
  flex: 1;
  min-width: 150px;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  caret-color: var(--accent);
}

#note-title-input::placeholder { color: var(--text-muted); }

.note-format-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.format-btn {
  padding: 6px 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.format-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.note-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-preview,
.btn-save-note {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-preview {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-preview:hover { color: var(--text-primary); }
.btn-preview svg { width: 14px; height: 14px; }

.btn-save-note {
  background: var(--accent);
  border: none;
  color: #fff;
}

.btn-save-note:hover { background: #7d76ff; }
.btn-save-note svg { width: 13px; height: 13px; }

.btn-delete-note {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,92,92,0.1);
  border: 1px solid rgba(255,92,92,0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-delete-note:hover { background: rgba(255,92,92,0.25); }
.btn-delete-note svg { width: 14px; height: 14px; }

.note-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#note-content-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 20px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  resize: none;
  caret-color: var(--accent);
}

#note-content-input::placeholder { color: var(--text-muted); }

.note-preview {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

.note-preview.hidden { display: none; }

/* Markdown preview styles */
.note-preview h1, .note-preview h2, .note-preview h3 {
  font-weight: 600;
  margin: 1em 0 0.5em;
  letter-spacing: -0.02em;
}
.note-preview h1 { font-size: 1.6em; }
.note-preview h2 { font-size: 1.3em; }
.note-preview h3 { font-size: 1.1em; }
.note-preview p { margin-bottom: 0.75em; }
.note-preview ul, .note-preview ol { margin: 0.5em 0 0.75em 1.5em; }
.note-preview li { margin-bottom: 0.25em; }
.note-preview code {
  background: var(--bg-hover);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.9em;
  color: #e8a87c;
}
.note-preview pre {
  background: var(--bg-hover);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 0.75em 0;
}
.note-preview pre code { background: none; padding: 0; }
.note-preview blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--text-secondary);
  margin: 0.75em 0;
}
.note-preview a { color: var(--accent); text-decoration: underline; }
.note-preview strong { font-weight: 600; }
.note-preview em { font-style: italic; }
.note-preview hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5em 0;
}

/* ── Widgets Manager ─────────────────────────────── */

.widgets-manager {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.widget-toggle-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

.widget-toggle-card.enabled { border-color: rgba(108,99,255,0.4); }

.widget-toggle-icon {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-hover);
  border-radius: 12px;
  flex-shrink: 0;
}

.widget-toggle-info {
  flex: 1;
  min-width: 0;
}

.widget-toggle-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.widget-toggle-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--transition);
}

.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all var(--transition);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-track::after {
  left: calc(100% - 19px);
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Modal ───────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}

.modal-overlay.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.modal-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.modal-close svg { width: 14px; height: 14px; }

.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-body label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 10px;
}

.modal-body label:first-child { margin-top: 0; }

.modal-body input[type="text"],
.modal-body input[type="url"] {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  caret-color: var(--accent);
}

.modal-body input[type="text"]:focus,
.modal-body input[type="url"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.modal-body input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 4px 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 18px 24px 22px;
  border-top: 1px solid var(--border);
}

/* ── Toast ───────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: rgba(62,207,142,0.4); color: var(--success); }
.toast.error   { border-color: rgba(255,92,92,0.4);  color: var(--danger); }

/* ── Footer ─────────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 24px 28px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Help Page ──────────────────────────────────── */

.help-hero {
  text-align: center;
  padding: 64px 24px 56px;
  max-width: 760px;
  margin: 0 auto;
}

.help-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-focus);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.help-hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #f0f2ff 40%, #6c63ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.help-hero p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto 32px;
}

.help-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.help-hero-cta:hover {
  background: #7d76ff;
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-1px);
}

.help-reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto 56px;
  padding: 0 24px;
}

.reason-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  transition: border-color var(--transition), transform var(--transition);
}

.reason-card:hover {
  border-color: rgba(108,99,255,0.35);
  transform: translateY(-2px);
}

.reason-icon {
  font-size: 26px;
  margin-bottom: 14px;
  display: block;
}

.reason-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.reason-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.help-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.help-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
}

.help-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.help-section-header:hover { background: var(--bg-elevated); }

.help-section-header-icon {
  font-size: 22px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}

.help-section-header-text { flex: 1; }

.help-section-header-text h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.help-section-header-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

.help-section-chevron {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.help-section.open .help-section-chevron {
  transform: rotate(180deg);
}

.help-section-body {
  display: none;
  padding: 0 28px 28px;
  border-top: 1px solid var(--border);
}

.help-section.open .help-section-body { display: block; }

.help-section-body p,
.help-section-body li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.help-section-body p { margin-bottom: 12px; }
.help-section-body p:last-child { margin-bottom: 0; }

.help-section-body ul,
.help-section-body ol {
  margin: 10px 0 14px 20px;
}

.help-section-body li { margin-bottom: 6px; }

.help-section-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.help-section-body .tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(108,99,255,0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.help-section-body .tip-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.help-section-body .kbd {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 5px;
  font-family: 'Cascadia Code', 'Fira Code', monospace;
  font-size: 12px;
  color: var(--accent);
  box-shadow: 0 2px 0 rgba(0,0,0,0.4);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--border-focus);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text { font-size: 14px; color: var(--text-secondary); line-height: 1.65; }
.step-text strong { color: var(--text-primary); }

.code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 14px 0;
  overflow-x: auto;
}

.code-block pre {
  font-family: 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: 12.5px;
  line-height: 1.7;
  color: #c9d1f0;
  white-space: pre;
}

.code-block .cm { color: #5c6690; }
.code-block .kw { color: #c678dd; }
.code-block .fn { color: #61aeee; }
.code-block .st { color: #98c379; }
.code-block .nu { color: #e8a87c; }
.code-block .ob { color: #abb2bf; }

.privacy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.privacy-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.privacy-item-icon { font-size: 18px; flex-shrink: 0; }

.faq-list { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  user-select: none;
}

.faq-q svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.open .faq-q svg { transform: rotate(180deg); }

.faq-a {
  display: none;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-bottom: 16px;
}

.faq-item.open .faq-a { display: block; }

/* ── Scrollbars ──────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Responsive ──────────────────────────────────── */

@media (max-width: 768px) {
  .site-header { padding: 0 16px; }
  .nav-btn span { display: none; }
  .main-content { padding: 32px 16px 60px; }
  .notes-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
  .notes-list { max-height: 200px; }
  .note-editor { min-height: 400px; }
  .panel { padding: 20px 18px; }
}

@media (max-width: 600px) {
  .help-section-header { padding: 18px 18px; }
  .help-section-body   { padding: 0 18px 22px; }
  .help-hero h1        { font-size: 28px; }
}
