:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-track: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Header & Top Bar */
.app-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
  flex-shrink: 0;
  cursor: pointer;
}
.brand-icon:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.brand-icon svg,
.brand-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 55%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  user-select: none;
}

.project-title-input,
.card-title-input {
  background: transparent;
  border: 1px dashed transparent;
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  max-width: 320px;
}
.project-title-input:hover,
.project-title-input:focus,
.card-title-input:hover,
.card-title-input:focus {
  border-color: var(--primary);
  background: #f1f5f9;
  outline: none;
}

/* Help button in header */
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  color: #2563eb;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.15);
  transition: all 0.2s ease;
  user-select: none;
  margin-left: 0.35rem;
}

.help-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px) scale(1.08);
}

/* Help Popup Modal (Hover over screen) */
.help-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4.5rem 1rem 2rem 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.help-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.help-popup-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(-16px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.help-modal-backdrop.open .help-popup-card {
  transform: translateY(0) scale(1);
}

.help-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  background: linear-gradient(90deg, #eff6ff, #f8fafc);
  border-bottom: 1px solid var(--border-color);
}

.help-popup-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.help-popup-body {
  padding: 1.25rem 1.4rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.help-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: background 0.15s, border-color 0.15s;
}

.help-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.help-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.help-item strong {
  display: block;
  font-size: 0.875rem;
  color: #0f172a;
  margin-bottom: 0.15rem;
}

.help-item p {
  margin: 0;
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

.help-popup-footer {
  padding: 1rem 1.4rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.help-demo-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
}

/* Controls Bar */
.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.preset-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.date-range-group {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  gap: 0.5rem;
  font-size: 0.85rem;
}

.date-range-group label {
  color: var(--text-muted);
  font-weight: 600;
}

.date-range-group input[type="date"] {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
}
.date-range-group input[type="date"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
  background: #ffffff;
}

.date-separator {
  color: var(--text-dim);
  font-weight: 700;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.btn-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}
.btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

/* Burger Menu Dropdown */
.burger-dropdown-container {
  position: relative;
  display: inline-block;
}

.burger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.75rem;
  font-size: 1.15rem;
  line-height: 1;
}

.burger-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  padding: 0.35rem;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  z-index: 1050;
  animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.burger-dropdown-menu.open {
  display: flex;
}

.burger-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  gap: 0.6rem;
}

.burger-menu-item:hover,
.burger-menu-item:focus {
  background: #eff6ff;
  color: var(--primary);
  outline: none;
}

.burger-menu-item .menu-item-icon {
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.burger-menu-item .menu-item-text {
  flex: 1;
}

.burger-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.3rem 0.25rem;
}

.menu-shortcut {
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  margin-left: auto;
}

/* Language selector in burger menu */
.burger-menu-lang-row {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.65rem;
  gap: 0.5rem;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-top: 0.2rem;
}

.burger-menu-lang-row .lang-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.burger-menu-lang-row .lang-select {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.burger-menu-lang-row .lang-select:focus,
.burger-menu-lang-row .lang-select:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.burger-menu-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.65rem 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  margin-top: 0.2rem;
}

.burger-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.burger-footer-brand svg {
  border-radius: 4px;
}

.burger-footer-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.675rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Active file indicator badge */
.active-file-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.775rem;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow-sm);
}

.active-file-indicator .file-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Autogem toggle checkbox in header */
.autogem-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.autogem-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}

.autogem-toggle input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
  margin: 0;
}

.autogem-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* Save status badge */
.save-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-dim);
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
}
.status-dot.saving {
  background: var(--warning);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
  animation: pulse 1s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Main Container */
.app-main {
  flex: 1;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Breadcrumbs bar */
.breadcrumb-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.breadcrumbs-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.breadcrumb-link:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

.breadcrumb-item.active .breadcrumb-link {
  color: var(--primary);
  font-weight: 700;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  pointer-events: none;
}

.breadcrumb-separator {
  color: var(--text-dim);
}

.breadcrumb-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Help banner / instructions */
.instruction-banner {
  background: linear-gradient(90deg, #eff6ff, #f5f3ff);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: #1e40af;
  box-shadow: var(--shadow-sm);
}

.instruction-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.chip kbd {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.75rem;
}

/* Timeline Cards and Levels */
.timeline-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  transition: border-color 0.3s;
}

.timeline-card.sub-level {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.08);
}

.timeline-card.level-1 {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.08);
}

