/* ==========================================================================
   Kauai Trades - tropical theme
   Palette: deep jungle greens for structure, sunset warms (hibiscus,
   mango, plumeria) for accents, over warm sand neutrals.
   ========================================================================== */

:root {
    /* Jungle greens - header, primary actions, links */
    --jungle-900: #0a3a29;
    --jungle-800: #114b34;
    --jungle-700: #17663f;
    --jungle-600: #1e8250;
    --jungle-500: #2aa06a;
    --jungle-400: #48c48d;
    --jungle-200: #a9e6c5;
    --jungle-100: #dff4e8;

    /* Sunset warms - accents and calls to action */
    --hibiscus-600: #d8442f;
    --hibiscus-500: #f4614a;
    --hibiscus-100: #ffe3dc;

    --mango-500: #ff9a3c;
    --mango-100: #ffeeda;

    --plumeria-500: #ffc857;
    --plumeria-100: #fff3d6;

    /* Warm sand neutrals */
    --sand-50: #fffaf3;
    --sand-100: #fdf3e5;
    --sand-200: #f6e7d3;
    --sand-300: #e8d6bd;

    --ink-900: #14312a;
    --ink-700: #2c4d42;
    --ink-500: #587067;
    --ink-300: #93a89f;

    --danger-600: #c33c2c;
    --danger-100: #fbe0da;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 6px rgba(10, 58, 41, 0.07);
    --shadow-md: 0 10px 24px rgba(10, 58, 41, 0.10);
    --shadow-lg: 0 20px 45px rgba(10, 58, 41, 0.16);

    --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --shell: 1120px;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-900);
    background-color: var(--sand-50);
    background-image:
        radial-gradient(circle at 12% 4%, rgba(72, 196, 141, 0.12), transparent 42%),
        radial-gradient(circle at 88% 0%, rgba(255, 154, 60, 0.13), transparent 38%);
    background-attachment: fixed;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    line-height: 1.25;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

a {
    color: var(--jungle-600);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.shell {
    width: 100%;
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Site header / nav ---------------------------------------- */

.site-header {
    background: linear-gradient(135deg, var(--jungle-900) 0%, var(--jungle-700) 45%, var(--jungle-600) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.site-header::after {
    /* soft sun glow in the upper right */
    content: "";
    position: absolute;
    top: -140px;
    right: -80px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 154, 60, 0.34), transparent 68%);
    pointer-events: none;
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    position: relative;
    z-index: 2;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
}

/* The island fill sits at ~1.1:1 against the header gradient, so the mark needs
   a light backing to separate from it. */
.brand__mark {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 15px;
    background: var(--sand-50);
    padding: 3px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.26);
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__name {
    font-size: 1.22rem;
}

.brand__tag {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--jungle-200);
    font-weight: 600;
}

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

.site-nav a,
.site-nav .site-nav__user {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.93rem;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
    color: #fff;
}

.site-nav a.is-active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.site-nav__user {
    color: var(--jungle-200);
    font-weight: 500;
}

.site-nav a.site-nav__cta {
    background: var(--plumeria-500);
    color: var(--jungle-900);
    font-weight: 700;
}

.site-nav a.site-nav__cta:hover {
    background: var(--mango-500);
    color: var(--jungle-900);
}

.site-nav__logout {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    cursor: pointer;
}

.site-nav__logout:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ---------- Hero ------------------------------------------------------ */

.hero {
    position: relative;
    padding: 46px 0 40px;
    z-index: 1;
}

.hero__inner {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--plumeria-500);
    margin: 0 0 14px;
}

.hero h1 {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
    margin: 0 0 14px;
    color: #fff;
}

.hero p {
    font-size: 1.06rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

/* Kauai island watermark behind the hero copy. This is a white silhouette of
   the logo art with the palm and wrench knocked out as negative space - the
   original green artwork sits at ~1.1:1 against the header and never shows. */
.hero__island {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-52%);
    width: min(380px, 44vw);
    height: auto;
    opacity: 0.28;
    z-index: 1;
    pointer-events: none;
}

