/* autumn.css - cozy and warm seasonal styling */

:root {
  /* Seasonal color tokens */
  --autumn-dark: #5e3023;    --autumn-medium: #9e5938;    --autumn-accent: #d17f46;    --autumn-light: #e9b87c;    --autumn-cream: #f9eeda;    --autumn-leaf: #cb4025;    --autumn-forest: #425035;    --autumn-gray: #6e6361;
  --spring-light: #e0f2d1;   --spring-mid: #a5d6a7;       --spring-dark: #4caf50;      --spring-accent: #ff80ab;
  --summer-light: #ffe0b2;   --summer-mid: #ffb74d;       --summer-dark: #ff9800;      --summer-accent: #42a5f5;
  --winter-light: #e0f7fa;   --winter-mid: #80deea;       --winter-dark: #00acc1;      --winter-accent: #7e57c2;
  
  /* Typography */
  --heading-font: 'Playfair Display', serif;
  --subheading-font: 'Lora', serif;
  --body-font: 'Open Sans', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 1rem; --space-lg: 2rem; --space-xl: 3rem;
  /* Radius/Shadows */
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --shadow-soft: 0 5px 20px rgba(0,0,0,0.04);
  --shadow-medium: 0 8px 30px rgba(0,0,0,0.08);
  --shadow-hard: 0 10px 50px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  background-color: var(--autumn-cream);
  color: #472b20;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Accessible focus styles */
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--autumn-accent) 60%, #ffffff);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Limit transitions to interactive elements for performance */
.btn,
.action-button,
.project-card,
.expand-button,
.task,
.project ul li,
input[type="checkbox"],
.notification,
.tab-button,
.idea-card .actions button,
.plan-card {
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease,
    box-shadow 0.3s ease, border-color 0.25s ease, opacity 0.25s ease;
}

.season-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1507371341162-763b5e714470?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') no-repeat center center fixed;
  background-size: cover;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--autumn-medium), var(--autumn-dark));
  color: var(--autumn-cream);
  padding: var(--space-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--autumn-light);
}

header:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1444392061186-9fc38f84f726?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') no-repeat center bottom;
  background-size: cover;
  opacity: 0.1;
  z-index: 0;
}

.header-content {
  position: relative;
  z-index: 2;
}

header h1 {
  font-family: var(--heading-font);
  font-size: 2.6rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-family: var(--subheading-font);
  font-style: italic;
  font-size: 1.3rem;
  margin: 0 0 var(--space-xs) 0;
  opacity: 0.9;
}

.tagline {
  font-family: var(--body-font);
  font-size: 0.95rem;
  margin: 0;
  opacity: 0.8;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.progress-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.circular-progress {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: conic-gradient(var(--autumn-accent) 0%, transparent 0%);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: var(--space-sm);
}

.circular-progress:before {
  content: "";
  position: absolute;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background-color: var(--autumn-dark);
}

.progress-text {
  position: relative;
  color: var(--autumn-cream);
  font-size: 1.2rem;
  font-weight: 600;
  z-index: 2;
}

.progress-overview p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

/* Main content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
  position: relative;
}

/* Tab navigation */
.dashboard-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(94, 48, 35, 0.2);
  position: relative;
}

.tab-button {
  background: none;
  border: none;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--subheading-font);
  font-size: 1.1rem;
  color: var(--autumn-gray);
  cursor: pointer;
  position: relative;
}

.tab-button:after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--autumn-accent);
  transition: width 0.3s ease;
}

.tab-button.active {
  color: var(--autumn-dark);
  font-weight: 600;
}

.tab-button.active:after {
  width: 100%;
}

.tab-button:hover:not(.active) {
  color: var(--autumn-medium);
}

.tab-button:hover:not(.active):after {
  width: 40%;
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

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

/* Section headings */
h2 {
  font-family: var(--heading-font);
  color: var(--autumn-dark);
  font-size: 1.8rem;
  margin: var(--space-lg) 0 var(--space-md);
  display: flex;
  align-items: center;
  position: relative;
  padding-bottom: var(--space-sm);
}

h2:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--autumn-medium), var(--autumn-light));
}

