/* Seller Calculator Pro — Architectural Fintech & Editorial Atelier */
:root {
  --bg-ivory: #FAF8F3;
  --bg-paper: #FFFFFF;
  --bg-tinted: #F3EFE6;
  --ink-primary: #16221E;
  --ink-secondary: #4A5853;
  --ink-muted: #76847F;
  --border-hairline: #E4DDD0;
  --border-strong: #CFC5B4;

  /* Default Hub Palette: Botanical Emerald + Champagne Gold */
  --accent: #14533E;
  --accent-hover: #0E3D2D;
  --accent-soft: #E8F3EE;
  --accent-border: #B7D8CA;
  --gold: #C89B3C;
  --gold-soft: #FBF4E4;

  --good: #156046;
  --good-bg: #E7F5EF;
  --warn: #9A6314;
  --warn-bg: #FEF5E6;
  --bad: #A62639;
  --bad-bg: #FCECEF;

  --shadow-card: 0 10px 30px -12px rgba(22, 34, 30, 0.08), 0 2px 6px -1px rgba(22, 34, 30, 0.04);
  --shadow-float: 0 18px 40px -14px rgba(22, 34, 30, 0.14);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* Tailored Per-Marketplace Palettes */
body[data-theme="poshmark"] {
  --accent: #7F1D3A;
  --accent-hover: #61142B;
  --accent-soft: #FBEFF3;
  --accent-border: #E8BDCA;
}
body[data-theme="mercari"] {
  --accent: #3C389E;
  --accent-hover: #2C297A;
  --accent-soft: #EFEFFD;
  --accent-border: #C4C2F2;
}
body[data-theme="ebay"] {
  --accent: #1D4ED8;
  --accent-hover: #173DA8;
  --accent-soft: #EDF3FE;
  --accent-border: #B9D0FA;
}
body[data-theme="depop"] {
  --accent: #BE123C;
  --accent-hover: #960E2F;
  --accent-soft: #FFF0F3;
  --accent-border: #F8B8C7;
}
body[data-theme="etsy"] {
  --accent: #B84A27;
  --accent-hover: #91381C;
  --accent-soft: #FDF2ED;
  --accent-border: #EDC4B4;
}
body[data-theme="whatnot"] {
  --accent: #1E293B;
  --accent-hover: #0F172A;
  --accent-soft: #FEF9E7;
  --accent-border: #E5C86B;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink-primary);
  background-color: var(--bg-ivory);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(200, 155, 60, 0.08), transparent 34%),
    radial-gradient(circle at 88% 14%, rgba(20, 83, 62, 0.06), transparent 38%),
    linear-gradient(to right, rgba(22, 34, 30, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 34, 30, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .serif-display {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.02em;
  margin: 0;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Header & Brand Lockup */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink-primary);
}

.brand-svg {
  flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(20, 83, 62, 0.14));
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scp-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, #103D2E, #1B634B);
  color: #F6DFA4;
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid #C89B3C;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--ink-primary);
}

.brand-tagline {
  display: block;
  font-size: 0.74rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--ink-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 999px;
  transition: all 0.18s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-link.active {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(22, 34, 30, 0.14);
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink-primary);
}

/* Hero Section */
.hero {
  padding: 42px 0 28px;
}

.hero-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 34px 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--accent));
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.15;
  color: var(--ink-primary);
  margin-bottom: 12px;
}

.hero p.lead {
  font-size: 1.03rem;
  color: var(--ink-secondary);
  max-width: 720px;
  margin: 0 0 20px;
}

.preset-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

.preset-chip {
  background: var(--bg-ivory);
  border: 1px solid var(--border-hairline);
  color: var(--ink-primary);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

.preset-chip:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
}

