.page {
  --gray-rgb: 0, 0, 0;
  --gray-alpha-200: rgba(var(--gray-rgb), 0.08);
  --gray-alpha-100: rgba(var(--gray-rgb), 0.05);

  --button-primary-hover: #383838;
  --button-secondary-hover: #f2f2f2;

  display: grid;
  grid-template-rows: 20px 1fr 20px;
  align-items: center;
  justify-items: center;
  min-height: 100svh;
  padding: 40px 80px 80px 80px; /* Reduced top padding from 80px to 40px (half) */
  gap: 64px;
  font-family: var(--font-geist-sans);
}

@media (prefers-color-scheme: dark) {
  .page {
    --gray-rgb: 255, 255, 255;
    --gray-alpha-200: rgba(var(--gray-rgb), 0.145);
    --gray-alpha-100: rgba(var(--gray-rgb), 0.06);

    --button-primary-hover: #ccc;
    --button-secondary-hover: #1a1a1a;
  }
}

.main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  grid-row-start: 2;
}

.main ol {
  font-family: var(--font-geist-mono);
  padding-left: 0;
  margin: 0;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: -0.01em;
  list-style-position: inside;
}

.main li:not(:last-of-type) {
  margin-bottom: 8px;
}

.main code {
  font-family: inherit;
  background: var(--gray-alpha-100);
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 600;
}

.ctas {
  display: flex;
  gap: 16px;
}

.ctas a {
  appearance: none;
  border-radius: 128px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
}

a.primary {
  background: var(--foreground);
  color: var(--background);
  gap: 8px;
}

a.secondary {
  border-color: var(--gray-alpha-200);
  min-width: 158px;
}

.footer {
  grid-row-start: 3;
  display: flex;
  gap: 24px;
}

.footer a {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer img {
  flex-shrink: 0;
}

/* Enable hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
  a.primary:hover {
    background: var(--button-primary-hover);
    border-color: transparent;
  }

  a.secondary:hover {
    background: var(--button-secondary-hover);
    border-color: transparent;
  }

  .footer a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 16px 32px 80px 32px; /* Reduced top padding from 32px to 16px (half) */
  }

  .main {
    align-items: center;
  }

  .main ol {
    text-align: center;
  }

  .ctas {
    flex-direction: column;
  }

  .ctas a {
    font-size: 14px;
    height: 40px;
    padding: 0 16px;
  }

  a.secondary {
    min-width: auto;
  }

  .footer {
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
  }

  .featuresSection,
  .faqCard {
    padding: 24px 20px;
  }

  .featureGrid {
    grid-template-columns: 1fr;
  }

  .heroHighlights li {
    font-size: 14px;
  }
}

@media (prefers-color-scheme: dark) {
  .logo {
    filter: invert();
  }
}




/* Hero/top section */
.hero {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.title {
  font-size: clamp(24px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subtitle {
  color: inherit;
  max-width: 60ch;
}

.heroHighlights {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.heroHighlights li {
  font-size: 16px;
  font-weight: 500;
}

.featuresSection {
  border: 3px solid var(--nb-border);
  background: var(--nb-card);
  box-shadow: 6px 6px 0 var(--nb-border);
  border-radius: 12px;
  padding: 32px;
  display: grid;
  gap: 24px;
  text-align: left;
}

.featureHeading {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--nb-fg);
}

.featureIntro {
  text-align: center;
  max-width: 70ch;
  margin: 0 auto;
  line-height: 1.6;
  color: var(--nb-fg);
}

.featureGrid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.featureCard {
  border: 3px solid var(--nb-border);
  background: var(--nb-card);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--nb-border);
  padding: 24px;
  display: grid;
  gap: 12px;
}

.featureTitle {
  font-size: 18px;
  font-weight: 700;
  color: var(--nb-fg);
}

.featureList {
  margin: 0;
  padding: 0;
}

.featureList li {
  font-size: 15px;
  font-weight: 500;
}

.faqSection {
  margin-top: 48px;
}

.faqCard {
  border: 3px solid var(--nb-border);
  background: var(--nb-card);
  box-shadow: 6px 6px 0 var(--nb-border);
  border-radius: 12px;
  padding: 32px;
  display: grid;
  gap: 16px;
}

.faqItem {
  border: 2px solid var(--nb-border);
  border-radius: 10px;
  padding: 18px 20px;
  background: var(--nb-card);
  box-shadow: 3px 3px 0 var(--nb-border);
  color: var(--nb-fg);
}

.faqItem > summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 16px;
}

.faqItem > p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
}

