/* ============================================
   Dewx Guide — Design System
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Brand */
  --brand: #5bbec9;
  --brand-dark: #4aabb7;
  --brand-light: #7dd3db;
  --brand-subtle: rgba(91, 190, 201, 0.1);
  --violet: #8b5cf6;
  --violet-subtle: rgba(139, 92, 246, 0.1);
  --success: #34c759;
  --warning: #ff9500;
  --error: #ff3b30;
  --success-subtle: rgba(52, 199, 89, 0.1);
  --warning-subtle: rgba(255, 149, 0, 0.1);
  --error-subtle: rgba(255, 59, 48, 0.1);

  /* Hub colors */
  --hub-gtm: #5bbec9;
  --hub-cx: #8b5cf6;
  --hub-ops: #ff9500;
  --hub-dew: #34c759;
  --hub-mydew: #ff6b9d;
  --hub-auth: #6366f1;
  --hub-settings: #94a3b8;
  --hub-corelink: #f59e0b;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Sizing */
  --sidebar-width: 280px;
  --header-height: 56px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;

  /* Transitions */
  --transition: 150ms ease;
  --transition-slow: 300ms ease;
}

/* Dark theme (default) */
[data-theme='dark'] {
  --bg: #0f1117;
  --bg-elevated: #161822;
  --bg-card: #1c1e2e;
  --bg-hover: #252840;
  --bg-active: #2d3154;
  --border: #2a2d3e;
  --border-subtle: #1f2233;
  --text: #e8e9ed;
  --text-secondary: #9ba1b0;
  --text-muted: #6b7280;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
  --code-bg: #1a1c2a;
  --scrollbar-thumb: #3a3d50;
  --scrollbar-track: transparent;
  --kbd-bg: #2a2d3e;
  --kbd-border: #3a3d50;
  --search-highlight: rgba(91, 190, 201, 0.2);
}

/* Light theme */
[data-theme='light'] {
  --bg: #f8f9fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f5;
  --bg-active: #e8ebf0;
  --border: #e2e5ea;
  --border-subtle: #f0f1f4;
  --text: #1a1d26;
  --text-secondary: #5a6070;
  --text-muted: #8b919e;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);
  --code-bg: #f4f5f7;
  --scrollbar-thumb: #c8ccd4;
  --scrollbar-track: transparent;
  --kbd-bg: #e8ebf0;
  --kbd-border: #d0d4dc;
  --search-highlight: rgba(91, 190, 201, 0.15);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --- Sidebar --- */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-slow);
}

.sidebar-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.mobile-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* Search */
.sidebar-search {
  padding: 12px 16px;
  flex-shrink: 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 8px 40px 8px 34px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition);
}

.search-input-wrapper input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-subtle);
}

.search-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-kbd {
  position: absolute;
  right: 8px;
  font-family: var(--font-sans);
  font-size: 11px;
  padding: 1px 5px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 4px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Progress */
.sidebar-progress {
  padding: 0 16px 12px;
  flex-shrink: 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-bar {
  height: 4px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--violet));
  border-radius: 2px;
  transition: width var(--transition-slow);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 16px;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  user-select: none;
  transition: background var(--transition);
}

.nav-section-header:hover {
  background: var(--bg-hover);
}

.nav-section-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.nav-section-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  color: white;
  flex-shrink: 0;
}

.nav-section-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav-section.collapsed .nav-section-chevron {
  transform: rotate(-90deg);
}

.nav-section.collapsed .nav-items {
  display: none;
}

.nav-section-progress {
  width: 28px;
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  flex-shrink: 0;
}

.nav-items {
  padding-left: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 28px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--brand-subtle);
  color: var(--brand);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  background: var(--brand);
  border-radius: 2px;
}

.nav-item-check {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0;
}

.nav-item-check.checked {
  opacity: 1;
  color: var(--success);
}

.nav-item-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.theme-toggle,
.export-btn,
.print-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover,
.export-btn:hover,
.print-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.theme-toggle {
  padding: 6px 8px;
}

[data-theme='dark'] .icon-sun {
  display: block;
}
[data-theme='dark'] .icon-moon {
  display: none;
}
[data-theme='light'] .icon-sun {
  display: none;
}
[data-theme='light'] .icon-moon {
  display: block;
}

/* --- Main Content --- */
.main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: var(--header-height);
  align-items: center;
  gap: 12px;
}

.hamburger,
.mobile-search-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.mobile-title {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
}

.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 32px;
}

/* --- Landing Page --- */
.landing-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.landing-logo {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.landing-hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--brand), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.landing-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.landing-search {
  max-width: 500px;
  margin: 0 auto;
}

.search-input-wrapper.large input {
  padding: 12px 16px 12px 44px;
  font-size: 15px;
  border-radius: var(--radius);
}

.search-input-wrapper.large .search-icon {
  left: 14px;
}

/* Hub grid */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 40px 0;
}

.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.hub-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--hub-color);
}

.hub-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.hub-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.hub-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.hub-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hub-card-count {
  font-size: 12px;
  color: var(--text-muted);
}

.hub-card-progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
}

/* Shortcuts card */
.shortcuts-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 40px 0 0;
}

.shortcuts-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}