.timeline-card.level-2 {
  border-color: #93c5fd;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.08);
}

.timeline-card.level-3 {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.08);
}

.timeline-card.level-4 {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 8px 25px rgba(22, 163, 74, 0.08);
}

.timeline-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.timeline-card-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.level-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.level-badge.sub {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.level-badge.level-1 {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}
.level-badge.level-2 {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.level-badge.level-3 {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
.level-badge.level-4 {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

/* Inline Card Date Range Inputs */
.card-date-range-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}
.card-date-range-group label {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.725rem;
}
.card-date-input {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  font-size: 0.75rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.card-date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}
.card-days-badge {
  font-size: 0.725rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 0.2rem;
  white-space: nowrap;
}

.timeline-range-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Header zoom controls widget */
.timeline-zoom-group {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.1rem 0.25rem;
  gap: 0.2rem;
  user-select: none;
}
.btn-zoom {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.15s ease;
}
.btn-zoom:hover:not(:disabled) {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn-zoom:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.zoom-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  min-width: 38px;
  text-align: center;
  transition: all 0.15s ease;
}
.zoom-badge:hover {
  background: #ffffff;
  color: var(--primary);
}

/* Scrollable container for timeline zoom */
.timeline-scroll-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border-radius: var(--radius-md);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

/* Custom styled horizontal scrollbar */
.timeline-scroll-container::-webkit-scrollbar {
  height: 9px;
}
.timeline-scroll-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 9999px;
  margin: 0 0.5rem;
}
.timeline-scroll-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
  border: 2px solid #f1f5f9;
}
.timeline-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* The Timeline Visual Component */
.timeline-wrapper {
  position: relative;
  user-select: none;
  padding: 3.25rem 1.75rem 5.5rem 1.75rem;
  box-sizing: border-box;
}

/* Ruler & Axis */
.timeline-ruler {
  position: relative;
  height: 52px;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border-color);
}

.ruler-tick {
  position: absolute;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.ruler-tick.year {
  height: 44px;
}
.ruler-tick.quarter {
  height: 36px;
}
.ruler-tick.month {
  height: 26px;
}
.ruler-tick.week {
  height: 18px;
}
.ruler-tick.day {
  height: 10px;
}

.ruler-tick-line {
  width: 1px;
  height: 100%;
  background: var(--border-light);
}

.ruler-tick.year .ruler-tick-line {
  width: 3px;
  background: #2563eb;
  border-radius: 2px;
}

.ruler-tick.quarter .ruler-tick-line {
  width: 2px;
  background: #7c3aed;
}

.ruler-tick.month .ruler-tick-line {
  background: #94a3b8;
}

.ruler-tick-label {
  position: absolute;
  top: -24px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
}

.ruler-tick.year .ruler-tick-label {
  color: #1e3a8a;
  font-weight: 800;
  font-size: 0.85rem;
  top: -28px;
  background: #dbeafe;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
}

.ruler-tick.quarter .ruler-tick-label {
  color: #6d28d9;
  font-weight: 700;
  top: -24px;
}

.ruler-tick.month .ruler-tick-label {
  color: #475569;
}

/* Circular Day Badge for Uger & Dage niveau */
.ruler-tick.day .day-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}
.ruler-tick.day.weekend .day-circle {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
}
.ruler-tick.day:hover .day-circle {
  border-color: #2563eb;
  color: #2563eb;
  transform: scale(1.15);
}