/* Neobrutalist file input */
.fileInput {
  display: inline-block;
  font: inherit;
  color: var(--nb-fg);
  background: var(--nb-card);
  border: 3px dashed var(--nb-border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: 6px 6px 0 var(--nb-border);
  cursor: pointer;
}

.fileInput::file-selector-button {
  margin-right: 12px;
  border: 3px solid var(--nb-border);
  background: var(--nb-accent);
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--nb-border);
}

@media (hover: hover) and (pointer: fine) {
  .fileInput::file-selector-button:hover {
    background: var(--nb-accent-hover);
  }
}


/* Form controls */
.formGroup { display: grid; gap: 6px; }
.label { font-size: 12px; opacity: 0.8; }
.input, .textarea, .number {
  width: 100%;
  border: 3px solid var(--nb-border);
  background: var(--nb-card);
  color: var(--nb-fg);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  box-shadow: 4px 4px 0 var(--nb-border);
  transition: transform .05s ease, background-color .15s ease;
}
.input:focus, .textarea:focus, .number:focus {
  background: #ffe5e5;
}
.textarea { min-height: 140px; resize: vertical; font-family: inherit; }
.inlineGroup { display: flex; align-items: center; gap: 10px; }
.number { width: 88px; text-align: center; }

/* Generic neobrutalist buttons within this page */
.main button {
  border: 3px solid var(--nb-border);
  border-radius: 8px;
  background: var(--nb-bg);
  color: var(--nb-fg);
  padding: 8px 12px;
  font-weight: 700;
  box-shadow: 4px 4px 0 var(--nb-border);
  cursor: pointer;
}
.main button:hover { background: #ffe5e5; }


/* Primary action button */
.primary {
  border: 3px solid var(--nb-border);
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--nb-accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 6px 6px 0 var(--nb-border);
  transition: transform .05s ease, background-color .15s ease;
}
.primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
@media (hover: hover) and (pointer: fine) {
  .primary:hover:not(:disabled) { background: var(--nb-accent-hover); }
}
.primary:active:not(:disabled) { transform: translateY(1px); }

/* Stepper */
.stepper { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; }
.step { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 3px solid var(--nb-border); background: var(--nb-card); color: var(--nb-fg); border-radius: 999px; box-shadow: 4px 4px 0 var(--nb-border); cursor: pointer; font-weight: 800; }
.step:disabled { opacity: .5; cursor: not-allowed; }
.stepActive { background: #ffe5e5; }
.stepDone { background: #e5ffe9; }
.stepIndex { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--nb-accent); color: #fff; font-size: 12px; }
.stepLabel { font-size: 12px; }
.stepHeader { text-align: center; margin: 4px 0; }
.navRow { display: flex; justify-content: center; gap: 8px; }

/* Callout helper box */
.callout { border: 3px solid var(--nb-border); background: #fff8dc; color: #111; border-radius: 10px; padding: 8px 12px; box-shadow: 4px 4px 0 var(--nb-border); text-align: center; font-size: 14px; }
.callout strong { font-weight: 900; }

/* Refinement-specific styles */
.refinementMode {
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
  border: 3px solid var(--nb-accent);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 8px 8px 0 var(--nb-border);
}

.refinementHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--nb-accent);
}

.refinementBadge {
  background: var(--nb-accent);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.selectedThumbnail {
  border: 3px solid var(--nb-accent) !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
  transform: scale(1.02);
  transition: all 0.2s ease;
}

.refineButton {
  background: var(--nb-accent);
  color: white;
  border: 2px solid var(--nb-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--nb-border);
  transition: all 0.1s ease;
}

.refineButton:hover {
  background: var(--nb-accent-hover);
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--nb-border);
}

.refineButton:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 var(--nb-border);
}

.historyButton {
  background: white;
  color: var(--nb-accent);
  border: 2px solid var(--nb-accent);
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--nb-border);
  transition: all 0.1s ease;
}

.historyButton:hover {
  background: var(--nb-accent);
  color: white;
}

.historyButtonActive {
  background: var(--nb-accent);
  color: white;
}

.iterationCard {
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.iterationCard:hover {
  border-color: var(--nb-accent);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--nb-border);
}

.iterationCardCurrent {
  border: 3px solid var(--nb-accent);
  box-shadow: 4px 4px 0 var(--nb-border);
}

.feedbackInput {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  border: 3px solid var(--nb-border);
  border-radius: 8px;
  background: white;
  color: var(--nb-fg);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  box-shadow: 4px 4px 0 var(--nb-border);
  transition: all 0.2s ease;
}

.feedbackInput:focus {
  background: #f0f8ff;
  border-color: var(--nb-accent);
  outline: none;
}

.refinementError {
  background: #fee;
  color: #c33;
  border: 2px solid #fcc;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  margin-top: 8px;
}

