:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #647069;
  --paper: #fffdf8;
  --canvas: #f3f0e8;
  --line: #d9d5ca;
  --accent: #236d4b;
  --accent-dark: #185239;
  --accent-soft: #e5f1e9;
  --warning: #8a5a09;
  --warning-soft: #fff4d9;
  --error: #9f2f2f;
  --error-soft: #fff0ee;
  --shadow: 0 18px 50px rgb(32 48 39 / 9%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgb(255 255 255 / 85%), transparent 34rem),
    var(--canvas);
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: var(--accent-dark);
}

button,
.drop-zone {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
  color: var(--muted);
  font-size: 0.88rem;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: var(--accent);
}

.account-nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
}

main {
  width: min(100% - 32px, 820px);
  margin: 42px auto 80px;
}

.narrow-page {
  width: min(100% - 32px, 520px);
}

.narrow-page > .brand {
  margin-bottom: 28px;
}

.auth-card h1,
.compact-hero h1 {
  font-size: clamp(2.2rem, 7vw, 3.5rem);
}

.hero {
  max-width: 690px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 660px;
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 7vw, 4.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1rem, 2.5vw, 1.18rem);
  line-height: 1.65;
}

.workflow-card,
.result-card {
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid rgb(217 213 202 / 85%);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.workflow-card section + section {
  padding-top: 34px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.section-heading,
.section-heading > div,
.result-header {
  display: flex;
  align-items: center;
}

.section-heading,
.result-header {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}

.section-heading > div {
  gap: 11px;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.2rem, 3vw, 1.48rem);
  letter-spacing: -0.02em;
}

.step {
  display: grid;
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.count,
.optional {
  color: var(--muted);
  font-size: 0.84rem;
}

.drop-zone {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 26px;
  border: 1.5px dashed #98a89f;
  border-radius: 18px;
  text-align: center;
  cursor: pointer;
  transition: 150ms ease;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone span,
.drop-zone small,
.field-help,
.privacy-note,
.review-note {
  color: var(--muted);
}

.drop-zone small {
  margin-top: 5px;
  line-height: 1.45;
}

.upload-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 14px;
  color: var(--accent) !important;
  background: white;
  font-size: 1.5rem;
  box-shadow: 0 5px 20px rgb(25 67 46 / 10%);
}

.field-help,
.privacy-note,
.review-note {
  font-size: 0.84rem;
  line-height: 1.55;
}

.field-help {
  margin: 10px 0 0;
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.photo-preview {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  object-fit: cover;
  color: var(--muted);
  background: #ece9e1;
  font-size: 0.78rem;
}

.main-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  background: rgb(23 33 27 / 85%);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.photo-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.photo-actions button {
  min-height: 38px;
  padding: 5px;
  border: 0;
  color: var(--ink);
  background: white;
  cursor: pointer;
}

.photo-actions button:hover:not(:disabled) {
  color: var(--accent);
  background: var(--accent-soft);
}

.photo-actions button:disabled {
  color: #b6b6b0;
  cursor: default;
}

textarea,
.auth-card input,
.inline-form input,
.draft-field input,
.draft-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  background: white;
  outline: none;
}

.auth-card input,
.inline-form input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
}

.auth-card label,
.inline-form label {
  display: block;
  margin: 18px 0 7px;
  font-weight: 700;
}

textarea {
  min-height: 112px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.5;
}

textarea:focus,
.auth-card input:focus,
.inline-form input:focus,
.draft-field input:focus,
.draft-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(35 109 75 / 12%);
}

.password-result {
  padding: 18px;
  margin: 24px 0;
  border: 1px solid #98a89f;
  border-radius: 14px;
  background: var(--accent-soft);
}

.copy-row,
.inline-form,
.user-row,
.user-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.copy-row {
  flex-wrap: wrap;
  justify-content: space-between;
}

.copy-row code {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.primary-link {
  display: inline-block;
  margin-top: 20px;
  font-weight: 750;
}

.inline-form {
  align-items: end;
}

.inline-form > div {
  flex: 1;
}

.inline-form .primary-button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.user-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.user-row {
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.user-actions .secondary-button {
  min-height: 40px;
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
  }

  #account-email {
    display: none;
  }

  .inline-form,
  .user-row {
    align-items: stretch;
    flex-direction: column;
  }

  .inline-form .primary-button {
    width: 100%;
  }
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  font-weight: 750;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  margin-top: 30px;
  padding: 13px 20px;
  color: white;
  background: var(--accent);
  box-shadow: 0 8px 24px rgb(35 109 75 / 20%);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.privacy-note {
  margin: 13px auto 0;
  text-align: center;
}

.message {
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.error-message {
  margin-top: 26px;
  color: var(--error);
  background: var(--error-soft);
}

.warning-message {
  margin-bottom: 20px;
  color: var(--warning);
  background: var(--warning-soft);
}

.result-card {
  margin-top: 28px;
}

.result-header {
  align-items: flex-start;
}

.secondary-button {
  flex: 0 0 auto;
  padding: 10px 16px;
  color: var(--accent);
  background: var(--accent-soft);
}

.draft-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 25px;
}

.draft-field {
  min-width: 0;
}

.draft-field.wide {
  grid-column: 1 / -1;
}

.draft-field label,
.specific-heading {
  display: block;
  margin-bottom: 7px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.draft-field input,
.draft-field textarea {
  padding: 11px 12px;
}

.draft-field textarea {
  min-height: 98px;
}

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

.specific-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(120px, 1.2fr);
  gap: 7px;
}

.confidence {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.pricing-disclaimer {
  margin-top: 25px;
  padding: 13px 15px;
  border-left: 3px solid var(--warning);
  color: var(--muted);
  background: var(--warning-soft);
  font-size: 0.84rem;
  line-height: 1.5;
}

footer {
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.policy-page {
  width: min(100% - 32px, 760px);
}

.policy-card h1 {
  margin-bottom: 10px;
}

.policy-card h2 {
  margin: 34px 0 12px;
}

.policy-card p,
.policy-card li {
  line-height: 1.65;
}

.policy-card li + li {
  margin-top: 8px;
}

.policy-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.ebay-connection {
  margin-top: 1.5rem;
}

.ebay-draft-section {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-top: 1.75rem;
}

.ebay-draft-section h3 {
  margin: 0.2rem 0 0.5rem;
}

.ebay-fields {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0;
}

.ebay-fields select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  color: var(--ink);
  font: inherit;
  min-height: 2.8rem;
  padding: 0.55rem 0.7rem;
  width: 100%;
}

#ebay-transfer-status {
  margin-bottom: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .site-header {
    padding: 17px 16px;
  }

  .site-header > p {
    display: none;
  }

  main {
    width: min(100% - 20px, 820px);
    margin-top: 28px;
  }

  .workflow-card,
  .result-card {
    border-radius: 19px;
  }

  .section-heading {
    align-items: flex-start;
  }

  .drop-zone {
    min-height: 180px;
  }

  .photo-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-header {
    flex-direction: column;
  }

  .secondary-button {
    width: 100%;
  }

  .draft-fields,
  .specifics-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
