/* ==========================================================================
   File: assets/css/community.css
   AMRIC community module - verification, feed, package board, tracking.

   Mobile first. Every layout rule starts at the phone and only widens inside
   a min-width query, because most farmers and riders will open this on a
   phone over a patchy connection.

   Loaded by:  includes/admin_header.php (always)
               any front-end page that sets $page_styles = ['community.css']
   ========================================================================== */

/* ==========================================================================
   THE HIDDEN ATTRIBUTE MUST WIN
   --------------------------------------------------
   The browser's own stylesheet sets [hidden] { display: none }, but ANY author
   rule that sets display beats it, because author styles outrank user-agent
   styles regardless of specificity.

   That is what put the report dialog on screen on every page load: this file
   said .feed-modal { display: flex }, which quietly cancelled the hidden
   attribute on the markup. The dialog covered the page with an empty target,
   so submitting it always came back "choose a reason first" and there was no
   way past it.

   This rule goes FIRST so nothing after it can make the same mistake again.
   ========================================================================== */

[hidden] {
    display: none !important;
}

:root {
    --amric-green:  #2E7D32;
    --amric-dark:   #1B5E20;
    --amric-gold:   #F9A825;
    --amric-brown:  #6D4C41;
    --amric-light:  #E8F5E9;
    --amric-border: #A5D6A7;

    --amric-ink:      #33291f;
    --amric-ink-soft: #7a6a5a;
    --amric-surface:  #ffffff;
    --amric-canvas:   #f4f6f4;
    --amric-line:     #e6e2dc;

    --amric-danger:  #c62828;
    --amric-warn:    #ef6c00;
    --amric-info:    #1565c0;

    --amric-radius:    12px;
    --amric-radius-sm: 8px;
    --amric-shadow:    0 2px 10px rgba(45, 35, 25, 0.07);
    --amric-shadow-lg: 0 8px 28px rgba(45, 35, 25, 0.12);

    --amric-font-display: 'Montserrat', system-ui, sans-serif;
    --amric-font-body:    'Open Sans', system-ui, sans-serif;
}

html[data-theme="dark"] {
    --amric-ink:      #ece6de;
    --amric-ink-soft: #a89b8c;
    --amric-surface:  #241f1a;
    --amric-canvas:   #1a1613;
    --amric-line:     #3a322a;
    --amric-light:    #1f3320;
}

/* ==========================================================================
   Layout shells
   ========================================================================== */

.amric-narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 20px 16px 60px;
}

.amric-admin-wrap {
    padding: 16px 0 48px;
}

.amric-admin-head {
    margin-bottom: 18px;
}

.amric-admin-head h1 {
    font-family: var(--amric-font-display);
    font-size: 1.5rem;
    color: var(--amric-green);
    margin: 0 0 4px;
}

.amric-admin-head p {
    margin: 0;
    color: var(--amric-ink-soft);
    font-size: 0.9rem;
}

/* Queue beside detail - stacked on a phone, side by side from 992px. */
.amric-split {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .amric-split {
        grid-template-columns: 320px minmax(0, 1fr);
        align-items: start;
    }
    .amric-queue {
        position: sticky;
        top: 88px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
    }
}

/* ==========================================================================
   Panels
   ========================================================================== */

.amric-panel {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    box-shadow: var(--amric-shadow);
    padding: 18px 16px;
    margin-bottom: 16px;
}

.amric-panel-title {
    font-family: var(--amric-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--amric-green);
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--amric-light);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.amric-panel-title i {
    color: var(--amric-gold);
}

.amric-panel-switch {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--amric-brown);
    text-decoration: underline;
}

.amric-panel-lead {
    margin: -4px 0 14px;
    color: var(--amric-ink-soft);
    font-size: 0.88rem;
    line-height: 1.55;
}

@media (min-width: 768px) {
    .amric-panel { padding: 24px; }
    .amric-panel-title { font-size: 1.15rem; }
}

/* ==========================================================================
   Alerts
   ========================================================================== */