h2 .icon {
  margin-right: var(--space-sm);
}

h3 {
  font-family: var(--subheading-font);
  color: var(--autumn-medium);
  font-size: 1.3rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-sm);
}

/* Projects section */
.projects-overview {
  margin-bottom: var(--space-xl);
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.project-card {
  background: linear-gradient(to bottom, #ffffff, var(--autumn-cream));
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(94, 48, 35, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.project-card.featured {
  background: linear-gradient(135deg, #fbf3e1, #e9c389);
  border: 1px solid var(--autumn-accent);
  box-shadow: 0 6px 20px rgba(209, 127, 70, 0.15);
  position: relative;
}

.project-card.featured:before {
  content: "Flagship";
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--autumn-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.card-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.progress-indicator {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid #e6ddd1;
  position: relative;
}

.progress-indicator:before {
  content: attr(data-progress) "%";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--autumn-medium);
}

.progress-indicator:after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--autumn-accent);
  transform: rotate(0deg);
  transition: transform 1s ease;
}

.project-description {
  margin: 0 0 var(--space-md) 0;
  font-size: 0.9rem;
  color: var(--autumn-gray);
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(94, 48, 35, 0.1);
  padding-top: var(--space-sm);
}

.project-stats {
  font-size: 0.85rem;
  color: var(--autumn-medium);
}

.expand-button {
  background-color: var(--autumn-medium);
  color: white;
  border: none;
  border-radius: 6px;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.expand-button:hover {
  background-color: var(--autumn-dark);
}

/* Project details */
.project-details {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.back-button {
  background: none;
  border: none;
  color: var(--autumn-medium);
  font-family: var(--body-font);
  font-size: 0.95rem;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-md);
}

.back-button:hover {
  color: var(--autumn-dark);
}

.project-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.detail-progress {
  display: flex;
  align-items: center;
}

.progress-bar {
  width: 150px;
  height: 8px;
  background-color: #e6ddd1;
  border-radius: 4px;
  overflow: hidden;
  margin-right: var(--space-sm);
}

.progress-fill {
  height: 100%;
  background-color: var(--autumn-accent);
  width: 0%;
  border-radius: 4px;
  transition: width 1s ease;
}

.progress-percent {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--autumn-medium);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-lg);
}

.project-notes {
  background-color: var(--autumn-cream);
  padding: var(--space-md);
  border-radius: 8px;
  border-left: 3px solid var(--autumn-light);
}

.project-notes h3 {
  margin-top: 0;
}

/* Tasks styles */
.task, .project ul li {
  background-color: #ffffff;
  border: 1px solid #e8dcc9;
  border-radius: 8px;
  margin: 0.5rem 0;
  padding: 0.75rem 1rem;
  transition: background 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
}

.task:hover, .project ul li:hover {
  background-color: #fdfaf4;
  transform: translateX(3px);
}

.task.done, .project ul li input:checked + label {
  background-color: rgba(229, 219, 203, 0.4);
  text-decoration: line-through;
  opacity: 0.7;
}

input[type="checkbox"] {
  margin-right: var(--space-md);
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--autumn-light);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  background-color: var(--autumn-accent);
  border-color: var(--autumn-accent);
}

input[type="checkbox"]:checked:after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
}

label {
  cursor: pointer;
  font-size: 0.95rem;
  flex-grow: 1;
}

ul {
  list-style: none;
  padding: 0;
}

/* Journal Tab */
.journal-interface {
  margin-bottom: var(--space-xl);
}

.daily-prompt {
  background-color: var(--autumn-forest);
  border-radius: 12px;
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
  color: white;
}

.daily-prompt h3 {
  color: white;
  opacity: 0.9;
  font-size: 1.1rem;
  margin-top: 0;
}

blockquote {
  font-family: var(--subheading-font);
  font-style: italic;
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.5;
}

.journal-container {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.date-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.date-nav {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--autumn-medium);
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.date-nav:hover {
  background-color: var(--autumn-cream);
  color: var(--autumn-dark);
}

#current-date {
  margin: 0;
  font-size: 1.1rem;
}

.entry-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-md);
}

