:root {
    /* bright light-mode palette — sage identity, lifted */
    --bg: #f7faf7;
    --bg-alt: #eef5f0;
    --surface: #ffffff;
    --ink: #10201d;
    --muted: #5c7069;
    --rule: #e3ebe5;
    --rule-strong: #cfdcd3;
    --accent: #0f8a6f;
    --accent-hover: #0d7a62;
    --accent-ink: #ffffff;
    --sisal: #d99a4e;
    --glow: #e6f4ef;
    --shadow-sm: 0 1px 2px rgba(16, 32, 29, 0.05);
    --shadow-md: 0 4px 16px rgba(16, 32, 29, 0.08);
    --head: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
    --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* optional dark mode — kept intact, just tuned to match */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1a18;
        --bg-alt: #142420;
        --surface: #172624;
        --ink: #e6efec;
        --muted: #9db3ad;
        --rule: #29403b;
        --rule-strong: #345049;
        --accent: #5fc2ad;
        --accent-hover: #7ed4c1;
        --accent-ink: #0f1a18;
        --sisal: #d9a95e;
        --glow: #1c2e2a;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
        --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.5);
    }
}

* {
    box-sizing: border-box;
}
html {
    -webkit-text-size-adjust: 100%;
}
body {
    margin: 0;
    background:
        radial-gradient(
            1200px 600px at 100% -10%,
            var(--glow) 0%,
            transparent 60%
        ),
        var(--bg);
    color: var(--ink);
    font: 18px/1.55 var(--body);
    min-height: 100vh;
}
a {
    color: inherit;
}
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}
img {
    max-width: 100%;
}

/* skip link */
.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 10px 16px;
    z-index: 10;
    border-radius: 0 0 6px 0;
    font-weight: 600;
}
.skip:focus {
    left: 12px;
}

/* ---------- header ---------- */
.top {
    padding: 18px max(20px, 5vw);
    border-bottom: 1px solid var(--rule);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 20;
}
@media (prefers-color-scheme: dark) {
    .top {
        background: rgba(23, 38, 36, 0.75);
    }
}
.brand {
    font: 800 1.3rem var(--head);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.brand img {
    width: 38px;
    height: 38px;
}
.brand small {
    display: block;
    font: 400 0.8rem var(--body);
    color: var(--muted);
    letter-spacing: 0;
    margin-top: -2px;
}
.brand span {
    line-height: 1.1;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.nav a {
    text-decoration: none;
    font-weight: 500;
}
.nav form {
    margin: 0;
}
@media (hover: hover) {
    .nav a:hover {
        color: var(--accent);
    }
}
.pill {
    background: linear-gradient(
        180deg,
        var(--accent) 0%,
        var(--accent-hover) 100%
    );
    color: var(--accent-ink);
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}
@media (hover: hover) {
    .nav a.pill:hover {
        color: var(--accent-ink);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
}
.linklike {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}

main {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 20px 72px;
}

/* ---------- hero ---------- */
.hero {
    padding: 64px 0 32px;
}
.hero h1 {
    font: 800 clamp(2.4rem, 7vw, 4.4rem)/1 var(--head);
    letter-spacing: -0.035em;
    margin: 0 0 20px;
    background: linear-gradient(135deg, var(--ink) 0%, var(--accent) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.sub {
    color: var(--muted);
    margin: -8px 0 28px;
    max-width: 52ch;
    font-size: 1.05rem;
}

/* search form: card, floating on the whisper-green background */
.search {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 10px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}
.search input,
.search select {
    font: inherit;
    padding: 13px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--bg-alt);
    color: var(--ink);
    min-width: 0;
    transition:
        border-color 0.12s ease,
        background 0.12s ease,
        box-shadow 0.12s ease;
}
.search input:focus,
.search select:focus {
    background: var(--surface);
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--glow);
}
.search button {
    font: 700 1rem var(--body);
    padding: 13px 24px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(
        180deg,
        var(--accent) 0%,
        var(--accent-hover) 100%
    );
    color: var(--accent-ink);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}
@media (hover: hover) {
    .search button:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
}

/* more filters disclosure */
.more-filters {
    grid-column: 1 / -1;
    margin-top: 4px;
    padding: 0 4px;
}
.more-filters summary {
    cursor: pointer;
    color: var(--accent);
    font-weight: 700;
    padding: 6px 0;
    list-style: none;
}
.more-filters summary::-webkit-details-marker {
    display: none;
}
.more-filters summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.12s ease;
}
.more-filters[open] summary::before {
    transform: rotate(90deg);
}
.more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.more-grid label {
    display: grid;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--muted);
}
.more-grid select {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    width: 100%;
}

/* alert CTA — soft mint pill, sits apart from the main search button */
.alert-cta {
    margin: 18px 0 0;
}
.alert-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--glow);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.12s ease,
        color 0.12s ease;
}
@media (hover: hover) {
    .alert-cta a:hover {
        background: var(--accent);
        color: var(--accent-ink);
    }
}
.alert-cta a::before {
    content: "✉";
    font-size: 1rem;
}