.amric-alert {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: var(--amric-radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.55;
    border-left: 4px solid transparent;
}

.amric-alert i { margin-top: 2px; flex: 0 0 auto; }

.amric-alert-success { background: #e8f5e9; color: #1b5e20; border-left-color: var(--amric-green); }
.amric-alert-error   { background: #ffebee; color: #8e1b1b; border-left-color: var(--amric-danger); }
.amric-alert-info    { background: #e3f2fd; color: #0d3c6e; border-left-color: var(--amric-info); }
.amric-alert-warn    { background: #fff8e1; color: #7a4b00; border-left-color: var(--amric-gold); }

html[data-theme="dark"] .amric-alert-success { background: #1c3320; color: #b7e0ba; }
html[data-theme="dark"] .amric-alert-error   { background: #38201f; color: #f0b6b3; }
html[data-theme="dark"] .amric-alert-info    { background: #16283d; color: #b9d5f2; }
html[data-theme="dark"] .amric-alert-warn    { background: #3a2f18; color: #f0d79a; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.amric-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--amric-radius-sm);
    font-family: var(--amric-font-body);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-height: 44px;              /* comfortable thumb target */
}

.amric-btn:hover { transform: translateY(-1px); }
.amric-btn:active { transform: translateY(0); }

.amric-btn:focus-visible {
    outline: 3px solid var(--amric-gold);
    outline-offset: 2px;
}

.amric-btn-primary {
    background: linear-gradient(135deg, var(--amric-green), var(--amric-dark));
    color: #fff;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.28);
}

.amric-btn-gold {
    background: linear-gradient(135deg, var(--amric-gold), #e08a00);
    color: #2a2000;
}

.amric-btn-danger {
    background: var(--amric-danger);
    color: #fff;
}

.amric-btn-ghost {
    background: transparent;
    border-color: var(--amric-line);
    color: var(--amric-ink);
}

.amric-btn-ghost:hover {
    border-color: var(--amric-green);
    color: var(--amric-green);
}

.amric-btn-lg { padding: 14px 26px; font-size: 0.95rem; }

.amric-btn[disabled],
.amric-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Full width on a phone, natural width from tablet up. */
.amric-form-actions .amric-btn,
.amric-status-actions .amric-btn { width: 100%; }

@media (min-width: 560px) {
    .amric-form-actions .amric-btn,
    .amric-status-actions .amric-btn { width: auto; }
}

/* ==========================================================================
   Badges and chips
   ========================================================================== */

.amric-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.amric-badge-verified   { background: var(--amric-light); color: var(--amric-dark); }
.amric-badge-pending    { background: #fff8e1; color: #8a5a00; }
.amric-badge-unverified { background: #f1eee9; color: var(--amric-ink-soft); }
.amric-badge-member     { background: #eef2f7; color: #46586e; }

.amric-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 0.02em;
}

.amric-chip-pending  { background: #fff3d6; color: #8a5a00; }
.amric-chip-approved { background: #e0f2e1; color: var(--amric-dark); }
.amric-chip-rejected { background: #fde3e1; color: #9c1f1f; }
.amric-chip-role     { background: #eceff4; color: #46586e; }
.amric-chip-danger   { background: var(--amric-danger); color: #fff; }

/* ==========================================================================
   Forms
   ========================================================================== */

.amric-field { margin-bottom: 16px; }

.amric-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--amric-ink);
}

.amric-field .req { color: var(--amric-danger); }

.amric-field input[type="text"],
.amric-field input[type="tel"],
.amric-field input[type="email"],
.amric-field input[type="number"],
.amric-field input[type="date"],
.amric-field input[type="password"],
.amric-field select,
.amric-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--amric-line);
    border-radius: var(--amric-radius-sm);
    background: var(--amric-surface);
    color: var(--amric-ink);
    font-family: var(--amric-font-body);
    font-size: 16px;               /* 16px stops iOS zooming the page on focus */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.amric-field textarea { resize: vertical; min-height: 88px; }

.amric-field input:focus,
.amric-field select:focus,
.amric-field textarea:focus {
    outline: none;
    border-color: var(--amric-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

.amric-field small {
    display: block;
    margin-top: 5px;
    font-size: 0.78rem;
    color: var(--amric-ink-soft);
    line-height: 1.45;
}

.amric-field-grid {
    display: grid;
    gap: 0 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .amric-field-grid { grid-template-columns: 1fr 1fr; }
    .amric-field-wide { grid-column: 1 / -1; }
}

.amric-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.amric-form-note {
    margin: 0;
    font-size: 0.8rem;
    color: var(--amric-ink-soft);
    line-height: 1.5;
}

/* ==========================================================================
   File upload tiles
   ========================================================================== */

.amric-upload-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
    margin-top: 6px;
}

@media (min-width: 560px) {
    .amric-upload-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

.amric-upload {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    padding: 20px 14px;
    border: 2px dashed var(--amric-border);
    border-radius: var(--amric-radius);
    background: var(--amric-light);
    cursor: pointer;
    min-height: 128px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.amric-upload:hover { border-color: var(--amric-green); }

.amric-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.amric-upload i { font-size: 1.5rem; color: var(--amric-green); }
.amric-upload strong { font-size: 0.85rem; color: var(--amric-ink); }
.amric-upload small { font-size: 0.75rem; color: var(--amric-ink-soft); }

/* Set by community.js once a file is chosen. */
.amric-upload.has-file {
    border-style: solid;
    border-color: var(--amric-green);
    background: var(--amric-surface);
}

.amric-upload.has-file i::before { content: "\f00c"; }   /* fa-check */

.amric-upload-preview {
    width: 100%;
    max-height: 110px;
    object-fit: cover;
    border-radius: var(--amric-radius-sm);
    margin-bottom: 4px;
}

/* ==========================================================================
   Role picker (registration + verification)
   ========================================================================== */

.role-picker {
    border: 0;
    padding: 0;
    margin: 0 0 22px;
}

.role-picker legend {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--amric-ink);
    margin-bottom: 10px;
    padding: 0;
}

.role-options {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

@media (min-width: 560px) {
    .role-options { grid-template-columns: repeat(3, 1fr); }
}

.role-option { display: block; cursor: pointer; }

.role-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 5px;
    padding: 16px 12px;
    border: 2px solid var(--amric-line);
    border-radius: var(--amric-radius);
    background: var(--amric-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    height: 100%;
}

.role-card i { font-size: 1.45rem; color: var(--amric-brown); }
.role-card strong { font-size: 0.92rem; color: var(--amric-ink); }
.role-card small { font-size: 0.75rem; color: var(--amric-ink-soft); line-height: 1.4; }

.role-option input:checked + .role-card {
    border-color: var(--amric-green);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.2);
    transform: translateY(-2px);
}

.role-option input:checked + .role-card i { color: var(--amric-green); }

.role-option input:focus-visible + .role-card {
    outline: 3px solid var(--amric-gold);
    outline-offset: 2px;
}

.role-note {
    margin: 12px 0 0;
    padding: 11px 14px;
    background: #fff8e1;
    border-left: 3px solid var(--amric-gold);
    border-radius: var(--amric-radius-sm);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #6b4a00;
}

.role-fields { margin-bottom: 4px; }

/* Two-up role tiles on the verification page. */
.amric-role-choice {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

@media (min-width: 560px) {
    .amric-role-choice { grid-template-columns: 1fr 1fr; }
}

.amric-role-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 18px;
    border: 2px solid var(--amric-line);
    border-radius: var(--amric-radius);
    text-decoration: none;
    color: var(--amric-ink);
    background: var(--amric-surface);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.amric-role-tile:hover {
    border-color: var(--amric-green);
    transform: translateY(-2px);
    box-shadow: var(--amric-shadow-lg);
}

.amric-role-tile i { font-size: 1.7rem; color: var(--amric-green); }
.amric-role-tile strong { font-family: var(--amric-font-display); font-size: 1rem; }
.amric-role-tile span { font-size: 0.82rem; color: var(--amric-ink-soft); line-height: 1.5; }

/* ==========================================================================
   Verification status card
   ========================================================================== */

.amric-verify-header {
    background: linear-gradient(135deg, var(--amric-green), var(--amric-dark));
    color: #fff;
    padding: 26px 0;
    border-bottom: 4px solid var(--amric-gold);
}

.amric-verify-header h1 {
    font-family: var(--amric-font-display);
    font-size: 1.45rem;
    margin: 10px 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.amric-verify-header h1 i { color: var(--amric-gold); }
.amric-verify-header p { margin: 0; opacity: 0.92; font-size: 0.88rem; }
.amric-verify-header .breadcrumb-nav,
.amric-verify-header .breadcrumb-nav a { color: rgba(255, 255, 255, 0.85); font-size: 0.8rem; }

.amric-status-card {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px 16px;
    border-radius: var(--amric-radius);
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-left: 5px solid var(--amric-ink-soft);
    box-shadow: var(--amric-shadow);
    margin-bottom: 20px;
}

.amric-status-icon { font-size: 1.6rem; line-height: 1; flex: 0 0 auto; margin-top: 2px; }

.amric-status-body h2 {
    font-family: var(--amric-font-display);
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: var(--amric-ink);
}

.amric-status-body p {
    margin: 0 0 8px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--amric-ink-soft);
}

.amric-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.amric-status-approved    { border-left-color: var(--amric-green); }
.amric-status-approved .amric-status-icon { color: var(--amric-green); }
.amric-status-pending     { border-left-color: var(--amric-gold); }
.amric-status-pending .amric-status-icon  { color: var(--amric-gold); }
.amric-status-rejected    { border-left-color: var(--amric-danger); }
.amric-status-rejected .amric-status-icon { color: var(--amric-danger); }
.amric-status-unsubmitted .amric-status-icon { color: var(--amric-ink-soft); }

/* ==========================================================================
   Tabs
   ========================================================================== */

.amric-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.amric-tabs::-webkit-scrollbar { display: none; }

.amric-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 22px;
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    color: var(--amric-ink-soft);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.amric-tab:hover { border-color: var(--amric-border); color: var(--amric-green); }

.amric-tab.is-active {
    background: var(--amric-green);
    border-color: var(--amric-green);
    color: #fff;
}

.amric-tab-count {
    display: inline-block;
    min-width: 20px;
    padding: 1px 7px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.72rem;
    text-align: center;
}

.amric-tab.is-active .amric-tab-count { background: rgba(255, 255, 255, 0.25); }

/* ==========================================================================
   Review queue
   ========================================================================== */

.amric-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.amric-queue-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: var(--amric-radius);
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    text-decoration: none;
    color: var(--amric-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.amric-queue-item:hover { border-color: var(--amric-border); box-shadow: var(--amric-shadow); }

.amric-queue-item.is-active {
    border-color: var(--amric-green);
    border-left-width: 4px;
    background: var(--amric-light);
}

.amric-queue-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 0.95rem;
}

.amric-queue-avatar.farmer { background: linear-gradient(135deg, var(--amric-green), var(--amric-dark)); }
.amric-queue-avatar.biker  { background: linear-gradient(135deg, var(--amric-brown), #4E342E); }

.amric-queue-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.amric-queue-body strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.amric-queue-body small { font-size: 0.75rem; color: var(--amric-ink-soft); }
.amric-queue-meta { font-size: 0.72rem !important; }

/* ==========================================================================
   Application detail
   ========================================================================== */

.amric-detail-head {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: var(--amric-shadow);
}

.amric-detail-title h2 {
    font-family: var(--amric-font-display);
    font-size: 1.25rem;
    margin: 0 0 8px;
    color: var(--amric-ink);
}

.amric-detail-title p { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }

.amric-detail-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--amric-line);
}

.amric-detail-contact a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 20px;
    background: var(--amric-light);
    color: var(--amric-dark);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    min-height: 40px;
}

.amric-detail-contact a:hover { background: var(--amric-border); }

.amric-doc-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.amric-doc { margin: 0; }

.amric-doc img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--amric-radius-sm);
    border: 1px solid var(--amric-line);
    background: var(--amric-canvas);
    display: block;
}

.amric-doc figcaption {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--amric-ink-soft);
    text-align: center;
}

.amric-doc-missing div {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    border: 1px dashed var(--amric-line);
    border-radius: var(--amric-radius-sm);
    color: var(--amric-ink-soft);
    font-size: 1.3rem;
    background: var(--amric-canvas);
}

.amric-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 0;
}

.amric-summary dt {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--amric-ink-soft);
    padding-top: 12px;
}

.amric-summary dd {
    margin: 3px 0 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--amric-line);
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--amric-ink);
}

.amric-summary dd code {
    background: var(--amric-canvas);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.85em;
}

@media (min-width: 640px) {
    .amric-summary { grid-template-columns: 190px minmax(0, 1fr); }
    .amric-summary dt { padding-bottom: 12px; border-bottom: 1px solid var(--amric-line); }
    .amric-summary dd { margin-top: 0; padding-top: 12px; }
}

.amric-decision { border-left: 4px solid var(--amric-gold); }

.amric-decision-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 560px) {
    .amric-decision-buttons { flex-direction: row; flex-wrap: wrap; }
}

/* ==========================================================================
   Empty states
   ========================================================================== */

.amric-empty {
    text-align: center;
    padding: 34px 20px;
    color: var(--amric-ink-soft);
    background: var(--amric-surface);
    border: 1px dashed var(--amric-line);
    border-radius: var(--amric-radius);
}

.amric-empty i { font-size: 1.9rem; color: var(--amric-border); display: block; margin-bottom: 10px; }
.amric-empty h2 { font-family: var(--amric-font-display); font-size: 1.1rem; margin: 0 0 6px; color: var(--amric-ink); }
.amric-empty p { margin: 0; font-size: 0.87rem; line-height: 1.55; }
.amric-empty-lg { padding: 60px 24px; }

/* ==========================================================================
   Accessibility and motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .amric-btn,
    .role-card,
    .amric-role-tile,
    .amric-queue-item {
        transition: none;
    }
    .amric-btn:hover,
    .amric-role-tile:hover,
    .role-option input:checked + .role-card {
        transform: none;
    }
}

.amric-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* ==========================================================================
   STAGE 2 - FEED, BELL, MODERATION
   Append everything below to assets/css/community.css.
   Still mobile first: the phone layout is the base, wider screens are the
   exception inside a min-width query.
   ========================================================================== */

/* ==========================================================================
   Feed shell
   ========================================================================== */

.feed-page {
    background: var(--amric-canvas);
    min-height: 70vh;
    padding: 16px 0 60px;
}

.feed-shell {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

.feed-side { display: none; }

@media (min-width: 992px) {
    .feed-shell { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
    .feed-side {
        display: flex;
        flex-direction: column;
        gap: 12px;
        position: sticky;
        top: 92px;
    }
    .feed-shell-single { grid-template-columns: minmax(0, 720px); justify-content: center; }
}

.feed-main { min-width: 0; }   /* stops long words blowing out the grid column */

.feed-head { margin-bottom: 14px; }

.feed-head h1 {
    font-family: var(--amric-font-display);
    font-size: 1.4rem;
    color: var(--amric-green);
    margin: 0 0 4px;
}

.feed-head p { margin: 0; color: var(--amric-ink-soft); font-size: 0.88rem; }

.feed-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--amric-brown);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.feed-back:hover { color: var(--amric-green); }

/* ==========================================================================
   Sidebar cards
   ========================================================================== */

.feed-side-card {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    padding: 16px;
    box-shadow: var(--amric-shadow);
}

.feed-side-me { display: flex; gap: 12px; align-items: center; }
.feed-side-me strong { display: block; font-size: 0.9rem; margin-bottom: 3px; }
.feed-side-cta { width: 100%; margin-top: 14px; }

.feed-side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px; }

.feed-side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--amric-radius-sm);
    color: var(--amric-ink);
    font-size: 0.87rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.feed-side-nav a i { width: 18px; text-align: center; color: var(--amric-ink-soft); }
.feed-side-nav a:hover { background: var(--amric-light); color: var(--amric-dark); }

.feed-side-nav a.is-active { background: var(--amric-green); color: #fff; }
.feed-side-nav a.is-active i { color: var(--amric-gold); }

.feed-side-note h3 {
    font-family: var(--amric-font-display);
    font-size: 0.9rem;
    margin: 0 0 8px;
    color: var(--amric-green);
}

.feed-side-note ul { margin: 0; padding-left: 18px; }
.feed-side-note li { font-size: 0.78rem; line-height: 1.55; color: var(--amric-ink-soft); margin-bottom: 6px; }

.feed-tabs-mobile { margin-bottom: 14px; }

@media (min-width: 992px) { .feed-tabs-mobile { display: none; } }

/* ==========================================================================
   Composer
   ========================================================================== */

.feed-composer {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    box-shadow: var(--amric-shadow);
    padding: 14px;
    margin-bottom: 16px;
}

.feed-composer-top { display: flex; gap: 12px; align-items: flex-start; }

.feed-composer-top textarea {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    resize: none;
    font-family: var(--amric-font-body);
    font-size: 16px;                 /* 16px stops iOS zooming on focus */
    line-height: 1.6;
    color: var(--amric-ink);
    padding: 8px 0;
    min-height: 46px;
    max-height: 320px;
    overflow-y: auto;
}

.feed-composer-top textarea:focus { outline: none; }
.feed-composer-top textarea::placeholder { color: var(--amric-ink-soft); }

.feed-composer-extra { margin-top: 10px; }

.feed-composer-extra input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius-sm);
    background: var(--amric-surface);
    color: var(--amric-ink);
    font-size: 16px;
    margin-bottom: 10px;
}

.feed-composer-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--amric-line);
}

.feed-attach {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 22px;
    background: var(--amric-light);
    color: var(--amric-dark);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 42px;
}

.feed-attach input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.feed-attach small { color: var(--amric-ink-soft); font-weight: 400; font-size: 0.72rem; }
.feed-attach:hover { background: var(--amric-border); }

.feed-composer-bar .amric-btn { margin-left: auto; }

.feed-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }

.feed-thumb {
    position: relative;
    width: 74px;
    height: 74px;
    border-radius: var(--amric-radius-sm);
    overflow: hidden;
    border: 1px solid var(--amric-line);
}

.feed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ==========================================================================
   Locked composer
   ========================================================================== */

.feed-locked {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-left: 4px solid var(--amric-gold);
    border-radius: var(--amric-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--amric-shadow);
}

.feed-locked > i { font-size: 1.2rem; color: var(--amric-gold); margin-top: 3px; }
.feed-locked strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.feed-locked p { margin: 0 0 12px; font-size: 0.85rem; line-height: 1.55; color: var(--amric-ink-soft); }

/* ==========================================================================
   New-post pill
   ========================================================================== */

.feed-new-pill {
    display: block;
    width: 100%;
    margin-bottom: 12px;
    padding: 11px 16px;
    border: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--amric-green), var(--amric-dark));
    color: #fff;
    font-family: var(--amric-font-body);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.3);
    animation: feedPillIn 0.25s ease;
}

