/* New landing page styles */
.section {
  padding: 80px 0;
  border-top: 1px solid hsl(var(--border));
}

@media (min-width: 768px) {
  .section {
    padding: 112px 0; /* py-28 */
  }
}

.section:first-of-type {
  border-top: none;
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
}

.section h2 {
  font-size: 32px;
  font-weight: 600;
  color: hsl(var(--heading));
  margin: 0 0 24px 0;
  line-height: 1.3;
  text-align: center;
}

.section-use-cases h2 {
  margin-bottom: 48px;
}

.section h3 {
  font-size: 24px;
  font-weight: 600;
  color: hsl(var(--heading));
  margin: 0 0 24px 0;
  line-height: 1.4;
}

.section p {
  margin: 0 0 24px 0;
  color: hsl(var(--foreground));
  line-height: 1.7;
}

.section p strong {
  color: hsl(var(--heading));
}

/* Problem section */
.section-problem {
  text-align: center;
}

.section-problem p {
  font-size: 18px; /* text-lg */
  color: hsl(var(--muted-foreground));
  max-width: 672px; /* max-w-2xl */
  margin: 0 auto 48px; /* mb-12 */
}

.problems-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.problem-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: hsl(var(--surface));
  border-radius: 8px;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  font-size: 14px;
}

.problem-icon {
  color: #000000; /* Black for red */
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Features section */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-top: 48px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
}

.section-features p {
  text-align: center;
  color: hsl(var(--muted-foreground));
  max-width: 576px;
  margin: 0 auto 64px;
}

.feature-group h3 {
  font-size: 20px;
  font-weight: 500;
  color: hsl(var(--heading));
  margin-bottom: 16px;
}

.feature-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-group li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 16px;
  color: hsl(var(--foreground) / 0.9);
}

.feature-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: hsl(var(--primary) / 0.12);
  color: hsl(var(--primary));
  flex-shrink: 0;
  margin-top: 2px;
}

/* Comparison section */
.section-comparison p {
  text-align: center;
  color: hsl(var(--muted-foreground));
  max-width: 576px; /* max-w-xl */
  margin: 0 auto 48px; /* mb-12 */
}

.comparison-table {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  overflow: hidden;
  margin-top: 48px;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px; /* text-sm */
}

.comparison-table th,
.comparison-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid hsl(var(--border));
}

.comparison-table th {
  background: transparent;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
}

.comparison-table th:nth-child(2) {
  font-weight: 600;
  color: hsl(var(--heading));
}

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

.comparison-table td {
  color: hsl(var(--foreground) / 0.9);
}

.comparison-table .status {
  text-align: center;
}

.status-icon {
  width: 20px;
  height: 20px;
}

.status-icon.check {
  color: hsl(var(--primary)); /* Blue color */
}

.status-icon.cross {
  color: #000000; /* Black for red */
}

.status-icon.partial {
  color: #000000; /* Black for yellow */
}

blockquote {
  margin: 40px auto 0;
  padding: 0;
  background: transparent;
  border-left: none;
  border-radius: 0;
  color: hsl(var(--muted-foreground));
  font-style: italic;
  text-align: center;
  max-width: 512px; /* max-w-lg */
}

/* Feature list section */
.feature-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 48px auto;
  max-width: 672px; /* max-w-2xl */
}

@media (min-width: 640px) {
  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
}

.feature-icon {
  width: 20px;
  height: 20px;
  color: hsl(var(--primary));
  flex-shrink: 0;
}

.feature-card span:last-child {
  font-size: 14px;
  color: hsl(var(--foreground) / 0.9);
}

.advanced-features {
  max-width: 672px; /* max-w-2xl */
  margin: 0 auto;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
}

.section-feature-list p {
  text-align: center;
  color: hsl(var(--muted-foreground));
  margin: 0 auto 48px; /* mb-12 */
}

.advanced-features summary {
  cursor: pointer;
  padding: 16px 24px;
  font-weight: 500;
  color: hsl(var(--heading));
  background: transparent;
  border-radius: 8px;
  transition: background-color 140ms ease-out;
}

.advanced-features summary:hover {
  background: hsl(var(--muted) / 0.5);
}

.advanced-features .advanced-content {
  padding: 8px 24px 16px;
  border-top: none;
}

.advanced-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.advanced-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
}

.advanced-features li::before {
  content: none;
}

.advanced-dot {
  width: 6px;
  height: 6px;
  background: hsl(var(--primary) / 0.4);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Showcase sections */
.section-showcase .showcase-layout {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .section-showcase .showcase-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }
}