/* active filter summary */
.active-filters {
    color: var(--muted);
    margin: 18px 0 0;
    padding: 10px 14px;
    background: var(--bg-alt);
    border-radius: 10px;
    border: 1px dashed var(--rule-strong);
    font-size: 0.95rem;
}
.active-filters a {
    color: var(--accent);
    font-weight: 700;
}

/* browse chips */
.locs {
    margin-top: 28px;
}
.locs > span {
    color: var(--muted);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 10px 0 20px;
}
.chips li {
    padding: 0;
}
.chips a {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    background: var(--surface);
    font-size: 0.92rem;
    text-decoration: none;
    transition:
        border-color 0.12s ease,
        background 0.12s ease,
        transform 0.12s ease;
}
@media (hover: hover) {
    .chips a:hover {
        border-color: var(--accent);
        background: var(--glow);
        transform: translateY(-1px);
    }
}
.chips.miss a,
.chips.miss li {
    border-color: var(--sisal);
}

/* ---------- job list ---------- */
.jobs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.jobs li {
    margin-bottom: 0; /* Remove the old list spacing */
}
@media (hover: hover) {
    .jobs li:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--rule-strong);
    }
}
.row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
    padding: 18px 20px;
    text-decoration: none;
    border-radius: 12px;
}
.title {
    font: 700 1.15rem var(--head);
    grid-column: 1;
    letter-spacing: -0.01em;
}
.meta {
    color: var(--muted);
    grid-column: 1;
    font-size: 0.95rem;
}
.when {
    color: var(--muted);
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 0.88rem;
    padding: 4px 10px;
    background: var(--bg-alt);
    border-radius: 999px;
    white-space: nowrap;
}
@media (hover: hover) {
    .row:hover .title {
        color: var(--accent);
    }
}

/* ---------- pager / empty ---------- */
.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 0;
    color: var(--muted);
}
.pager a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--rule);
    background: var(--surface);
    transition:
        border-color 0.12s ease,
        background 0.12s ease;
}
@media (hover: hover) {
    .pager a:hover {
        border-color: var(--accent);
        background: var(--glow);
    }
}
.empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--rule-strong);
    border-radius: 12px;
    margin: 24px 0;
}

/* ---------- job detail ---------- */
.detail {
    padding-top: 40px;
}
.back {
    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: none;
}
.back::before {
    content: "← ";
}
.detail h1 {
    font: 800 clamp(1.9rem, 5vw, 2.8rem)/1.1 var(--head);
    letter-spacing: -0.02em;
    margin: 18px 0 8px;
}
.detail .meta {
    margin: 0 0 24px;
}
.desc {
    white-space: pre-line;
    max-width: 70ch;
    margin: 32px 0;
}
.closed {
    padding: 12px 14px;
    background: var(--glow);
    border: 1px solid var(--accent);
    border-radius: 10px;
    color: var(--accent);
}
/* ---------- footer ---------- */
footer {
    /* Full width background */
    width: 100%;
    background: var(--bg-alt);
    border-top: 1px solid var(--rule);
    padding: 48px 20px 64px;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Container to center content and match main width */
footer > * {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

footer p {
    margin: 0 0 12px;
    line-height: 1.6;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.12s ease;
}

@media (hover: hover) {
    footer a:hover {
        color: var(--accent-hover);
        text-decoration: underline;
    }
}

.footlinks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}

.footlinks a {
    font-weight: 500;
    font-size: 0.88rem;
}
/* ---------- forms & panels ---------- */
.flash {
    margin: 20px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.flash.error {
    border-color: #c0392b;
}
.flash.ok {
    border-color: var(--accent);
}
.banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 16px;
    border-color: var(--sisal);
    background: var(--glow);
}
.banner form {
    margin: 0;
}

.panel {
    max-width: 460px;
    padding: 48px 0;
}
.panel.wide {
    max-width: 720px;
}
.panel h1 {
    font: 800 2rem/1.1 var(--head);
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}
.lede {
    color: var(--muted);
    margin: 0 0 24px;
}
.form {
    display: grid;
    gap: 18px;
}
.form label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}
.form input,
.form textarea {
    font: 400 1rem var(--body);
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    width: 100%;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}
.form input:focus,
.form textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--glow);
}
.form small {
    font-weight: 400;
    color: var(--muted);
}
.form fieldset {
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 14px;
    display: grid;
    gap: 10px;
}
.form legend {
    font-weight: 600;
    padding: 0 6px;
}
.form label.inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    margin-right: 16px;
}
.form label.inline input {
    width: auto;
}
.alt {
    margin-top: 24px;
    color: var(--muted);
}
.actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.actions form {
    margin: 0;
}
.split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.drow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 4px;
}
.drow .title {
    text-decoration: none;
}
.review {
    padding: 20px 4px;
}
.review h2 {
    font: 700 1.2rem var(--head);
    margin: 0;
}
.desc.short {
    max-height: 12em;
    overflow: auto;
    margin: 12px 0;
    padding: 12px;
    background: var(--bg-alt);
    border-radius: 10px;
}

