/* SaleRoost website: brand tokens from the brand kit (green + gold, cream paper). */
@font-face { font-family: 'Fraunces'; src: url('/fonts/Fraunces-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('/fonts/Manrope-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --green: #024224;
  --green-2: #0b5a34;
  --gold: #FFB800;
  --paper: #FAF7EF;
  --card: #FFFFFF;
  --ink: #17352B;
  --muted: #52675B;
  --pale: #E8F0E9;
  --line: #BCCBC0;
  --bad: #B42C2C;
  --bad-bg: #FBEAEA;
  --ok: #1d6b3f;
  --radius: 14px;
  --radius-card: 22px;
  --display: 'Fraunces', Georgia, serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
/* hidden must win over the display rules below (flex/grid rows). */
[hidden] { display: none !important; }
form, .panel-fields { display: grid; gap: 16px; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--green); font-weight: 600; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--pale); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--green); font: 700 22px/1 var(--display); }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav a { text-decoration: none; }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(560px, 100% - 32px); margin-inline: auto; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: var(--radius); border: 2px solid var(--green); background: var(--green); color: #fff; font: 700 17px/1 var(--body); text-decoration: none; cursor: pointer; }
.button:hover { background: var(--green-2); border-color: var(--green-2); }
.button.ghost { background: var(--card); color: var(--green); }
.button.ghost:hover { background: var(--pale); }
.button.small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.button.block { width: 100%; }
.button[disabled], .button[aria-busy="true"] { opacity: .55; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 4px 0; color: var(--green); font: 600 16px var(--body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button.muted { color: var(--muted); }

/* Home */
.hero { padding: 56px 0 40px; display: grid; gap: 28px; align-items: center; }
.hero h1 { font: 700 clamp(40px, 7vw, 68px)/1.04 var(--display); color: var(--green); margin: 0; letter-spacing: -.02em; }
.hero p.lead { font-size: clamp(18px, 2.4vw, 22px); color: var(--muted); max-width: 34ch; margin: 18px 0 26px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-card); padding: 22px; box-shadow: 0 18px 40px -24px rgba(2, 66, 36, .35); }
.hero-card .row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--pale); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .dot { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--pale); color: var(--green); font-weight: 700; }
.hero-card b { display: block; }
.hero-card small { color: var(--muted); }
@media (min-width: 860px) { .hero { grid-template-columns: 1.15fr .85fr; padding: 88px 0 64px; } }

