/* ═══════════════════════════════════════════
   CatchUp — Design System & Styles
   Premium minimal aesthetic
   ═══════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  /* Palette - Warm sleek light theme */
  --color-bg:         #FAFAF9; /* stone-50 */
  --color-surface:    #FFFFFF;
  --color-surface-alt:#F5F5F4; /* stone-100 */
  --color-border:     #E7E5E4; /* stone-200 */
  --color-border-strong: #D6D3D1; /* stone-300 */

  --color-ink:        #1C1917; /* stone-900 */
  --color-ink-secondary: #57534E; /* stone-600 */
  --color-ink-tertiary:  #706A64; /* readable secondary metadata */

  --color-accent:     #4F46E5; /* indigo-600 */
  --color-accent-hover:#4338CA; /* indigo-700 */
  --color-accent-subtle:#EEF2FF; /* indigo-50 */
  --color-accent-text:#4338CA; /* indigo-700 */

  --color-success:    #059669; /* emerald-600 */
  --color-success-bg: #ECFDF5; /* emerald-50 */
  --color-warning:    #DC2626; /* red-600 */
  --color-warning-bg: #FEF2F2; /* red-50 */
  --color-warning-border:#FECACA; /* red-200 */
  --color-error:      #DC2626; 

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs:   0.75rem;
  --font-size-sm:   0.875rem;
  --font-size-base: 1rem;
  --font-size-md:   1.125rem;
  --font-size-lg:   1.25rem;
  --font-size-xl:   1.75rem;
  --font-size-2xl:  2.5rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Layout */
  --sidebar-width: 260px;
  --content-max: 920px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.04), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--color-ink);
  background-color: var(--color-bg);
  line-height: 1.6;
}

.hidden { display: none !important; }
.recovery-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }

/* ══════════════
   Layout
   ══════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-6);
  margin-bottom: var(--space-4);
}

.brand-icon {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.brand-name {
  font-size: var(--font-size-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.sidebar-nav {
  flex: 1;
  padding: 0 var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-ink-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: all 0.2s var(--ease-out);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover {
  background-color: var(--color-surface-alt);
  color: var(--color-ink);
}

.nav-item.active {
  background-color: var(--color-accent-subtle);
  color: var(--color-accent-text);
  font-weight: 600;
}

.sidebar-footer {
  padding: var(--space-6);
}

.privacy-badge {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-success-bg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(5, 150, 105, 0.1);
}

.privacy-icon-wrapper {
  color: var(--color-success);
  margin-top: 2px;
}

.privacy-icon-wrapper svg {
  width: 16px;
  height: 16px;
}

.privacy-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.privacy-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-success);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.privacy-detail {
  font-size: 0.7rem;
  color: var(--color-success);
  opacity: 0.8;
}

/* ── Mobile Header ── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  align-items: center;
  padding: 0 var(--space-4);
  gap: var(--space-3);
  z-index: 90;
}

.mobile-menu-btn {
  background: none; border: none; cursor: pointer;
  padding: var(--space-2); border-radius: var(--radius-sm);
}
.mobile-menu-btn svg { width: 24px; height: 24px; color: var(--color-ink); }
.mobile-brand { font-weight: 700; font-size: var(--font-size-lg); letter-spacing: -0.02em; }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; backdrop-filter: blur(2px);
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  display: flex;
  justify-content: center;
  padding: var(--space-12) var(--space-8) var(--space-16);
}

.content-wrapper {
  width: 100%;
  min-width: 0;
  max-width: var(--content-max);
}

.page {
  display: none;
  animation: fadeIn 0.4s var(--ease-out);
}
.page.active { display: block; }

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

/* ══════════════
   Page Header
   ══════════════ */
.page-header {
  margin-bottom: var(--space-10);
  max-width: 640px;
}

.header-tags {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.tag-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  background: var(--color-surface-alt);
  color: var(--color-ink-secondary);
  border-radius: 100px;
  border: 1px solid var(--color-border);
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--color-ink);
  margin-bottom: var(--space-4);
}

.page-subtitle {
  font-size: var(--font-size-md);
  color: var(--color-ink-secondary);
  line-height: 1.6;
}

/* ══════════════
   Model Status
   ══════════════ */
.model-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--color-ink-secondary);
  margin-bottom: var(--space-6);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
}

