:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #151a18;
  --muted: #65726e;
  --line: #d9e0e7;
  --blue: #0d6efd;
  --blue-dark: #084db5;
  --green: #245c43;
  --clay: #b96f45;
  --charcoal: #17201d;
  --soft-blue: #eef5ff;
  --soft-green: #edf6f0;
  --shadow: 0 18px 45px rgba(21, 26, 24, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  overflow-x: clip;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 244, 249, 0.88)),
    var(--bg);
  overflow-x: clip;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(217, 224, 231, 0.92);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(21, 26, 24, 0.14);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.98rem;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: #35423d;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: #eef2f6;
}

.workspace {
  width: min(960px, calc(100% - 40px));
  margin: 24px auto 42px;
  scroll-margin-top: 96px;
}

.trial-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.trial-intro {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--clay);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  font-size: 2.25rem;
  line-height: 1.02;
  overflow-wrap: break-word;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.support-copy {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.52;
}

.upload-zone {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px dashed #9fb3a8;
  border-radius: 8px;
  background: #f9fbfd;
}

.upload-zone.is-dragging {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
  transform: none;
}

.button.is-disabled {
  pointer-events: none;
  opacity: 0.46;
  transform: none;
}

.button.primary {
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
}

.button.primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface-strong);
  border-color: var(--line);
}

.button.secondary .button-glyph {
  color: var(--blue);
  background: var(--soft-blue);
}

.button.store {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.button.wide {
  flex: 1 1 180px;
}

.button-glyph {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  line-height: 18px;
}

.trial-toolbar {
  display: grid;
  grid-template-columns: minmax(112px, 0.36fr) minmax(0, 1fr);
  gap: 10px;
}

.trial-toolbar .button {
  width: 100%;
}

.generate-button {
  min-height: 48px;
  font-size: 1rem;
}

.generate-button.is-store-cta {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.trial-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.text-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0;
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.preview-meta span,
.preview-meta small {
  display: block;
}

.preview-meta span {
  font-weight: 800;
}

.preview-meta small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.4;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #f7f9fb;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-pill.is-busy {
  color: var(--blue-dark);
  border-color: #b8d4ff;
  background: #eef6ff;
}

.status-pill.is-error {
  color: #8a1f11;
  border-color: #f0b4a8;
  background: #fff4f1;
}

.status-pill.is-done {
  color: #14532d;
  border-color: #bbdfc6;
  background: #effaf2;
}

.compare-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dfe7e6;
}

.compare-shell:not(.has-result) .after-image,
.compare-shell:not(.has-result) .compare-handle,
.compare-shell:not(.has-result) .compare-slider {
  display: none;
}

.compare-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.after-image {
  clip-path: inset(0 0 0 56%);
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 56%;
  width: 3px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(23, 32, 29, 0.22);
  pointer-events: none;
}

.compare-handle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(23, 32, 29, 0.18);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(21, 26, 24, 0.18);
  content: "";
  transform: translate(-50%, -50%);
}

.compare-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.upload-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: grid;
  max-width: 360px;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 224, 231, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(21, 26, 24, 0.14);
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.upload-hint strong,
.upload-hint span {
  display: block;
}

.upload-hint strong {
  font-size: 0.95rem;
}

.upload-hint span {
  color: var(--muted);
  font-size: 0.86rem;
}

.compare-shell.has-result .upload-hint {
  visibility: hidden;
  opacity: 0;
}

.progress-wrap {
  margin-top: 14px;
}

.progress-line {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e2e9df;
}

.progress-line span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 260ms ease;
}

.progress-wrap small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 16px;
  gap: 10px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #385045;
  background: var(--soft-green);
  font-size: 0.78rem;
  font-weight: 800;
}

.content-band {
  padding: 26px 20px;
}