@keyframes feedPillIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (min-width: 992px) {
    .feed-new-pill { position: sticky; top: 92px; z-index: 5; }
}

/* ==========================================================================
   Post card
   ========================================================================== */

.feed-stream { display: flex; flex-direction: column; gap: 14px; }

.feed-post {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    box-shadow: var(--amric-shadow);
    padding: 15px 14px 6px;
    scroll-margin-top: 90px;          /* so #post-12 does not land under the header */
}

.feed-post.is-new { animation: feedPostIn 0.3s ease; }

@keyframes feedPostIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.feed-post.is-going { opacity: 0.35; pointer-events: none; }

.feed-post-head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 10px; }

.feed-avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amric-green), var(--amric-dark));
    display: grid;
    place-items: center;
}

.feed-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.feed-avatar-initials {
    color: #fff;
    font-family: var(--amric-font-display);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.feed-avatar-sm { width: 32px; height: 32px; }
.feed-avatar-sm .feed-avatar-initials { font-size: 0.7rem; }
.feed-avatar-lg { width: 52px; height: 52px; }

.feed-post-meta { flex: 1 1 auto; min-width: 0; }

.feed-post-author {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.feed-post-author strong { font-size: 0.9rem; color: var(--amric-ink); }

.feed-post-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--amric-ink-soft);
}