.section-showcase .showcase-copy {
  text-align: left;
}

.section-showcase h2 {
  text-align: left;
  margin-bottom: 16px;
}

.showcase-eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  margin: 0 0 12px;
}

.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.showcase-tag {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface));
  font-size: 12px;
  color: hsl(var(--foreground) / 0.9);
}

.showcase-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--surface));
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

@media (max-width: 899px) {
  .section-showcase .showcase-copy,
  .section-showcase h2 {
    text-align: center;
  }

  .section-showcase .showcase-tags {
    justify-content: center;
  }
}

/* Use cases section */
.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px; /* gap-8 */
  margin-top: 48px;
}

@media (min-width: 768px) {
  .use-cases-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.use-case-card {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  padding: 32px 24px; /* Increased top/bottom padding */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 140ms ease-out;
  text-align: center;
  display: flex; /* Added flex */
  flex-direction: column; /* Column direction */
  align-items: center; /* Center items */
}

.use-case-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.use-case-icon {
  width: 48px;
  height: 48px;
  background: hsl(var(--primary) / 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px; /* Specific margin */
  color: hsl(var(--primary));
}

.use-case-icon svg {
  width: 24px;
  height: 24px;
}

.use-case-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: hsl(var(--heading));
  margin-bottom: 12px;
  margin-top: 0; /* Reset margin top */
}

.use-case-card p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* CLI section */
.section-cli {
  background: hsl(var(--surface));
}

.section-cli p {
  text-align: center;
  color: hsl(var(--muted-foreground));
  max-width: 576px;
  margin: 0 auto 32px;
}

.cli-tabs {
  max-width: 720px;
  margin: 0 auto;
}

.cli-tab-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

.cli-tab-btn {
  padding: 8px 20px;
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 140ms ease-out;
}

.cli-tab-btn:hover {
  background: hsl(var(--muted) / 0.3);
  color: hsl(var(--heading));
}

.cli-tab-btn.active {
  background: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: white;
}

.cli-tab-content {
  display: none;
}

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

.cli-description {
  text-align: left !important;
  margin-bottom: 12px !important;
  font-size: 14px;
}

.cli-description code {
  background: hsl(var(--muted) / 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.cli-code {
  background: hsl(220 20% 14%);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 0 0 12px 0;
}

.cli-code code {
  color: hsl(210 100% 80%);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.cli-usage {
  text-align: left !important;
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin: 0 !important;
}

.cli-usage code {
  background: hsl(var(--muted) / 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: hsl(var(--heading));
}

/* CTA section */
.section-cta {
  background: hsl(var(--surface));
  border-top: 1px solid hsl(var(--border));
}

.section-cta h2 {
  font-size: 30px; /* text-3xl */
  margin-bottom: 24px; /* mb-6 */
}

@media (min-width: 768px) {
  .section-cta h2 {
    font-size: 36px; /* md:text-4xl */
  }
}

/* FAQ section */
.faq-accordion {
  max-width: 672px; /* max-w-2xl */
  margin: 0 auto;
  margin-top: 48px;
}

.faq-item {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 16px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: hsl(var(--heading));
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 140ms ease-out;
  list-style: none;
}

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

.faq-question:hover {
  background: transparent;
}

.faq-question::after {
  content: '';
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform 200ms ease-out;
  opacity: 0.5;
}

.faq-item[open] .faq-question::after {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 24px 16px;
  font-size: 15px;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}

/* Footer */
.footer {
  background: hsl(var(--surface));
  border-top: 1px solid hsl(var(--border));
  padding: 40px 0;
  text-align: center;
}

.footer p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  margin: 0;
}

/* Mobile TOC Button - only visible in reader view */
.toc-mobile-button {
  display: none;
  position: fixed;
  left: 16px;
  bottom: 80px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  color: var(--muted);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
}

body:not(.has-document) .toc-mobile-button {
  display: none !important;
}

.toc-mobile-button:hover {
  background: var(--bg-muted);
  color: var(--ink);
  transform: scale(1.05);
}

.toc-mobile-button:active {
  transform: scale(0.95);
}

/* Mobile Preferences Button - only visible in reader view */
.prefs-mobile-button {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  color: var(--muted);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
}

body:not(.has-document) .prefs-mobile-button {
  display: none !important;
}

.prefs-mobile-button:hover {
  background: var(--bg-muted);
  color: var(--ink);
  transform: scale(1.05);
}

.prefs-mobile-button:active {
  transform: scale(0.95);
}

/* Mobile TOC Modal */
.toc-modal {
  max-width: 90vw;
  max-height: 80vh;
}

.toc-modal__list {
  max-height: 60vh;
  overflow-y: auto;
}

.toc-modal__list .toc__link {
  display: block;
  padding: 12px 16px;
  margin: 4px 0;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  line-height: 1.4;
  transition: background-color 140ms ease-out;
}

.toc-modal__list .toc__link:hover {
  background: var(--bg-muted);
}

.toc-modal__list .toc__link--h2 {
  margin-left: 16px;
  font-size: 15px;
}

.toc-modal__list .toc__link--h3 {
  margin-left: 32px;
  font-size: 14px;
  color: var(--muted);
}

.toc-modal__empty {
  color: var(--muted);
  padding: 24px;
  margin: 0;
}

/* Mobile Preferences Bottom Sheet */
.prefs-bottom-sheet {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  pointer-events: none;
}

.prefs-bottom-sheet--open {
  pointer-events: auto;
}

.bottom-sheet-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 300ms ease-out;
}

.prefs-bottom-sheet--open .bottom-sheet-backdrop {
  opacity: 1;
}

.bottom-sheet-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 300ms ease-out, max-height 300ms ease-out, opacity 150ms ease-out;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
}

.bottom-sheet-container.expanded {
  max-height: 85vh;
}

.prefs-bottom-sheet--open .bottom-sheet-container {
  transform: translateY(0);
}

.bottom-sheet-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 20px 8px;
  border-bottom: 1px solid var(--stroke);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--stroke);
  border-radius: 2px;
  margin-bottom: 12px;
}