.model-status:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.model-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background-color: var(--color-ink-tertiary);
  transition: all 0.3s var(--ease-out);
}

.model-dot.loading {
  background-color: var(--color-warning);
  animation: pulse 1.5s infinite;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.model-dot.ready {
  background-color: var(--color-success);
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.4);
}

.model-dot.error {
  background-color: var(--color-error);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

.model-dot.preparing {
  background-color: var(--color-accent);
  animation: prepare 2s infinite ease-in-out;
  box-shadow: 0 0 8px rgba(79, 70, 229, 0.4);
}

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(1.1); } }

@keyframes prepare {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

/* ══════════════
   Input Panel
   ══════════════ */
.input-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.input-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
}

.input-panel-header h2 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-ink-secondary);
}

.input-actions { display: flex; gap: var(--space-2); }

/* ── Target User Field ── */
.target-user-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.target-user-field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  transition: all 0.2s var(--ease-out);
}
.target-user-field:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
  background: var(--color-surface);
}

.target-user-icon {
  width: 18px;
  height: 18px;
  color: var(--color-ink-tertiary);
  flex-shrink: 0;
}

.target-user-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  color: var(--color-ink);
  outline: none;
}
.target-user-input::placeholder {
  color: var(--color-ink-tertiary);
}

/* ── Engine Mode Selector ── */
.engine-mode-card {
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.engine-mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.engine-mode-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.engine-mode-icon {
  width: 16px;
  height: 16px;
  color: var(--color-ink-tertiary);
}

.engine-mode-title {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-ink-secondary);
}

.engine-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
  transition: all 0.2s var(--ease-out);
}
.badge-local {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(5, 150, 105, 0.2);
}
.badge-cloud {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  border: 1px solid rgba(79, 70, 229, 0.2);
}
.badge-heuristic {
  background: var(--color-surface-alt);
  color: var(--color-ink-secondary);
  border: 1px solid var(--color-border);
}

.engine-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.engine-option-pill {
  position: relative;
  display: flex;
  cursor: pointer;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  transition: all 0.2s var(--ease-out);
  user-select: none;
}
.engine-option-pill:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  transform: translateY(-1px);
}
.engine-option-pill.active {
  border-color: var(--color-accent);
  background: var(--color-surface);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.mode-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-pill-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.option-pill-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.option-emoji {
  font-size: 14px;
}

.option-label {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-ink);
}

.option-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: auto;
}
.tag-primary {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
}
.tag-api {
  background: #fef3c7;
  color: #b45309;
}
.tag-fast {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.option-sub {
  font-size: 11px;
  color: var(--color-ink-tertiary);
  line-height: 1.5;
}

/* ── Collapsible Cloud API Config Drawer ── */
.cloud-config-drawer {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  animation: fadeIn 0.2s var(--ease-out);
}

.cloud-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.cloud-drawer-title {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--color-ink-secondary);
}

.cloud-key-link {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}
.cloud-key-link:hover {
  text-decoration: underline;
}

.cloud-drawer-inputs {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.cloud-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: min(180px, 100%);
}
.cloud-input-group.flex-2 {
  flex: 2;
  min-width: min(260px, 100%);
}

.cloud-field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-ink-tertiary);
  letter-spacing: 0.05em;
}

.cloud-select, .cloud-text-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  color: var(--color-ink);
  outline: none;
  transition: all 0.2s var(--ease-out);
}
.cloud-select:focus, .cloud-text-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-subtle);
}

.cloud-key-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.cloud-key-input-wrapper .cloud-text-input {
  padding-right: 36px;
}
.key-toggle-btn {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.key-toggle-btn:hover {
  opacity: 1;
}

.cloud-custom-endpoint-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cloud-drawer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
}

.cloud-key-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--color-ink-secondary);
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot-gray { background: var(--color-ink-tertiary); }
.dot-green { background: var(--color-success); box-shadow: 0 0 4px rgba(5, 150, 105, 0.4); }

.cloud-drawer-actions {
  display: flex;
  gap: var(--space-2);
}

.text-danger {
  color: var(--color-error) !important;
}

/* ── Hardware Alert Banner ── */
.hardware-alert-banner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-xs);
  color: #92400e;
}