.feed-post-sub a { color: inherit; text-decoration: none; }
.feed-post-sub a:hover { text-decoration: underline; }
.feed-dot { opacity: 0.5; }

.feed-tag-produce {
    color: var(--amric-dark);
    background: var(--amric-light);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.feed-pin { color: var(--amric-gold); font-size: 0.85rem; margin-top: 4px; }

.feed-post-title {
    font-family: var(--amric-font-display);
    font-size: 1.02rem;
    line-height: 1.4;
    margin: 0 0 8px;
    color: var(--amric-ink);
}

.feed-post-title a { color: inherit; text-decoration: none; }
.feed-post-title a:hover { color: var(--amric-green); }

.feed-post-body {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--amric-ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;          /* a pasted URL must not widen the card */
}

.feed-post-body.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-more {
    background: none;
    border: 0;
    padding: 4px 0;
    color: var(--amric-green);
    font-family: var(--amric-font-body);
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   Gallery
   ========================================================================== */

.feed-gallery {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    border-radius: var(--amric-radius-sm);
    overflow: hidden;
}

.feed-gallery-1 { grid-template-columns: 1fr; }
.feed-gallery-2 { grid-template-columns: 1fr 1fr; }
.feed-gallery-3 { grid-template-columns: 2fr 1fr; }
.feed-gallery-4 { grid-template-columns: 1fr 1fr; }

.feed-gallery-3 .feed-gallery-item:first-child { grid-row: span 2; }

.feed-gallery-item { display: block; background: var(--amric-canvas); }

.feed-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 4 / 3;
}

.feed-gallery-1 .feed-gallery-item img { aspect-ratio: 16 / 10; max-height: 460px; }
.feed-gallery-3 .feed-gallery-item:first-child img { aspect-ratio: 1 / 1; }

/* ==========================================================================
   Actions
   ========================================================================== */

.feed-post-actions {
    display: flex;
    gap: 4px;
    margin-top: 12px;
    padding-top: 6px;
    border-top: 1px solid var(--amric-line);
}

.feed-action {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 6px;
    min-height: 44px;
    border: 0;
    border-radius: var(--amric-radius-sm);
    background: transparent;
    color: var(--amric-ink-soft);
    font-family: var(--amric-font-body);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.feed-action:hover:not([disabled]) { background: var(--amric-canvas); color: var(--amric-ink); }
.feed-action[disabled] { opacity: 0.45; cursor: not-allowed; }
.feed-action.is-on { color: var(--amric-green); }
.feed-action.is-on i { transform: scale(1.12); }

.feed-action:focus-visible { outline: 2px solid var(--amric-gold); outline-offset: -2px; }

.feed-action.is-pulsed { animation: feedPulse 0.32s ease; }

@keyframes feedPulse {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

/* ==========================================================================
   Post menu
   ========================================================================== */

.feed-menu { position: relative; flex: 0 0 auto; }

.feed-menu-toggle {
    background: none;
    border: 0;
    padding: 6px 8px;
    color: var(--amric-ink-soft);
    cursor: pointer;
    border-radius: var(--amric-radius-sm);
    min-height: 34px;
}

.feed-menu-toggle:hover { background: var(--amric-canvas); color: var(--amric-ink); }

.feed-menu-list {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 20;
    min-width: 170px;
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius-sm);
    box-shadow: var(--amric-shadow-lg);
    padding: 5px;
}

.feed-menu-list button {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--amric-ink);
    font-family: var(--amric-font-body);
    font-size: 0.83rem;
    text-align: left;
    cursor: pointer;
}

.feed-menu-list button:hover { background: var(--amric-light); }
.feed-menu-list button i { width: 15px; color: var(--amric-ink-soft); }

/* ==========================================================================
   Comments
   ========================================================================== */

.feed-comments {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--amric-line);
}

.feed-comment-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }

.feed-comments-empty,
.feed-comments-locked {
    margin: 0 0 12px;
    font-size: 0.82rem;
    color: var(--amric-ink-soft);
    line-height: 1.55;
}

.feed-comment { display: flex; gap: 10px; align-items: flex-start; }
.feed-comment-body { flex: 1 1 auto; min-width: 0; }