.bottom-sheet-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.bottom-sheet-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.bottom-sheet-close {
  background: none;
  border: none;
  padding: 8px;
  margin: -8px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}


.bottom-sheet-close:hover {
  background: var(--bg-muted);
  color: var(--ink);
}

.bottom-sheet-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.bottom-sheet-footer {
  border-top: 1px solid var(--stroke);
  background: var(--bg);
  padding: 16px 20px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.prefs-done-btn {
  width: 100%;
  height: 44px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 140ms ease-out;
}

.prefs-done-btn:hover {
  background: var(--accent-strong);
}

.prefs-section {
  margin-bottom: 24px;
}

.prefs-section:last-child {
  margin-bottom: 0;
}

.prefs-section-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 12px;
}

/* Segmented Control */
.segmented-control {
  display: flex;
  background: var(--bg-muted);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.segment-option {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 140ms ease-out;
  text-align: center;
}

.segment-option:hover {
  background: var(--bg);
  color: var(--ink);
}

.segment-option--active {
  background: var(--bg);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Slider with Buttons */
.slider-with-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-with-buttons input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-muted);
  outline: none;
  -webkit-appearance: none;
}

.slider-with-buttons input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.slider-with-buttons input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid var(--bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Slider Buttons */
.slider-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--stroke);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 140ms ease-out;
  user-select: none;
}

.slider-btn:hover {
  background: var(--bg-muted);
  color: var(--ink);
}

.slider-btn:active {
  background: var(--accent);
  color: white;
  transform: scale(0.95);
}

.slider-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Feature Rows with Toggle Switch */
.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--stroke);
}

.feature-row:last-child {
  border-bottom: none;
}

.feature-row:active {
  opacity: 0.7;
}

.feature-label {
  font-size: 16px;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.3;
}

/* Toggle Switch */
.feature-toggle {
  width: 44px;
  height: 26px;
  background: var(--stroke);
  border-radius: 13px;
  position: relative;
  transition: background-color 200ms ease-out;
  flex-shrink: 0;
}

.feature-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 200ms ease-out;
}

.feature-row--enabled .feature-toggle {
  background: var(--accent);
}

.feature-row--enabled .feature-toggle::after {
  transform: translateX(18px);
}

.feature-icon {
  display: none;
}

.hero-glassbar {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border) / 0.5);
  background: hsl(var(--surface) / 0.65);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-bottom: 16px;
}

.hero-glassbar__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-glassbar__link {
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 999px;
  background: hsl(var(--surface) / 0.9);
  border: 1px solid hsl(var(--border) / 0.6);
}

.hero-glassbar__link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 60px 0;
  }

  .empty-state h1 {
    font-size: 36px;
  }

  .hero-tagline {
    font-size: 18px;
  }

  .section h2 {
    font-size: 28px;
  }

  .section h3 {
    font-size: 20px;
  }

  .problems-grid,
  .features-grid,
  .use-cases-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-cards {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    overflow-x: auto;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

   .hero-btn,
   .cta-btn {
     width: 100%;
     text-align: center;
   }
 }

/* Canvas Settings Panel */