section.band { padding: 48px 0; }
section.band h2 { font: 700 clamp(30px, 4.5vw, 42px)/1.1 var(--display); color: var(--green); margin: 0 0 24px; }
.steps, .plans { display: grid; gap: 16px; }
@media (min-width: 760px) { .steps, .plans { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-card); padding: 22px; }
.card h3 { margin: 6px 0 6px; font-size: 20px; }
.card p { margin: 0; color: var(--muted); }
.step-num { font: 700 30px/1 var(--display); color: var(--gold); }
.plan.current { border-color: var(--green); border-width: 2.5px; }
.plan .price { font: 700 28px/1.1 var(--display); color: var(--green); margin: 4px 0 10px; }
.plan .price s { font-size: 18px; font-weight: 600; color: #7A8A81; margin-right: 4px; }
.plan .price s:empty { display: none; }
.plan .price small { font: 600 14px/1 var(--body, inherit); color: var(--muted, #52675B); }
.plan .tag:not(.soon) { color: var(--green); }
.fine { margin: 18px 0 0; color: var(--muted, #52675B); font-size: 14px; max-width: 760px; }
.plan ul { margin: 12px 0 0; padding-left: 20px; color: var(--ink); }
.plan li { margin: 4px 0; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--green); background: var(--pale); border-radius: 999px; padding: 3px 10px; }
.tag.soon { color: #7A5A00; background: #FFF4D6; }
.note { background: var(--pale); border-radius: var(--radius-card); padding: 22px; display: grid; gap: 6px; }
.site-footer { padding: 36px 0 48px; color: var(--muted); font-size: 15px; border-top: 1px solid var(--pale); margin-top: 32px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

/* Onboarding */
.flow { padding: 28px 0 64px; }
.flow h1 { font: 700 clamp(30px, 6vw, 40px)/1.1 var(--display); color: var(--green); margin: 0 0 8px; }
.flow .sub { color: var(--muted); margin: 0 0 22px; }
.panel { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-card); padding: 22px; display: grid; gap: 18px; }
.step[hidden] { display: none; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--pale); border-radius: var(--radius); padding: 4px; gap: 4px; }
.tabs button { border: 0; background: transparent; border-radius: 10px; min-height: 44px; font: 700 16px var(--body); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--green); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; color: var(--ink); }
.hint { font-size: 14px; color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%; font: 400 17px var(--body); color: var(--ink); background: var(--card);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 13px 14px; min-height: 50px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px rgba(2, 66, 36, .15); }
input:user-invalid, textarea:user-invalid { border-color: var(--bad); background: var(--bad-bg); }
.field:has(:user-invalid) .hint.rule { color: var(--bad); font-weight: 600; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 76px; }
.password-wrap .toggle { position: absolute; right: 8px; top: 50%; translate: 0 -50%; border: 0; background: none; color: var(--green); font: 700 15px var(--body); padding: 8px; cursor: pointer; }
input.code { font: 700 26px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .4em; text-align: center; }

.address-box { background: var(--pale); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; }
.address-box .addr { font: 700 19px var(--body); color: var(--green); overflow-wrap: anywhere; }
.address-box .slug-row { display: flex; align-items: center; gap: 4px; }
.address-box .slug-row input { min-height: 44px; padding: 8px 10px; font-weight: 600; }
.address-box .slug-row span { color: var(--muted); font-weight: 600; white-space: nowrap; }
.status-ok { color: var(--ok); font-weight: 700; font-size: 15px; }
.status-bad { color: var(--bad); font-weight: 700; font-size: 15px; }

.matches { display: grid; gap: 8px; }
.match { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 12px 14px; font: 600 16px var(--body); color: var(--ink); cursor: pointer; }
.match[aria-pressed="true"] { border-color: var(--green); border-width: 2.5px; background: #f3f8f4; }
.match .check { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 1px; }
.match[aria-pressed="true"] .check { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px #fff; }
.match small { color: var(--muted); font-weight: 400; font-size: 14px; }
.public-city { font-size: 15px; color: var(--muted); }
.public-city b { color: var(--ink); }

.progress { display: flex; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.progress li { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.progress li.done, .progress li[aria-current="step"] { background: var(--green); }
.step-label { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }

.actions-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.error { background: var(--bad-bg); color: var(--bad); border: 1.5px solid var(--bad); border-radius: var(--radius); padding: 12px 14px; font-weight: 600; margin: 0; }
.error:empty { display: none; }
.success { background: var(--pale); color: var(--green); border-radius: var(--radius); padding: 12px 14px; font-weight: 600; margin: 0; }
.success:empty { display: none; }

.logo-pick { display: flex; align-items: center; gap: 16px; }
.logo-preview { flex: none; width: 104px; height: 104px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--pale) center / cover no-repeat; display: grid; place-items: center; font: 700 32px var(--body); color: var(--green); overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }

.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid var(--pale); border-top-color: var(--green); animation: spin 1s linear infinite; margin: 8px auto; }
@keyframes spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.center { text-align: center; }
#live-logo { margin-inline: auto; }
.live-link { font: 700 20px var(--body); overflow-wrap: anywhere; }
.plan-summary { display: grid; gap: 10px; }
.plan-summary .card { padding: 16px 18px; }

/* Legal pages */
.legal { padding: 32px 0 56px; }
.legal h1 { font: 700 clamp(32px, 6vw, 44px)/1.1 var(--display); color: var(--green); margin: 0 0 6px; }
.legal h2 { font: 700 22px/1.25 var(--body); color: var(--green); margin: 32px 0 8px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal p, .legal li { max-width: 68ch; }
.legal-note { font-size: 14px; color: var(--muted); text-align: center; margin: 0; }

/* Continue with Google */
.google-block { display: grid; gap: 12px; justify-items: center; }
#google-button { min-height: 44px; }
.divider { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Account */
.inbox-card { padding: 6px 0; }
.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-list li + li { border-top: 1px solid var(--pale); }
.inbox-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; text-align: left; background: none; border: 0; padding: 14px 22px; font: inherit; color: var(--ink); cursor: pointer; }
.inbox-item:hover, .inbox-item:focus-visible { background: var(--pale); }
.inbox-item b { font-size: 16px; }
.inbox-item .amount { font-weight: 700; color: var(--green); text-align: right; }
.inbox-item small { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.inbox-item .when { text-align: right; white-space: nowrap; }
.inbox-item.unread b::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: middle; }
.inbox-card .hint, .inbox-card .error { margin: 14px 22px; }
dialog.detail { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); border: 1.5px solid var(--line); border-radius: var(--radius-card); padding: 22px; background: var(--card); color: var(--ink); }
dialog.detail::backdrop { background: rgba(23, 53, 43, 0.45); }
.detail-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.detail-head h2 { margin: 0; font: 700 24px/1.2 var(--display); color: var(--green); }
.detail-body { display: grid; gap: 10px; margin: 14px 0; }
.detail-body p { margin: 0; }
.detail-body .lines { margin: 0; padding-left: 20px; }
.thread { display: grid; gap: 8px; }
.bubble { padding: 10px 14px; border-radius: 14px; max-width: 85%; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.buyer { background: var(--pale); justify-self: start; }
.bubble.seller { background: var(--green); color: #fff; justify-self: end; }
.bubble small { display: block; opacity: .75; font-size: 12px; margin-top: 4px; }
#reply-form { display: grid; gap: 10px; }
#reply-form textarea { width: 100%; }
.account-section { display: grid; gap: 12px; margin-top: 28px; }
.account-section h2 { margin: 0; }
.plans.two { grid-template-columns: 1fr; }
@media (min-width: 640px) { .plans.two { grid-template-columns: 1fr 1fr; } }
.plan .price .was { color: var(--muted); font-size: 20px; font-weight: 600; }
.plan .price small { font: 600 16px var(--body); color: var(--muted); }
.plan .button { margin-top: 16px; }
.card .actions-row { margin-top: 14px; }
.card .hint { margin-top: 10px; }

/* Dashboard (account.html): tabs, listings, orders, store */
.dash { width: min(960px, 100% - 32px); margin-inline: auto; }
.dash-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
.dash-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1.5px solid var(--line); margin: 8px 0 4px; scrollbar-width: none; }
.dash-tabs a { flex: none; padding: 10px 14px; border-radius: 12px 12px 0 0; color: var(--muted); font-weight: 700; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.dash-tabs a:hover { color: var(--green); }
.dash-tabs a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.dash-tabs .tag { margin-left: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 600 15px var(--body); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.listing-card { display: grid; gap: 4px; text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-card); padding: 10px; font: inherit; color: var(--ink); cursor: pointer; }
.listing-card:hover, .listing-card:focus-visible { border-color: var(--green); }
.listing-card img, .listing-card .no-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--pale); }
.listing-card .no-photo { display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.listing-card b { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.listing-card .price { color: var(--green); font-weight: 700; }
.listing-card .tag { justify-self: start; }
.tag.state-hidden { color: var(--muted); background: #EEEDE8; }
.tag.state-sold { color: #7A5A00; background: #FFF4D6; }
dialog.detail.wide { width: min(720px, calc(100vw - 32px)); }
.listing-form { display: grid; gap: 14px; margin: 12px 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="number"], select { width: 100%; font: 400 17px var(--body); color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 13px 14px; min-height: 50px; }
label.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
label.check input { width: 20px; height: 20px; accent-color: var(--green); }
.link-button.danger { color: var(--bad); }
.listing-photos-block { display: grid; gap: 10px; border-top: 1.5px solid var(--pale); padding-top: 14px; margin-top: 4px; }
.listing-photos-block h3 { margin: 0; font-size: 18px; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-strip .photo { margin: 0; display: grid; gap: 4px; }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--line); }
.photo-strip figcaption { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 14px; }
.photo-strip .link-button { font-size: 14px; }
.file-button { position: relative; justify-self: start; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-button:focus-within { box-shadow: 0 0 0 3px rgba(2, 66, 36, .25); }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; }
.order-row div { display: grid; gap: 2px; min-width: 0; }
.order-row small { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.match.stacked { flex-direction: column; gap: 2px; }
#store-form { margin-top: 4px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } .order-row { flex-direction: column; align-items: flex-start; } }