.feed-comment-head {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.feed-comment-head strong { font-size: 0.84rem; }
.feed-comment-time { font-size: 0.72rem; color: var(--amric-ink-soft); }

.feed-comment-body p {
    margin: 0;
    font-size: 0.87rem;
    line-height: 1.6;
    color: var(--amric-ink);
    overflow-wrap: anywhere;
}

.feed-comment-tools { display: flex; gap: 12px; margin-top: 5px; }

.feed-comment-tools button {
    background: none;
    border: 0;
    padding: 2px 0;
    color: var(--amric-ink-soft);
    font-family: var(--amric-font-body);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
}

.feed-comment-tools button:hover { color: var(--amric-green); text-decoration: underline; }

.feed-replies {
    margin-top: 10px;
    padding-left: 12px;
    border-left: 2px solid var(--amric-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-comment-form { display: flex; gap: 8px; align-items: flex-end; }

.feed-comment-form textarea {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 13px;
    border: 1px solid var(--amric-line);
    border-radius: 20px;
    background: var(--amric-canvas);
    color: var(--amric-ink);
    font-family: var(--amric-font-body);
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    min-height: 42px;
    max-height: 160px;
    overflow-y: auto;
}

.feed-comment-form textarea:focus {
    outline: none;
    border-color: var(--amric-green);
    background: var(--amric-surface);
}

.feed-comment-send {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--amric-green);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.feed-comment-send:hover { background: var(--amric-dark); }
.feed-comment-send[disabled] { opacity: 0.5; cursor: not-allowed; }

.feed-reply-banner {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--amric-ink-soft);
}

.feed-reply-banner button {
    background: none;
    border: 0;
    padding: 0 0 0 6px;
    color: var(--amric-danger);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

/* ==========================================================================
   Load more / end
   ========================================================================== */

.feed-load-more { width: 100%; margin-top: 16px; }

.feed-end {
    text-align: center;
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--amric-ink-soft);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.feed-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(26, 20, 15, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

@media (min-width: 560px) {
    .feed-modal { align-items: center; padding: 20px; }
}

.feed-modal-panel {
    width: 100%;
    max-width: 460px;
    background: var(--amric-surface);
    border-radius: var(--amric-radius) var(--amric-radius) 0 0;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--amric-shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalUp 0.22s ease;
}

@media (min-width: 560px) {
    .feed-modal-panel { border-radius: var(--amric-radius); padding-bottom: 22px; }
}

@keyframes modalUp {
    from { transform: translateY(18px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.feed-modal-panel h2 {
    font-family: var(--amric-font-display);
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: var(--amric-ink);
}

.feed-modal-panel > p {
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: var(--amric-ink-soft);
    line-height: 1.55;
}

.feed-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

.feed-modal-actions .amric-btn { flex: 1 1 0; }

@media (min-width: 560px) { .feed-modal-actions .amric-btn { flex: 0 0 auto; } }

/* ==========================================================================
   Toast
   ========================================================================== */

.feed-toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%) translateY(70px);
    z-index: 2500;
    max-width: calc(100vw - 32px);
    padding: 12px 20px;
    border-radius: 24px;
    background: var(--amric-ink);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--amric-shadow-lg);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    pointer-events: none;
}

.feed-toast.is-up { transform: translateX(-50%) translateY(0); opacity: 1; }
.feed-toast.is-error { background: var(--amric-danger); }

/* ==========================================================================
   Notification bell
   ========================================================================== */

.bell { position: relative; }

.bell-toggle {
    position: relative;
    background: none;
    border: 0;
    padding: 8px 10px;
    color: inherit;
    font-size: 1.05rem;
    cursor: pointer;
    min-height: 40px;
}

.bell-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    padding: 1px 5px;
    border-radius: 20px;
    background: var(--amric-danger);
    color: #fff;
    font-size: 0.63rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.bell-dot-inline {
    display: inline-block;
    min-width: 17px;
    padding: 1px 6px;
    margin-left: 5px;
    border-radius: 20px;
    background: var(--amric-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
}

.bell-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1200;
    width: min(330px, calc(100vw - 24px));
    max-height: 400px;
    overflow-y: auto;
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    box-shadow: var(--amric-shadow-lg);
}

.bell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--amric-line);
    position: sticky;
    top: 0;
    background: var(--amric-surface);
}

.bell-head strong { font-size: 0.88rem; color: var(--amric-ink); }
.bell-head a { font-size: 0.78rem; color: var(--amric-green); font-weight: 600; text-decoration: none; }

.bell-item {
    display: flex;
    gap: 11px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--amric-line);
    text-decoration: none;
    color: var(--amric-ink);
}

.bell-item:last-child { border-bottom: 0; }
.bell-item:hover { background: var(--amric-canvas); }
.bell-item.is-unread { background: var(--amric-light); }

.bell-item-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--amric-canvas);
    color: var(--amric-green);
    font-size: 0.8rem;
}

.bell-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bell-item-text strong { font-size: 0.83rem; }
.bell-item-text small { font-size: 0.76rem; color: var(--amric-ink-soft); line-height: 1.45; }
.bell-item-text time { font-size: 0.7rem; color: var(--amric-ink-soft); }

.bell-empty { padding: 26px 16px; text-align: center; font-size: 0.83rem; color: var(--amric-ink-soft); margin: 0; }

/* ==========================================================================
   Notifications page
   ========================================================================== */

.notif-mark-all { margin-bottom: 14px; }

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

.notif-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
}

.notif-item.is-unread { border-left: 4px solid var(--amric-green); background: var(--amric-light); }

.notif-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--amric-canvas);
    color: var(--amric-green);
}

.notif-body { flex: 1 1 auto; min-width: 0; }
.notif-body strong { display: block; font-size: 0.9rem; margin-bottom: 3px; }
.notif-body p { margin: 0 0 5px; font-size: 0.84rem; line-height: 1.55; color: var(--amric-ink-soft); }
.notif-body time { font-size: 0.73rem; color: var(--amric-ink-soft); }

.notif-tools { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }

.notif-read-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--amric-line);
    border-radius: 50%;
    background: var(--amric-surface);
    color: var(--amric-green);
    cursor: pointer;
}

.notif-read-btn:hover { background: var(--amric-light); }

.amric-btn-sm { padding: 7px 13px; font-size: 0.78rem; min-height: 36px; }

/* ==========================================================================
   Admin moderation
   ========================================================================== */

.mod-list { display: flex; flex-direction: column; gap: 12px; }

.mod-card {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-left: 4px solid var(--amric-line);
    border-radius: var(--amric-radius);
    padding: 16px;
    box-shadow: var(--amric-shadow);
}

.mod-card-published { border-left-color: var(--amric-green); }
.mod-card-hidden    { border-left-color: var(--amric-gold); }
.mod-card-removed   { border-left-color: var(--amric-danger); }
.mod-card-compact   { padding: 13px 15px; }