/* Wave divider at the bottom of the header */
.site-header__wave {
    display: block;
    width: 100%;
    height: 48px;
    margin-bottom: -1px;
    position: relative;
    z-index: 3;
}

/* ---------- Search panel --------------------------------------------- */

.search-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 22px;
    margin-top: -30px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 2fr 1.2fr auto;
    gap: 14px;
    align-items: end;
    border: 1px solid var(--sand-200);
}

.search-panel label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--ink-500);
    margin-bottom: 7px;
}

/* ---------- Forms ----------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    font: inherit;
    font-size: 0.98rem;
    color: var(--ink-900);
    background: var(--sand-50);
    border: 1.5px solid var(--sand-300);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
    resize: vertical;
    min-height: 110px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    background: #fff;
    border-color: var(--jungle-500);
    box-shadow: 0 0 0 3px rgba(42, 160, 106, 0.20);
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-700);
    margin-bottom: 7px;
}

.field__hint {
    font-size: 0.82rem;
    color: var(--ink-500);
    margin: 6px 0 0;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--ink-700);
    font-size: 0.95rem;
}

.checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--jungle-600);
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 10px 16px;
    padding: 14px 16px;
    border: 1.5px solid var(--sand-300);
    border-radius: var(--radius-sm);
    background: var(--sand-50);
}

.validation-message,
.text-danger {
    display: block;
    color: var(--danger-600);
    font-size: 0.84rem;
    margin-top: 6px;
}

.validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

.validation-summary:empty,
.validation-summary ul:empty {
    display: none;
}

/* ---------- Buttons --------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: linear-gradient(135deg, var(--jungle-600), var(--jungle-500));
    color: #fff;
    box-shadow: 0 6px 16px rgba(30, 130, 80, 0.32);
}

.btn--primary:hover {
    box-shadow: 0 10px 22px rgba(30, 130, 80, 0.40);
    color: #fff;
}

.btn--coral {
    background: linear-gradient(135deg, var(--hibiscus-600), var(--hibiscus-500));
    color: #fff;
    box-shadow: 0 6px 16px rgba(224, 83, 61, 0.30);
}

.btn--coral:hover {
    color: #fff;
    box-shadow: 0 10px 22px rgba(224, 83, 61, 0.38);
}

.btn--ghost {
    background: #fff;
    border-color: var(--sand-300);
    color: var(--ink-700);
}

.btn--ghost:hover {
    border-color: var(--jungle-500);
    color: var(--jungle-600);
}

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

.btn--danger:hover {
    color: #fff;
    box-shadow: 0 8px 18px rgba(195, 60, 44, 0.34);
}

.btn--sm {
    padding: 7px 15px;
    font-size: 0.85rem;
}

.btn--block {
    width: 100%;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--sand-200);
}

/* ---------- Cards / directory results -------------------------------- */

.results-meta {
    margin: 0;
    color: var(--ink-500);
    font-size: 0.95rem;
    font-weight: 600;
}

.results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 30px 0 18px;
}

.results-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    display: inline-block;
    padding: 7px 15px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--sand-300);
    background: #fff;
    color: var(--ink-700);
    font-size: 0.85rem;
    font-weight: 700;
}

.chip:hover {
    text-decoration: none;
    border-color: var(--jungle-500);
    color: var(--jungle-600);
}

.chip.is-active {
    background: var(--jungle-100);
    border-color: var(--jungle-500);
    color: var(--jungle-700);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

/* ---------- Endorsements ---------------------------------------------- */

.endorse {
    display: flex;
    align-items: center;
    gap: 12px;
    /* auto pushes the endorse row to the card's bottom edge, so cards line up
       even when their descriptions differ in length */
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--sand-200);
}

.endorse form {
    display: contents;
}

.endorse__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 7px 15px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--hibiscus-500);
    background: #fff;
    color: var(--hibiscus-600);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.endorse__btn:hover {
    background: var(--hibiscus-500);
    color: #fff;
    text-decoration: none;
}

.endorse__btn.is-endorsed,
.endorse__btn:disabled {
    background: var(--hibiscus-100);
    border-color: var(--hibiscus-100);
    color: var(--hibiscus-600);
    cursor: default;
}

.endorse__count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink-500);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 56px;
}

