/* ==========================================================================
   AI TASK PLANNER - MODERN SAAS DESIGN SYSTEM & STYLESHEET
   Target: Cloudflare Pages / Static Multi-Page Architecture
   100% Native CSS Custom Properties, Responsive 320px - 4K, Zero Dependencies
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-surface-elevated: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Brand Accents */
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-dark: #1e40af;

  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;

  /* Priority Badges */
  --prio-urgent-bg: #fee2e2;
  --prio-urgent-text: #991b1b;
  --prio-high-bg: #fef3c7;
  --prio-high-text: #92400e;
  --prio-medium-bg: #e0e7ff;
  --prio-medium-text: #3730a3;
  --prio-low-bg: #f1f5f9;
  --prio-low-text: #475569;

  /* Typography & Sizing */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
  --nav-height: 72px;
}

[data-theme="dark"] {
  --bg-primary: #0b0f17;
  --bg-surface: #111827;
  --bg-surface-subtle: #1f2937;
  --bg-surface-elevated: #1a2234;
  --border-color: #2d3748;
  --border-focus: #60a5fa;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --primary-50: #172554;
  --primary-100: #1e3a8a;
  --primary-500: #3b82f6;
  --primary-600: #60a5fa;
  --primary-700: #93c5fd;

  --prio-urgent-bg: #450a0a;
  --prio-urgent-text: #fca5a5;
  --prio-high-bg: #451a03;
  --prio-high-text: #fcd34d;
  --prio-medium-bg: #1e1b4b;
  --prio-medium-text: #c7d2fe;
  --prio-low-bg: #1f2937;
  --prio-low-text: #cbd5e1;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* ==========================================================================
   LAYOUT CONTAINERS & GRID
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.section {
  padding: 4.5rem 0;
}

.section-subtle {
  background-color: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ==========================================================================
   TYPOGRAPHY HIERARCHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.25rem);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--primary-50);
  color: var(--primary-600);
  border: 1px solid var(--primary-100);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  height: var(--nav-height);
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background-color: rgba(17, 24, 39, 0.92);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo:hover {
  text-decoration: none;
  color: var(--primary-600);
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-indigo));
  color: #ffffff;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  position: relative;
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-600);
  background-color: var(--bg-surface-subtle);
  text-decoration: none;
}

.nav-link.active {
  color: var(--primary-600);
  font-weight: 600;
  background-color: var(--primary-50);
  text-decoration: none;
}

[data-theme="dark"] .nav-link.active {
  background-color: var(--primary-50);
  color: var(--primary-500);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  transition: all var(--transition-fast);
  text-decoration: none !important;
  white-space: nowrap;
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ==========================================================================
   BUTTONS & FORM CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary-600);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-700);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
  text-decoration: none;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  display: flex;
  width: 100%;
  text-align: center;
  justify-content: center;
}

.btn-lg {
  padding: 0.85rem 1.85rem;
  font-size: 1.05rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.results-container {
  margin-top: 2rem;
  border-top: 2px dashed var(--border-color);
  padding-top: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}

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

/* ==========================================================================
   AI TASK PLANNER TOOL CONTAINER & CARD
   ========================================================================== */
.tool-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2rem;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

.tool-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.tool-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.quick-templates-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  margin-bottom: 1.5rem;
}

.quick-template-btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.quick-template-btn:hover {
  background-color: var(--primary-50);
  border-color: var(--primary-100);
  color: var(--primary-600);
}

/* Plan Result Board */
.plan-board {
  margin-top: 2rem;
  border-top: 2px dashed var(--border-color);
  padding-top: 2rem;
}

.plan-summary-card {
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-600);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* Progress Bar */
.progress-container {
  margin: 1.5rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-track {
  width: 100%;
  height: 10px;
  background-color: var(--border-color);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-600), var(--accent-emerald));
  border-radius: var(--radius-pill);
  transition: width 300ms ease;
}

/* Phase / Milestone Card */
.phase-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.phase-header {
  padding: 1rem 1.5rem;
  background-color: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.phase-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

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

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

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

.task-item:hover {
  background-color: var(--bg-surface-subtle);
}

.task-item.completed {
  background-color: var(--primary-50);
}

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

.task-checkbox {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  cursor: pointer;
  accent-color: var(--primary-600);
}

.task-content {
  flex: 1;
}

.task-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.priority-pill {
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.priority-urgent {
  background-color: var(--prio-urgent-bg);
  color: var(--prio-urgent-text);
}

.priority-high {
  background-color: var(--prio-high-bg);
  color: var(--prio-high-text);
}

.priority-medium {
  background-color: var(--prio-medium-bg);
  color: var(--prio-medium-text);
}

.priority-low {
  background-color: var(--prio-low-bg);
  color: var(--prio-low-text);
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-task-del {
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.btn-task-del:hover {
  color: var(--accent-rose);
  background-color: var(--prio-urgent-bg);
}

/* Action Toolbar (Export / Save / Filter) */
.plan-actions-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background-color: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.export-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Add Subtask Inline Form */
.add-task-box {
  padding: 1rem 1.5rem;
  background-color: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ==========================================================================
   CONTENT TYPOGRAPHY & CARDS
   ========================================================================== */
.prose {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
  line-height: 1.75;
}

.prose ul, .prose ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

.prose li {
  margin-bottom: 0.5rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
}

.feature-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all var(--transition-fast);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-100);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background-color: var(--primary-50);
  color: var(--primary-600);
}

.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.comparison-table th, .comparison-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
  background-color: var(--bg-surface-subtle);
  font-weight: 700;
  color: var(--text-primary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface);
  transition: background-color var(--transition-fast);
}

.faq-question:hover {
  background-color: var(--bg-surface-subtle);
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease, padding 300ms ease;
  padding: 0 1.25rem;
  background-color: var(--bg-surface);
}

.faq-item.active .faq-answer {
  max-height: 400px;
  padding: 0 1.25rem 1.25rem 1.25rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-heading {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

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

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--primary-600);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  animation: toastSlideIn 250ms ease forwards;
  pointer-events: auto;
}

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

/* ==========================================================================
   PRINT LAYOUT
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .site-header, .site-footer, .nav-actions, .quick-templates-bar,
  .plan-actions-bar, .add-task-box, .btn, .theme-toggle-btn, .toast-container,
  .section-subtle, .faq-list, .breadcrumb-nav {
    display: none !important;
  }
  .tool-wrapper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
  .phase-card {
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
    margin-bottom: 1.5rem !important;
  }
  .task-item {
    border-bottom: 1px solid #eee !important;
  }
  h1, h2, h3 {
    color: #000000 !important;
  }
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    box-shadow: var(--shadow-xl);
    z-index: 99;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }
  .mobile-menu-btn {
    display: grid;
  }
  .tool-wrapper {
    padding: 1.25rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .plan-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .nav-cta-btn {
    display: none;
  }
}