.apply {
    font: 700 1rem var(--body);
    padding: 13px 24px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(
        180deg,
        var(--accent) 0%,
        var(--accent-hover) 100%
    );
    color: var(--accent-ink);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--shadow-sm);
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}
@media (hover: hover) {
    .apply:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
}
.secondary {
    display: inline-block;
    padding: 12px 20px;
    border: 1px solid var(--accent);
    border-radius: 10px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: background 0.12s ease;
}
@media (hover: hover) {
    .secondary:hover {
        background: var(--glow);
    }
}

.btnrow {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.softnote {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--rule);
}
.softnote a {
    color: var(--accent);
}

/* ---------- score / bars ---------- */
.score {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 8px 0 4px;
}
.score b {
    font: 800 4.5rem/1 var(--head);
    letter-spacing: -0.03em;
    color: var(--accent);
}
.score span {
    color: var(--muted);
}
.bar {
    height: 10px;
    background: var(--rule);
    border-radius: 99px;
    overflow: hidden;
}
.bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 99px;
}
.part {
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
}
.part .head {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 8px;
}
.part p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}
.result h2 {
    font: 700 1.25rem var(--head);
    margin: 28px 0 0;
}
.tips {
    padding-left: 1.2em;
}
.fineprint {
    color: var(--muted);
    font-size: 0.9rem;
}
.jobchip {
    padding: 12px 14px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    margin-bottom: 20px;
}

/* ---------- service packages ---------- */
.pkgs {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
}
.pkg {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 24px;
    padding: 24px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}
.pkg h2 {
    font: 700 1.3rem var(--head);
    margin: 0;
}
.pkg .price {
    font: 800 1.5rem var(--head);
    color: var(--accent);
    text-align: right;
}
.pkg .price small {
    display: block;
    font: 400 0.85rem var(--body);
    color: var(--muted);
}
.pkg ul {
    margin: 8px 0;
    padding-left: 1.2em;
    color: var(--muted);
}
.pkg .ask {
    grid-column: 1 / -1;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.pkg .ask a {
    color: var(--accent);
    font-weight: 700;
}
@media (max-width: 640px) {
    .pkg {
        grid-template-columns: 1fr;
    }
    .pkg .price {
        text-align: left;
    }
}

/* ---------- SEO helpers ---------- */
.crumbs {
    color: var(--muted);
    font-size: 0.95rem;
}
.crumbs a {
    color: var(--muted);
}
.share {
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 20px;
}
.share a {
    color: var(--accent);
}
.related {
    margin-top: 36px;
}
.related h2 {
    font: 700 1.25rem var(--head);
    margin: 0 0 8px;
}
.reach {
    margin: 0 0 14px;
    max-width: 60ch;
}

/* ---------- admin ---------- */
.admin {
    padding: 28px 0 8px;
}
.admin h1 {
    font: 800 2rem/1.1 var(--head);
    letter-spacing: -0.02em;
    margin: 18px 0 14px;
}
.admin h1 small {
    font: 400 1rem var(--body);
    color: var(--muted);
}
.admin h2 {
    font: 700 1.2rem var(--head);
    margin: 32px 0 6px;
}
.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--rule);
}
.tabs a {
    padding: 10px 14px;
    text-decoration: none;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    font-weight: 700;
}
.tabs a[aria-current="page"] {
    color: var(--ink);
    border-color: var(--accent);
}
.count {
    display: inline-block;
    min-width: 1.4em;
    padding: 0 6px;
    border-radius: 99px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
}
.stats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}
.stats a {
    display: block;
    padding: 16px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--surface);
    text-decoration: none;
    color: var(--muted);
    box-shadow: var(--shadow-sm);
    transition:
        box-shadow 0.12s ease,
        transform 0.12s ease;
}
@media (hover: hover) {
    .stats a:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }
}
.stats b {
    display: block;
    font: 800 2rem/1.1 var(--head);
    color: var(--ink);
}
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 16px;
}
.filters input,
.filters select {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
}
.filters input {
    flex: 1;
    min-width: 180px;
}
.filters button {
    font: 700 1rem var(--body);
    padding: 10px 18px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    cursor: pointer;
}
.atable {
    list-style: none;
    margin: 0;
    padding: 0;
}
.atable > li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    padding: 16px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--surface);
    margin-bottom: 8px;
    align-items: start;
    box-shadow: var(--shadow-sm);
}
.atable .main {
    display: grid;
    gap: 2px;
    min-width: 0;
}
.atable .title {
    font: 700 1.05rem var(--head);
    text-decoration: none;
    overflow-wrap: anywhere;
}
.atable .meta {
    color: var(--muted);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}