.trade-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--sand-200);
    border-top: 4px solid var(--jungle-500);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.trade-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.trade-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.trade-card__head h2 {
    font-size: 1.12rem;
    margin: 0;
}

.trade-card__person {
    color: var(--ink-500);
    font-size: 0.92rem;
    margin: 0 0 10px;
}

.trade-card__meta {
    margin: 0;
    font-size: 0.94rem;
    color: var(--ink-700);
    display: flex;
    gap: 8px;
}

.trade-card__meta dt {
    font-weight: 700;
    color: var(--ink-500);
    margin: 0;
}

.trade-card__meta dd {
    margin: 0;
}

.trade-card__desc {
    margin: 12px 0 0;
    padding-top: 12px;
    border-top: 1px dashed var(--sand-300);
    font-size: 0.94rem;
    color: var(--ink-700);
    /* Honour the line breaks the author typed, without allowing raw HTML. */
    white-space: pre-line;
}

/* A fixed four-line box rather than just a maximum, so short and long
   descriptions occupy identical space and the cards stop looking ragged.
   The More button is only injected when the text actually overflows. */
.trade-card__desc[data-clamp] {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.55;
    height: calc(1.55em * 4);
}

.trade-card__desc[data-clamp].is-expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    height: auto;
}

/* Reserve the toggle's row on every card so its presence or absence doesn't
   shift the endorse bar up and down between cards. */
.trade-card__toggle-slot {
    min-height: 26px;
}

.more-toggle {
    align-self: flex-start;
    margin-top: 6px;
    padding: 2px 0;
    background: none;
    border: none;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--jungle-600);
    cursor: pointer;
}

.more-toggle:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--plumeria-100);
    color: #8a5600;
    white-space: nowrap;
}

.badge--coral { background: var(--hibiscus-100); color: var(--hibiscus-600); }
.badge--palm  { background: var(--jungle-100);   color: var(--jungle-700); }
.badge--sun   { background: var(--mango-100);    color: #a35a00; }
.badge--muted { background: var(--sand-200);     color: var(--ink-500); }

.empty-state {
    background: #fff;
    border: 1px dashed var(--sand-300);
    border-radius: var(--radius-lg);
    padding: 44px 24px;
    text-align: center;
    margin-bottom: 56px;
    box-shadow: var(--shadow-sm);
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0;
    color: var(--ink-500);
}

/* ---------- Alerts ---------------------------------------------------- */

.alert {
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 22px;
    font-weight: 600;
    font-size: 0.95rem;
    border-left: 4px solid;
}

.alert--success {
    background: var(--jungle-100);
    border-color: var(--jungle-500);
    color: var(--jungle-700);
}

.alert--danger {
    background: var(--danger-100);
    border-color: var(--danger-600);
    color: var(--danger-600);
}

.alert--warning {
    background: var(--plumeria-100);
    border-color: var(--plumeria-500);
    color: #9a6300;
}

/* ---------- Page shell ------------------------------------------------ */

main {
    flex: 1 0 auto;
}

.page {
    padding: 40px 0 60px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.narrow {
    max-width: 760px;
    margin: 0 auto;
}

/* Honeypot field - off-screen rather than display:none, which some bots skip. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.page-head h1 {
    margin: 0;
    font-size: 1.75rem;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--ink-500);
}

/* ---------- Admin ----------------------------------------------------- */

.admin-layout {
    display: grid;
    grid-template-columns: 232px 1fr;
    gap: 32px;
    align-items: start;
}

.admin-nav {
    background: #fff;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 24px;
}

.admin-nav__title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 800;
    color: var(--ink-300);
    padding: 6px 12px 10px;
    margin: 0;
}

.admin-nav a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink-700);
    font-weight: 600;
    font-size: 0.94rem;
}

.admin-nav a:hover {
    background: var(--jungle-100);
    color: var(--jungle-800);
    text-decoration: none;
}