/* Studio Workspace Grid */
.studio-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.panel {
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.panel-header h2 {
  font-size: 1.32rem;
}

.badge-soft {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--gold-soft);
  color: #876116;
  border: 1px solid #EAD196;
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.field label small {
  font-weight: 500;
  color: var(--ink-muted);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix, .input-suffix {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 0.92rem;
  pointer-events: none;
}

.input-prefix { left: 13px; }
.input-suffix { right: 13px; }

input[type="number"], input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-hairline);
  background: var(--bg-ivory);
  color: var(--ink-primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.96rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input.has-prefix {
  padding-left: 28px;
  font-family: 'JetBrains Mono', monospace;
}

input.has-suffix {
  padding-right: 30px;
  font-family: 'JetBrains Mono', monospace;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: var(--bg-ivory);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.toggle-row span {
  font-size: 0.86rem;
  font-weight: 600;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Telemetry & Payout Hero Box */
.payout-banner {
  background: linear-gradient(145deg, var(--accent-soft), #FFFFFF);
  border: 1.5px solid var(--accent-border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.payout-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.payout-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.1;
  margin-top: 4px;
}

.margin-pill {
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.margin-pill.good { background: var(--good-bg); color: var(--good); }
.margin-pill.warn { background: var(--warn-bg); color: var(--warn); }
.margin-pill.bad  { background: var(--bad-bg); color: var(--bad); }

/* Visual Telemetry Bar */
.telemetry-box {
  margin-bottom: 20px;
}

.telemetry-bar {
  height: 16px;
  border-radius: 999px;
  background: var(--bg-tinted);
  overflow: hidden;
  display: flex;
  border: 1px solid var(--border-hairline);
}

.seg-profit { background: #167956; transition: width 0.25s ease; }
.seg-fees   { background: #C89B3C; transition: width 0.25s ease; }
.seg-ship   { background: #4F6BED; transition: width 0.25s ease; }
.seg-cogs   { background: #94A3B8; transition: width 0.25s ease; }

.telemetry-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--ink-secondary);
  font-weight: 600;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}

/* Boutique Atelier Receipt */
.receipt-card {
  background: #FFFEFA;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  position: relative;
}

.receipt-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border-hairline);
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.9rem;
}

.receipt-line.deduct span:last-child {
  color: var(--bad);
}

.receipt-line.total {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1.5px solid var(--ink-primary);
  font-weight: 700;
  font-size: 1rem;
}

/* Offer Simulator */
.offer-sim {
  margin-top: 20px;
  padding: 18px;
  background: var(--bg-ivory);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
}

.offer-sim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.offer-sim-head h3 {
  font-size: 1.05rem;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.offer-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.offer-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.offer-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  margin: 2px 0;
}

.offer-net {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Buttons */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.16s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-paper);
  color: var(--ink-primary);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* 6-Platform Comparison Matrix */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.plat-card {
  background: var(--bg-paper);
  border: 1.5px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plat-card:hover {
  transform: translateY(-3px);
}

.plat-card.winner {
  border-color: #C89B3C;
  box-shadow: 0 14px 34px -10px rgba(200, 155, 60, 0.28);
}

.winner-ribbon {
  position: absolute;
  top: -11px;
  right: 18px;
  background: linear-gradient(135deg, #103D2E, #1C664D);
  color: #F8E2A6;
  border: 1px solid #C89B3C;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.plat-badge {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.plat-net {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.85rem;
  font-weight: 700;
  margin: 4px 0 8px;
}

.plat-meta {
  font-size: 0.84rem;
  color: var(--ink-secondary);
  border-top: 1px solid var(--border-hairline);
  padding-top: 10px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plat-link {
  margin-top: 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.plat-link:hover {
  text-decoration: underline;
}

/* Sourcing Haul Log Table */
.haul-panel {
  margin-bottom: 44px;
}

.table-scroll {
  overflow-x: auto;
}

table.haul-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.haul-table th {
  text-align: left;
  padding: 11px 12px;
  background: var(--bg-ivory);
  color: var(--ink-secondary);
  font-weight: 700;
  border-bottom: 1.5px solid var(--border-hairline);
}

.haul-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.del-btn {
  background: none;
  border: none;
  color: var(--bad);
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.del-btn:hover {
  background: var(--bad-bg);
}

/* Editorial Prose Pages (About, Contact, Privacy, Terms) */
.prose-card {
  background: var(--bg-paper);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-card);
  max-width: 860px;
  margin: 0 auto 44px;
}

.prose-card h2 {
  font-size: 1.45rem;
  margin-top: 26px;
  margin-bottom: 10px;
}

.prose-card p, .prose-card li {
  color: var(--ink-secondary);
  font-size: 0.98rem;
}

.status-banner {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
}

.status-banner.ok {
  display: block;
  background: var(--good-bg);
  color: var(--good);
  border: 1px solid var(--accent-border);
}

.status-banner.err {
  display: block;
  background: var(--bad-bg);
  color: var(--bad);
}

/* Footer */
.site-footer {
  background: #12241E;
  color: #DCE5E1;
  padding: 48px 0 28px;
  margin-top: 32px;
  border-top: 3px solid #C89B3C;
}

.site-footer .brand-name {
  color: #FFFFFF;
}

.site-footer .brand-tagline {
  color: #A4B8B0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-note {
  font-size: 0.88rem;
  color: #A4B8B0;
  margin-top: 14px;
  max-width: 390px;
}

.footer-col h4 {
  color: #F3D58D;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: #DCE5E1;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #F3D58D;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: #93A8A0;
}

@media (max-width: 940px) {
  .studio-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .mobile-menu-btn { display: inline-flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0;
  }
  .site-nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .compare-grid { grid-template-columns: 1fr; }
  .offer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { padding: 24px 20px; }
}
