/* ResaleRadar AI design system — emerald / fresh & friendly.
   Served as a static file so it complies with the strict CSP (style-src 'self').
   No inline styles anywhere in templates. */

:root {
  --ink: #14201A;
  --heading: #0B1F17;
  --body: #374151;
  --muted: #6B7280;
  --emerald: #059669;
  --emerald-dark: #047857;
  --mint: #34D399;
  --soft: #F0FDF4;
  --soft-2: #ECFDF5;
  --border: #E5E7EB;
  --white: #FFFFFF;
  --danger: #DC2626;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-md: 0 4px 12px rgba(5, 150, 105, .10), 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--body);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; font-weight: 700; }
h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.6rem; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0; }
a { color: var(--emerald-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
main { flex: 1 0 auto; width: 100%; }
.section { padding: 56px 0; }
.narrow { max-width: 460px; margin: 0 auto; }

/* ---------------------------------------------------------------- header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-left { display: flex; align-items: center; gap: 8px; }

/* wordmark logo */
.logo { display: inline-flex; align-items: baseline; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.03em; }
.logo:hover { text-decoration: none; }
.logo .sale { color: var(--ink); }
.logo .scout { color: var(--emerald); }
.logo .dot { color: var(--mint); }
.logo-svg { height: 26px; width: auto; display: block; }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { color: var(--body); font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--emerald-dark); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* hamburger (CSS-only, checkbox hack) */
.nav-toggle { display: none; }
.hamburger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; cursor: pointer; border-radius: 8px;
}
.hamburger span { display: block; height: 2px; width: 22px; background: var(--ink); border-radius: 2px; transition: .2s; margin: 0 auto; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius); font-weight: 700; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent; transition: .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--emerald); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--emerald-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--emerald); color: var(--emerald-dark); background: var(--soft); }
.btn-text { background: transparent; color: var(--body); padding: 11px 8px; }
.btn-text:hover { color: var(--emerald-dark); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }

/* ---------------------------------------------------------------- hero */
.hero { text-align: center; padding: 80px 0 56px; background: linear-gradient(180deg, var(--soft) 0%, #fff 100%); }
.hero h1 { margin-bottom: 16px; }
.hero .tagline { font-size: 1.2rem; color: var(--muted); max-width: 36rem; margin: 0 auto 28px; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.eyebrow { display: inline-block; background: var(--soft-2); color: var(--emerald-dark); font-weight: 700;
  font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 20px; }

/* ---------------------------------------------------------------- steps / features */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { text-align: center; padding: 8px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--soft-2); color: var(--emerald-dark); font-weight: 800; font-size: 1.1rem; margin-bottom: 12px; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .95rem; }
.price-note { text-align: center; color: var(--muted); margin-top: 36px; font-size: .95rem; }

/* ---------------------------------------------------------------- cards / forms */
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 32px; }
.card-pad { padding: 32px; }
.auth-card { max-width: 440px; margin: 48px auto; }
.auth-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: 6px; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; color: var(--heading); margin-bottom: 6px; font-size: .92rem; }
.field .hint { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="email"], input[type="number"], input[type="password"], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; font-family: inherit; color: var(--ink); background: #fff; transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(5,150,105,.15); }
textarea { min-height: 90px; resize: vertical; }
.note { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.errors { list-style: none; margin-top: 6px; }
.error { color: var(--danger); font-size: .85rem; }
.flash { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: .92rem; }
.flash-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.flash-ok { background: var(--soft-2); color: var(--emerald-dark); border: 1px solid #A7F3D0; }
.form-foot { text-align: center; margin-top: 18px; font-size: .92rem; color: var(--muted); }
.text-center { text-align: center; }
.mt { margin-top: 16px; }

/* table */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { background: var(--soft); color: var(--heading); font-weight: 700; }
tr:last-child td { border-bottom: none; }
.count { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }

/* ---------------------------------------------------------------- portal shell */
.page-head { padding: 28px 0 8px; }
.page-head h1 { font-size: 1.7rem; }
.page-head .crumbs { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 24px 0; }
.tile { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); transition: .15s; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--mint); }
.tile h3 { color: var(--heading); margin-bottom: 4px; }
.tile p { color: var(--muted); font-size: .9rem; }
.upgrade-options { display: flex; flex-wrap: wrap; gap: 12px; }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { color: var(--ink); }
.status { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; text-transform: capitalize; }
.status.active { background: var(--soft-2); color: var(--emerald-dark); }
.status.inactive, .status.canceled { background: #FEF2F2; color: var(--danger); }
.status.past_due { background: #FFFBEB; color: #B45309; }

/* ---------------------------------------------------------------- search / browse */
.filter-bar { display: flex; gap: 12px; align-items: center; margin: 20px 0 24px; flex-wrap: wrap; }
.filter-bar input[type="text"] { flex: 1; max-width: 420px; }
.result-count { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.prompt { text-align: center; color: var(--muted); padding: 64px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.photo-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: .15s; }
.photo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.photo-card a { color: inherit; display: block; }
.photo-card a:hover { text-decoration: none; }
.photo-card img { width: 100%; height: 170px; object-fit: cover; display: block; background: var(--soft); }
.photo-card .body { padding: 12px 14px 14px; }
.photo-card .sale-name { font-weight: 700; color: var(--emerald-dark); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-card .sale-meta { font-size: .82rem; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: .72rem; background: var(--soft-2); color: var(--emerald-dark); border-radius: 999px; padding: 3px 9px; font-weight: 600; }
.card-links { margin-top: 10px; display: flex; gap: 14px; font-size: .8rem; }
.card-links a { font-weight: 600; }

/* ---------------------------------------------------------------- footer */
.site-footer { flex-shrink: 0; border-top: 1px solid var(--border); background: var(--soft); padding: 28px 0; margin-top: 56px; }
.site-footer .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.site-footer p { color: var(--muted); font-size: .88rem; }
.site-footer .links { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); font-size: .88rem; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 760px) {
  h1 { font-size: 2rem; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .hamburger { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links li { width: 100%; }
  .nav-links a, .nav-links .btn { display: block; width: 100%; padding: 14px 20px; border-radius: 0; text-align: left; border: none; }
  .nav-links a { border-bottom: 1px solid var(--border); }
  .nav-toggle:checked ~ .nav-links { max-height: 420px; }
  .nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { margin-top: 10px; }
}