@media (max-width: 768px) {
  .engine-mode-grid {
    grid-template-columns: 1fr;
  }
}

.target-user-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  color: var(--color-ink-secondary);
}
.target-user-hint svg {
  color: var(--color-ink-tertiary);
  flex-shrink: 0;
}

.textarea-wrapper {
  position: relative;
  background: var(--color-surface);
}

textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  border: none;
  padding: var(--space-6);
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: 1.7;
  color: var(--color-ink);
  background: transparent;
}

textarea::placeholder { color: var(--color-ink-tertiary); }
textarea:focus { outline: none; }

.textarea-overlay {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-6);
  pointer-events: none;
}

.char-count {
  font-size: var(--font-size-xs);
  color: var(--color-ink-tertiary);
  font-weight: 500;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.input-hint {
  font-size: var(--font-size-sm);
  color: var(--color-error);
  font-weight: 500;
}

/* ── Buttons ── */
button { cursor: pointer; font-family: var(--font-sans); }

.text-btn {
  background: none; border: none;
  font-size: var(--font-size-sm); font-weight: 500;
  color: var(--color-ink-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.text-btn:hover { background: var(--color-surface-alt); color: var(--color-ink); }

.primary-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background-color: var(--color-accent); color: #fff;
  border: none; border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-base); font-weight: 600;
  transition: all 0.2s var(--ease-out);
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}
.primary-btn:hover { background-color: var(--color-accent-hover); box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3); transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); box-shadow: none; }
.primary-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

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

.secondary-btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--color-surface); border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm); padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm); font-weight: 600; color: var(--color-ink);
  transition: all 0.2s; box-shadow: var(--shadow-sm);
}
.secondary-btn:hover { background: var(--color-surface-alt); }
.btn-icon-sm { width: 16px; height: 16px; }

/* ══════════════
   Progress Panel
   ══════════════ */
.progress-panel {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-10) var(--space-6);
  text-align: center; box-shadow: var(--shadow-md); margin-top: var(--space-6);
}

.progress-content { max-width: 420px; margin: 0 auto; }

.spinner-wrapper {
  display: inline-flex; justify-content: center; align-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--color-accent-subtle); margin-bottom: var(--space-6);
}

.spinner {
  width: 32px; height: 32px; border: 3px solid var(--color-accent);
  border-top-color: transparent; border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-content h3 { font-size: var(--font-size-lg); font-weight: 700; margin-bottom: var(--space-2); color: var(--color-ink); }
.progress-detail { font-size: var(--font-size-sm); color: var(--color-ink-secondary); margin-bottom: var(--space-6); }

.progress-track { width: 100%; height: 6px; background: var(--color-surface-alt); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--color-accent); border-radius: 3px; transition: width 0.3s var(--ease-out); }

/* ══════════════
   Error Panel
   ══════════════ */
.error-panel { background: var(--color-warning-bg); border: 1px solid var(--color-warning-border); border-radius: var(--radius-lg); padding: var(--space-10) var(--space-6); text-align: center; margin-top: var(--space-6); }
.error-icon svg { width: 40px; height: 40px; color: var(--color-error); margin-bottom: var(--space-4); }
.error-title { font-size: var(--font-size-lg); font-weight: 700; color: var(--color-error); margin-bottom: var(--space-2); }
.error-detail { font-size: var(--font-size-sm); color: var(--color-ink-secondary); margin-bottom: var(--space-6); max-width: 420px; margin-left: auto; margin-right: auto; }

/* ══════════════
   Results Workspace & Bento Layout
   ══════════════ */
.results-workspace { margin-top: var(--space-6); animation: fadeIn 0.4s var(--ease-out); }

.results-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: var(--space-6); padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border);
  gap: var(--space-4); flex-wrap: wrap;
}

.results-title-group {
  display: flex; flex-direction: column; gap: var(--space-1);
}

.results-header h2 {
  font-size: var(--font-size-2xl); font-weight: 800;
  letter-spacing: -0.03em; color: var(--color-ink); line-height: 1.1;
}

.results-subtitle {
  font-size: var(--font-size-xs); font-weight: 500;
  color: var(--color-ink-tertiary); text-transform: uppercase; letter-spacing: 0.05em;
}

.results-actions {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
}