.mood-selector {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.mood-selector span {
  font-size: 0.9rem;
  color: var(--autumn-gray);
}

select {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid #e8dcc9;
  border-radius: 4px;
  font-family: var(--body-font);
  font-size: 0.9rem;
  color: var(--autumn-dark);
  background-color: white;
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: var(--space-md);
  font-size: 1rem;
  font-family: var(--body-font);
  border: 1px solid #e8dcc9;
  border-radius: 8px;
  resize: vertical;
  line-height: 1.6;
  color: var(--autumn-dark);
}

textarea:focus {
  outline: none;
  border-color: var(--autumn-medium);
  box-shadow: 0 0 0 2px rgba(158, 89, 56, 0.1);
}

/* Insights Tab */
.insights-view {
  margin-bottom: var(--space-xl);
}

.insight-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.insight-card {
  background: linear-gradient(135deg, white, var(--autumn-cream));
  border-radius: 12px;
  padding: var(--space-md);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.insight-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--autumn-accent);
  margin: var(--space-sm) 0;
}

.insight-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--autumn-gray);
}

.activity-calendar {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.activity-calendar h3 {
  margin-top: 0;
}

#calendar-view {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--autumn-gray);
  font-style: italic;
}

.export-section {
  text-align: center;
  margin: var(--space-lg) 0;
}

.export-section p {
  margin-bottom: var(--space-md);
  color: var(--autumn-gray);
}