.admin-nav a.is-active {
    background: linear-gradient(135deg, var(--jungle-800), var(--jungle-600));
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.nav-count {
    display: inline-block;
    min-width: 20px;
    text-align: center;
    background: var(--hibiscus-500);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    border-radius: var(--radius-pill);
    padding: 1px 7px;
    margin-left: 6px;
}

.panel {
    background: #fff;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 26px;
}

.panel + .panel {
    margin-top: 22px;
}

.panel__title {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.panel__sub {
    margin: 0 0 22px;
    color: var(--ink-500);
    font-size: 0.92rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 8px 18px;
    margin: 0;
    font-size: 0.94rem;
}

.detail-grid dt {
    font-weight: 700;
    color: var(--ink-500);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-top: 2px;
}

.detail-grid dd {
    margin: 0;
    color: var(--ink-900);
}

@media (max-width: 620px) {
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .detail-grid dd {
        margin-bottom: 10px;
    }
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat {
    background: #fff;
    border: 1px solid var(--sand-200);
    border-left: 4px solid var(--jungle-500);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.stat--coral { border-left-color: var(--hibiscus-500); }
.stat--palm  { border-left-color: var(--jungle-500); }
.stat--sun   { border-left-color: var(--plumeria-500); }

.stat__value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--jungle-800);
}

.stat__label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--ink-500);
    margin-top: 4px;
}

/* ---------- Tables ---------------------------------------------------- */

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--sand-200);
    background: #fff;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
    min-width: 640px;
}

table.data th {
    text-align: left;
    padding: 13px 16px;
    background: var(--sand-100);
    color: var(--ink-500);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 800;
    border-bottom: 1px solid var(--sand-200);
    white-space: nowrap;
}

table.data td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--sand-100);
    vertical-align: middle;
}

table.data tbody tr:last-child td {
    border-bottom: none;
}

table.data tbody tr:hover {
    background: var(--jungle-100);
}

table.data .nowrap {
    white-space: nowrap;
}

.slug {
    font-family: Consolas, "SF Mono", Menlo, monospace;
    font-size: 0.85em;
    background: var(--sand-100);
    border: 1px solid var(--sand-200);
    border-radius: 5px;
    padding: 2px 7px;
    color: var(--ink-700);
}

table.data .row-title {
    font-weight: 700;
    color: var(--ink-900);
}

table.data .row-sub {
    color: var(--ink-500);
    font-size: 0.86rem;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    white-space: nowrap;
}

.table-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--ink-500);
}

/* ---------- Auth card ------------------------------------------------- */

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 56px 0 72px;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--sand-200);
    border-top: 5px solid var(--jungle-500);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 36px;
    width: 100%;
    max-width: 430px;
}

.auth-card h1 {
    font-size: 1.5rem;
    margin: 0 0 6px;
}

.auth-card__sub {
    color: var(--ink-500);
    margin: 0 0 26px;
    font-size: 0.94rem;
}

.auth-alt {
    margin: 20px 0 0;
    text-align: center;
    font-size: 0.92rem;
    color: var(--ink-500);
}

.external-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Provider buttons stay close to each vendor's brand guidance rather than the
   site palette, so the marks stay recognisable and compliant. */
.external-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    border: 1.5px solid #dadce0;
    background: #fff;
    color: #1f1f1f;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.external-btn:hover {
    background: #f7f8f8;
    border-color: #c9ccd1;
    box-shadow: var(--shadow-sm);
}

.external-btn:focus-visible {
    outline: none;
    border-color: var(--jungle-500);
    box-shadow: 0 0 0 3px rgba(42, 160, 106, 0.20);
}

.external-btn__icon {
    width: 18px;
    height: 18px;
    flex: none;
}

/* Apple sanctions three button styles: black, white, and white with a black
   outline. We use the white one so it sits beside the Google button instead of
   shouting over it — a solid black bar next to a white one reads as an error.
   The mark is drawn with fill="currentColor", so it turns black automatically
   and stays within Apple's rule that the logo be black or white only.

   For the strictly-outlined variant, set border-color to #000 here. */
.external-btn--apple .external-btn__icon {
    /* Apple's glyph has a lighter visual weight than Google's four-colour G,
       so it needs a touch more size to look the same. */
    width: 19px;
    height: 19px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: var(--ink-300);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--sand-300);
}

/* ---------- House ads (cross-promo) ----------------------------------- */