.action-btn-export {
  font-size: var(--font-size-xs); font-weight: 600;
  padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s var(--ease-out);
}
.action-btn-export:hover {
  background: var(--color-accent-subtle); color: var(--color-accent);
  border-color: var(--color-accent);
}
.action-btn-export.copied {
  background: var(--color-success-bg); color: var(--color-success);
  border-color: var(--color-success);
}

/* ── Metric Summary Bar ── */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.metric-pill {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.metric-pill::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.metric-pill:hover::before {
  left: 100%;
}

.metric-pill:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-border-strong);
}

.metric-pill:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

.metric-pill.active {
  border-color: var(--color-accent);
  background: var(--color-accent-subtle);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}

.metric-pill-left {
  display: flex; align-items: center; gap: var(--space-2);
}

.metric-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.metric-needs-you .metric-dot { background: var(--color-warning); box-shadow: 0 0 6px rgba(220, 38, 38, 0.4); }
.metric-actions .metric-dot { background: var(--color-accent); box-shadow: 0 0 6px rgba(79, 70, 229, 0.4); }
.metric-decisions .metric-dot { background: var(--color-success); box-shadow: 0 0 6px rgba(5, 150, 105, 0.4); }
.metric-questions .metric-dot { background: #d97706; box-shadow: 0 0 6px rgba(217, 119, 6, 0.4); }

.metric-label {
  font-size: var(--font-size-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-ink-secondary);
}

.metric-count {
  font-size: var(--font-size-base); font-weight: 800;
  color: var(--color-ink); font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: 100px; background: var(--color-surface-alt);
}

/* ── View Switcher Segmented Control ── */
.view-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  overflow-x: auto;
  scrollbar-width: none;
}
.view-switcher::-webkit-scrollbar { display: none; }

.switcher-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--color-ink-secondary);
  font-family: var(--font-sans);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--ease-out);
  user-select: none;
}
.switcher-tab:hover {
  color: var(--color-ink);
  background: rgba(0,0,0,0.03);
}
.switcher-tab.active {
  background: var(--color-surface);
  color: var(--color-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}
.tab-svg { width: 14px; height: 14px; color: var(--color-ink-tertiary); }
.switcher-tab.active .tab-svg { color: var(--color-accent); }

.tab-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.dot-needs-you { background: var(--color-warning); }
.dot-actions { background: var(--color-accent); }
.dot-decisions { background: var(--color-success); }
.dot-questions { background: #d97706; }

.tab-count-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 100px;
  background: var(--color-surface);
  color: var(--color-ink-secondary);
  border: 1px solid var(--color-border);
}
.switcher-tab.active .tab-count-badge {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  border-color: rgba(79, 70, 229, 0.2);
}

/* ── Results Grid & Multi-View Layouts ── */
.results-grid {
  display: grid;
  gap: var(--space-6);
  transition: all 0.25s var(--ease-out);
}

/* Layout: Overview (2-Column Balanced Dashboard) */
.results-grid.layout-overview {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
}
.results-grid.layout-overview .results-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.results-grid.layout-overview .cards-list {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Layout: Focused Tab Views (Single Category Expanded) */
.results-grid:not(.layout-overview) {
  grid-template-columns: 1fr;
}
.results-grid:not(.layout-overview) .results-col {
  display: contents;
}
.results-grid:not(.layout-overview) .result-section {
  display: none !important;
}
.results-grid.layout-needs-you #section-needs-you,
.results-grid.layout-actions #section-actions,
.results-grid.layout-decisions #section-decisions,
.results-grid.layout-questions #section-questions {
  display: block !important;
  animation: fadeIn 0.2s var(--ease-out);
}
.results-grid:not(.layout-overview) .cards-list {
  max-height: none;
}

@media (max-width: 900px) {
  .results-grid.layout-overview {
    grid-template-columns: 1fr;
  }
}

/* ── Result Sections ── */
.result-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s var(--ease-out);
}
.result-section:hover {
  border-color: var(--color-border-strong);
}

.section-label {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--font-size-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--color-ink-secondary); margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}
.section-svg { width: 16px; height: 16px; color: var(--color-ink-tertiary); }