/* Links section */
#saved-links-section {
  background-color: white;
  border-radius: 12px;
  padding: var(--space-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.links-toolbar {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.links-toolbar input {
  flex-grow: 1;
  padding: var(--space-sm);
  border: 1px solid #e8dcc9;
  border-radius: 4px;
  font-family: var(--body-font);
}

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

.links-list li {
  padding: var(--space-sm);
  border-bottom: 1px solid rgba(94, 48, 35, 0.1);
}

.links-list a {
  color: var(--autumn-medium);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  word-break: break-all;
}

.links-list a:hover {
  color: var(--autumn-dark);
  text-decoration: underline;
}

/* Buttons */
.action-button {
  background-color: var(--autumn-medium);
  color: white;
  border: none;
  border-radius: 6px;
  padding: var(--space-sm) var(--space-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.action-button:hover {
  background-color: var(--autumn-dark);
  transform: translateY(-2px);
}

/* Seasonal quote */
.seasonal-quote {
  background-color: var(--autumn-dark);
  color: white;
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  text-align: center;
  border-radius: 12px;
  position: relative;
}

.seasonal-quote blockquote {
  margin: 0;
  font-size: 1.5rem;
  position: relative;
  z-index: 1;
}

.seasonal-quote cite {
  font-size: 1rem;
  font-style: normal;
  display: block;
  margin-top: var(--space-sm);
  opacity: 0.8;
}

.seasonal-quote::before {
  content: "\201C";
  position: absolute;
  top: 0;
  left: var(--space-md);
  font-size: 8rem;
  color: rgba(255, 255, 255, 0.1);
  font-family: Georgia, serif;
  line-height: 1;
}

/* Footer */
footer {
  background-color: var(--autumn-dark);
  color: var(--autumn-cream);
  padding: var(--space-lg);
  text-align: center;
  margin-top: var(--space-xl);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.season-switch {
  display: flex;
  gap: 2px;
}

.season-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  padding: var(--space-xs) var(--space-sm);
  font-size: 0.8rem;
  cursor: pointer;
}

.season-btn:first-child {
  border-radius: 4px 0 0 4px;
}

.season-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.season-btn.current {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Notification */
.notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--autumn-dark);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.notification-content {
  display: flex;
  align-items: center;
}

.notification-icon {
  margin-right: var(--space-sm);
}

.notification-message {
  font-size: 0.95rem;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Responsive styles */
@media (max-width: 900px) {
  header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  
  .progress-overview {
    margin-top: var(--space-md);
  }
  
  .detail-content {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--space-md);
  }
}

@media (max-width: 600px) {
  .dashboard-tabs {
    flex-direction: column;
    border-bottom: none;
  }
  
  .tab-button {
    border-bottom: 1px solid rgba(94, 48, 35, 0.1);
  }
  
  .tab-button:after {
    display: none;
  }
  
  .project-cards {
    grid-template-columns: 1fr;
  }
  
  .insight-cards {
    grid-template-columns: 1fr;
  }
  
  .links-toolbar {
    flex-direction: column;
  }
  
  .seasonal-quote blockquote {
    font-size: 1.2rem;
  }
}

/* Chapter Ideas Section */
.chapter-ideas-section {
  margin-top: var(--space-xl);
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  padding: var(--space-lg);
}

.chapter-ideas-section h3 {
  color: var(--autumn-dark);
  margin-top: 0;
  border-bottom: 2px solid var(--autumn-light);
  padding-bottom: var(--space-xs);
}

.helper-text {
  font-size: 0.9rem;
  color: var(--autumn-gray);
  margin-bottom: var(--space-md);
}

.form-row {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

#chapter-selector,
#chapter-filter {
  padding: var(--space-sm);
  border: 1px solid #e8dcc9;
  border-radius: 4px;
  font-family: var(--body-font);
  color: var(--autumn-dark);
  min-width: 200px;
}

#custom-chapter-name {
  flex-grow: 1;
  padding: var(--space-sm);
  border: 1px solid #e8dcc9;
  border-radius: 4px;
  font-family: var(--body-font);
}

#chapter-idea-input {
  margin-bottom: var(--space-md);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-lg);
}

.chapter-ideas-list {
  margin-top: var(--space-lg);
  border-top: 1px dashed var(--autumn-light);
  padding-top: var(--space-md);
}

.filter-options {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
}

.filter-select {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.idea-card {
  background-color: #fdfaf4;
  border-left: 3px solid var(--autumn-accent);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border-radius: 4px;
  position: relative;
}

.idea-card .chapter-label {
  font-size: 0.8rem;
  color: var(--autumn-medium);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  display: block;
}

.idea-card .idea-text {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.idea-card .timestamp {
  font-size: 0.75rem;
  color: var(--autumn-gray);
  margin-top: var(--space-sm);
  text-align: right;
  font-style: italic;
}

.idea-card .actions {
  position: absolute;
  top: var(--space-xs);
  right: var(--space-xs);
  display: flex;
  gap: var(--space-xs);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.idea-card:hover .actions {
  opacity: 1;
}

.idea-card .actions button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--autumn-gray);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.idea-card .actions button:hover {
  background-color: var(--autumn-light);
  color: var(--autumn-dark);
}

.chapter-group {
  margin-bottom: var(--space-lg);
}

.chapter-group-title {
  font-family: var(--subheading-font);
  color: var(--autumn-dark);
  font-size: 1.1rem;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--autumn-light);
}

.empty-state {
  text-align: center;
  padding: var(--space-lg);
  color: var(--autumn-gray);
  font-style: italic;
}


/* --- TCM Self-Assessment additions --- */
.assessment .assessment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.assessment fieldset {
  background: white;
  border: 1px solid #e8dcc9;
  border-radius: 12px;
  padding: var(--space-md);
}

.assessment legend {
  font-family: var(--subheading-font);
  color: var(--autumn-medium);
  padding: 0 var(--space-xs);
  font-weight: 600;
}

.assessment label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0.4rem 0;
}

.assessment-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.action-button.outline {
  background: transparent;
  color: var(--autumn-medium);
  border: 2px solid var(--autumn-medium);
}

.plan-results {
  background: linear-gradient(180deg, #fff, var(--autumn-cream));
  border: 1px solid #e8dcc9;
  border-radius: 12px;
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}

.plan-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.plan-card {
  background: #fff;
  border: 1px solid rgba(94,48,35,0.1);
  border-radius: 10px;
  padding: var(--space-md);
}

.plan-card h4 {
  margin: 0 0 var(--space-sm) 0;
  color: var(--autumn-dark);
}

.export-actions {
  display: flex;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--autumn-gray);
  margin: 0;
}

.series-cards .series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.series-card {
  background: #fff;
  border: 1px solid rgba(94,48,35,0.1);
  border-radius: 12px;
  padding: var(--space-md);
  position: relative;
}

.series-card.current {
  border-color: var(--autumn-accent);
  box-shadow: 0 6px 20px rgba(209, 127, 70, 0.12);
}

.series-card.disabled {
  opacity: 0.6;
}


/* --- Public Welcome (Hero) --- */
:root{
  --hero-max: 980px;
  --header-h: 68px;
}
.header-brand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md);
}
.header-brand {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.1) blur(6px);
  backdrop-filter: saturate(1.1) blur(6px);
  position: fixed;
  left: 0; right: 0;
  top: 0;
  z-index: 21;
  border-bottom: 1px solid #eadfcd;
  pointer-events: auto;
  isolation: isolate;
  min-height: var(--header-h);
}
.header-inner { max-width: var(--hero-max); margin: 0 auto; padding: 0 1rem; display:flex; justify-content: flex-start; align-items: center; gap: 1rem; }
.header-brand, .header-brand * { pointer-events: auto; }
.header-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--heading-font);
  color: var(--autumn-dark);
}
.header-brand .logo .leaf {
  font-size: 1.35rem;
}
.header-brand .logo strong {
  font-size: clamp(1.25rem, 2.8vmax, 2rem);
  letter-spacing: .3px;
}
.header-brand nav a {
  text-decoration: none;
  color: var(--autumn-dark);
  margin-left: 1rem;
  font-weight: 600;
}
.header-brand nav a {
  padding: .25rem .5rem;
  border-radius: 8px;
}
.header-brand .logo .logo-link { color: inherit; text-decoration: none; }
.header-brand nav a:hover {
  background: #f7efe1;
}
.header-brand nav a[aria-current="page"] {
  color: var(--autumn-accent);
  background: #fff2e6;
}
.header-brand nav {
  display: flex;
  gap: .25rem;
  position: relative;
  z-index: 25;
  margin-left: auto;
}
.header-brand nav a { font-size: 1.05rem; }
.header-brand .menu-toggle { display:none; background:#fff; border:1px solid #eadfcd; border-radius:8px; padding:.35rem .5rem; font-weight:700; }
.header-brand .menu-toggle[aria-expanded="true"] + nav { display:flex; }
@media (max-width: 720px){
  .header-brand .menu-toggle { display:inline-flex; align-items:center; gap:.35rem; }
  .header-brand nav { display:none; position:absolute; top: calc(var(--header-h) - 2px); left:0; right:0; background:#fff; border-bottom:1px solid #eadfcd; padding:.5rem 1rem; }
  .header-brand nav a { margin:.25rem .5rem; display:block; }
}
.hero {
  position: relative;
  max-width: var(--hero-max);
  margin: 2rem auto;
  background: linear-gradient(135deg, #fff8f0, #fff);
  border: 1px solid #f0e5d5;
  border-radius: 18px;
  padding: clamp(1.25rem, 2vmax, 2rem);
  box-shadow: 0 18px 50px rgba(209,127,70,.12);
  overflow: hidden;
}
.hero.hero-framed { position: relative; overflow: hidden; border-radius: 16px; }
.hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; filter: saturate(1.1) contrast(1.05); }
.text-panel.text-panel-padded-lg { position: relative; padding: 2.25rem 2rem; }
.lede.lede-narrow { max-width: 760px; }
.ctas-inline { display: flex; gap: .75rem; flex-wrap: wrap; }
.aside-cards { position: relative; padding: 0 2rem 1.5rem; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.info-spaced { margin-top: 1.25rem; }
.quickwins-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.info-grid.newsletter-grid { margin-top: 1.25rem; display: grid; gap: 12px; grid-template-columns: 2fr 3fr; align-items: center; }
.newsletter-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.sticky-home-cta { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; display: none; gap: 8px; align-items: center; z-index: 20; }
.hero.hero-framed { position: relative; overflow: hidden; border-radius: 16px; }
.hero .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; filter: saturate(1.06) contrast(1.04); }
.text-panel.text-panel-padded { position: relative; padding: 2rem; }
.lede.lede-narrow { max-width: 760px; }
.info-spaced { margin-top: 1.25rem; }
.seasons-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cover-img { max-width: 100%; border-radius: 12px; border: 1px solid #eadfcd; }
.quickwins-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); }
.sticky-home-cta { position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px; display: none; gap: 8px; align-items: center; z-index: 20; }
.hero iframe { pointer-events: none; z-index: 0; }
.hero { z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid #f2e6d7;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .9rem;
  color: var(--autumn-medium);
  margin-bottom: .75rem;
}
.hero h1 {
  font-family: var(--heading-font);
  font-size: clamp(1.8rem, 4vmax, 3rem);
  line-height: 1.1;
  margin: .25rem 0 .75rem 0;
  color: var(--autumn-dark);
}
.hero h1 { text-shadow: 0 2px 6px rgba(0,0,0,.06); }
.hero p.lede {
  font-size: clamp(1rem, 2.2vmax, 1.25rem);
  color: var(--autumn-gray);
  max-width: 64ch;
}

/* Utilities shared by products page */
.text-panel.text-panel-padded { position: relative; padding: 2rem; }
.mt-tight { margin-top: .35rem; }
.lede-narrow { max-width: 760px; }
.info-spaced-sm { margin-top: 1rem; }
.row-wrap { display:flex; flex-wrap:wrap; }
.space-between { justify-content: space-between; }
.center-items { align-items: center; }
.gap-sm { gap: .5rem; }
.stack-start { gap: .5rem; align-items:flex-start; flex-direction:column; }
.peek-img { max-width: 260px; border-radius: 8px; border: 1px solid #eadfcd; }
.input-min-260 { min-width: 260px; }

/* Hero text panel for readability over animated leaves */
.text-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.78));
  border: 1px solid #f0e5d5;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  backdrop-filter: blur(6px) saturate(1.1);
  box-shadow: var(--shadow-soft);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  border: none;
  padding: .75rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}