.atable .actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid var(--rule);
    background: var(--bg-alt);
    margin-left: 4px;
    white-space: nowrap;
}
.badge.live {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--glow);
}
.badge.pending {
    border-color: var(--sisal);
    color: #8a5a16;
    background: #fdf3e1;
}
.badge.expired,
.badge.closed {
    color: var(--muted);
}
.badge.hidden {
    border-color: #c0392b;
    color: #c0392b;
}
@media (prefers-color-scheme: dark) {
    .badge.pending {
        background: #2a1e0c;
        color: var(--sisal);
    }
}
.inline {
    display: inline;
    margin: 0;
}
.danger {
    color: #c0392b;
}
details.confirm {
    display: inline-block;
}
details.confirm summary {
    cursor: pointer;
    color: #c0392b;
    text-decoration: underline;
    list-style: none;
    display: inline;
}
details.confirm summary::-webkit-details-marker {
    display: none;
}
details.confirm[open] {
    padding: 8px 12px;
    border: 1px solid #c0392b;
    border-radius: 8px;
    background: var(--surface);
}
details.confirm p {
    margin: 6px 0;
    font-size: 0.9rem;
}

/* ---------- prose / static pages ---------- */
.prose {
    max-width: 68ch;
    padding: 40px 0 16px;
}
.prose h1 {
    font: 800 clamp(2rem, 5vw, 2.8rem)/1.1 var(--head);
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}
.prose h2 {
    font: 700 1.3rem var(--head);
    margin: 32px 0 8px;
}
.prose p,
.prose li {
    margin: 0 0 12px;
}
.prose ul,
.prose ol {
    padding-left: 1.3em;
}
.prose a {
    color: var(--accent);
}
.prose .lede {
    font-size: 1.15rem;
    color: var(--muted);
}
.prose .meta {
    color: var(--muted);
    font-size: 0.95rem;
}
.prose .btnrow a {
    text-decoration: none;
}
.callout {
    padding: 16px 18px;
    border: 1px solid var(--sisal);
    border-radius: 12px;
    background: #fdf6e8;
    margin: 20px 0;
}
.callout h2 {
    margin-top: 0;
}
.callout a {
    color: var(--accent);
    font-weight: 700;
}
.footlinks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 4px;
}

/* ---------- rich descriptions (scraped) ---------- */
/* Sanitize untrusted scraped HTML server-side (bleach) before rendering. */
.desc.rich {
    white-space: normal;
}
.desc.rich h1,
.desc.rich h2,
.desc.rich h3,
.desc.rich h4,
.desc.rich h5 {
    font: 700 1.2rem var(--head);
    margin: 1.6em 0 0.4em;
    line-height: 1.3;
}
.desc.rich p {
    margin: 0 0 1em;
}
.desc.rich ul,
.desc.rich ol {
    margin: 0 0 1em;
    padding-left: 1.3em;
}
.desc.rich li {
    margin: 0 0 0.35em;
}
.desc.rich a {
    color: var(--accent);
    overflow-wrap: anywhere;
}
.desc.rich blockquote {
    margin: 0 0 1em;
    padding-left: 1em;
    border-left: 3px solid var(--rule);
    color: var(--muted);
}
.desc.rich img {
    max-width: 100%;
    height: auto;
}
.desc.rich table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1em;
}
.desc.rich td,
.desc.rich th {
    border: 1px solid var(--rule);
    padding: 6px 8px;
    text-align: left;
}
.desc.rich pre {
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 12px;
    overflow-x: auto;
}