/* Needs You Section - High Prominence */
.needs-you-section {
  background: var(--color-warning-bg);
  border-color: var(--color-warning-border);
}
.needs-you-section .section-label {
  color: var(--color-warning);
  border-bottom-color: rgba(220, 38, 38, 0.15);
}
.needs-you-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-warning); color: #fff; font-size: 11px; font-weight: 800;
}

/* ── Finding Cards ── */
.cards-list {
  display: flex; flex-direction: column; gap: var(--space-3);
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-strong) transparent;
}
.cards-list::-webkit-scrollbar { width: 5px; }
.cards-list::-webkit-scrollbar-track { background: transparent; }
.cards-list::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: 4px;
}
.cards-list::-webkit-scrollbar-thumb:hover {
  background: var(--color-ink-tertiary);
}

.finding-card {
  flex-shrink: 0; /* Keep wrapped confirmations inside each scrollable card. */
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.finding-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(79, 70, 229, 0.03) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease-out;
  pointer-events: none;
}

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

.finding-card:hover::after {
  opacity: 1;
}

.finding-card.selected {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-subtle);
}

/* Section Specific Left Border Accents */
.needs-you-section .finding-card {
  border-left: 3.5px solid var(--color-warning);
  background: #fff;
}
.actions-section .finding-card {
  border-left: 3.5px solid var(--color-accent);
}
.decisions-section .finding-card {
  border-left: 3.5px solid var(--color-success);
}
.questions-section .finding-card {
  border-left: 3.5px solid #d97706;
}

.decisions-section .section-label { color: var(--color-success); }
.questions-section .section-label { color: #d97706; }
.actions-section .section-label { color: var(--color-accent); }

/* Action Items Checkbox & Completed State */
.task-card-wrapper {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.task-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--color-accent);
  border-radius: 4px;
  flex-shrink: 0;
}

.task-card-content {
  flex: 1;
  min-width: 0;
}

.finding-card.completed {
  background: var(--color-surface-alt);
}
.finding-card.completed .finding-text {
  text-decoration: line-through;
  color: var(--color-ink-tertiary);
}

.finding-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.finding-text {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-ink);
  line-height: 1.65;
  margin-bottom: var(--space-2);
}

.finding-owner {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--font-size-xs); color: var(--color-accent-text); font-weight: 600;
  background: var(--color-accent-subtle); border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 2px 8px; border-radius: 100px; white-space: nowrap; flex-shrink: 0;
}

.finding-meta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
  font-size: var(--font-size-xs);
}

.finding-quote {
  font-size: var(--font-size-xs);
  color: var(--color-ink-tertiary);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.finding-ref {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono, monospace);
  color: var(--color-ink-tertiary);
  white-space: nowrap;
  margin-left: auto;
}

/* ── Summary List ── */
.summary-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.summary-list { list-style: none; padding: 0; }
.summary-list li {
  position: relative; padding: var(--space-3) 0 var(--space-3) var(--space-6);
  font-size: var(--font-size-md); color: var(--color-ink);
  border-bottom: 1px solid var(--color-border); line-height: 1.6;
}
.summary-list li:last-child { border-bottom: none; padding-bottom: 0; }
.summary-list li:first-child { padding-top: 0; }
.summary-list li::before {
  content: ''; position: absolute; left: 4px; top: 22px; width: 6px; height: 6px;
  border-radius: 50%; background-color: var(--color-accent);
}

/* ══════════════
   About Page
   ══════════════ */
.about-content { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.about-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-sm);
  display: flex; gap: var(--space-4); align-items: flex-start;
}
.about-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--color-accent-subtle); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.about-icon svg { width: 24px; height: 24px; }
.about-card h3 { font-size: var(--font-size-md); font-weight: 700; margin-bottom: var(--space-2); color: var(--color-ink); }
.about-card p, .about-card ol { color: var(--color-ink-secondary); font-size: var(--font-size-sm); line-height: 1.6; }
.about-card ol { padding-left: var(--space-5); }
.about-card ol li { margin-bottom: var(--space-2); }

/* ══════════════
   Responsive
   ══════════════ */