/* Today indicator line */
.today-line {
  position: absolute;
  top: 0;
  bottom: -40px;
  width: 2px;
  background: #ef4444;
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
}
.today-badge {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* Timeline Track */
.timeline-track-container {
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
}

.timeline-track {
  position: absolute;
  left: 0;
  right: 0;
  height: 14px;
  background: var(--bg-track);
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  cursor: crosshair;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.timeline-track:hover {
  border-color: var(--primary);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 0 0 3px var(--primary-glow);
}

/* Boundary resize handles */
.boundary-handle {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 38px;
  transform: translateY(-50%);
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: 6px;
  cursor: ew-resize;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  transition: transform 0.1s, background-color 0.2s;
}
.boundary-handle::after {
  content: "⋮";
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: bold;
  line-height: 1;
}
.boundary-handle:hover,
.boundary-handle.dragging {
  background: var(--primary);
  transform: translateY(-50%) scale(1.15);
}
.boundary-handle:hover::after,
.boundary-handle.dragging::after {
  color: #fff;
}
.boundary-handle.start-handle {
  left: 0;
  transform: translate(-50%, -50%);
}
.boundary-handle.start-handle:hover,
.boundary-handle.start-handle.dragging {
  transform: translate(-50%, -50%) scale(1.15);
}
.boundary-handle.end-handle {
  right: 0;
  transform: translate(50%, -50%);
}
.boundary-handle.end-handle:hover,
.boundary-handle.end-handle.dragging {
  transform: translate(50%, -50%) scale(1.15);
}

.boundary-label {
  position: absolute;
  top: 44px;
  font-size: 0.725rem;
  font-weight: 700;
  white-space: nowrap;
  color: #1e293b;
  background: #ffffff;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  pointer-events: none;
}
.start-handle .boundary-label {
  left: 50%;
  transform: translateX(-50%);
}
.end-handle .boundary-label {
  right: 50%;
  transform: translateX(50%);
}

/* Timeline Markers / Points */
.timeline-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  cursor: grab;
  transition: transform 0.15s ease-out;
}
.timeline-point.dragging {
  cursor: grabbing !important;
  z-index: 50;
  transform: translate(-50%, -50%) scale(1.12);
}

.point-node {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: var(--primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(37, 99, 235, 0.25);
  position: relative;
  z-index: 2;
  transition: all 0.2s ease;
}
.timeline-point:hover .point-node {
  transform: scale(1.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), 0 0 0 5px rgba(37, 99, 235, 0.35);
}

.timeline-point.active .point-node,
.timeline-point.selected .point-node {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 7px #7c3aed, 0 4px 14px rgba(124, 58, 237, 0.4);
  border-color: #ffffff;
  transform: scale(1.2);
}

/* På Uger & Dage niveau fremhæves cirklen om punkterne */
.timeline-card.level-2 .point-node {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px rgba(37, 99, 235, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.timeline-card.level-2 .timeline-point:hover .point-node {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 7px rgba(37, 99, 235, 0.5), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.timeline-card.level-3 .point-node,
.timeline-card.level-4 .point-node {
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #16a34a, 0 3px 8px rgba(22, 163, 74, 0.35);
}
.timeline-card.level-3 .timeline-point:hover .point-node,
.timeline-card.level-3 .timeline-point.selected .point-node,
.timeline-card.level-4 .timeline-point:hover .point-node,
.timeline-card.level-4 .timeline-point.selected .point-node {
  box-shadow: 0 0 0 4px #ffffff, 0 0 0 8px #15803d, 0 4px 12px rgba(21, 128, 61, 0.45);
}

/* Point label & badge */
.point-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.8rem;
  box-shadow: var(--shadow-md);
  min-width: 140px;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  white-space: nowrap;
  pointer-events: auto;
  z-index: 3;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Multi-tier staggering for clustered point cards */
.timeline-point.pos-top .point-card,
.timeline-point.pos-top.tier-0 .point-card {
  bottom: 26px;
}
.timeline-point.pos-top.tier-1 .point-card {
  bottom: 88px;
}
.timeline-point.pos-top.tier-2 .point-card {
  bottom: 150px;
}
.timeline-point.pos-top.tier-3 .point-card {
  bottom: 212px;
}
.timeline-point.pos-top.tier-4 .point-card {
  bottom: 274px;
}

.timeline-point.pos-bottom .point-card,
.timeline-point.pos-bottom.tier-0 .point-card {
  top: 26px;
}
.timeline-point.pos-bottom.tier-1 .point-card {
  top: 88px;
}
.timeline-point.pos-bottom.tier-2 .point-card {
  top: 150px;
}
.timeline-point.pos-bottom.tier-3 .point-card {
  top: 212px;
}
.timeline-point.pos-bottom.tier-4 .point-card {
  top: 274px;
}

/* Connecting stem from point node to point card */
.point-stem {
  position: absolute;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #cbd5e1;
  pointer-events: none;
  z-index: 1;
  transition: background-color 0.15s ease, width 0.15s ease;
}

.timeline-point.pos-top .point-stem,
.timeline-point.pos-top.tier-0 .point-stem {
  bottom: 11px;
  height: 15px;
}
.timeline-point.pos-top.tier-1 .point-stem {
  bottom: 11px;
  height: 77px;
}
.timeline-point.pos-top.tier-2 .point-stem {
  bottom: 11px;
  height: 139px;
}
.timeline-point.pos-top.tier-3 .point-stem {
  bottom: 11px;
  height: 201px;
}
.timeline-point.pos-top.tier-4 .point-stem {
  bottom: 11px;
  height: 263px;
}

.timeline-point.pos-bottom .point-stem,
.timeline-point.pos-bottom.tier-0 .point-stem {
  top: 11px;
  height: 15px;
}
.timeline-point.pos-bottom.tier-1 .point-stem {
  top: 11px;
  height: 77px;
}
.timeline-point.pos-bottom.tier-2 .point-stem {
  top: 11px;
  height: 139px;
}
.timeline-point.pos-bottom.tier-3 .point-stem {
  top: 11px;
  height: 201px;
}
.timeline-point.pos-bottom.tier-4 .point-stem {
  top: 11px;
  height: 263px;
}

.timeline-point:hover {
  z-index: 60;
}
.timeline-point:hover .point-stem,
.timeline-point.active .point-stem,
.timeline-point.selected .point-stem {
  background: var(--stem-color, var(--primary));
  width: 2px;
}

.timeline-point:hover .point-card {
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.point-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
}

.point-edit-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  opacity: 0.65;
  flex-shrink: 0;
}
.point-edit-btn:hover {
  opacity: 1;
  background: #e2e8f0;
  transform: scale(1.2);
}

.point-card-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
}

.point-children-badge {
  font-size: 0.65rem;
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ddd6fe;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-weight: 600;
}

/* Segment Highlight Between Points */
.timeline-segment-highlight {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.12), rgba(37, 99, 235, 0.16));
  border-top: 2px solid #7c3aed;
  border-bottom: 2px solid #7c3aed;
  pointer-events: none;
  z-index: 4;
  border-radius: 4px;
}

/* Unfold Visual Connector lines */
.unfold-connector {
  position: relative;
  height: 30px;
  margin: -1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.unfold-connector-line {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 2px dashed #7c3aed;
  border-right: 2px dashed #7c3aed;
  background: rgba(124, 58, 237, 0.04);
}

/* Point Modal & Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(15px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s;
}
.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Color Picker */
.color-options {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.25rem;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
}
.color-swatch:hover {
  transform: scale(1.15);
}
.color-swatch.selected {
  border-color: #0f172a;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  transform: scale(1.15);
}

.modal-drilldown-box {
  background: #f5f3ff;
  border: 1px dashed #c4b5fd;
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.modal-drilldown-box p {
  font-size: 0.8rem;
  color: #5b21b6;
}

.modal-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.modal-footer-right {
  display: flex;
  gap: 0.75rem;
}

/* Bottom Floating Action Panel / Points table toggle */
.overview-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.points-table-container {
  overflow-x: auto;
}

.points-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  text-align: left;
}
.points-table th {
  padding: 0.75rem 0.85rem;
  color: var(--text-dim);
  border-bottom: 2px solid var(--border-color);
  background: #f8fafc;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
}
.points-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}
.points-table tr:hover td {
  background: #f8fafc;
}

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translateY(20px);
  opacity: 0;
  animation: toastIn 0.25s forwards, toastOut 0.25s 2.75s forwards;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.info { border-left: 4px solid var(--primary); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.error { border-left: 4px solid var(--danger); }

@keyframes toastIn {
  to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
  to { transform: translateY(-10px); opacity: 0; }
}

/* Custom Confirmation & Prompt Modal Dialog */
.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.confirm-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 450px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(14px) scale(0.96);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.confirm-modal-backdrop.open .confirm-modal-card {
  transform: translateY(0) scale(1);
}

.confirm-modal-header {
  padding: 1.15rem 1.4rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.confirm-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.confirm-modal-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.confirm-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.confirm-modal-body {
  padding: 1.35rem 1.4rem;
  color: #334155;
  font-size: 0.925rem;
  line-height: 1.55;
  background: #ffffff;
}
.confirm-modal-message {
  margin: 0;
  word-break: break-word;
}

.confirm-modal-prompt-wrap {
  margin-top: 1rem;
}
.confirm-modal-prompt-wrap .form-control {
  width: 100%;
  box-sizing: border-box;
}

.confirm-modal-footer {
  padding: 0.95rem 1.4rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
  }
  .header-controls {
    justify-content: space-between;
  }
  .app-main {
    padding: 1rem;
  }
  .instruction-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   Guide & FAQ Sektion (Strømlinet & Spiseligt SaaS-Design)
   ========================================================================== */
.guide-faq-section {
  margin-top: 3.5rem;
  padding: 3rem 1.5rem 3rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  color: var(--text-color);
}

.guide-faq-container {
  max-width: 1200px;
  margin: 0 auto;
}

.guide-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.guide-header-left {
  flex: 1;
  min-width: 280px;
}

.guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.6rem;
}

.guide-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.guide-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem 0;
}

.guide-lead {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
  max-width: 820px;
}

.btn-toggle-guide {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
}

.btn-toggle-guide:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-toggle-guide .toggle-icon {
  font-size: 1rem;
  line-height: 1;
  font-weight: 700;
}

.guide-collapsible-body {
  transition: opacity 0.25s ease, max-height 0.35s ease;
  overflow: hidden;
}

.guide-collapsible-body.collapsed {
  display: none;
}

/* Feature Cards Grid */
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.feature-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.icon-zoom {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #dbeafe;
}

.icon-drag {
  background: #ecfeff;
  color: #0891b2;
  border: 1px solid #cffafe;
}

.icon-excel {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #dcfce7;
}

.icon-privacy {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid #ede9fe;
}

.feature-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.45rem;
}