.mod-card-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.mod-card-head > div { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mod-card-head strong { font-size: 0.9rem; }
.mod-card-head small { font-size: 0.75rem; color: var(--amric-ink-soft); }

.mod-title { font-family: var(--amric-font-display); font-size: 1rem; margin: 0 0 8px; }

.mod-reported-by { margin: 0 0 10px; font-size: 0.83rem; color: var(--amric-ink-soft); line-height: 1.55; }

.mod-quote {
    margin: 0 0 10px;
    padding: 12px 14px;
    background: var(--amric-canvas);
    border-radius: var(--amric-radius-sm);
    font-size: 0.87rem;
    line-height: 1.6;
    color: var(--amric-ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.mod-quote-gone { font-style: italic; color: var(--amric-ink-soft); }

.mod-author { margin: 0 0 12px; font-size: 0.8rem; color: var(--amric-ink-soft); }
.mod-author a { color: var(--amric-green); font-weight: 600; }

.mod-stats { display: flex; gap: 14px; flex-wrap: wrap; margin: 0 0 12px; font-size: 0.79rem; color: var(--amric-ink-soft); }
.mod-stats a { color: var(--amric-green); font-weight: 600; margin-left: auto; }

.mod-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mod-actions form { margin: 0; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .feed-post.is-new,
    .feed-new-pill,
    .feed-modal-panel,
    .feed-action.is-pulsed {
        animation: none;
    }
    .feed-toast { transition: opacity 0.2s ease; transform: translateX(-50%); }
}

/* ==========================================================================
   CAMERA CAPTURE
   --------------------------------------------------
   Used where a photo has to be taken now rather than chosen from a gallery:
   the identity check where the person holds their document beside their face.
   ========================================================================== */

.amric-capture {
    border: 2px solid var(--amric-border);
    border-radius: var(--amric-radius);
    background: var(--amric-light);
    padding: 14px;
    margin-bottom: 16px;
}

.amric-capture-head {
    margin-bottom: 10px;
}

.amric-capture-head strong {
    display: block;
    font-size: 0.9rem;
    color: var(--amric-ink);
    margin-bottom: 3px;
}

.amric-capture-head span {
    display: block;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--amric-ink-soft);
}

.amric-capture-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 420px;
    border-radius: var(--amric-radius-sm);
    overflow: hidden;
    background: #14110e;
    display: grid;
    place-items: center;
}

@media (min-width: 560px) {
    .amric-capture-stage { aspect-ratio: 4 / 3; }
}

.amric-capture-stage video,
.amric-capture-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Front camera preview is mirrored, so what people see matches a mirror.
   The captured frame is un-mirrored on the canvas, so the saved photo reads
   the right way round. */
.amric-capture-stage video.is-front {
    transform: scaleX(-1);
}

.amric-capture-placeholder {
    text-align: center;
    padding: 26px 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.84rem;
    line-height: 1.6;
}

.amric-capture-guide {
    position: absolute;
    inset: 12%;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 50% / 40%;
    pointer-events: none;
}

.amric-capture-tools {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.amric-capture-tools .amric-btn {
    flex: 1 1 140px;
}

.amric-capture-status {
    margin: 10px 0 0;
    font-size: 0.79rem;
    line-height: 1.5;
    color: var(--amric-ink-soft);
    min-height: 1.2em;
}

.amric-capture-status.is-good { color: var(--amric-dark); font-weight: 600; }
.amric-capture-status.is-bad  { color: var(--amric-danger); }

.amric-capture.is-done {
    border-style: solid;
    border-color: var(--amric-green);
    background: var(--amric-surface);
}

/* Upload or snap: the farm and bike photos allow either */
.amric-choice-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.amric-choice-tools .amric-btn { flex: 1 1 150px; }

.amric-choice-file { position: relative; overflow: hidden; }
.amric-choice-file input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* ==========================================================================
   COMPRESSION FEEDBACK
   ========================================================================== */

.amric-shrink-note {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--amric-dark);
}

.amric-shrink-note.is-working { color: var(--amric-ink-soft); }

/* ==========================================================================
   LAZY LOADING AND SKELETONS
   --------------------------------------------------
   An image that has not arrived yet should hold its space, otherwise the page
   jumps under the reader's thumb as each photo lands.
   ========================================================================== */

img[loading="lazy"] {
    background: linear-gradient(100deg,
        var(--amric-canvas) 30%,
        rgba(0, 0, 0, 0.04) 50%,
        var(--amric-canvas) 70%);
    background-size: 220% 100%;
    animation: amricShimmer 1.4s linear infinite;
}

img.is-loaded {
    animation: none;
    background: none;
}

@keyframes amricShimmer {
    from { background-position: 180% 0; }
    to   { background-position: -60% 0; }
}

.amric-skeleton {
    border-radius: var(--amric-radius);
    background: linear-gradient(100deg,
        var(--amric-canvas) 30%,
        rgba(0, 0, 0, 0.04) 50%,
        var(--amric-canvas) 70%);
    background-size: 220% 100%;
    animation: amricShimmer 1.4s linear infinite;
}

.feed-skeleton {
    height: 168px;
    margin-bottom: 14px;
}

@media (prefers-reduced-motion: reduce) {
    img[loading="lazy"],
    .amric-skeleton {
        animation: none;
        background: var(--amric-canvas);
    }
}

/* Whole notification row is the tap target */
.notif-item { padding: 0; overflow: hidden; }

.notif-hit {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    padding: 14px;
    text-decoration: none;
    color: inherit;
}

.notif-hit:hover { background: rgba(0, 0, 0, 0.02); }
.notif-body .notif-text { display: block; margin: 0 0 5px; font-size: 0.84rem; line-height: 1.55; color: var(--amric-ink-soft); }
.notif-tools { padding: 14px 14px 14px 0; }

/* ==========================================================================
   PORTALS
   Farmer portal and rider portal. Same shell, different content.
   ========================================================================== */

.portal {
    background: var(--amric-canvas);
    min-height: 70vh;
    padding: 20px 0 60px;
}

.portal-head { margin-bottom: 20px; }

.portal-id { display: flex; gap: 14px; align-items: center; }

.portal-greeting {
    margin: 0 0 2px;
    font-size: 0.8rem;
    color: var(--amric-ink-soft);
}

.portal-head h1 {
    font-family: var(--amric-font-display);
    font-size: 1.4rem;
    color: var(--amric-green);
    margin: 0 0 5px;
}

.portal-sub {
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.portal-place { font-size: 0.78rem; color: var(--amric-ink-soft); }

/* ==========================================================================
   Gate, shown while unverified
   ========================================================================== */

.portal-gate {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-left: 4px solid var(--amric-gold);
    border-radius: var(--amric-radius);
    box-shadow: var(--amric-shadow);
    padding: 24px 20px;
    max-width: 640px;
}

.portal-gate-pending  { border-left-color: var(--amric-gold); }
.portal-gate-rejected { border-left-color: var(--amric-danger); }

.portal-gate h2 {
    font-family: var(--amric-font-display);
    font-size: 1.15rem;
    color: var(--amric-ink);
    margin: 0 0 10px;
}

.portal-gate p {
    margin: 0 0 12px;
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--amric-ink-soft);
}

.portal-gate .portal-small { font-size: 0.82rem; }

.portal-reason {
    padding: 12px 14px;
    background: rgba(198, 40, 40, 0.07);
    border-radius: var(--amric-radius-sm);
    color: #8E1B1B !important;
}

.portal-gate .amric-btn { margin: 6px 8px 0 0; }

/* ==========================================================================
   Stats strip
   ========================================================================== */

.portal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

@media (min-width: 640px)  { .portal-stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .portal-stats { grid-template-columns: repeat(5, 1fr); } }

.portal-stat {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    padding: 15px 14px;
    text-align: center;
}

.portal-stat strong {
    display: block;
    font-family: var(--amric-font-display);
    font-size: 1.5rem;
    line-height: 1.15;
    color: var(--amric-green);
    margin-bottom: 3px;
}

.portal-stat span {
    font-size: 0.73rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--amric-ink-soft);
}

