:root {
    --terracotta: #9b3f2c;
    --terracotta-dark: #713022;
    --cream: #f8f0e3;
    --paper: #fffaf2;
    --forest: #183f34;
    --forest-soft: #dbe7dc;
    --ink: #201b18;
    --muted: #665d56;
    --line: #d9cbbd;
    --focus: #b8df57;
    --danger: #8c241e;
    --radius: 3px;
    color-scheme: light;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.55;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.shell { width: min(1200px, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 20; padding: .65rem 1rem; color: var(--paper); background: var(--forest); font-weight: 700; }
.skip-link:focus { top: 1rem; }
.site-header { border-bottom: 1px solid var(--line); background: rgba(248, 240, 227, .96); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--forest); text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand img { width: 40px; height: 40px; }
.brand-wordmark { font-size: 1.02rem; }
.brand-wordmark span { display: block; font-size: .72rem; color: var(--muted); letter-spacing: .03em; font-weight: 600; }
.main-nav { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; flex-wrap: wrap; }
.main-nav a, .nav-button { min-height: 44px; display: inline-flex; align-items: center; padding: .55rem .6rem; color: var(--forest); text-decoration: none; font-size: .88rem; font-weight: 700; background: none; border: 0; cursor: pointer; }
.main-nav a:hover, .nav-button:hover, .text-link:hover { color: var(--terracotta); }
.main-nav .nav-cta { padding-inline: .8rem; color: var(--paper); background: var(--forest); border-radius: var(--radius); }
.main-nav .nav-cta:hover { color: var(--paper); background: var(--terracotta); }
.inline-form { display: inline; }

.notice { margin-top: 1.25rem; padding: .85rem 1rem; border-left: 4px solid var(--forest); background: var(--forest-soft); }
.notice-error { border-color: var(--danger); background: #f6dfd4; color: var(--danger); }
.notice ul { margin: .35rem 0 0 1.2rem; padding: 0; }
.notice-success { color: var(--forest); }

.hero { display: grid; gap: 2rem; padding-top: clamp(3.5rem, 9vw, 7rem); padding-bottom: clamp(3.5rem, 9vw, 7rem); }
.hero-copy { max-width: 700px; }
.eyebrow, .panel-kicker { margin: 0 0 1rem; color: var(--terracotta); font-size: .75rem; font-weight: 800; letter-spacing: .16em; line-height: 1.3; text-transform: uppercase; }
h1, h2 { margin: 0; color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.045em; line-height: 1.05; }
h1 { font-size: clamp(3.4rem, 12vw, 7.5rem); }
h1 em { color: var(--terracotta); font-style: normal; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
p { margin: 0 0 1rem; }
.hero-lede { max-width: 560px; margin-top: 1.7rem; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1.05rem; border: 1px solid transparent; border-radius: var(--radius); font-weight: 800; text-decoration: none; cursor: pointer; }
.button-primary { color: var(--paper); background: var(--terracotta); }
.button-primary:hover { background: var(--terracotta-dark); }
.button-secondary { color: var(--forest); background: transparent; border-color: var(--forest); }
.button-secondary:hover { color: var(--paper); background: var(--forest); }
.button-wide { width: 100%; }
.hero-panel { align-self: end; padding: 1.5rem; color: var(--paper); background: var(--forest); border-radius: var(--radius); box-shadow: 16px 16px 0 var(--terracotta); }
.hero-panel h2 { max-width: 360px; color: var(--paper); font-size: clamp(1.8rem, 5vw, 2.7rem); }
.hero-panel .panel-kicker { color: #b8df57; }
.principles-list { display: grid; gap: 0; margin: 2rem 0 1.5rem; padding: 0; list-style: none; }
.principles-list li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .75rem; padding: 1rem 0; border-top: 1px solid rgba(248, 240, 227, .25); }
.list-number { color: #b8df57; font-size: .75rem; font-weight: 800; }
.principles-list strong, .principles-list small { display: block; }
.principles-list small { margin-top: .15rem; color: #d8e1d9; }
.phase-label { display: flex; align-items: center; gap: .5rem; margin: 0; color: #d8e1d9; font-size: .82rem; }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #b8df57; }
.about-section { padding: clamp(3.5rem, 8vw, 6rem) 0; color: var(--paper); background: var(--terracotta); }
.about-grid { display: grid; gap: 2rem; }
.about-section h2 { color: var(--paper); }
.about-section .eyebrow { color: #f4c6a7; }
.about-copy { max-width: 560px; font-size: 1.1rem; }
.about-copy .muted { color: #f4d8c7; font-size: .95rem; }
.text-link { display: inline-flex; align-items: center; gap: .5rem; color: var(--forest); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.about-section .text-link { color: var(--paper); }
.phase-section { padding-top: 3rem; padding-bottom: 5rem; }
.phase-card { display: grid; gap: 1rem; padding: 1.5rem; color: var(--forest); border: 1px solid var(--forest); border-left: 8px solid var(--forest); }
.phase-card p { max-width: 560px; margin: 0; }

.form-page, .profile-page { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.form-intro { max-width: 690px; margin-bottom: 2.5rem; }
.form-intro h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); }
.form-intro > p:last-child { max-width: 560px; margin-top: 1.2rem; color: var(--muted); font-size: 1.08rem; }
.form-layout { display: grid; gap: 2rem; align-items: start; }
.form-card { padding: clamp(1.25rem, 4vw, 2.4rem); background: var(--paper); border: 1px solid var(--line); box-shadow: 9px 9px 0 var(--forest); }
.form-field { margin-bottom: 1.25rem; }
.form-field label, .radio-fieldset legend { display: block; margin-bottom: .4rem; color: var(--forest); font-weight: 800; }
.required-mark, .optional-mark { color: var(--muted); font-size: .78rem; font-weight: 500; }
.field-hint { margin: -.15rem 0 .45rem; color: var(--muted); font-size: .82rem; }
input[type="text"], input[type="email"], input[type="password"], textarea { width: 100%; min-height: 48px; padding: .65rem .75rem; color: var(--ink); background: var(--paper); border: 1px solid #9f9489; border-radius: var(--radius); }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--forest); outline: 3px solid rgba(184, 223, 87, .65); outline-offset: 1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.field-errors { margin: .4rem 0 0; padding: 0; color: var(--danger); font-size: .85rem; list-style: none; }
.form-field-pair { display: grid; gap: 1.25rem; }
.radio-fieldset { padding: 0; border: 0; }
.radio-fieldset legend { padding: 0; }
.radio-option { display: flex !important; align-items: center; gap: .6rem; min-height: 44px; margin: 0 !important; font-weight: 600 !important; }
.radio-option input { width: 1.1rem; height: 1.1rem; accent-color: var(--terracotta); }
.form-actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.75rem; }
.form-footnote { margin: 1.25rem 0 0; color: var(--muted); font-size: .9rem; text-align: center; }
.form-aside { padding: 1.4rem; color: var(--forest); background: var(--forest-soft); border-top: 4px solid var(--forest); }
.form-aside p:last-child { margin: 0; }

.profile-heading { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.profile-heading h1 { font-size: clamp(2.5rem, 7vw, 5rem); overflow-wrap: anywhere; }
.avatar { width: 64px; height: 64px; display: grid; place-items: center; color: var(--paper); background: var(--terracotta); border-radius: 50%; font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; }
.profile-id { margin: .55rem 0 0; color: var(--muted); font-size: .82rem; }
.profile-id span { color: var(--forest); font-weight: 700; }
.profile-action { grid-column: 1 / -1; justify-self: start; }
.profile-grid { display: grid; gap: 1.25rem; margin-top: 2rem; }
.profile-card { padding: 1.4rem; background: var(--paper); border: 1px solid var(--line); }
.private-card { border-top: 5px solid var(--forest); }
.card-heading { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.card-heading .eyebrow { margin-bottom: .55rem; }
.card-heading h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.detail-list { margin: 0; }
.detail-list > div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { margin-bottom: .2rem; color: var(--muted); font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.private-note { margin: .5rem 0 0; color: var(--muted); font-size: .84rem; }
.site-footer { padding: 2rem 0; color: #d8e1d9; background: var(--forest); font-size: .82rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.25rem; }
.footer-inner p { margin: 0; }
.footer-brand { color: var(--paper); font-weight: 800; }
.footer-note { flex-basis: 100%; color: #b6c8ba; }

@media (min-width: 700px) {
    .shell { width: min(1200px, calc(100% - 4rem)); }
    .hero { grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); align-items: center; gap: clamp(3rem, 8vw, 8rem); }
    .hero-panel { margin-top: 4rem; }
    .about-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); gap: 4rem; }
    .phase-card { grid-template-columns: minmax(250px, .8fr) minmax(280px, 1fr); gap: 3rem; align-items: center; padding: 2.1rem 2.5rem; }
    .form-layout { grid-template-columns: minmax(0, 1fr) minmax(220px, .5fr); gap: clamp(2.5rem, 7vw, 6rem); }
    .form-field-pair { grid-template-columns: 1fr 1fr; }
    .profile-heading { grid-template-columns: auto 1fr auto; }
    .profile-action { grid-column: auto; grid-row: 1; }
    .profile-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

@media (max-width: 620px) {
    .header-inner { align-items: flex-start; flex-direction: column; padding-top: .8rem; padding-bottom: .8rem; }
    .main-nav { justify-content: flex-start; width: 100%; }
    .main-nav a, .nav-button { padding-inline: .45rem; }
    .main-nav .nav-cta { padding-inline: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Tsena marketplace layer — intentionally appended to preserve the Phase 0 foundation. */
select { width: 100%; min-height: 48px; padding: .65rem .75rem; color: var(--ink); background: var(--paper); border: 1px solid #9f9489; border-radius: var(--radius); }
select:focus { border-color: var(--forest); outline: 3px solid rgba(184, 223, 87, .65); outline-offset: 1px; }
.marketplace-hero { padding-bottom: clamp(3rem, 8vw, 6rem); }
.market-section { padding-top: clamp(3rem, 7vw, 5.5rem); padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.marketplace-about { margin-top: 0; }
.section-heading, .listing-heading, .dashboard-heading, .conversation-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; margin-bottom: 2rem; }
.section-heading h2, .listing-heading h1, .dashboard-heading h1, .conversation-heading h1 { font-size: clamp(2.25rem, 7vw, 4.75rem); }
.section-heading .text-link { flex: 0 0 auto; }
.card-grid { display: grid; gap: 1rem; }
.market-card { min-width: 0; background: var(--paper); border: 1px solid var(--line); }
.market-card h3 { margin: 0; color: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: 1.65rem; font-weight: 400; line-height: 1.08; }
.market-card h3 a { text-decoration: none; }
.market-card h3 a:hover { color: var(--terracotta); }
.card-media { height: 9rem; display: grid; place-items: center; overflow: hidden; color: var(--paper); background: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: 3.5rem; text-decoration: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.2rem; }
.card-kicker { margin-bottom: .6rem; color: var(--terracotta); font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card-meta { margin: .65rem 0; color: var(--muted); font-size: .82rem; }
.card-excerpt { margin-top: .8rem; color: var(--muted); font-size: .92rem; }
.card-link { display: inline-flex; gap: .5rem; margin-top: .75rem; color: var(--forest); font-size: .86rem; font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.price, .detail-price { margin: .8rem 0 0; color: var(--terracotta); font-size: 1.2rem; font-weight: 800; }
.price small, .detail-price small { color: var(--muted); font-size: .75rem; font-weight: 600; }
.empty-state { display: grid; justify-items: start; gap: .6rem; padding: clamp(1.3rem, 4vw, 2.5rem); color: var(--forest); background: var(--forest-soft); border-left: 5px solid var(--forest); }
.empty-state strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 400; }
.empty-state p { max-width: 580px; margin: 0; color: var(--muted); }
.empty-state.compact { padding: 1rem 1.2rem; }
.category-list { display: flex; flex-wrap: wrap; gap: .65rem; }
.category-chip { display: inline-flex; align-items: baseline; gap: .6rem; padding: .75rem 1rem; color: var(--forest); background: var(--paper); border: 1px solid var(--line); font-weight: 800; text-decoration: none; }
.category-chip:hover { color: var(--paper); background: var(--terracotta); border-color: var(--terracotta); }
.category-chip small { color: var(--muted); font-size: .75rem; }
.category-chip:hover small { color: #f4d8c7; }
.listing-page, .dashboard-page, .conversation-page, .detail-page, .article-page { padding-top: clamp(2.8rem, 7vw, 5.5rem); padding-bottom: clamp(4rem, 9vw, 7rem); }
.listing-heading { align-items: start; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.listing-heading .lede, .dashboard-heading .lede { max-width: 620px; margin: 1rem 0 0; color: var(--muted); font-size: 1.08rem; }
.listing-count { flex: 0 0 auto; color: var(--terracotta); font-size: .82rem; font-weight: 800; }
.filter-bar { display: grid; gap: 1rem; margin: 1.5rem 0 2rem; padding: 1rem; background: var(--paper); border: 1px solid var(--line); }
.filter-bar label, .status-form label, .report-card label { display: block; margin-bottom: .35rem; color: var(--forest); font-size: .8rem; font-weight: 800; }
.filter-bar input, .filter-bar select { background: var(--cream); }
.filter-bar .button { align-self: end; }
.pagination-wrap { margin-top: 2rem; overflow-x: auto; }
.pagination-wrap nav { color: var(--forest); }
.pagination-wrap nav a, .pagination-wrap nav span { display: inline-flex; min-width: 2.5rem; min-height: 2.5rem; align-items: center; justify-content: center; margin-right: .25rem; padding: .4rem .7rem; border: 1px solid var(--line); text-decoration: none; }
.pagination-wrap nav span[aria-current="page"] { color: var(--paper); background: var(--forest); border-color: var(--forest); }
.seller-card { display: grid; grid-template-columns: auto 1fr; gap: 0; }
.seller-mark { width: 4.2rem; height: 4.2rem; display: grid; place-items: center; align-self: start; margin: 1.2rem 0 0 1.2rem; color: var(--paper); background: var(--terracotta); border-radius: 50%; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; }
.seller-mark-large { width: 5.5rem; height: 5.5rem; margin: 0; font-size: 2.3rem; }
.post-card-top { display: flex; justify-content: space-between; min-height: 2.4rem; padding: 1.2rem 1.2rem 0; }
.post-card-top .card-kicker { margin: 0; }
.post-index { color: var(--terracotta); font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; color: var(--muted); font-size: .78rem; }
.post-meta a { color: var(--forest); font-weight: 800; }
.back-link { display: inline-flex; margin-bottom: 2rem; color: var(--forest); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.detail-layout { display: grid; gap: 2rem; }
.detail-media { min-height: 18rem; display: grid; place-items: center; overflow: hidden; color: var(--paper); background: var(--forest); font-family: Georgia, "Times New Roman", serif; font-size: 7rem; }
.detail-media img { width: 100%; height: 100%; min-height: 18rem; object-fit: cover; }
.detail-copy h1, .article-heading h1 { font-size: clamp(2.8rem, 9vw, 6.5rem); }
.detail-location { margin: .8rem 0 1.5rem; color: var(--muted); }
.prose { max-width: 680px; color: var(--ink); line-height: 1.8; }
.seller-byline { margin-top: 1.5rem; color: var(--muted); }
.seller-byline a { color: var(--forest); font-weight: 800; }
.detail-actions { display: grid; gap: 1.2rem; margin-top: 2.5rem; }
.compact-form { max-width: 740px; box-shadow: 9px 9px 0 var(--forest); }
.compact-form h2 { margin-bottom: .5rem; font-size: 2.2rem; }
.report-form { justify-self: start; }
.text-button { padding: .2rem 0; color: var(--danger); background: none; border: 0; font-weight: 800; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.seller-hero { display: flex; align-items: center; gap: 1.2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.seller-bio { margin: 1.5rem 0 3rem; }
.seller-sections { display: grid; gap: 3.5rem; }
.article-heading { max-width: 880px; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.article-heading .post-meta { margin-top: 1.5rem; }
.article-body { max-width: 760px; margin: 2.5rem auto 3rem; font-size: 1.08rem; }
.article-page .report-form { max-width: 760px; margin-inline: auto; }
.dashboard-heading { align-items: start; }
.dashboard-heading .button { flex: 0 0 auto; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin: 2rem 0; }
.stat-card { display: grid; gap: .35rem; padding: 1.2rem; color: var(--paper); background: var(--forest); }
.stat-card span { color: #d8e1d9; font-size: .8rem; }
.stat-card strong { color: #b8df57; font-family: Georgia, "Times New Roman", serif; font-size: 2.5rem; font-weight: 400; }
.dashboard-grid, .admin-grid { display: grid; gap: 1.2rem; }
.admin-links { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: 2rem; }
.narrow-form { max-width: 760px; }
.managed-card { display: grid; gap: .6rem; align-content: start; }
.managed-edit { justify-self: start; }
.conversation-list { display: grid; gap: .8rem; }
.conversation-card { display: flex; justify-content: space-between; gap: 1rem; padding: 1.2rem; color: inherit; background: var(--paper); border: 1px solid var(--line); text-decoration: none; }
.conversation-card:hover { border-color: var(--terracotta); }
.conversation-card h2 { font-size: 1.7rem; }
.conversation-card p { margin: .55rem 0 0; color: var(--muted); }
.conversation-meta { display: grid; align-content: space-between; justify-items: end; color: var(--muted); font-size: .75rem; text-align: right; }
.conversation-meta span { color: var(--terracotta); font-weight: 800; }
.status-form { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; min-width: 12rem; }
.status-form label { flex-basis: 100%; margin: 0; }
.status-form select { min-width: 8rem; flex: 1; }
.message-thread { display: grid; gap: .85rem; max-width: 760px; margin: 2rem 0; }
.message-bubble { max-width: 88%; padding: 1rem 1.1rem; color: var(--forest); background: var(--paper); border: 1px solid var(--line); }
.message-bubble.message-mine { justify-self: end; color: var(--paper); background: var(--forest); border-color: var(--forest); }
.message-author { margin-bottom: .35rem; font-size: .78rem; font-weight: 800; }
.message-bubble time { display: block; margin-top: .6rem; color: var(--muted); font-size: .72rem; }
.message-mine time { color: #b6c8ba; }
.reply-form { max-width: 760px; }
.admin-table { background: var(--paper); border: 1px solid var(--line); }
.admin-table-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.admin-table-row:last-child { border-bottom: 0; }
.admin-table-row > div { min-width: 0; display: grid; gap: .25rem; }
.admin-table-row strong { color: var(--forest); overflow-wrap: anywhere; }
.admin-table-row span { color: var(--muted); font-size: .8rem; }
.admin-table-row form { display: flex; align-items: center; gap: .5rem; flex: 0 0 auto; }
.admin-table-row select { min-height: 42px; width: auto; }
.admin-table-row .button { min-height: 42px; padding: .5rem .75rem; }
.report-list { display: grid; gap: 1rem; }
.report-card { display: grid; gap: 1rem; padding: 1.2rem; background: var(--paper); border: 1px solid var(--line); }
.report-card h2 { font-size: 1.7rem; }
.report-card form { display: grid; gap: .45rem; }
.report-card textarea { min-height: 80px; }
.audit-list { background: var(--paper); border: 1px solid var(--line); }
.audit-row { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border-bottom: 0; }
.audit-row time, .audit-row > span { color: var(--muted); font-size: .78rem; }
.audit-row p { margin: .25rem 0 0; color: var(--muted); font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.muted { color: var(--muted); }
@media (min-width: 700px) {
    .card-grid-products { grid-template-columns: repeat(3, 1fr); }
    .card-grid-sellers { grid-template-columns: repeat(2, 1fr); }
    .card-grid-posts { grid-template-columns: repeat(3, 1fr); }
    .filter-bar { grid-template-columns: minmax(0, 1.5fr) minmax(9rem, .8fr) minmax(9rem, .8fr) auto; align-items: end; padding: 1.2rem; }
    .detail-layout { grid-template-columns: minmax(280px, .8fr) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 7vw, 6rem); }
    .detail-media { min-height: 27rem; }
    .detail-media img { min-height: 27rem; }
    .detail-actions { grid-template-columns: minmax(0, 760px) auto; align-items: start; }
    .dashboard-grid, .admin-grid { grid-template-columns: 1.2fr .8fr; }
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
    .report-card { grid-template-columns: 1fr minmax(240px, .7fr); align-items: start; }
    .audit-row { grid-template-columns: 9rem 1fr auto; align-items: start; }
}
@media (max-width: 699px) {
    .section-heading, .listing-heading, .dashboard-heading, .conversation-heading { display: grid; align-items: start; }
    .section-heading .text-link { justify-self: start; }
    .dashboard-heading .button { justify-self: start; }
    .conversation-heading .status-form { width: 100%; }
    .admin-table-row { align-items: start; flex-direction: column; }
    .admin-table-row form { width: 100%; }
    .admin-table-row select { flex: 1; }
}


/* Phase 1 marketplace controls and responsive polish. */
input[type="number"], input[type="tel"], input[type="file"] { width: 100%; min-height: 48px; padding: .65rem .75rem; color: var(--ink); background: var(--paper); border: 1px solid #9f9489; border-radius: var(--radius); }
input[type="file"] { padding-block: .45rem; }
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; accent-color: var(--terracotta); }
input:focus, textarea:focus, select:focus { border-color: var(--forest); outline: 3px solid rgba(184, 223, 87, .65); outline-offset: 1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
fieldset { min-width: 0; }
.report-fieldset { display: grid; gap: .45rem; min-width: min(100%, 18rem); margin: 0; padding: 1rem; border: 1px solid var(--line); background: var(--paper); }
.report-fieldset legend { padding: 0 .35rem; color: var(--forest); font-weight: 800; }
.report-fieldset .text-button { justify-self: start; margin-top: .4rem; }
.contact-note { display: grid; gap: .25rem; max-width: 560px; margin: 1.5rem 0 2.5rem; padding: 1rem 1.2rem; color: var(--forest); background: var(--forest-soft); border-left: 5px solid var(--forest); }
.contact-note span { overflow-wrap: anywhere; }
.stock-note { color: var(--forest); font-weight: 700; }
.seller-photo, .post-photo { display: block; overflow: hidden; background: var(--forest); }
.seller-photo { width: 4.2rem; height: 4.2rem; align-self: start; margin: 1.2rem 0 0 1.2rem; border-radius: 50%; }
.seller-photo img { width: 100%; height: 100%; object-fit: cover; }
.seller-photo-large { width: 5.5rem; height: 5.5rem; margin: 0; }
.post-photo { height: 10rem; }
.post-photo img { width: 100%; height: 100%; object-fit: cover; }
.article-image { width: min(760px, 100%); max-height: 30rem; margin: 2rem auto 0; object-fit: cover; }
.article-report { margin-inline: auto; }
.current-image { display: grid; gap: .8rem; margin-bottom: 1.25rem; padding: 1rem; background: var(--forest-soft); }
.current-image img { width: min(16rem, 100%); max-height: 12rem; object-fit: cover; }
.check-option, .image-choice { display: flex; align-items: center; gap: .55rem; color: var(--forest); font-weight: 700; }
.image-picker { margin: 0 0 1.25rem; padding: 1rem; border: 1px solid var(--line); }
.image-picker legend { padding: 0 .35rem; color: var(--forest); font-weight: 800; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .75rem; }
.image-choice { display: grid; justify-items: start; gap: .45rem; font-size: .82rem; }
.image-choice img { width: 100%; height: 7rem; object-fit: cover; }
.managed-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.button-danger { color: var(--danger); background: transparent; border-color: var(--danger); }
.button-danger:hover { color: var(--paper); background: var(--danger); }
.admin-row { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.admin-row:last-child { border-bottom: 0; }
.admin-row span { overflow-wrap: anywhere; }

.button:disabled { opacity: .72; cursor: wait; }
form[aria-busy="true"] .button { pointer-events: none; }

@media (min-width: 700px) {
    .form-card.narrow-form { width: min(100%, 820px); }
}
@media (max-width: 699px) {
    .detail-actions { grid-template-columns: 1fr; }
    .conversation-card { align-items: flex-start; flex-direction: column; }
    .conversation-meta { width: 100%; display: flex; justify-content: space-between; text-align: left; }
    .status-form { align-items: stretch; }
    .status-form select, .status-form .button { min-width: 0; width: 100%; }
    .report-fieldset { width: 100%; }
    .seller-hero { align-items: flex-start; }
}


/* Tsena 2.0 — editorial marketplace polish */
:root {
    --terracotta: #9b3f2c;
    --terracotta-dark: #713022;
    --cream: #f5eee3;
    --paper: #fffdf8;
    --forest: #183f34;
    --forest-deep: #102d26;
    --forest-soft: #e0ebe1;
    --ink: #201b18;
    --muted: #665d56;
    --line: #d8cbbd;
    --focus: #c5ef5b;
    --shadow-soft: 0 12px 30px rgba(32, 27, 24, .07);
    --shadow-card: 0 3px 0 rgba(24, 63, 52, .08), 0 16px 30px rgba(32, 27, 24, .06);
}
html { background: var(--cream); }
body { background: radial-gradient(circle at 90% 0%, rgba(155,63,44,.06), transparent 28rem), var(--cream); }
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(245,238,227,.94); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(24,63,52,.08); }
.header-inner { min-height: 70px; }
.brand { min-height: 48px; }
.brand img { width: 42px; height: 42px; }
.brand-wordmark { font-size: 1.08rem; }
.mobile-menu { margin-left: auto; }
.mobile-menu summary { display: none; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.main-nav { gap: .15rem; }
.main-nav a, .nav-button { position: relative; min-height: 44px; padding: .55rem .7rem; font-size: .84rem; letter-spacing: .01em; }
.main-nav a[aria-current="page"] { color: var(--terracotta); }
.main-nav a[aria-current="page"]::after { position: absolute; right: .7rem; bottom: .32rem; left: .7rem; height: 2px; background: var(--terracotta); content: ""; }
.main-nav .nav-account { color: var(--paper); background: var(--forest); border-radius: 2px; }
.main-nav .nav-account[aria-current="page"] { color: var(--paper); }
.main-nav .nav-account[aria-current="page"]::after { display: none; }
.nav-divider { width: 1px; height: 1.5rem; margin: 0 .45rem; background: var(--line); }
.nav-cta { box-shadow: 3px 3px 0 var(--terracotta); }
.notice { position: relative; margin-top: 1rem; box-shadow: var(--shadow-soft); }
.hero { gap: clamp(2.5rem, 5vw, 5rem); padding-top: clamp(2.7rem, 6vw, 5.2rem); padding-bottom: clamp(2.7rem, 6vw, 5.2rem); }
.hero-copy { max-width: 760px; }
.hero h1 { font-size: clamp(3.35rem, 10vw, 7rem); }
.hero-lede { max-width: 620px; margin-top: 1.25rem; }
.home-search { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(9rem, .8fr) minmax(8.5rem, .7fr) auto; gap: .55rem; max-width: 760px; margin-top: 1.6rem; padding: .55rem; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.home-search input, .home-search select { min-height: 46px; background: transparent; border-color: transparent; }
.home-search input:focus, .home-search select:focus { outline: 2px solid var(--focus); }
.search-input-wrap { display: flex; align-items: center; min-width: 0; }
.search-input-wrap span { padding-left: .75rem; color: var(--terracotta); font-size: 1.35rem; }
.search-input-wrap input { min-width: 0; }
.home-search .button { min-height: 46px; }
.hero-actions { align-items: center; margin-top: 1.25rem; }
.hero-panel { padding: clamp(1.3rem, 3vw, 2rem); border-radius: 4px; box-shadow: 10px 10px 0 var(--terracotta); }
.hero-panel h2 { font-size: clamp(1.75rem, 4vw, 2.45rem); }
.principles-list { margin: 1.3rem 0 1rem; }
.principles-list li { padding: .75rem 0; }
.market-section { padding-top: clamp(2.8rem, 6vw, 5rem); padding-bottom: clamp(2.8rem, 6vw, 5rem); }
.home-categories { padding-top: 0; }
.section-heading { margin-bottom: 1.35rem; }
.section-heading h2, .listing-heading h1, .dashboard-heading h1, .conversation-heading h1 { font-size: clamp(2.2rem, 6vw, 4.25rem); }
.card-grid { gap: 1.15rem; }
.market-card { overflow: hidden; box-shadow: var(--shadow-card); transition: transform .18s ease, box-shadow .18s ease; }
.market-card:hover { transform: translateY(-3px); box-shadow: 0 5px 0 rgba(24,63,52,.12), 0 20px 38px rgba(32,27,24,.1); }
.card-media { height: 11.5rem; background: linear-gradient(135deg, var(--forest) 0%, #28614f 100%); }
.card-media .media-initial, .detail-media .media-initial { color: var(--paper); font-size: 4.3rem; }
.card-body { padding: 1.25rem 1.3rem 1.35rem; }
.market-card h3 { font-size: 1.55rem; }
.price, .detail-price { font-size: 1.25rem; }
.category-list { gap: .75rem; }
.category-chip { position: relative; min-height: 3.1rem; align-items: center; padding: .75rem 1rem; box-shadow: 0 2px 0 rgba(24,63,52,.08); }
.category-chip .chip-arrow { margin-left: .25rem; color: var(--terracotta); }
.category-chip:hover .chip-arrow { color: #f4d8c7; }
.empty-state { gap: .75rem; padding: clamp(1.35rem, 4vw, 2.4rem); box-shadow: inset 0 0 0 1px rgba(24,63,52,.05); }
.empty-state strong { font-size: 1.65rem; }
.about-section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.listing-page, .dashboard-page, .conversation-page, .detail-page, .article-page { padding-top: clamp(2.3rem, 5vw, 4.5rem); }
.listing-heading { margin-bottom: 1.25rem; }
.listing-count { padding: .55rem .75rem; background: var(--forest-soft); }
.listing-count strong { display: block; color: var(--forest); font-family: Georgia, serif; font-size: 1.5rem; font-weight: 400; }
.filter-bar { margin: 1.25rem 0 1.75rem; padding: 1.1rem; box-shadow: var(--shadow-soft); }
.filter-bar input, .filter-bar select { background: var(--cream); }
.button { transition: background-color .15s ease, color .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .text-link:focus-visible, .category-chip:focus-visible, .card-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.form-card { box-shadow: 8px 8px 0 var(--forest); }
.form-field { margin-bottom: 1.1rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="search"], input[type="file"], textarea, select { background: var(--paper); border-radius: 2px; }
label { overflow-wrap: anywhere; }
.form-field label, .radio-fieldset legend { letter-spacing: .01em; }
.form-field-pair { gap: 1rem; }
.detail-page .back-link { margin-bottom: 1.4rem; }
.detail-media { min-height: 24rem; background: linear-gradient(135deg, var(--forest) 0%, #2f6b57 100%); box-shadow: var(--shadow-card); }
.detail-media img { min-height: 24rem; }
.product-gallery { min-width: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr)); gap: .65rem; margin-top: .7rem; }
.gallery-grid figure { height: 6.5rem; margin: 0; overflow: hidden; background: var(--forest-soft); }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy h1, .article-heading h1 { text-wrap: balance; }
.seller-byline { padding-top: 1rem; border-top: 1px solid var(--line); }
.contact-note { box-shadow: var(--shadow-soft); }
.pagination-wrap { overflow: visible; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; }
.pagination-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.pagination-control, .pagination-page { display: inline-flex; min-width: 2.5rem; min-height: 2.5rem; align-items: center; justify-content: center; padding: .4rem .65rem; color: var(--forest); background: var(--paper); border: 1px solid var(--line); text-decoration: none; }
.pagination-control:hover, .pagination-page:hover { color: var(--paper); background: var(--terracotta); border-color: var(--terracotta); }
.pagination-page.is-current { color: var(--paper); background: var(--forest); border-color: var(--forest); }
.pagination-control.is-disabled { color: #9a9087; background: transparent; }
.pagination-ellipsis { display: inline-flex; min-height: 2.5rem; align-items: center; padding-inline: .25rem; color: var(--muted); }
.site-footer { margin-top: 2rem; }
.submit-status { color: var(--terracotta); }
form.is-submitting .button[type="submit"] { position: relative; }
form.is-submitting .button[type="submit"]::after { display: inline-block; width: .85em; height: .85em; margin-left: .5rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ""; animation: tsena-spin .7s linear infinite; }
@keyframes tsena-spin { to { transform: rotate(360deg); } }
@media (min-width: 700px) {
    .card-grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .card-grid-sellers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .detail-layout { grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); }
}
@media (max-width: 1100px) {
    .home-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .search-input-wrap { grid-column: 1 / -1; }
    .home-search .button { width: 100%; }
}
@media (max-width: 999px) {
    .header-inner { min-height: 64px; align-items: center; flex-direction: row; padding-block: .5rem; }
    .mobile-menu { position: relative; }
    .mobile-menu summary { display: inline-flex; min-height: 44px; align-items: center; gap: .45rem; padding: .55rem .7rem; color: var(--forest); font-weight: 800; cursor: pointer; border: 1px solid var(--line); background: var(--paper); }
    .mobile-menu summary::after { content: "⌄"; color: var(--terracotta); }
    .mobile-menu[open] summary::after { content: "⌃"; }
    .menu-icon { width: 1rem; height: .75rem; display: inline-block; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
    .menu-icon::after { position: absolute; top: .23rem; left: 0; width: 100%; border-top: 2px solid currentColor; content: ""; }
    .main-nav { position: absolute; top: calc(100% + .55rem); right: 0; display: grid; min-width: min(18rem, calc(100vw - 2rem)); gap: .1rem; padding: .55rem; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
    .main-nav a, .nav-button { width: 100%; justify-content: flex-start; padding-inline: .8rem; }
    .main-nav a[aria-current="page"]::after { right: .8rem; left: auto; width: 3px; height: 1.5rem; bottom: .75rem; }
    .main-nav .nav-account { color: var(--paper); }
    .nav-divider { width: auto; height: 1px; margin: .35rem .6rem; }
    .home-search { grid-template-columns: 1fr 1fr; }
    .search-input-wrap { grid-column: 1 / -1; }
    .home-search .button { width: 100%; }
    .hero-panel { margin-top: .35rem; }
    .pagination { align-items: stretch; }
    .pagination-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
    .pagination-control { min-width: 2.5rem; }
    .detail-media, .detail-media img { min-height: 17rem; }
}
@media (prefers-reduced-motion: reduce) {
    .market-card, .button { transition: none; }
    form.is-submitting .button[type="submit"]::after { animation: none; }
}