/* ---------- facts / company ---------- */
.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}
.facts li {
    padding: 5px 12px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.92rem;
}
.fieldgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.companyhead {
    display: flex;
    gap: 18px;
    align-items: center;
    padding: 36px 0 8px;
}
.companyhead img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: #fff;
    padding: 6px;
    box-shadow: var(--shadow-sm);
}
.companyhead h1 {
    margin: 0;
    font: 800 clamp(1.8rem, 5vw, 2.6rem)/1.1 var(--head);
    letter-spacing: -0.02em;
}
.about {
    max-width: 70ch;
    white-space: pre-line;
    margin: 8px 0 20px;
}
.az {
    columns: 2 260px;
    list-style: none;
    padding: 0;
}
.az li {
    margin: 0 0 8px;
}

.recovery {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}
.recovery code,
code {
    padding: 4px 8px;
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    border-radius: 6px;
    font-size: 0.92em;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
    .search {
        grid-template-columns: 1fr 1fr;
    }
    .search button {
        grid-column: 1 / -1;
    }
}
@media (max-width: 640px) {
    .search {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    .row {
        grid-template-columns: 1fr;
    }
    .when {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        margin-top: 6px;
    }
    .hero {
        padding-top: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================
   KYONDO VISUAL POLISH
   Additive refinements: keeps existing template selectors and
   functionality while improving rhythm, responsiveness, and finish.
   ========================================================== */

:root {
    --page-width: 1120px;
    --content-width: 960px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 2px 8px rgba(16, 32, 29, 0.045);
    --shadow-md: 0 10px 28px rgba(16, 32, 29, 0.085);
    --shadow-lg: 0 20px 55px rgba(16, 32, 29, 0.11);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: -0.008em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    color: var(--accent-ink);
    background: var(--accent);
}

a {
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select,
summary {
    -webkit-tap-highlight-color: transparent;
}

button,
.apply,
.pill,
.secondary,
.pager a,
.chips a,
.alert-cta a {
    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

/* Header */
.top {
    padding: 14px max(20px, calc((100vw - var(--page-width)) / 2));
    min-height: 76px;
    border-bottom-color: color-mix(in srgb, var(--rule) 82%, transparent);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 3px 18px rgba(16, 32, 29, 0.025);
}

.brand {
    gap: 11px;
    letter-spacing: -0.035em;
}

.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand small {
    font-size: 0.74rem;
    margin-top: 2px;
}

.nav {
    gap: clamp(12px, 2vw, 24px);
}

.nav a:not(.pill) {
    color: var(--muted);
    font-size: 0.94rem;
    transition: color 150ms ease;
}

.nav a:not(.pill):hover {
    color: var(--accent);
}

.nav .pill {
    padding: 10px 18px;
}

/* Main content width */
main {
    width: min(100% - 40px, var(--content-width));
    max-width: none;
    padding: 0 0 80px;
}

/* Hero: calmer spacing and a stronger visual anchor */
.hero {
    position: relative;
    padding: clamp(48px, 7vw, 82px) 0 30px;
}

.hero h1 {
    max-width: 900px;
    font-size: clamp(2.5rem, 6vw, 4.65rem);
    line-height: 1.035;
    letter-spacing: -0.055em;
    text-wrap: balance;
    margin-bottom: 22px;
}

.sub {
    max-width: 62ch;
    font-size: clamp(1rem, 1.6vw, 1.12rem);
    line-height: 1.75;
    margin: 0 0 30px;
    text-wrap: pretty;
}

/* Search panel */
.search {
    position: relative;
    grid-template-columns:
        minmax(190px, 1.45fr) minmax(150px, 1fr) minmax(150px, 0.95fr)
        auto;
    gap: 9px;
    padding: 10px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.search input,
.search select {
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 0.96rem;
}

.search input::placeholder {
    color: color-mix(in srgb, var(--muted) 78%, transparent);
    opacity: 1;
}

.search input:hover,
.search select:hover {
    border-color: var(--rule-strong);
}

.search input:focus-visible,
.search select:focus-visible,
.more-grid select:focus-visible,
.form input:focus-visible,
.form textarea:focus-visible,
.filters input:focus-visible,
.filters select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent);
    outline-offset: 1px;
    border-color: var(--accent);
    box-shadow: none;
}

.search button,
.apply {
    min-height: 52px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 18%, transparent);
}

.search button:hover,
.apply:hover {
    box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 24%, transparent);
}

.search button:active,
.apply:active,
.pill:active {
    transform: translateY(0);
}

/* Filters feel like part of the search tool, not an afterthought */
.more-filters {
    margin: 2px 4px 0;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
}

.more-filters summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0 4px;
    font-size: 0.92rem;
}

.more-filters summary::before {
    content: "+";
    font-size: 1.1rem;
    line-height: 1;
    transform: none;
}

.more-filters[open] summary::before {
    content: "−";
    transform: none;
}

.more-grid {
    gap: 14px;
    padding-bottom: 8px;
}

.more-grid label {
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.more-grid select {
    min-height: 44px;
    border-color: var(--rule);
    border-radius: 10px;
    font-size: 0.94rem;
}

.alert-cta {
    margin-top: 20px;
}

.alert-cta a {
    padding: 9px 14px;
    border-color: var(--rule-strong);
    font-size: 0.91rem;
}

.alert-cta a:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.active-filters {
    padding: 12px 15px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    line-height: 1.65;
}

/* Browse sections */
.locs {
    margin-top: 32px;
}

.locs > span {
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.015em;
}

.chips {
    gap: 9px;
    margin-top: 12px;
}

.chips a {
    padding: 7px 13px;
    border-color: var(--rule);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.88rem;
    background: var(--surface);
}

.chips a:hover {
    color: var(--accent);
    border-color: color-mix(in srgb, var(--accent) 55%, var(--rule));
    background: var(--glow);
    transform: translateY(-1px);
}

/* Job list: clean, scannable cards */
.jobs {
    margin-top: 28px;
}

.jobs li {
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: var(--radius-md);
    border-color: var(--rule);
    box-shadow: var(--shadow-sm);
}

.jobs li:hover {
    border-color: color-mix(in srgb, var(--accent) 30%, var(--rule));
    box-shadow: var(--shadow-md);
}

.row {
    gap: 5px 20px;
    min-height: 88px;
    padding: 20px 22px;
}

.title {
    font-size: 1.13rem;
    line-height: 1.35;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}

.meta {
    font-size: 0.91rem;
    line-height: 1.55;
}

.when {
    align-self: start;
    margin-top: 2px;
    padding: 5px 10px;
    font-size: 0.79rem;
    font-weight: 600;
    border: 1px solid var(--rule);
}

.row:hover .title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Pagination and empty states */
.pager {
    gap: 14px;
    margin-top: 10px;
    font-size: 0.92rem;
}

.pager a {
    padding: 10px 16px;
    border-radius: 10px;
}

.empty {
    padding: clamp(36px, 6vw, 60px) 24px;
    border-radius: var(--radius-md);
    line-height: 1.7;
}

/* Job details */
.detail {
    padding-top: clamp(28px, 5vw, 52px);
}

.detail h1 {
    max-width: 22ch;
    font-size: clamp(2rem, 5vw, 3.15rem);
    line-height: 1.08;
    text-wrap: balance;
}

.detail .meta {
    line-height: 1.8;
}

.desc {
    max-width: 72ch;
    line-height: 1.8;
}

.desc.rich h1,
.desc.rich h2,
.desc.rich h3,
.desc.rich h4,
.desc.rich h5 {
    line-height: 1.35;
}

.desc.rich a:hover,
.prose a:hover {
    text-decoration-thickness: 2px;
}

/* Footer */
footer {
    margin-top: 28px;
    padding: 42px max(20px, calc((100vw - var(--page-width)) / 2)) 52px;
    background: var(--bg-alt);
}

footer > * {
    max-width: var(--content-width);
}

.footlinks {
    row-gap: 10px;
}

/* Shared forms and panels */
.panel {
    padding: clamp(32px, 5vw, 54px) 0;
}

.panel h1,
.prose h1 {
    text-wrap: balance;
}

.form {
    gap: 20px;
}

.form label {
    gap: 8px;
    font-size: 0.96rem;
}

.form input,
.form textarea {
    min-height: 48px;
    border-radius: 12px;
}

.form textarea {
    min-height: 130px;
    resize: vertical;
}

.flash,
.jobchip,
.pkg,
.stats a,
.atable > li {
    border-radius: var(--radius-md);
}

.pkg {
    padding: clamp(18px, 3vw, 26px);
}

.pkg h2 {
    line-height: 1.3;
}

.secondary {
    border-color: var(--rule-strong);
    border-radius: 11px;
}

.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.score b {
    font-size: clamp(3.3rem, 9vw, 4.5rem);
}

.bar {
    height: 11px;
}

/* Admin and data-heavy screens */
.stats {
    gap: 12px;
}

.stats a {
    padding: 18px;
}

.atable > li {
    padding: 18px;
}

.filters input,
.filters select {
    min-height: 44px;
    border-radius: 10px;
}

.filters button {
    border-radius: 10px;
    transition:
        filter 150ms ease,
        transform 150ms ease;
}

.filters button:hover {
    filter: brightness(0.96);
}

/* More reliable contrast for dark mode and translucent surfaces */
@media (prefers-color-scheme: dark) {
    .top {
        background: color-mix(in srgb, var(--surface) 90%, transparent);
        border-bottom-color: var(--rule);
        box-shadow: 0 3px 20px rgba(0, 0, 0, 0.12);
    }

    .search {
        border-color: var(--rule-strong);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    }

    .search input,
    .search select {
        background: var(--bg-alt);
    }

    .search input:focus,
    .search select:focus {
        background: var(--surface);
    }

    .jobs li:hover {
        border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
    }

    .when {
        border-color: var(--rule);
    }

    .callout {
        background: var(--bg-alt);
        border-color: var(--rule-strong);
    }

    .closed {
        background: var(--glow);
    }
}

/* Responsive refinements */
@media (max-width: 860px) {
    .top {
        padding-inline: 20px;
    }

    .search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: var(--radius-md);
    }

    .search button {
        grid-column: 1 / -1;
    }

    .search .more-filters {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 15.5px;
    }

    .top {
        position: relative;
        padding: 13px 18px;
        align-items: flex-start;
    }

    .brand img {
        width: 36px;
        height: 36px;
    }

    .nav {
        width: 100%;
        gap: 10px 16px;
        font-size: 0.9rem;
    }

    .nav .pill {
        padding: 8px 13px;
    }

    main {
        width: min(100% - 36px, var(--content-width));
        padding-bottom: 56px;
    }

    .hero {
        padding-top: 42px;
    }

    .hero h1 {
        font-size: clamp(2.35rem, 11vw, 3.35rem);
        line-height: 1.04;
        letter-spacing: -0.05em;
        margin-bottom: 17px;
    }

    .sub {
        margin-bottom: 24px;
        font-size: 1rem;
    }

    .search {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 9px;
        border-radius: 16px;
    }

    .search input,
    .search select,
    .search button {
        width: 100%;
        min-height: 49px;
    }

    .search button {
        grid-column: auto;
        margin-top: 2px;
    }

    .search .more-filters {
        grid-column: auto;
    }

    .more-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .alert-cta {
        margin-top: 15px;
    }

    .alert-cta a {
        max-width: 100%;
    }

    .locs {
        margin-top: 26px;
    }

    .jobs {
        margin-top: 22px;
    }

    .jobs li {
        margin-bottom: 10px;
        border-radius: 13px;
    }

    .row {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
        padding: 17px;
    }

    .title,
    .meta {
        grid-column: 1;
        min-width: 0;
    }

    .when {
        grid-column: 1;
        grid-row: auto;
        justify-self: start;
        margin-top: 7px;
        white-space: normal;
    }

    .pager {
        padding: 26px 0;
        flex-wrap: wrap;
    }

    .pager span {
        order: -1;
        width: 100%;
        text-align: center;
    }

    .detail h1 {
        font-size: clamp(1.9rem, 8vw, 2.6rem);
    }

    .companyhead {
        align-items: flex-start;
        gap: 14px;
        padding-top: 26px;
    }

    .companyhead img {
        width: 64px;
        height: 64px;
    }

    .pkg {
        gap: 10px;
    }

    .pkg .ask {
        gap: 10px 14px;
    }

    footer {
        padding: 34px 18px 42px;
    }

    .footlinks {
        gap: 10px 16px;
    }

    .split,
    .drow {
        align-items: flex-start;
        flex-direction: column;
    }

    .actions,
    .btnrow {
        gap: 10px;
    }
}

@media (max-width: 380px) {
    .brand {
        font-size: 1.15rem;
    }

    .nav {
        gap: 9px 12px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .chips {
        gap: 7px;
    }

    .chips a {
        padding: 6px 10px;
        font-size: 0.83rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ============================================================
   LANDING — grid results, quiet count
   ============================================================ */

/* ---- Search: 3 columns (category now in chips) ---- */
.search {
    grid-template-columns: 1.6fr 1.2fr auto;
}

/* ---- Category chip row ---- */
.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}
.category-row .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition:
        border-color 0.12s ease,
        background 0.12s ease,
        color 0.12s ease;
}
.category-row .chip .n {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.85em;
}
.category-row .chip[aria-current="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.category-row .chip[aria-current="true"] .n {
    color: var(--accent-ink);
    opacity: 0.8;
}
@media (hover: hover) {
    .category-row .chip:hover {
        border-color: var(--accent);
        background: var(--glow);
    }
    .category-row .chip[aria-current="true"]:hover {
        background: var(--accent-hover);
    }
}

/* ---- Trust strip ---- */
.trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}
.trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.trust li span {
    color: var(--accent);
    font-weight: 700;
}

/* ---- Inline alert form ---- */
.alert-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin: 22px 0 0;
    max-width: 520px;
}
.alert-inline input[type="email"] {
    font: inherit;
    padding: 13px 14px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    min-width: 0;
    transition:
        border-color 0.12s ease,
        box-shadow 0.12s ease;
}
.alert-inline input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow);
}
.alert-inline button {
    font: 700 1rem var(--body);
    padding: 13px 22px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(
        180deg,
        var(--accent) 0%,
        var(--accent-hover) 100%
    );
    color: var(--accent-ink);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}