.btn.primary {
  background: var(--autumn-accent);
  color: #2b1a12;
  box-shadow: 0 6px 20px rgba(209,127,70,.25);
}
.btn.ghost {
  background: #fff;
  color: var(--autumn-dark);
  border: 1px solid #eadfcd;
}
.hero-aside {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
  gap: 1rem;
}
.info-card {
  background: #fff;
  border: 1px solid rgba(94,48,35,.1);
  border-radius: 14px;
  padding: 1rem;
}
.info-card h3 {
  margin: 0 0 .35rem 0;
  color: var(--autumn-dark);
}
.footer-min {
  text-align: center;
  color: var(--autumn-gray);
  padding: 2rem 0 3rem 0;
}
/* Small utility for page container */
.page {
  max-width: var(--hero-max);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}
.header-spacer { height: var(--header-h); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.visible { opacity: 1; transform: translateY(0); transition: opacity .6s ease, transform .6s ease; }
.cycle-highlight { box-shadow: 0 12px 30px rgba(209,127,70,.22); border-color: var(--autumn-accent) !important; }

/* Cart drawer (read-only) */
.cart-drawer {
  position: fixed;
  right: 0; top: 0; bottom: 0;
  width: min(92vw, 360px);
  background: #fff;
  border-left: 1px solid #eadfcd;
  box-shadow: -10px 0 30px rgba(0,0,0,.08);
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 60;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer header { padding: 1rem; border-bottom: 1px solid #f0e5d5; }
.cart-drawer .cart-body { padding: 1rem; overflow: auto; }
.cart-drawer .cart-footer { margin-top: auto; padding: 1rem; border-top: 1px solid #f0e5d5; }
.cart-row { display:flex; gap:.75rem; align-items:center; }
.cart-row .thumb { width:56px; height:56px; border-radius:8px; background:#fff8f0; display:grid; place-items:center; }
.cart-note { font-size:.9rem; color: var(--autumn-gray); }

/* Skip to content */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--autumn-dark);
  color: var(--autumn-cream);
  padding: .5rem .75rem;
  border-radius: 6px;
  z-index: 1000;
}
.skip-link:focus {
  left: .75rem;
  top: .75rem;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero iframe { display: none !important; }
}

/* Print-friendly plan */
@media print {
  .header-brand,
  .footer-min,
  #sticky-cta {
    display: none !important;
  }
  .plan-results {
    background: #fff;
    border: 0;
    box-shadow: none;
  }
  .page {
    max-width: none;
    padding: 0;
  }
}

/* --- Products --- */
.products-hero {
  margin: 1.5rem 0 1rem;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.product-card {
  background: #fff;
  border: 1px solid #eadfcd;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(209,127,70,.08);
}
.product-media {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg,#fff8f0,#fff);
  display: grid;
  place-items: center;
  color: var(--autumn-accent);
  font-size: 3rem;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #eadfcd;
}
.product-body { padding: 0.85rem 1rem 1rem; }
.product-title { margin: 0 0 .25rem 0; color: var(--autumn-dark); }
.product-meta { color: var(--autumn-gray); font-size: .95rem; }
.product-price { font-weight: 700; color: var(--autumn-medium); margin-top: .35rem; }
.product-actions { display:flex; gap:.5rem; margin-top: .75rem; }
.badge {
  display:inline-flex; align-items:center; gap:.35rem; font-size:.8rem; font-weight:700;
  padding:.25rem .5rem; border-radius:999px; border:1px solid #f0e5d5; color: var(--autumn-medium);
}
.badge.soon { background:#fff7ea; }
.badge.soldout { background:#fde7e1; color:#8b3a2a; border-color:#f6cfc4; }
.btn.disabled, .action-button.disabled,
button[disabled] { opacity:.6; cursor:not-allowed; filter:grayscale(.2); }

/* Product enhancements */
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.highlight-card {
  background: #fff;
  border: 1px solid rgba(94,48,35,.1);
  border-radius: 12px;
  padding: 1rem;
}
.highlight-card h4 { margin: 0 0 .35rem 0; color: var(--autumn-dark); }
.highlight-card .icon { font-size: 1.25rem; margin-right: .35rem; }

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.testimonial-card {
  background: #fff;
  border: 1px solid rgba(94,48,35,.1);
  border-radius: 12px;
  padding: 1rem;
  font-style: italic;
}
.testimonial-card .author { font-style: normal; color: var(--autumn-medium); margin-top: .5rem; font-weight: 700; }

.faq details {
  background: #fff;
  border: 1px solid rgba(94,48,35,.1);
  border-radius: 10px;
  padding: .5rem .75rem;
}
.faq details + details { margin-top: .5rem; }
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--autumn-dark);
}
.faq p { margin: .5rem 0 0 0; color: var(--autumn-gray); }

.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.compare-card {
  background: #fff;
  border: 1px solid rgba(94,48,35,.1);
  border-radius: 12px;
  padding: 1rem;
}
.compare-card h4 { margin: 0 0 .25rem 0; }
.compare-card .status { font-size: .9rem; color: var(--autumn-gray); }

#sticky-products-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  display: none;
  gap: 8px;
  align-items: center;
  z-index: 20;
}

/* Mobile enhancements */
@media (max-width: 600px) {
  .header-brand .header-inner { flex-wrap: wrap; gap: .5rem; }
  .header-brand nav { margin-left: 0; justify-content: center; flex-wrap: wrap; }
  .header-brand nav a { font-size: .95rem; }
  .header-brand .logo strong { font-size: clamp(1.1rem, 4.5vw, 1.35rem); }
  .header-spacer { height: calc(var(--header-h) - 8px); }
  .hero { margin: 1rem .75rem; border-radius: 12px; }
  .text-panel.text-panel-padded, .text-panel.text-panel-padded-lg { padding: 1.25rem; }
  .info-grid.newsletter-grid { grid-template-columns: 1fr; }
  .hero-ctas .btn { flex: 1 1 100%; justify-content: center; }
  .peek-img { max-width: 48%; }
  .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { margin: .75rem .5rem; }
  .hero-badge { font-size: .85rem; }
  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .hero p.lede { font-size: 1rem; }
  .sticky-home-cta { left: 50%; transform: translateX(-50%); bottom: 10px; }
  .compare-grid { grid-template-columns: 1fr; }
  .highlights-grid { grid-template-columns: 1fr; }
}