@media (max-width: 1024px) {
  :root { --sidebar-width: 220px; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s var(--ease-out); }
  .sidebar.open { transform: translateX(0); }
  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding: calc(60px + var(--space-6)) var(--space-4) var(--space-8); }
  
  .page-title { font-size: 2rem; }
  .results-header { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
  
  .input-panel-header { flex-direction: column; align-items: flex-start; gap: var(--space-3); }
  .input-footer { flex-direction: column; align-items: stretch; gap: var(--space-4); }
  .primary-btn { justify-content: center; }
  
  .finding-meta { flex-direction: column; gap: var(--space-2); }
  .about-card { flex-direction: column; }
}

/* ── File Drop Zone ── */
.file-drop-zone {
  background-color: var(--color-surface-alt);
  border: 1.5px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  cursor: pointer;
  margin-bottom: var(--space-4);
  transition: all 0.2s var(--ease-out);
}
.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--color-accent);
  background-color: var(--color-accent-subtle);
  transform: translateY(-1px);
}
.drop-icon {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.drop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.drop-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-ink);
}
.drop-subtitle {
  font-size: var(--font-size-xs);
  color: var(--color-ink-tertiary);
}

/* ── Privacy Note ── */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.privacy-note {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--color-success);
  font-weight: 500;
  background: var(--color-success-bg);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Small refinements to the original workspace: readable details and safe reflow. */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.target-user-input, .cloud-select, .cloud-text-input,