/* ForkYes!ForkNo! brand colours, kept local so they can't leak into the
   Kauai Trades palette. The greens are close but deliberately distinct. */
.promo-band {
    --fy-green: #6aa62b;
    --fy-green-dark: #558820;
}

/* The band sits between main and the footer. It takes over the auto margin so
   the footer still lands at the bottom of short pages. */
.promo-band {
    flex: none;
    margin-top: auto;
    padding: 16px 0;
    background: var(--sand-100);
    border-top: 1px solid var(--sand-200);
}

.promo-band + .site-footer {
    margin-top: 0;
}

/* Spanning every column breaks the grid row cleanly, so the strip always sits
   full width across the cards however many columns the viewport gives us. */
.promo-band--inline {
    grid-column: 1 / -1;
    margin-top: 0;
    padding: 14px 20px;
    border: 1px solid var(--sand-200);
    border-radius: var(--radius-md);
}

.promo-band__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.promo-band__icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.promo-band__text {
    flex: 1 1 260px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--ink-500);
}

.promo-band__text strong {
    color: var(--ink-900);
    margin-right: 6px;
}

.promo-band__cta {
    flex: none;
    padding: 7px 16px;
    border: 1.5px solid var(--fy-green);
    border-radius: var(--radius-pill);
    color: var(--fy-green-dark);
    font-size: 0.85rem;
    font-weight: 700;
}

.promo-band__cta:hover {
    background: var(--fy-green);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 560px) {
    .promo-band__inner {
        gap: 10px;
    }

    .promo-band__text {
        flex-basis: 100%;
    }
}

/* ---------- Footer ---------------------------------------------------- */

.site-footer {
    flex: none;
    margin-top: auto;
    background: var(--jungle-900);
    color: rgba(255, 255, 255, 0.72);
    padding: 26px 0;
    font-size: 0.9rem;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--jungle-200);
}

.site-footer__links {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Card titles link to the listing page; keep them looking like headings. */
.trade-card__head h2 a {
    color: inherit;
}

.trade-card__head h2 a:hover {
    color: var(--jungle-600);
    text-decoration: none;
}

/* Category badges are links now, so they need a hover state. */
.badge--link {
    transition: background 0.15s ease, color 0.15s ease;
}

.badge--link:hover {
    background: var(--jungle-500);
    color: #fff;
    text-decoration: none;
}

.crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 4px;
    font-size: 0.85rem;
    color: var(--ink-500);
}

.crumbs span[aria-hidden] {
    color: var(--ink-300);
}

.back-link {
    margin: 26px 0 40px;
    font-size: 0.9rem;
}

/* Deliberately quiet — useful when you need it, invisible when you don't. */
.trade-card__report {
    margin-top: 10px;
    font-size: 0.76rem;
    color: var(--ink-300);
}

.trade-card__report:hover {
    color: var(--ink-500);
}

.plain-list {
    margin: 0 0 14px;
    padding-left: 20px;
    color: var(--ink-700);
    font-size: 0.93rem;
}

.plain-list li {
    margin-bottom: 5px;
}

/* ---------- Long-form copy (privacy policy) --------------------------- */

.prose {
    max-width: 68ch;
}

.prose h2 {
    margin: 32px 0 10px;
    font-size: 1.18rem;
    color: var(--jungle-800);
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin: 22px 0 6px;
    font-size: 0.98rem;
    color: var(--ink-700);
}

.prose p,
.prose li {
    color: var(--ink-700);
    font-size: 0.95rem;
}

.prose p {
    margin: 0 0 12px;
}

.prose ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.prose li {
    margin-bottom: 8px;
}

/* ---------- Responsive ------------------------------------------------ */

@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .admin-nav__title {
        width: 100%;
        padding-bottom: 4px;
    }

    .admin-nav a {
        flex: 1 1 auto;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .search-panel {
        grid-template-columns: 1fr;
        margin-top: -30px;
    }

    .hero {
        padding: 32px 0 80px;
    }

    .hero__island {
        opacity: 0.5;
        right: -70px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .site-header__bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-head {
        align-items: flex-start;
    }
}