.portal-stat-money strong { font-size: 1.15rem; color: var(--amric-brown); }

/* ==========================================================================
   Quick actions
   ========================================================================== */

.portal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 640px) { .portal-actions { grid-template-columns: repeat(2, 1fr); } }

.portal-action {
    display: block;
    padding: 16px 18px;
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    text-decoration: none;
    color: var(--amric-ink);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.portal-action:hover {
    border-color: var(--amric-border);
    transform: translateY(-2px);
    box-shadow: var(--amric-shadow-lg);
}

.portal-action strong {
    display: block;
    font-family: var(--amric-font-display);
    font-size: 0.98rem;
    margin-bottom: 3px;
}

.portal-action span { font-size: 0.82rem; line-height: 1.5; color: var(--amric-ink-soft); }

.portal-action-lead {
    background: linear-gradient(135deg, var(--amric-green), var(--amric-dark));
    border-color: transparent;
    color: #fff;
}

.portal-action-lead span { color: rgba(255, 255, 255, 0.85); }

@media (min-width: 640px) { .portal-action-lead { grid-column: 1 / -1; } }

/* ==========================================================================
   Panels
   ========================================================================== */

.portal-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 992px) { .portal-panels { grid-template-columns: 1fr 1fr; align-items: start; } }

.portal-panel {
    background: var(--amric-surface);
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    box-shadow: var(--amric-shadow);
    padding: 18px;
    margin-bottom: 14px;
}

.portal-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--amric-light);
}

.portal-panel-head h2 {
    font-family: var(--amric-font-display);
    font-size: 1rem;
    color: var(--amric-green);
    margin: 0;
}

.portal-panel-head a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--amric-brown);
    text-decoration: none;
    white-space: nowrap;
}

.portal-panel-head a:hover { text-decoration: underline; }

.portal-empty { text-align: left; }

.portal-empty p {
    margin: 0 0 10px;
    font-size: 0.87rem;
    line-height: 1.6;
    color: var(--amric-ink-soft);
}

.portal-empty p strong { color: var(--amric-ink); }
.portal-empty .amric-btn { margin-top: 4px; }

.portal-list { list-style: none; margin: 0; padding: 0; }

.portal-list li { border-bottom: 1px solid var(--amric-line); }
.portal-list li:last-child { border-bottom: 0; }

.portal-list a {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 4px;
    text-decoration: none;
    color: var(--amric-ink);
    min-height: 48px;
}

.portal-list a:hover { background: var(--amric-canvas); }

.portal-list-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.portal-list-main strong { font-size: 0.88rem; overflow-wrap: anywhere; }
.portal-list-main small { font-size: 0.76rem; color: var(--amric-ink-soft); }

.portal-list-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: 0 0 auto; }
.portal-list-side code { font-size: 0.72rem; background: var(--amric-canvas); padding: 3px 7px; border-radius: 4px; }
.portal-list-counts span { font-size: 0.75rem; color: var(--amric-ink-soft); }
.portal-fee { font-size: 0.85rem; color: var(--amric-dark); }

@media (prefers-reduced-motion: reduce) {
    .portal-action { transition: none; }
    .portal-action:hover { transform: none; }
}

/* ==========================================================================
   PRODUCE LISTINGS
   The block that appears inside a produce post in the feed, and the admin
   promotion screen.
   ========================================================================== */

.produce-card {
    margin-top: 12px;
    border: 1px solid var(--amric-border);
    border-radius: var(--amric-radius-sm);
    background: var(--amric-light);
    overflow: hidden;
}

.produce-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--amric-border);
}

@media (min-width: 560px) {
    .produce-facts { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}

.produce-fact {
    background: var(--amric-light);
    padding: 11px 13px;
}

.produce-fact span {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--amric-ink-soft);
    margin-bottom: 3px;
}

.produce-fact strong {
    display: block;
    font-size: 0.92rem;
    color: var(--amric-dark);
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.produce-fact small {
    display: block;
    font-size: 0.7rem;
    color: var(--amric-ink-soft);
    margin-top: 1px;
}

.produce-foot {
    display: flex;
    gap: 9px;
    align-items: center;
    flex-wrap: wrap;
    padding: 11px 13px;
    background: var(--amric-surface);
    border-top: 1px solid var(--amric-border);
}

.produce-status {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: #fff8e1;
    color: #8a5a00;
}

.produce-status-held,
.produce-status-picked_up,
.produce-status-in_transit { background: #e3f2fd; color: #0d3c6e; }

.produce-status-delivered { background: var(--amric-light); color: var(--amric-dark); }

.produce-status-cancelled,
.produce-status-expired { background: #f1eee9; color: var(--amric-ink-soft); }

.produce-shop-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--amric-green);
    color: #fff;
}

.produce-track {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--amric-brown);
    text-decoration: none;
    white-space: nowrap;
}

.produce-track:hover { color: var(--amric-green); text-decoration: underline; }

.produce-track code {
    background: var(--amric-canvas);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.94em;
}

/* Sell produce button in the composer bar */
.feed-attach-produce {
    text-decoration: none;
    background: #fff8e1;
    color: #8a5a00;
}

.feed-attach-produce:hover { background: #ffecb3; }
.feed-attach-produce small { color: rgba(138, 90, 0, 0.7); }

/* ==========================================================================
   ADMIN PROMOTION SCREEN
   ========================================================================== */

.promote-photo {
    position: relative;
    display: block;
    cursor: pointer;
    margin: 0;
}

.promote-photo input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.promote-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--amric-radius-sm);
    border: 3px solid var(--amric-line);
    background: var(--amric-canvas);
    display: block;
    transition: border-color 0.15s ease;
}

.promote-photo-tick {
    display: block;
    margin-top: 6px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--amric-ink-soft);
}

.promote-photo input:checked + img {
    border-color: var(--amric-green);
}

.promote-photo input:checked ~ .promote-photo-tick {
    color: var(--amric-green);
}

.promote-photo input:focus-visible + img {
    outline: 3px solid var(--amric-gold);
    outline-offset: 2px;
}

.promote-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

@media (min-width: 560px) { .promote-modes { flex-direction: row; } }

.promote-mode {
    flex: 1 1 0;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 15px;
    border: 1.5px solid var(--amric-line);
    border-radius: var(--amric-radius-sm);
    background: var(--amric-surface);
    cursor: pointer;
    font-size: 0.87rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.promote-mode input { accent-color: var(--amric-green); width: 17px; height: 17px; }

.promote-mode:has(input:checked) {
    border-color: var(--amric-green);
    background: var(--amric-light);
}

.amric-agree-line {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
    font-size: 0.87rem;
    cursor: pointer;
}

.amric-agree-line input { accent-color: var(--amric-green); width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
    .promote-photo img,
    .promote-mode { transition: none; }
}

/* ==========================================================================
   SELLING: TWO CLEAR ACTIONS
   --------------------------------------------------
   These sit below the composer as full buttons rather than behind an icon.
   A farmer with cocoa to sell should not have to work out that "sell produce"
   is hiding next to the photo button.
   ========================================================================== */

.sell-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

@media (min-width: 560px) { .sell-actions { grid-template-columns: 1fr 1fr; } }

.sell-action {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid var(--amric-line);
    border-radius: var(--amric-radius);
    background: var(--amric-surface);
    box-shadow: var(--amric-shadow);
    text-decoration: none;
    color: var(--amric-ink);
    min-height: 68px;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.sell-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--amric-shadow-lg);
}

