:root {
  --navy: #0b1f33;
  --navy-2: #132f4c;
  --blue: #1266d6;
  --blue-dark: #0d4fa8;
  --orange: #f59e0b;
  --ink: #152233;
  --muted: #66758a;
  --line: #dce3eb;
  --surface: #f5f7fa;
  --white: #ffffff;
  --success: #15803d;
  --shadow: 0 18px 50px rgba(16, 36, 58, .12);
  --radius: 16px;
}

/* Ensure the HTML hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--white); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
.container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: 92px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(220,227,235,.9); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.45rem; font-weight: 800; letter-spacing: -.045em; }
.brand-mark { width: 42px; height: 34px; color: var(--navy); }
.brand-mark svg { width: 100%; height: 100%; fill: currentColor; }
.brand-mark .brand-window { fill: white; }
.brand-accent { color: var(--orange); }
.main-nav { display: flex; align-items: center; gap: 30px; font-size: .94rem; font-weight: 600; color: #344256; }
.main-nav a:hover { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.text-button, .text-link { border: 0; background: none; color: var(--navy); font-weight: 700; padding: 6px; }
.text-link { color: var(--blue); font-size: .86rem; }
.menu-toggle { display: none; border: 0; background: none; font-size: 1.5rem; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid transparent; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--blue); color: white; box-shadow: 0 8px 22px rgba(18,102,214,.22); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { border-color: var(--line); background: white; color: var(--navy); }
.button-dark { background: var(--navy); color: white; }
.button-light { background: white; color: var(--navy); }
.button-outline-light { border-color: rgba(255,255,255,.55); color: white; background: transparent; }
.button-small { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.full-width { width: 100%; }

.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #f7faff 0%, #eef5ff 55%, #fff7e8 100%); padding: 88px 0 76px; }
.hero::before { content: ""; position: absolute; width: 580px; height: 580px; border: 90px solid rgba(18,102,214,.055); border-radius: 50%; right: -230px; top: -230px; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.13fr .87fr; gap: 64px; align-items: center; }
.eyebrow { display: inline-block; margin-bottom: 13px; color: var(--blue); font-size: .79rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #bed7ff; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 22px; font-size: clamp(2.7rem, 5.2vw, 4.85rem); line-height: 1.02; letter-spacing: -.055em; color: var(--navy); }
h2 { margin-bottom: 16px; font-size: clamp(2rem, 3.5vw, 3.1rem); line-height: 1.08; letter-spacing: -.04em; color: var(--navy); }
h3 { color: var(--navy); }
.hero-copy > p { max-width: 720px; margin-bottom: 30px; font-size: 1.09rem; color: #526277; }
.hero-search { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; max-width: 760px; background: white; padding: 8px; border: 1px solid #d6e0ed; border-radius: 14px; box-shadow: 0 14px 38px rgba(14,51,91,.11); }
.hero-search input { width: 100%; border: 0; outline: none; padding: 0 4px; color: var(--ink); }
.search-icon { padding-left: 10px; color: var(--muted); font-size: 1.35rem; }
.hero-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 28px; }
.hero-trust div { display: flex; flex-direction: column; border-left: 3px solid var(--orange); padding-left: 11px; }
.hero-trust strong { color: var(--navy); font-size: .9rem; }
.hero-trust span { color: var(--muted); font-size: .76rem; }
.hero-panel { background: var(--navy); color: white; padding: 26px; border-radius: 22px; box-shadow: 0 28px 70px rgba(10,31,51,.23); }
.hero-panel-top { display: flex; align-items: center; gap: 9px; color: #cad6e3; font-size: .82rem; font-weight: 700; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #40d16e; box-shadow: 0 0 0 5px rgba(64,209,110,.12); }
.metric-large { margin: 26px 0 20px; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.13); }
.metric-large span, .metric-large small { display: block; color: #9fb0c3; }
.metric-large strong { display: block; margin: 4px 0; font-size: 3rem; line-height: 1; }
.activity-list { display: grid; gap: 12px; }
.activity-list article { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 11px; background: rgba(255,255,255,.065); padding: 12px; border-radius: 12px; }
.activity-icon { display: grid; place-items: center; width: 38px; height: 38px; background: rgba(255,255,255,.1); border-radius: 10px; color: var(--orange); }
.activity-list strong, .activity-list small { display: block; }
.activity-list strong { font-size: .86rem; }
.activity-list small { color: #9fb0c3; font-size: .7rem; }
.activity-list b { font-size: .82rem; }
.panel-note { margin-top: 16px; color: #8195aa; font-size: .7rem; text-align: center; }

.category-strip { position: relative; z-index: 3; margin-top: -18px; }
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.category-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 144px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 10px 30px rgba(13,42,72,.06); text-align: left; transition: transform .18s ease, border-color .18s ease; }
.category-card:hover { transform: translateY(-3px); border-color: #a8c9f4; }
.category-card span { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 18px; border-radius: 10px; background: #eaf3ff; color: var(--blue); font-size: 1.1rem; }
.category-card b { color: var(--navy); font-size: .87rem; line-height: 1.2; }
.category-card small { margin-top: 4px; color: var(--muted); font-size: .7rem; }

.section-heading { margin-bottom: 38px; }
.section-heading p { color: var(--muted); }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.centered { max-width: 760px; margin-inline: auto; margin-bottom: 44px; text-align: center; }
.marketplace { background: white; }
.market-layout { display: grid; grid-template-columns: 250px 1fr; gap: 34px; }
.filters { height: fit-content; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfe; }
.filter-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.filter-header h3 { margin: 0; }
.filter-label { display: block; margin: 17px 0 7px; font-size: .8rem; font-weight: 800; color: #405067; }
.input, .filters select, .seller-form input, .seller-form select, .seller-form textarea, .auth-form input { width: 100%; border: 1px solid #cfd9e5; border-radius: 9px; background: white; padding: 11px 12px; outline: none; }
.input:focus, .seller-form input:focus, .seller-form select:focus, .seller-form textarea:focus, .auth-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,102,214,.1); }
#maxPrice { width: 100%; accent-color: var(--blue); }
.checkbox-row { display: flex; align-items: center; gap: 9px; margin-top: 18px; font-size: .82rem; font-weight: 650; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; color: var(--muted); font-size: .86rem; }
.results-toolbar select { margin-left: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: var(--ink); background: white; }
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.listing-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: white; transition: transform .18s ease, box-shadow .18s ease; }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.listing-image { position: relative; display: grid; place-items: center; aspect-ratio: 4/3; overflow: hidden; background: linear-gradient(145deg, #e9eef4, #f9fbfd); color: #7b8da2; }
.listing-image svg { width: 74%; height: 74%; }
.listing-badge { position: absolute; top: 12px; left: 12px; padding: 5px 8px; border-radius: 999px; background: white; color: var(--navy); box-shadow: 0 4px 12px rgba(0,0,0,.1); font-size: .65rem; font-weight: 800; }
.favorite-button { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.93); color: #8190a2; font-size: 1.2rem; }
.favorite-button.active { color: #d53c56; }
.listing-content { padding: 16px; }
.listing-meta { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: .68rem; }
.listing-title { min-height: 44px; margin-bottom: 9px; font-size: .94rem; line-height: 1.35; }
.listing-price { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.listing-price strong { color: var(--navy); font-size: 1.22rem; }
.listing-price small { color: var(--success); font-weight: 700; }
.listing-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid #edf1f5; color: var(--muted); font-size: .7rem; }
.listing-view { border: 0; background: none; color: var(--blue); font-weight: 800; }
.empty-state { padding: 70px 20px; border: 1px dashed #c6d3e1; border-radius: 16px; text-align: center; color: var(--muted); }
.empty-state span { font-size: 2.5rem; }

.value-section { background: var(--surface); }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps-grid article { padding: 30px; border-radius: 16px; background: white; box-shadow: 0 10px 30px rgba(18,46,74,.06); }
.steps-grid article > span { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 22px; border-radius: 12px; background: var(--navy); color: white; font-weight: 800; }
.steps-grid h3 { margin-bottom: 10px; }
.steps-grid p { margin-bottom: 0; color: var(--muted); }

.seller-section { background: linear-gradient(180deg, white, #f7faff); }
.seller-grid { display: grid; grid-template-columns: .88fr 1.12fr; gap: 68px; align-items: center; }
.seller-copy p { color: var(--muted); }
.check-list { display: grid; gap: 12px; padding: 0; margin: 28px 0; list-style: none; }
.check-list li { position: relative; padding-left: 31px; color: #3b4d61; }
.check-list li::before { content: "✓"; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #e6f7ec; color: var(--success); font-size: .72rem; font-weight: 900; }
.seller-form { padding: 30px; border: 1px solid var(--line); border-radius: 19px; background: white; box-shadow: var(--shadow); }
.form-heading p { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.form-grid label, .auth-form label { display: grid; gap: 6px; color: #43536a; font-size: .78rem; font-weight: 750; }
.form-grid .full { grid-column: 1 / -1; }
.seller-form textarea { resize: vertical; }
.fine-print { display: block; margin-top: 10px; color: #8895a5; text-align: center; }

.about-section { background: var(--navy); color: white; }
.about-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; }
.about-section h2 { color: white; }
.about-section p { color: #c1cfdd; font-size: 1.03rem; }
.cta-section { padding: 62px 0; background: var(--blue); color: white; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-section h2 { max-width: 720px; margin-bottom: 0; color: white; }
.cta-actions { display: flex; gap: 12px; flex-shrink: 0; }

.site-footer { padding: 64px 0 22px; background: #071421; color: #9eb0c4; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 48px; }
.footer-brand { color: white; }
.footer-grid p { max-width: 330px; margin-top: 14px; font-size: .84rem; }
.footer-grid h4 { margin: 0 0 14px; color: white; font-size: .85rem; }
.footer-grid > div:not(:first-child) { display: flex; flex-direction: column; gap: 9px; font-size: .78rem; }
.footer-grid a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: .69rem; letter-spacing: .08em; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(2,12,23,.72); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 28px; border-radius: 20px; background: white; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef2f6; color: var(--navy); font-size: 1.4rem; }
.modal-listing { display: grid; grid-template-columns: 1fr 1.05fr; gap: 28px; }
.modal-visual { display: grid; place-items: center; min-height: 340px; border-radius: 15px; background: linear-gradient(145deg, #e9eef4, #f9fbfd); color: #72869c; }
.modal-visual svg { width: 72%; height: 72%; }
.modal-details { padding: 18px 0; }
.modal-details h2 { padding-right: 35px; font-size: 2rem; }
.modal-price { margin: 16px 0; color: var(--navy); font-size: 2rem; font-weight: 850; }
.detail-table { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; margin: 20px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.detail-table div { background: white; padding: 11px; }
.detail-table span { display: block; color: var(--muted); font-size: .68rem; }
.detail-table strong { font-size: .82rem; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-modal { width: min(470px, 100%); text-align: center; }
.modal-brand { color: var(--navy); font-size: 1.25rem; font-weight: 900; letter-spacing: -.04em; }
.auth-modal h2 { margin-top: 18px; font-size: 2rem; }
.auth-modal > p { color: var(--muted); }
.auth-form { display: grid; gap: 14px; margin-top: 24px; text-align: left; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 200; max-width: 360px; padding: 14px 18px; border-radius: 12px; background: var(--navy); color: white; box-shadow: var(--shadow); transform: translateY(130%); opacity: 0; transition: .25s ease; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1040px) {
  .main-nav { display: none; position: absolute; top: 75px; left: 20px; right: 20px; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px; }
  .menu-toggle { display: block; }
  .header-actions .text-button, .header-actions .button-small { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-panel { max-width: 680px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .seller-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 28px, 1180px); }
  .section { padding: 68px 0; }
  .hero { padding-top: 62px; }
  .hero-search { grid-template-columns: auto 1fr; }
  .hero-search .button { grid-column: 1 / -1; width: 100%; }
  .hero-trust { grid-template-columns: 1fr; gap: 13px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .split-heading, .cta-inner { align-items: flex-start; flex-direction: column; }
  .market-layout { grid-template-columns: 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .filter-header, .checkbox-row { grid-column: 1 / -1; }
  .steps-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .modal-listing { grid-template-columns: 1fr; }
  .modal-visual { min-height: 250px; }
}

@media (max-width: 520px) {
  h1 { font-size: 2.65rem; }
  .header-inner { min-height: 68px; }
  .category-card { min-height: 126px; padding: 14px; }
  .listing-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .filter-header, .checkbox-row { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .cta-actions, .modal-actions { width: 100%; grid-template-columns: 1fr; flex-direction: column; }
  .cta-actions .button { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}


.wanted-promo-section { padding: 30px 0 12px; background: white; }
.wanted-promo-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px; padding: 25px 28px; border: 1px solid #cfe0f6; border-radius: 18px; background: linear-gradient(135deg, #f3f8ff, #fffaf0); }
.wanted-promo-inner h2 { margin: 0 0 6px; font-size: 1.8rem; }
.wanted-promo-inner p { margin: 0; color: var(--muted); }
.wanted-promo-inner .eyebrow { margin-bottom: 4px; }
.wanted-promo-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; background: var(--navy); font-size: 1.55rem; }
@media (max-width: 760px) { .wanted-promo-inner { grid-template-columns: auto 1fr; } .wanted-promo-inner .button { grid-column: 1 / -1; } }
@media (max-width: 520px) { .wanted-promo-inner { grid-template-columns: 1fr; } }

/* Version 5 legal and seller protection additions */
.seller-certification { align-items:flex-start; padding:11px 12px; border:1px solid #d8e1eb; border-radius:10px; background:#f8fafc; line-height:1.45; }
.seller-certification input { margin-top:3px; flex:0 0 auto; }
.seller-certification a { color:var(--blue); font-weight:800; text-decoration:underline; }
.consent-box a { color:var(--blue); font-weight:800; text-decoration:underline; }


/* Version 7.1: secure login tools in the homepage login modal */
.password-input-wrap { position:relative; display:block; }
.password-input-wrap input { width:100%; padding-right:72px !important; }
.password-toggle { position:absolute; top:50%; right:8px; transform:translateY(-50%); padding:6px 8px; border:0; border-radius:7px; background:#eef4fb; color:var(--blue); font-size:.72rem; font-weight:850; cursor:pointer; }
.password-toggle:hover { background:#dfeafa; }
.auth-helper-row { display:flex; justify-content:flex-end; margin:-5px 0 -2px; }
.auth-link-button { color:var(--blue); font-weight:800; }
.auth-modal-secure { width:min(520px, 100%); }
.auth-modal .captcha-box { text-align:left; }
.captcha-box { display:grid; grid-template-columns:1fr auto; gap:15px; align-items:center; margin:2px 0 0; padding:14px; border:1px solid #c9d8e8; border-radius:12px; background:#f6f9fd; }
.captcha-copy span,.captcha-copy strong { display:block; }
.captcha-copy strong { margin-top:5px; color:var(--navy); font-size:1rem; }
.captcha-controls { display:grid; grid-template-columns:100px 40px; gap:7px; align-items:center; }
.captcha-controls input:not([type=hidden]) { width:100%; min-width:0; padding:10px; border:1px solid #bfcddd; border-radius:9px; background:white; text-align:center; font-weight:850; }
.captcha-refresh { width:40px; height:40px; border:1px solid #bfcddd; border-radius:9px; background:white; color:var(--blue); font-size:1.15rem; font-weight:900; cursor:pointer; }
.inline-status { min-height:20px; margin:0; color:var(--muted); font-size:.82rem; text-align:left; }
.inline-status.error { color:#b42318; }
.inline-status.success { color:var(--success); }
.password-reset-modal { width:min(520px, 100%); }
.password-reset-modal > div > p { color:var(--muted); line-height:1.55; }
.password-requirements { display:block; margin:-3px 0 2px; color:var(--muted); text-align:left; }
.centered-text-button { display:block; margin:4px auto 0; }
.recovery-eyebrow { display:block; margin-top:18px; }
.dev-code { width:min(430px, 100%); margin:18px auto; padding:13px; border:1px dashed #e5a92b; border-radius:10px; background:#fff8e8; color:#7b5710; font-size:.82rem; }
.dev-code strong { font-size:1.15rem; letter-spacing:.18em; }
@media (max-width:520px) { .captcha-box { grid-template-columns:1fr; } .captcha-controls { grid-template-columns:1fr 40px; } }

/* Version 7.4 security display hardening */
.captcha-box.captcha-ready { border-color:#8db7ee; box-shadow:0 0 0 3px rgba(19,101,216,.08); }
.captcha-box.captcha-error { border-color:#e2a8a3; background:#fff4f3; }
.captcha-box.captcha-error .captcha-copy strong { color:#a22920; }
.captcha-controls input:disabled { background:#eef2f6; cursor:not-allowed; }
.dev-code a { color:inherit; font-weight:850; }