.shortcut kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 4px;
  color: var(--text-muted);
  min-width: 24px;
  text-align: center;
}

/* --- Feature Detail --- */
.feature-detail {
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.feature-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.feature-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.feature-breadcrumb a:hover {
  color: var(--brand);
}

.feature-breadcrumb .sep {
  color: var(--border);
}

.feature-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.feature-title-area {
  flex: 1;
}

.feature-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.feature-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.feature-hub-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  color: white;
}

.feature-path {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--code-bg);
  padding: 2px 8px;
  border-radius: 4px;
}

.feature-open-link {
  font-size: 12px;
  color: var(--brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.feature-open-link:hover {
  text-decoration: underline;
}

.feature-open-link.beta {
  color: var(--violet);
}

/* Nav buttons */
.feature-nav {
  display: flex;
  gap: 8px;
}

.feature-nav-btn {
  padding: 6px 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.feature-nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* Sections */
.feature-section {
  margin-bottom: 28px;
}

.feature-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feature-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Screenshot placeholder */
.screenshot-placeholder {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin: 20px 0;
  background: var(--bg);
}

.screenshot-placeholder svg {
  display: block;
  margin: 0 auto 8px;
}

/* Steps */
.steps-list {
  counter-reset: step;
  list-style: none;
}

.step {
  counter-increment: step;
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-subtle);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  padding-top: 3px;
}

.step-text {
  font-size: 14px;
  color: var(--text);
}

.step-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* Tips box */
.tips-box {
  background: var(--brand-subtle);
  border: 1px solid rgba(91, 190, 201, 0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.tips-box-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tips-list {
  list-style: none;
}

.tips-list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: 16px;
  position: relative;
}

.tips-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--brand);
}

/* Checklist */
.checklist {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.checklist-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-progress {
  font-size: 12px;
  color: var(--text-muted);
}

.checklist-progress .done {
  color: var(--success);
  font-weight: 600;
}

.checklist-items {
  list-style: none;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 13px;
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item:hover {
  background: var(--bg-hover);
}

.checklist-item input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition);
}

.checklist-item input[type='checkbox']:checked {
  background: var(--success);
  border-color: var(--success);
}

.checklist-item input[type='checkbox']:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checklist-item.checked .checklist-item-text {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Related features */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.related-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all var(--transition);
}

.related-link:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: var(--brand);
}

.related-link-icon {
  font-size: 16px;
  flex-shrink: 0;
}

/* --- Search Modal --- */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.search-modal.open {
  display: flex;
}

.search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.search-modal-content {
  position: relative;
  width: 90%;
  max-width: 560px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modalIn 150ms ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-modal-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.search-modal-input-wrapper svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-modal-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 16px;
  font-family: var(--font-sans);
}

.search-modal-input-wrapper input::placeholder {
  color: var(--text-muted);
}

.search-modal-input-wrapper kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 4px;
  color: var(--text-muted);
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.search-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.search-result-item:hover,
.search-result-item.focused {
  background: var(--bg-hover);
}

.search-result-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

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

.search-result-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.search-result-name mark {
  background: var(--search-highlight);
  color: var(--brand);
  border-radius: 2px;
  padding: 0 1px;
}

.search-result-path {
  font-size: 12px;
  color: var(--text-muted);
}

.search-result-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  color: white;
  flex-shrink: 0;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  color: var(--text);
  z-index: 300;
  transform: translateY(100px);
  opacity: 0;
  transition: all var(--transition-slow);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 90;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .mobile-close {
    display: flex;
  }

  .main {
    margin-left: 0;
  }

  .mobile-header {
    display: flex;
  }

  .content {
    padding: 20px 16px;
  }

  .landing-hero {
    padding: 20px 0;
  }

  .landing-hero h1 {
    font-size: 24px;
  }

  .landing-stats {
    gap: 24px;
  }

  .stat-value {
    font-size: 24px;
  }

  .hub-grid {
    grid-template-columns: 1fr;
  }

  .feature-header {
    flex-direction: column;
  }

  .feature-nav {
    align-self: flex-end;
  }

  .search-modal {
    padding-top: 20px;
  }

  .search-modal-content {
    width: 95%;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .shortcuts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .sidebar-footer {
    flex-wrap: wrap;
  }

  .landing-stats {
    flex-direction: column;
    gap: 12px;
  }
}

/* --- Print --- */
@media print {
  body {
    background: white;
    color: #1a1a1a;
  }

  .sidebar,
  .mobile-header,
  .sidebar-overlay,
  .search-modal,
  .toast,
  .feature-nav,
  .shortcuts-card,
  .feature-open-link,
  .theme-toggle,
  .export-btn,
  .print-btn {
    display: none !important;
  }

  .main {
    margin-left: 0;
  }

  .content {
    max-width: 100%;
    padding: 20px;
  }

  .feature-detail {
    page-break-inside: avoid;
  }

  .checklist-item {
    page-break-inside: avoid;
  }

  .hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hub-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .checklist {
    border: 1px solid #ddd;
  }

  .tips-box {
    border: 1px solid #5bbec9;
    background: #f0fafb;
  }

  a {
    color: #5bbec9;
  }
}

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

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}
