:root {
  --bg: #fafafa;
  --card: #ffffff;
  --text: #222222;
  --muted: #6b6b6b;
  --border: #eeeeee;
  --accent: #ff385c;
  --accent-dark: #e03150;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 22px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Landing page */
.landing .container {
  max-width: 600px;
  margin: 0 auto;
  padding: 80px 20px;
  text-align: center;
}

.landing h1 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.landing .subtitle {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 40px;
  line-height: 1.5;
}

.landing .logo {
  font-size: 14px;
  letter-spacing: 2px;
  color: #999;
  margin-bottom: 20px;
}

.beehiiv-form-wrapper {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  background: var(--bg);
}

.beehiiv-form-wrapper iframe,
.beehiiv-form-wrapper div {
  margin-left: auto;
  margin-right: auto;
}

.landing footer {
  margin-top: 80px;
  font-size: 14px;
  color: #aaa;
}

/* Shared page layout */
.page-header {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-header .brand {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
}

.page-header .brand:hover {
  color: var(--text);
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.page-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}

.hero p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 28px;
  line-height: 1.55;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  box-shadow: var(--shadow-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
  font-size: 14px;
}

.btn-ghost:hover {
  border-color: #ccc;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* Form */
.submit-form {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.12);
}

.form-group textarea {
  min-height: 88px;
  resize: vertical;
}

.photo-dropzone {
  position: relative;
  display: block;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.photo-dropzone:hover,
.photo-dropzone:focus-visible {
  border-color: var(--accent);
  background: #fff;
  outline: none;
}

.photo-dropzone.is-dragover {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.12);
}

.photo-dropzone.is-disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.photo-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 0;
}

.photo-upload-label,
.photo-upload-hint {
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.photo-upload-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.photo-upload-hint {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.photo-preview {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-height: 360px;
}

.photo-preview img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: #111;
}

.photo-analyze-status {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  min-height: 1.25em;
}

.photo-analyze-status.error {
  color: #c13515;
}

.ai-helper-text {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.45;
}

.ai-fill-banner {
  font-size: 14px;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin: 0 0 20px;
}

.ai-fill-banner[hidden] {
  display: none;
}

.field-warning {
  margin: 6px 0 0;
  font-size: 13px;
  color: #b45309;
}

.field-warning[hidden] {
  display: none;
}

.label-muted {
  font-weight: 400;
  color: var(--muted);
}

.form-actions {
  margin-top: 8px;
}

.form-actions .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.submit-status {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  min-height: 1.25em;
}

.submit-status.error {
  color: #c13515;
}

/* Success banner */
.success-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 24px;
}

.success-banner[hidden] {
  display: none;
}

/* Feed */
.finds-feed {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.find-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.find-card-photo {
  aspect-ratio: 4 / 3;
  background: var(--border);
  overflow: hidden;
}

.find-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.find-card-body {
  padding: 18px 20px 20px;
}

.find-card-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.2px;
}

.find-card-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 8px;
}

.find-card-meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
}

.find-card-notes {
  font-size: 15px;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.5;
}

.find-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty-state h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 10px;
}

.empty-state p {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 24px;
}

.feed-status {
  text-align: center;
  padding: 32px;
  color: var(--muted);
  font-size: 15px;
}

.feed-status.error {
  color: #c13515;
}

/* Staging pages (unlisted) */
.staging-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 56, 92, 0.1);
  padding: 6px 10px;
  border-radius: 999px;
}

.staging-hero {
  margin-bottom: 28px;
}

.staging-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.staging-hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.4px;
}

.staging-hero p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.staging-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.staging-section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.staging-section-card h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.2px;
}

.staging-section-card > p {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

.staging-placeholder {
  padding: 20px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px dashed var(--border);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.staging-note {
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.staging-note a {
  color: var(--accent);
  font-weight: 600;
}

.staging-note a:hover {
  color: var(--accent-dark);
}

.staging-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 48px;
  text-align: center;
}

.staging-footer p {
  font-size: 13px;
  color: #aaa;
  margin: 0;
}

@media (min-width: 640px) {
  .landing h1,
  .hero h1 {
    font-size: 36px;
  }

  .submit-form {
    padding: 32px;
  }

  .form-actions .btn-primary {
    width: auto;
    min-width: 180px;
  }

  .staging-hero h1 {
    font-size: 32px;
  }

  .staging-section-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .staging-section-card {
    padding: 28px;
  }
}