.content-band.alternate {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.band-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-heading.compact {
  max-width: 760px;
  margin-bottom: 18px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.info-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.step-number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 900;
}

h3 {
  margin: 14px 0 6px;
  font-size: 1rem;
  letter-spacing: 0;
}

.info-grid p,
.faq-list p,
.legal-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.56;
}

.faq-teaser {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list.full {
  margin-top: 22px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.faq-list summary {
  min-height: 52px;
  padding: 15px 18px;
  cursor: pointer;
  font-weight: 900;
  list-style-position: inside;
}

.faq-list details p {
  padding: 0 18px 18px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--charcoal);
  background: #ffffff;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 18px;
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 34px;
  color: var(--muted);
}

.site-footer strong,
.site-footer span,
.site-footer small {
  display: block;
}

.site-footer strong {
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer a {
  color: #35423d;
  text-decoration: none;
  font-weight: 800;
}

.subpage {
  width: min(900px, calc(100% - 40px));
  margin: 34px auto 48px;
}

.subpage-hero {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.subpage-hero h1 {
  margin-top: 6px;
}

.legal-page {
  display: grid;
  gap: 14px;
}

.legal-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.legal-section h2 {
  margin-bottom: 8px;
}

.subpage-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .faq-teaser,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .faq-teaser .text-link {
    justify-self: start;
  }
}

@media (max-width: 680px) {
  .topbar {
    display: grid;
    grid-template-areas:
      "brand"
      "nav";
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: 64px;
    padding: 8px 12px;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
    gap: 9px;
  }

  .brand span {
    min-width: 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .brand small {
    display: none;
  }

  .site-nav {
    grid-area: nav;
    display: flex;
    justify-content: flex-start;
    gap: 2px;
    overflow-x: auto;
    padding-top: 2px;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    min-height: 30px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 0.78rem;
  }

  .site-nav a[href="#how-it-works"] {
    display: none;
  }

  .workspace {
    width: calc(100% - 24px);
    margin-top: 10px;
    margin-bottom: 26px;
    scroll-margin-top: 78px;
  }

  .trial-panel {
    padding: 14px;
    box-shadow: 0 12px 28px rgba(21, 26, 24, 0.08);
  }

  .trial-intro {
    display: grid;
    gap: 10px;
  }

  .trial-intro .status-pill {
    justify-self: start;
  }

  .section-heading {
    gap: 5px;
    margin-bottom: 10px;
  }

  .eyebrow {
    font-size: 0.68rem;
  }

  h1 {
    font-size: 1.32rem;
    line-height: 1.1;
    max-width: 12.5em;
  }

  .support-copy {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .upload-zone {
    gap: 12px;
    padding: 10px;
  }

  .button {
    min-height: 42px;
    font-size: 0.9rem;
  }

  .compare-shell {
    aspect-ratio: 4 / 3;
  }

  .upload-hint {
    display: none;
  }

  .preview-meta small {
    font-size: 0.82rem;
  }

  .preview-meta small {
    display: none;
  }

  .trial-toolbar {
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    gap: 8px;
  }

  .trial-toolbar .button {
    padding-right: 10px;
    padding-left: 10px;
  }

  .generate-button {
    min-height: 44px;
  }

  .trial-subbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .text-button,
  .preview-meta span {
    font-size: 0.9rem;
  }

  .status-pill:not(.is-busy):not(.is-error):not(.is-done) {
    display: none;
  }

  .trust-row {
    display: none;
  }

  .result-actions .button,
  .subpage-cta .button {
    flex: 1 1 100%;
  }

  .content-band {
    display: none;
  }

  .info-grid article,
  .legal-section,
  .subpage-hero {
    padding: 16px;
  }

  .faq-list summary {
    padding: 14px 15px;
  }

  .faq-list details p {
    padding: 0 15px 16px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    align-items: start;
    width: calc(100% - 24px);
    padding: 24px 0 30px;
  }

  .site-footer nav {
    justify-content: flex-start;
  }

  .subpage {
    width: calc(100% - 24px);
    margin: 18px auto 34px;
  }
}