.results-col, .result-section, .finding-header-row, .finding-text,
.option-pill-content, .engine-option-pill, .footer-left { min-width: 0; }
.page-subtitle, .finding-text, .summary-list li, .error-detail,
.privacy-note, .hardware-alert-text, .cloud-key-status { overflow-wrap: anywhere; }
.engine-mode-header, .cloud-drawer-header, .cloud-drawer-footer,
.finding-header-row, .finding-meta { flex-wrap: wrap; }
.cloud-drawer-footer { gap: var(--space-3); }
.option-pill-top { flex-wrap: wrap; }
.option-label { overflow-wrap: anywhere; }
.engine-option-pill:focus-within { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.finding-text { flex: 1 1 160px; }
.finding-owner { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.finding-quote { white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
.finding-ref { white-space: normal; overflow-wrap: anywhere; font-size: 12px; }
.finding-meta { row-gap: var(--space-2); }
.finding-meta .finding-ref:first-child { margin-left: 0; }
.summary-list li::before { top: calc(var(--space-3) + .65em); }
.summary-list li:first-child::before { top: .65em; }
.results-grid.layout-overview .cards-list { padding: 3px; }
.view-switcher { flex-wrap: wrap; overflow-x: visible; }
.switcher-tab { padding: 9px 12px; }
.input-panel-header, .results-actions, .input-actions { flex-wrap: wrap; }

@media (min-width: 769px) and (max-width: 1100px) {
  .engine-mode-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .results-grid.layout-overview { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { width: min(var(--sidebar-width), calc(100vw - 56px)); }
  .finding-meta { flex-direction: row; justify-content: flex-start; }
  .results-grid.layout-overview .cards-list { max-height: none; overflow-y: visible; }
  .results-actions { width: 100%; }
  .cloud-drawer-actions { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .input-panel-header, .target-user-row, .input-footer,
  .result-section, .summary-section { padding: var(--space-4); }
  .engine-mode-card { padding: var(--space-4); }
  .file-drop-zone { padding: var(--space-3) var(--space-4); }
  .cloud-config-drawer { padding: var(--space-3); }
  .cloud-input-group, .cloud-input-group.flex-2 { flex-basis: 100%; min-width: 0; }
  .metrics-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .metric-pill { padding: var(--space-3); }
  .metric-pill-left { gap: 6px; min-width: 0; }
  .metric-label { font-size: 11px; }
  .metric-count { padding: 1px 6px; }
  .results-header h2 { font-size: 2rem; }
  .results-actions > button { flex: 1 1 auto; padding: 10px 12px; }
  .finding-header-row { gap: var(--space-2); }
  .finding-ref { margin-left: 0; }
  .summary-list li { font-size: var(--font-size-base); }
  .target-user-input, .cloud-select, .cloud-text-input, #conversation-input { font-size: 16px; }
}
@media (pointer: coarse) {
  .text-btn, .secondary-btn, .primary-btn, .switcher-tab, .mobile-menu-btn { min-height: 44px; }
  .task-checkbox { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Saved catch-ups extend the existing card and sidebar styles. */
.sidebar-nav { overflow-y: auto; min-height: 0; }
.sidebar { height: 100dvh; }
.sidebar-brand, .sidebar-footer { flex-shrink: 0; }
.nav-item .tab-count-badge { margin-left: auto; }
.recent-section { margin-top: var(--space-6); padding: 0 var(--space-3); }
.recent-section h2 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-ink-secondary); margin-bottom: var(--space-2); }
.recent-catchup { display: block; width: 100%; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-ink-secondary); font: inherit; font-size: 12px; text-align: left; padding: 9px 6px; cursor: pointer; overflow-wrap: anywhere; }
.recent-catchup:hover, .recent-catchup[aria-current=true] { background: var(--color-accent-subtle); color: var(--color-accent-text); }
.recent-section .library-empty { padding: 0; font-size: 12px; background: transparent; border: 0; }
.library-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-4); }
.library-search { font-size: 12px; color: var(--color-ink-secondary); display: flex; flex-direction: column; gap: 6px; flex: 1; max-width: 420px; min-width: 0; }
.library-search input, .catchup-dialog input { width: 100%; min-width: 0; border: 1px solid var(--color-border-strong); background: var(--color-surface); border-radius: var(--radius-sm); padding: 10px 12px; font: inherit; color: var(--color-ink); }
.library-views { display: flex; gap: var(--space-2); }
.library-views [aria-pressed=true] { color: var(--color-accent-text); border-color: var(--color-accent); background: var(--color-accent-subtle); }
.library-storage-note, .library-feedback, .save-report-status { font-size: 12px; color: var(--color-ink-secondary); overflow-wrap: anywhere; }
.library-feedback { margin: var(--space-3) 0; }
.save-report-status { margin: 0 0 var(--space-4); }
.library-list { display: flex; flex-direction: column; gap: var(--space-3); }
.saved-catchup-card, .library-empty { padding: var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.saved-catchup-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.saved-catchup-body { min-width: 0; flex: 1 1 260px; }
.saved-catchup-card h2 { font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; margin-bottom: 6px; }
.saved-catchup-card p, .library-empty { font-size: 12px; color: var(--color-ink-secondary); }
.saved-catchup-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.catchup-dialog { margin: auto; padding: var(--space-6); width: min(480px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); color: var(--color-ink); background: var(--color-surface); box-shadow: var(--shadow-lg); font-family: var(--font-sans); }
.catchup-dialog::backdrop { background: rgba(0,0,0,.4); }
.catchup-dialog h2 { font-size: 20px; margin-bottom: var(--space-3); }
.catchup-dialog p { font-size: 13px; margin-bottom: var(--space-4); color: var(--color-ink-secondary); overflow-wrap: anywhere; }
.catchup-dialog label { display: block; font-size: 13px; margin-bottom: 6px; }
.catchup-dialog .input-hint { color: var(--color-error); margin-top: var(--space-2); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-5); }
#report-heading { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .library-search { flex-basis: 100%; }
  .library-search input, .catchup-dialog input { font-size: 16px; }
  .saved-catchup-card { padding: var(--space-4); }
  .saved-catchup-actions { width: 100%; }
  .saved-catchup-actions button { flex: 1 1 auto; }
  .dialog-actions { flex-wrap: wrap; }
}

/* Sidebar collapse: give the workspace its width back, keep reopening obvious. */
.sidebar-brand { gap: var(--space-2); padding-right: var(--space-3); }
.sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-ink-secondary); cursor: pointer; }
.sidebar-toggle:hover { background: var(--color-accent-subtle); color: var(--color-accent-text); }
.sidebar-toggle svg { width: 20px; height: 20px; }
#sidebar-collapse-btn { margin-left: auto; }
.sidebar-reopen { position: fixed; top: 16px; left: 16px; z-index: 80; box-shadow: var(--shadow-sm); }
@media (min-width: 769px) {
  .sidebar { transition: transform .2s var(--ease-out); }
  .main-content { transition: margin-left .2s var(--ease-out); }
  .sidebar-collapsed .sidebar { transform: translateX(-100%); }
  .sidebar-collapsed .main-content { margin-left: 0; padding-top: 76px; }
}
@media (pointer: coarse) { .sidebar-toggle { width: 44px; height: 44px; } }