.feature-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.pill-blue { background: #eff6ff; color: #1d4ed8; }
.pill-cyan { background: #ecfeff; color: #0e7490; }
.pill-emerald { background: #f0fdf4; color: #15803d; }
.pill-violet { background: #f5f3ff; color: #6d28d9; }

.feature-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.feature-card-desc {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

/* Interaktiv FAQ Accordion */
.faq-card-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.faq-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.85rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.faq-main-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.faq-sub-text {
  font-size: 0.8rem;
  color: #94a3b8;
}

.faq-accordion-list {
  display: flex;
  flex-direction: column;
}

.faq-accordion-item {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.85rem 0;
}

.faq-accordion-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  user-select: none;
  padding: 0.2rem 0;
  gap: 1rem;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
  transition: color 0.15s ease;
}

.faq-accordion-item:hover .faq-question {
  color: #2563eb;
}

.faq-chevron {
  font-size: 0.95rem;
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

details[open] .faq-chevron {
  transform: rotate(180deg);
  color: #2563eb;
}

.faq-content {
  padding: 0.65rem 0 0.25rem;
}

.faq-content p {
  font-size: 0.87rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.faq-content code {
  background: #f1f5f9;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: #0f172a;
}

/* ==========================================================================
   Lovpligtig Professionel Sidefod (Legal Footer)
   ========================================================================== */
.site-legal-footer {
  background: #0f172a;
  color: #f8fafc;
  padding: 3.5rem 1.5rem 2rem;
  border-top: 1px solid #1e293b;
  margin-top: 0;
}

.legal-footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.legal-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.3fr 1.3fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.brand-col .footer-brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.footer-mini-logo {
  flex-shrink: 0;
}

.footer-brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.footer-brand-slogan {
  font-size: 0.86rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0 0 1.25rem 0;
  max-width: 320px;
}

.footer-compliance-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.compliance-pill {
  font-size: 0.72rem;
  font-weight: 600;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.footer-col-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin: 0 0 1.1rem 0;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-list li {
  margin-bottom: 0.65rem;
}

.footer-nav-list a,
.legal-trigger-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.86rem;
  color: #cbd5e1;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  display: inline-block;
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-nav-list a:hover,
.legal-trigger-btn:hover {
  color: #38bdf8;
  transform: translateX(2px);
}

.footer-contact-box {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.6;
}

.footer-contact-box p {
  margin: 0 0 0.4rem 0;
}

.footer-contact-box strong {
  color: #e2e8f0;
}

.footer-contact-box a {
  color: #38bdf8;
  text-decoration: none;
}

.footer-contact-box a:hover {
  text-decoration: underline;
}

/* Bottom Legal Bar */
.legal-bottom-bar {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: #64748b;
}

.legal-bottom-copy {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.legal-sep {
  color: #334155;
}

.legal-bottom-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.legal-bottom-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
}

.legal-bottom-btn:hover {
  color: #38bdf8;
}

/* ==========================================================================
   Dedikeret Juridisk Modal Dialog (Lovpligtige oplysninger)
   ========================================================================== */
.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3500;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.legal-modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.legal-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: legalModalSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes legalModalSlideIn {
  from {
    transform: translateY(20px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.legal-modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.legal-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.legal-modal-icon {
  font-size: 1.35rem;
}

.legal-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.legal-tabs-bar {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.4rem 1.25rem 0;
  overflow-x: auto;
  gap: 0.35rem;
}

.legal-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.legal-tab-btn:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.5);
}

.legal-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  border-color: #e2e8f0;
  font-weight: 700;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.02);
}

.legal-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.6;
}

.legal-tab-panel {
  display: none;
}

.legal-tab-panel.active {
  display: block;
  animation: legalFadeIn 0.2s ease;
}

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

.legal-tab-panel h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.6rem 0;
}

.legal-lead-text {
  font-size: 0.92rem;
  color: #64748b;
  border-left: 3px solid #2563eb;
  padding-left: 0.85rem;
  margin: 0 0 1.35rem 0;
}

.legal-tab-panel h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin: 1.25rem 0 0.4rem 0;
}

.legal-tab-panel p {
  margin: 0 0 0.85rem 0;
}

.legal-bullet-list {
  padding-left: 1.25rem;
  margin: 0 0 1rem 0;
}

.legal-bullet-list li {
  margin-bottom: 0.4rem;
}

.legal-info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.legal-info-table th,
.legal-info-table td {
  padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0;
  text-align: left;
}

.legal-info-table th {
  background: #f8fafc;
  color: #0f172a;
  width: 32%;
  font-weight: 600;
}

.legal-info-table td {
  color: #334155;
}

.legal-modal-footer {
  padding: 0.9rem 1.75rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

/* Responsive Footer */
@media (max-width: 960px) {
  .legal-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .legal-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .legal-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}