@media (hover: hover) {
    .alert-inline button:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }
}
.fineprint {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 8px 0 0;
}

/* ---- Alert CTA (filtered pages) ---- */
.alert-cta {
    margin: 20px 0 0;
}
.alert-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--glow);
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition:
        background 0.12s ease,
        color 0.12s ease;
}
@media (hover: hover) {
    .alert-cta a:hover {
        background: var(--accent);
        color: var(--accent-ink);
    }
}
.alert-cta a::before {
    content: "✉";
    font-size: 1rem;
}

/* ============================================================
   RESULTS BAR — the count lives here, small and quiet
   ============================================================ */
.results {
    padding-top: 36px;
}
.results-bar {
    display: flex;
    align-items: center;
    gap: 12px 20px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 20px;
}
.results-count {
    font: 700 1rem var(--head);
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--ink);
}
.results-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}
.results-meta .pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 99px;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
    .results-meta .pulse {
        animation: pulse 2.4s ease-in-out infinite;
    }
}
@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
    }
    50% {
        box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 10%, transparent);
    }
}
.results-clear {
    margin-left: auto;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}
@media (hover: hover) {
    .results-clear:hover {
        text-decoration: underline;
    }
}

/* active filters: subtle secondary line */
.active-filters {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 20px;
}

/* ============================================================
   JOB GRID — replaces the old .jobs list
   ============================================================ */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}
