: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;
}

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;
}

.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--charcoal);
  border-radius: 8px;
  color: #ffffff;
  background: var(--charcoal);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.96fr);
  gap: 24px;
  width: min(1280px, calc(100% - 40px));
  margin: 24px auto 42px;
  scroll-margin-top: 96px;
}

.input-column,
.result-column {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.input-column {
  padding: 24px;
}

.result-column {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 20px;
}

.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: 16px;
  padding: 18px;
  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;
}

.upload-copy {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

.upload-reference {
  width: 104px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

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

.upload-copy strong {
  font-size: 1.02rem;
}

.upload-copy span {
  margin-top: 4px;
  color: var(--muted);
}

.upload-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.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.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.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;
}

.preview-strip {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 16px 0 24px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.preview-frame {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: #e7ece5;
}

.preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.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;
}

.styles-header,
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.styles-header {
  margin-bottom: 12px;
}

.styles-header span,
.status-pill {
  display: inline-flex;
  align-items: center;
  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;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.style-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  min-height: 96px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  cursor: pointer;
  text-align: left;
}

.style-card[aria-pressed="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.14);
}

.style-card img {
  width: 112px;
  height: 74px;
  border-radius: 6px;
  object-fit: cover;
  background: #e7ece5;
}

.style-card strong,
.style-card small {
  display: block;
}

.style-card strong {
  margin-top: 2px;
  font-size: 0.94rem;
}

.style-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.32;
}

.result-head {
  margin-bottom: 16px;
}

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

.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;
}

.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 {
  margin-top: 16px;
}

.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) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .result-column {
    position: static;
  }

  .faq-teaser,
  .info-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand span {
    min-width: 0;
  }

  .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    display: none;
  }

  .store-link {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.84rem;
  }

  .site-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .site-nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.84rem;
  }

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

  .input-column,
  .result-column {
    padding: 16px;
  }

  h1 {
    font-size: 1.58rem;
    line-height: 1.12;
  }

  .upload-copy,
  .preview-strip {
    grid-template-columns: 1fr;
  }

  .upload-reference {
    width: 100%;
    max-height: 170px;
  }

  .preview-frame {
    width: 100%;
  }

  .style-grid {
    grid-auto-columns: minmax(214px, 72vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding: 2px 2px 12px;
    margin-right: -16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .style-card {
    grid-template-columns: 1fr;
    scroll-snap-align: start;
  }

  .style-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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

  .content-band {
    padding: 22px 12px;
  }

  .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;
  }
}