.sell-action-icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: #fff;
}

.sell-action-sale .sell-action-icon {
    background: linear-gradient(135deg, var(--amric-gold), #e08a00);
    color: #2a2000;
}

.sell-action-pickup .sell-action-icon {
    background: linear-gradient(135deg, var(--amric-green), var(--amric-dark));
}

.sell-action-sale:hover   { border-color: var(--amric-gold); }
.sell-action-pickup:hover { border-color: var(--amric-green); }

.sell-action-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sell-action-text strong { font-size: 0.95rem; font-family: var(--amric-font-display); }
.sell-action-text small { font-size: 0.78rem; color: var(--amric-ink-soft); line-height: 1.45; }

/* ==========================================================================
   LISTING TYPE CHOOSER
   ========================================================================== */

.listing-choice {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 22px 0 18px;
}

@media (min-width: 720px) { .listing-choice { grid-template-columns: 1fr 1fr; } }

.listing-choice-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 20px;
    border: 2px solid var(--amric-line);
    border-radius: var(--amric-radius);
    background: var(--amric-surface);
    box-shadow: var(--amric-shadow);
    text-decoration: none;
    color: var(--amric-ink);
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.listing-choice-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--amric-shadow-lg);
}

.listing-choice-sale:hover   { border-color: var(--amric-gold); }
.listing-choice-pickup:hover { border-color: var(--amric-green); }

.listing-choice-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 4px;
}

.listing-choice-sale .listing-choice-icon {
    background: linear-gradient(135deg, var(--amric-gold), #e08a00);
    color: #2a2000;
}

.listing-choice-pickup .listing-choice-icon {
    background: linear-gradient(135deg, var(--amric-green), var(--amric-dark));
}

.listing-choice-tile strong {
    font-family: var(--amric-font-display);
    font-size: 1.15rem;
}

.listing-choice-lead { font-size: 0.9rem; color: var(--amric-ink); line-height: 1.5; }
.listing-choice-help { font-size: 0.82rem; color: var(--amric-ink-soft); line-height: 1.6; }

.listing-choice-go {
    margin-top: 8px;
    align-self: flex-start;
    padding: 10px 22px;
    border-radius: 8px;
    background: var(--amric-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.87rem;
}

.listing-choice-sale .listing-choice-go { background: var(--amric-gold); color: #2a2000; }

.listing-choice-note {
    text-align: center;
    font-size: 0.87rem;
    color: var(--amric-ink-soft);
    margin: 0 0 40px;
}

.listing-switch {
    margin: 0 0 16px;
    font-size: 0.85rem;
    color: var(--amric-ink-soft);
}

.listing-switch a { color: var(--amric-green); font-weight: 700; }

/* ==========================================================================
   THE ASK FORM
   --------------------------------------------------
   One question at a time, in plain words, with a large answer field.
   Built for somebody who is not a confident reader and is on a phone.
   ========================================================================== */

.ask { margin-bottom: 24px; }
.ask:last-child { margin-bottom: 0; }

.ask-q {
    display: block;
    margin-bottom: 9px;
    font-family: var(--amric-font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--amric-ink);
    line-height: 1.35;
}

.ask-a {
    width: 100%;
    padding: 15px 16px;
    border: 2px solid var(--amric-line);
    border-radius: 10px;
    background: var(--amric-surface);
    color: var(--amric-ink);
    font-family: var(--amric-font-body);
    font-size: 17px;               /* over 16px so iOS never zooms the page */
    line-height: 1.4;
    min-height: 54px;              /* a comfortable thumb target */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ask-a:focus {
    outline: none;
    border-color: var(--amric-green);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.14);
}

textarea.ask-a { min-height: 96px; resize: vertical; }

.ask-hint {
    margin: 7px 0 0;
    font-size: 0.83rem;
    line-height: 1.55;
    color: var(--amric-ink-soft);
}

/* Number and unit side by side, because a farmer thinks "250 kilograms" as one
   thought and should not have to scroll to a separate dropdown to finish it. */
.ask-pair { display: flex; gap: 10px; }

.ask-a-num { flex: 1 1 40%; font-size: 20px; font-weight: 700; }
.ask-a-unit { flex: 1 1 60%; }

.ask-half { display: grid; grid-template-columns: 1fr; gap: 18px; }

@media (min-width: 560px) { .ask-half { grid-template-columns: 1fr 1fr; gap: 16px; } }

.ask-upload { min-height: 108px; }

.ask-submit { margin: 4px 0 40px; }
.ask-submit .amric-btn { width: 100%; font-size: 1.02rem; min-height: 58px; }

@media (min-width: 560px) { .ask-submit .amric-btn { width: auto; min-width: 260px; } }

/* ==========================================================================
   CONFIRMATION AND CODES
   --------------------------------------------------
   The most important screen in the flow. If the farmer misses their code here
   they will phone you, so the digits are enormous and everything else is quiet.
   ========================================================================== */

.listed-done { padding: 30px 0 50px; text-align: center; }

.listed-done-tick { font-size: 3rem; color: var(--amric-green); margin: 0 0 10px; }

.listed-done h1 {
    font-family: var(--amric-font-display);
    font-size: 1.5rem;
    color: var(--amric-ink);
    margin: 0 0 4px;
}

.listed-done-what { margin: 0 0 26px; font-size: 1rem; color: var(--amric-ink-soft); }

.code-card {
    text-align: center;
    padding: 22px 18px;
    margin-bottom: 14px;
    border-radius: var(--amric-radius);
    background: var(--amric-surface);
    border: 2px solid var(--amric-line);
}

.code-card-lead {
    border-color: var(--amric-green);
    background: var(--amric-light);
}

.code-card-quiet { border-style: dashed; }

.code-card-label {
    margin: 0 0 8px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amric-ink-soft);
}

.code-card-digits {
    margin: 0 0 12px;
    font-family: var(--amric-font-display);
    font-size: 3.6rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1;
    color: var(--amric-dark);
    cursor: pointer;
}

.code-card-digits-sm { font-size: 2.6rem; color: var(--amric-brown); }

.code-card-track {
    margin: 0 0 10px;
    font-family: var(--amric-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--amric-ink);
    cursor: pointer;
    overflow-wrap: anywhere;
}

.code-card-help {
    margin: 0 0 12px;
    font-size: 0.87rem;
    line-height: 1.65;
    color: var(--amric-ink-soft);
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}

.code-card-help strong { color: var(--amric-ink); }

.listed-done-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
}

@media (min-width: 560px) {
    .listed-done-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
}

/* ==========================================================================
   STARS
   ========================================================================== */

.amric-stars { display: inline-flex; gap: 2px; color: var(--amric-gold); font-size: 0.85rem; }
.amric-stars .is-empty { color: var(--amric-line); }
.amric-stars-count { margin-left: 6px; font-size: 0.78rem; color: var(--amric-ink-soft); }

@media (prefers-reduced-motion: reduce) {
    .sell-action,
    .listing-choice-tile,
    .ask-a { transition: none; }
    .sell-action:hover,
    .listing-choice-tile:hover { transform: none; }
}