.job-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 18px 18px 16px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition:
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}
@media (hover: hover) {
    .job-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--rule-strong);
        transform: translateY(-2px);
    }
    .job-card:hover .job-card-title {
        color: var(--accent);
    }
}

.job-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.job-card-title {
    font: 700 1.1rem/1.3 var(--head);
    letter-spacing: -0.01em;
    color: var(--ink);
    transition: color 0.12s ease;
}
.job-card-tag {
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--glow);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.job-card-meta {
    color: var(--muted);
    font-size: 0.92rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}
.job-card-company {
    color: var(--ink);
    font-weight: 600;
}
.job-card-sep {
    color: var(--rule-strong);
}

.job-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
}
.job-card-pill {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}
.job-card-when {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* ---- Pager ---- */
.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 0 8px;
    color: var(--muted);
}
.pager a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--rule);
    background: var(--surface);
    transition:
        border-color 0.12s ease,
        background 0.12s ease;
}
@media (hover: hover) {
    .pager a:hover {
        border-color: var(--accent);
        background: var(--glow);
    }
}

/* ---- Empty state ---- */
.empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--rule-strong);
    border-radius: 12px;
    margin: 8px 0 24px;
}
.empty p {
    margin: 0 0 8px;
}
.empty p:last-child {
    margin-bottom: 0;
}
.empty-tip {
    font-size: 0.95rem;
}
.empty-tip a {
    color: var(--accent);
    font-weight: 700;
}

/* ---- More-filters badge ---- */
.more-filters summary .count {
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.72rem;
    padding: 1px 7px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ---- visually hidden ---- */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .search {
        grid-template-columns: 1fr 1fr;
    }
    .search button {
        grid-column: 1 / -1;
    }
    .alert-inline {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .alert-inline button {
        width: 100%;
    }
}
@media (max-width: 640px) {
    .search {
        grid-template-columns: 1fr;
    }
    .job-grid {
        grid-template-columns: 1fr;
    }
    .results-clear {
        margin-left: 0;
    }
}
