/* Business Ideas: plain CSS, mobile-first, no framework, no CDN. Carried over from GovJobs GTA.
   Type: Plus Jakarta Sans, self-hosted (OFL). Colour: forest green with a burnt-orange call to action, on warm paper.
   Shapes: pills for anything you type into or press, 14px corners for anything that holds content. */

@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/PlusJakartaSans.woff2") format("woff2");
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: italic;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/PlusJakartaSans-Italic.woff2") format("woff2");
}

:root {
    color-scheme: light dark;

    --bg: #fffdf8;
    --surface: #f6f2e9;
    --surface-2: #ece6d9;
    --text: #1f1d18;
    --muted: #625d52;
    --border: #e6e0d3;
    --border-strong: #cfc6b4;

    --accent: #1f5c45;           /* forest green: brand, links, active states */
    --accent-hover: #164633;
    --accent-soft: #e4f0e9;      /* green wash for selected chips and banners */
    --accent-text: #ffffff;
    --link: #1f5c45;

    --cta: #c2410c;              /* burnt orange: the one thing to press on a page */
    --cta-hover: #a3360a;
    --cta-text: #ffffff;
    --cta-soft: #fdf1e9;

    --focus: #ff9d3f;
    --warn-bg: #fdf3e3;
    --warn-border: #c08a3e;
    --warn-text: #5a3a08;
    --urgent-fg: #b42318;
    --ok-bg: #e3f5ea;
    --ok-fg: #14532d;

    /* Badge and chip tones. Each pair clears WCAG AA (4.5:1) in both themes. Satisfaction, claim
       status and sentiment badges are assigned a tone when they are built. */
    --tone-green-bg: #dcf1e3;  --tone-green-fg: #135229;
    --tone-blue-bg: #dde9f8;  --tone-blue-fg: #173f6e;
    --tone-amber-bg: #fbeccd;  --tone-amber-fg: #633f00;
    --tone-orange-bg: #fbe2d6; --tone-orange-fg: #7a2e0e;
    --tone-teal-bg: #d6f0ed;  --tone-teal-fg: #0c4f4a;
    --tone-violet-bg: #ece3fa;    --tone-violet-fg: #4a2a7a;
    --tone-pink-bg: #f9e0ec;   --tone-pink-fg: #7a1f4d;

    --gutter: 16px;
    --radius: 14px;
    --radius-sm: 10px;
    --pill: 999px;
    --maxw: 72rem;
    --shadow: 0 1px 2px rgba(31, 29, 24, .06), 0 6px 20px rgba(31, 29, 24, .06);
    --shadow-lift: 0 2px 6px rgba(31, 29, 24, .08), 0 14px 32px rgba(31, 92, 69, .12);
    --control-h: 3rem;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #13171a;
        --surface: #1b2125;
        --surface-2: #242b30;
        --text: #ece9e2;
        --muted: #a9b0aa;
        --border: #2e363b;
        --border-strong: #434d53;

        --accent: #7fc9a6;
        --accent-hover: #a3dcc0;
        --accent-soft: #1d3329;
        --accent-text: #0d1f17;
        --link: #8fd3b2;

        --cta: #f08a4b;
        --cta-hover: #f4a171;
        --cta-text: #1a0d07;
        --cta-soft: #3a2416;

        --focus: #ffb454;
        --warn-bg: #2e2415;
        --warn-border: #b98c46;
        --warn-text: #f3ddb4;
        --urgent-fg: #ff8a80;
        --ok-bg: #173a24;
        --ok-fg: #a8e3bb;

        --tone-green-bg: #173a24;  --tone-green-fg: #a8e3bb;
        --tone-blue-bg: #1a3150;  --tone-blue-fg: #b3d2f5;
        --tone-amber-bg: #3d2e10;  --tone-amber-fg: #f5d58e;
        --tone-orange-bg: #45241a; --tone-orange-fg: #f7bfa6;
        --tone-teal-bg: #123d3a;  --tone-teal-fg: #9fe0d8;
        --tone-violet-bg: #2f2349;    --tone-violet-fg: #d3c0f5;
        --tone-pink-bg: #45192f;   --tone-pink-fg: #f5b8d5;

        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
        --shadow-lift: 0 2px 6px rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .4);
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.6 "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip; /* the full-bleed hero uses 100vw, which includes the scrollbar */
    /* The footer sits at the bottom of the window on short pages, with nothing beneath it. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
body > main { flex: 1 0 auto; }

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
@media (min-width: 48rem) { .wrap { padding-inline: 1.5rem; } }

a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 6px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

@media (min-width: 48rem) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.5rem; }
}

.lede, .lead { font-size: 1.1rem; color: var(--muted); max-width: 44rem; }
.hint { color: var(--muted); font-size: .9rem; margin-bottom: .75rem; }
.stale-note { color: var(--muted); font-size: .875rem; }
.text-danger { color: var(--urgent-fg); }

/* ---------- skip link ---------- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--accent);
    color: var(--accent-text);
    padding: .7rem 1rem;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus { left: 0; color: var(--accent-text); }

/* ---------- header / nav ---------- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: .5rem 1.5rem;
    min-height: 4rem;
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
/* The logo is drawn artwork (img/logo-*.svg); the dark copy shows when the dark theme is on. */
.brand-logo { display: block; height: 36px; width: auto; }
.brand-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand-logo-light { display: none; }
    :root:not([data-theme="light"]) .brand-logo-dark { display: block; }
}
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
@media (max-width: 24rem) { .brand-logo { height: 28px; } }
.site-nav { min-width: 0; flex: 1 1 auto; }
.site-nav ul {
    list-style: none;
    display: flex;
    gap: .25rem;
    margin: 0;
    padding: 0;
}
.site-nav a {
    display: inline-block;
    padding: .45rem .8rem;
    border-radius: var(--pill);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    color: var(--muted);
    white-space: nowrap;
}
.site-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.nav-end { margin-left: auto; display: flex; gap: .35rem; align-items: center; }
.nav-end > a:not(.btn) {
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    color: var(--muted);
    padding: .45rem .8rem;
    border-radius: var(--pill);
    white-space: nowrap;
}
.nav-end > a:not(.btn):hover { color: var(--accent); background: var(--accent-soft); }
.nav-end .btn { padding: .5rem 1.1rem; font-size: .95rem; }
.nav-signout { display: inline; margin: 0; }

/* Desktop "Account" dropdown: account links and sign-out live behind one word so the top bar
   keeps fitting. On phones the menu lists the same links, so the dropdown is hidden. */
.account-menu { position: relative; }
.account-dd-face {
    display: inline-block;
    padding: .45rem 1.7rem .45rem .8rem;
    border-radius: var(--pill);
    font-weight: 600;
    font-size: .95rem;
    color: var(--muted);
    white-space: nowrap;
    cursor: pointer;
    list-style: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235f5b74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .55rem center;
    background-size: .8rem;
}
.account-dd-face::-webkit-details-marker { display: none; }
.account-dd-face:hover, .account-dd[open] .account-dd-face { color: var(--accent); background-color: var(--accent-soft); }
.account-dd-panel {
    position: absolute;
    z-index: 30;
    top: calc(100% + .4rem);
    right: 0;
    min-width: 11rem;
    display: grid;
    gap: .1rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: .4rem;
}
.account-dd-panel > a {
    display: block;
    padding: .5rem .75rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    color: var(--text);
    white-space: nowrap;
}
.account-dd-panel > a:hover { color: var(--accent); background: var(--accent-soft); }
.account-dd-panel .nav-signout { display: block; margin-top: .25rem; padding-top: .35rem; border-top: 1px solid var(--border); }
.account-dd-panel .nav-signout .btn {
    width: 100%;
    justify-content: flex-start;
    padding: .5rem .75rem;
    min-height: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font-size: .95rem;
    color: var(--text);
}
.account-dd-panel .nav-signout .btn:hover { color: var(--accent); background: var(--accent-soft); }

/* Brand switcher: the same dropdown, holding the brands the person may work in. */
.brand-name, .brand-menu .account-dd-face { color: var(--accent); font-weight: 700; }
.brand-name { padding: .45rem .8rem; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16rem; }
.brand-menu .account-dd-face { display: block; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; }
.account-dd-panel .dd-item { display: block; margin: 0; }
.account-dd-panel .dd-item .btn {
    width: 100%;
    justify-content: flex-start;
    padding: .5rem .75rem;
    min-height: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
}
.account-dd-panel .dd-item .btn:hover { color: var(--accent); background: var(--accent-soft); }
.account-dd-panel .dd-current { display: block; padding: .5rem .75rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem; color: var(--accent); background: var(--accent-soft); }
.nav-brand-current { display: block; padding: .6rem .75rem; font-weight: 700; color: var(--accent); }

/* Phone: brand, a couple of account links and the menu button on one line; the menu
   button opens a panel with every link stacked (site.js toggles .nav-open). */
.nav-toggle { display: none; }
@media (max-width: 47.99rem) {
    .site-header .wrap { flex-wrap: wrap; gap: .25rem .5rem; min-height: 3.5rem; padding-block: .5rem; }
    .brand { margin-right: auto; }
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 1.5px solid var(--border-strong);
        border-radius: 50%;
        background: var(--bg);
        color: var(--text);
        cursor: pointer;
        order: 3;
    }
    .nav-toggle svg { width: 1.3rem; height: 1.3rem; }
    .nav-toggle-close { display: none; }
    .nav-open .nav-toggle-open { display: none; }
    .nav-open .nav-toggle-close { display: block; }
    .nav-end { margin-left: 0; order: 2; gap: .25rem; }
    .nav-end > a:not(.btn) { display: none; }
    .account-menu { display: none; }
    .nav-end .brand-name { display: none; }
    .site-nav .nav-signout { display: block; padding: .5rem .75rem 0; }
    .nav-end .btn { padding: .4rem .85rem; font-size: .9rem; min-height: 2.4rem; }
    .site-nav { order: 4; flex-basis: 100%; display: none; padding: .5rem 0 .75rem; border-top: 1px solid var(--border); margin-top: .5rem; }
    .nav-open .site-nav { display: block; }
    .site-nav ul { flex-direction: column; gap: .1rem; }
    .site-nav a { display: block; padding: .6rem .75rem; font-size: 1rem; }
    .site-nav .nav-account { display: block; }
    .nav-account-heading { padding: .75rem .75rem .25rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
}
@media (min-width: 48rem) { .site-nav .nav-account { display: none; } }
/* Admin: the links sit on a second row, which scrolls sideways before it ever wraps or collides. */
@media (min-width: 48rem) {
    .site-header.is-admin .wrap { flex-wrap: wrap; row-gap: 0; }
    .site-header.is-admin .site-nav { order: 5; flex-basis: 100%; overflow-x: auto; scrollbar-width: thin; margin-inline: -.8rem; padding-bottom: .5rem; }
}

/* ---------- footer ---------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-block: 2rem;
    color: var(--muted);
    font-size: .9rem;
}
.site-footer ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a { color: var(--text); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer p { max-width: 48rem; }
.site-footer p:last-child { margin-bottom: 0; }

/* The space above the footer lives here, so a full-bleed band at the end of a page can cancel it. */
main { display: block; padding-block: 1.75rem 3rem; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.75rem;
    padding: .55rem 1.35rem;
    border-radius: var(--pill);
    border: 1.5px solid var(--accent);
    background: var(--accent);
    color: var(--accent-text);
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }
.btn-primary { background: var(--cta); border-color: var(--cta); color: var(--cta-text); }
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-text); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent); }
.btn-quiet { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-quiet:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-lg { min-height: 3.25rem; padding: .8rem 1.75rem; font-size: 1.05rem; width: 100%; }
@media (min-width: 30rem) { .btn-lg { width: auto; } }
.btn-small { min-height: 2rem; padding: .25rem .8rem; font-size: .82rem; background: transparent; color: var(--accent); border-color: var(--border-strong); }
.btn-small:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn-danger { background: var(--urgent-fg); border-color: var(--urgent-fg); color: #fff; }
.btn-danger:hover { background: #912018; border-color: #912018; }
.btn-quiet-danger { color: var(--urgent-fg); }
.btn-quiet-danger:hover { background: var(--tone-orange-bg); border-color: var(--urgent-fg); color: var(--urgent-fg); }

/* ---------- inputs ---------- */
input[type="search"], input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    min-height: var(--control-h);
    padding: .6rem 1.1rem;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--pill);
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { border-radius: var(--radius); }
input::placeholder { color: var(--muted); opacity: .9; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
input[type="search"] { -webkit-appearance: none; appearance: none; }
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.6rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235f5b74' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    cursor: pointer;
}
.field { margin-bottom: 1rem; }
.field label {
    display: block;
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: .35rem;
}
.field-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .35rem; }
.field-error { display: block; color: var(--urgent-fg); font-size: .85rem; margin-top: .3rem; }
.validation-summary ul { margin: 0 0 1rem; padding: .75rem 1rem .75rem 2rem; background: var(--cta-soft); border: 1px solid var(--urgent-fg); border-radius: var(--radius-sm); color: var(--urgent-fg); font-size: .9rem; }
.validation-summary:empty, .validation-summary-valid { display: none; }
.notice {
    background: var(--ok-bg);
    color: var(--ok-fg);
    border-radius: var(--radius-sm);
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}
.notice-error { background: var(--cta-soft); color: var(--urgent-fg); }
.shell-banners { padding-block: .75rem; border-bottom: 1px solid var(--border); }
.shell-banners .notice { margin-bottom: .5rem; }
.shell-banners .notice:last-child { margin-bottom: 0; }
.notice-warn { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); }
.banner-impersonation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; }
.banner-impersonation p { margin: 0; }
.banner-impersonation form { margin: 0; }

/* ---------- hero ---------- */
.hero {
    background: var(--surface);
    margin-inline: calc(50% - 50vw);
    padding-inline: calc(50vw - 50%);
    margin-top: -1.75rem;
    padding-block: 2rem 1.5rem;
    margin-bottom: 1.75rem;
}
@media (min-width: 48rem) { .hero { padding-block: 3rem 2rem; } }
.hero h1 { margin-bottom: .35rem; }
@media (min-width: 64rem) { .hero h1 { font-size: 2.35rem; white-space: nowrap; } }
.hero .lead { margin-bottom: .35rem; max-width: none; font-size: 1.05rem; }
.hero-detail h1 { white-space: normal; }
.hero > p:last-child, .hero .lead:last-child { margin-bottom: 0; }
.hero .lead strong { color: var(--text); }

/* Filter chips: one scrolling row of pills. Selected pills go green. */
.filter-line { margin-top: .75rem; }
.filter-more > summary { list-style: none; cursor: pointer; }
.filter-more > summary::-webkit-details-marker { display: none; }
.chip-row {
    display: flex;
    gap: .5rem;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    padding-block: .15rem;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
}
.chip-row::-webkit-scrollbar { display: none; }
@media (min-width: 48rem) { .chip-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; } }
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.5rem;
    padding: .4rem 1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--pill);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    flex: 0 0 auto;
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.filter-chip svg { width: .9rem; height: .9rem; }
.filter-more[open] > summary .filter-chip:first-child { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.filter-grid { display: grid; gap: .6rem; margin-top: .75rem; }
@media (min-width: 42rem) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 60rem) { .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.check-inline { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; cursor: pointer; }
.check-inline .hint { margin: 0; }
.filter-chip-clear { border-style: dashed; color: var(--muted); }
.filter-chip-clear:hover { color: var(--urgent-fg); border-color: var(--urgent-fg); }

/* "Filtering by" chips above a list: each chip removes its own filter. */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    margin-bottom: 1.25rem;
}
.active-filters-title { color: var(--muted); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.active-filters ul { list-style: none; margin: 0; padding: 0; flex: 1 1 auto; margin-inline: 0; padding-inline: 0; }
.active-filters li { display: inline-flex; }
.active-filters .filter-chip svg { width: .8rem; height: .8rem; opacity: .7; }
.active-filters .filter-chip.is-on:hover { background: var(--bg); color: var(--urgent-fg); border-color: var(--urgent-fg); }
.active-filters .filter-chip.is-on:hover svg { opacity: 1; }

/* ---------- tags, chips and badges ---------- */
.tag {
    display: inline-block;
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--pill);
    padding: .2rem .7rem;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}
a.tag:hover { background: var(--accent-soft); color: var(--accent); }
.chip {
    display: inline-block;
    background: var(--surface-2);
    color: var(--text);
    border-radius: var(--pill);
    padding: .2rem .75rem;
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.5;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.chip-more { background: transparent; border: 1.5px solid var(--border-strong); color: var(--accent); font-weight: 600; cursor: pointer; }
.chip-more:hover { background: var(--accent-soft); border-color: var(--accent); }
.chip-fold-wrap, .chip-fold { display: contents; }
.chip-fold > summary { display: contents; list-style: none; }
.chip-fold > summary::-webkit-details-marker { display: none; }
.chip-more-close { display: none; }
.chip-fold[open] .chip-more-open { display: none; }
.chip-fold[open] .chip-more-close { display: inline-block; }
.chip-rest { display: contents; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .75rem;
    border-radius: var(--pill);
    font-size: .8125rem;
    font-weight: 700;
    white-space: nowrap;
}
.badge::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.badge-on { background: var(--ok-bg); color: var(--ok-fg); }
.badge-off { background: var(--surface-2); color: var(--muted); }

.result-count { color: var(--muted); margin-bottom: 1rem; font-size: .95rem; }
/* Text a person wrote, shown as they wrote it. */
.sample { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border-radius: var(--radius-sm); padding: .75rem 1rem; margin: 0; }

/* ---------- empty state ---------- */
.empty {
    background: var(--surface);
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius);
    padding: 1.75rem 1.25rem;
    color: var(--muted);
}
.empty p:last-child { margin-bottom: 0; }

/* ---------- pagination ---------- */
.pager { margin-top: 2rem; }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.pager a, .pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    min-height: 2.6rem;
    padding: .35rem .8rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--pill);
    text-decoration: none;
    font-weight: 600;
    background: var(--bg);
    color: var(--text);
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager [aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }

/* ---------- card grids ---------- */
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
@media (min-width: 40rem) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card-grid li {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    background: var(--bg);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.card-grid li:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.card-grid h2, .card-grid h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.card-grid h2 a { text-decoration: none; }
.card-grid h2 a:hover { text-decoration: underline; }
.card-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.card-grid p + p { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .3rem; }

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

/* ---------- cards (forms, account, preferences) ---------- */
.card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.card > h2:first-child { margin-bottom: .5rem; }
.card > p:last-child { margin-bottom: 0; }
.danger-zone { border-color: var(--tone-orange-bg); }
.danger-zone h2 { color: var(--urgent-fg); }

/* ---------- images and colours in the admin ---------- */
.logo-preview { display: block; max-width: 14rem; max-height: 8rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: .5rem; }
.thumb-name { display: inline-flex; align-items: center; gap: .6rem; }
.thumb { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
/* The two colours come from custom properties set on the element, never from a generated rule. */
.swatch { background: var(--swatch-bg); color: var(--swatch-fg); border-radius: var(--pill); padding: .4rem 1rem; font-weight: 700; font-size: .9rem; border: 1px solid var(--border-strong); }
.qr-panel { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 40rem) { .qr-panel { grid-template-columns: 12rem minmax(0, 1fr); } }
/* Always black on white, in both themes: a scanner needs the contrast. */
.qr-image { background: #ffffff; border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .5rem; max-width: 12rem; }
.qr-image img { display: block; width: 100%; height: auto; }
input[type="file"] { font: inherit; color: var(--text); max-width: 100%; }
.listing-row { margin-bottom: .25rem; }
.card > form + form { margin-top: .5rem; }

/* ---------- page head with an action ---------- */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    margin-bottom: 1.5rem;
}
.page-head h1 { margin-bottom: .25rem; }
.page-head .lede { margin: 0; }
.page-head .btn { white-space: nowrap; }

/* ---------- rows of buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.actions form { margin: 0; display: inline-flex; }
.actions .btn { min-height: 2.4rem; padding: .35rem 1rem; font-size: .9rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.form-actions .btn { min-width: 0; }
.form-actions-foot { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ---------- multi-select pickers ---------- */
.picker {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem 1.1rem;
    margin: 0 0 1.25rem;
    min-width: 0;
}
.picker legend { font-weight: 700; font-size: 1rem; padding: 0 .4rem; }
.picker .hint { margin: 0 0 .6rem; }
.picker-toolbar { display: flex; align-items: center; gap: .5rem; margin: 0 0 .75rem; }
.picker-count { color: var(--muted); font-size: .8rem; margin-left: auto; }
.check-grid { display: grid; gap: .3rem .9rem; }
@media (min-width: 38rem) { .check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 58rem) { .check-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.check { display: flex; align-items: baseline; gap: .45rem; }
.check input[type="checkbox"] { width: auto; margin: 0; flex: none; accent-color: var(--accent); }
.check label { display: inline; font-weight: 400; font-size: .9rem; margin: 0; cursor: pointer; }
.check .count { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.check .count::before { content: "("; }
.check .count::after { content: ")"; }

/* ---------- account forms ---------- */
.form { max-width: 26rem; margin-bottom: 1.25rem; }
.form .field { margin-bottom: 1rem; }
.form .checkbox { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .9rem; }
.form .checkbox input { width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; accent-color: var(--accent); flex: none; }
.form .checkbox label { font-weight: 500; }
.form .btn { min-width: 9rem; }
.form.form-wide { max-width: none; }
.form-wide > .field { max-width: 26rem; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0 1.25rem; }
.consents { border: 0; padding: 0; margin: 0 0 1.25rem; }
.consents legend { font-weight: 700; padding: 0; margin-bottom: .25rem; }
.external-logins { display: grid; gap: .6rem; margin-bottom: .9rem; }
.card:has(> form > .external-logins) { max-width: 26rem; }
.card:has(> form > .external-logins) .hint:last-child { margin-bottom: 0; }
.btn-external {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    width: 100%;
    max-width: 22rem;
    min-height: 44px;
    padding: .55rem 1rem;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--pill);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
}
.btn-external:hover { box-shadow: var(--shadow); }
.btn-external:active { background: var(--surface-2); }
.btn-google::before {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-google { background: #ffffff; border-color: #747775; color: #1f1f1f; }
.btn-google:hover { background: #f8faff; }
.btn-google:active { background: #eef2fb; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .btn-google { background: #131314; border-color: #8e918f; color: #e3e3e3; }
    :root:not([data-theme="light"]) .btn-google:hover { background: #1f2022; }
    :root:not([data-theme="light"]) .btn-google:active { background: #2a2b2e; }
}
:root[data-theme="dark"] .btn-google { background: #131314; border-color: #8e918f; color: #e3e3e3; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; border: 1.5px solid var(--border); border-radius: var(--radius); margin-bottom: 1.5rem; }
.chip-row + .table-scroll, .chip-row + .empty { margin-top: .75rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin-bottom: 1.5rem; }
.table-scroll .data-table { margin-bottom: 0; }
.data-table th, .data-table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table tbody tr:last-child td, .data-table tbody tr:last-child th { border-bottom: 0; }
.data-table thead th { background: var(--surface); font-weight: 700; font-size: .82rem; color: var(--muted); }
.data-table tbody tr:hover { background: var(--surface); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; }
.sort-link:hover, .sort-link:focus-visible { color: var(--accent); text-decoration: underline; }
.sort-arrow { font-size: .7rem; min-width: .7rem; }
.sort-arrow:empty { display: none; }
.data-table .inline-form { display: inline; margin: 0; }

/* ---------- admin ---------- */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .75rem; margin-bottom: 2rem; }
.metric { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.metric-value { font-size: 1.75rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.metric-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.row-alert td { background: var(--warn-bg); color: var(--warn-text); }

/* ---------- forms: the field a person never sees ---------- */
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- uploads ---------- */
.upload-drop { border: 2px dashed var(--border); border-radius: var(--radius); padding: 1.5rem; text-align: center; background: var(--surface); }
.upload-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.upload-drop input[type=file] { display: block; margin: .75rem auto 0; max-width: 100%; }
.upload-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .5rem; }
.upload-item { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; background: var(--surface); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .9rem; }
.upload-item .upload-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .upload-stage { color: var(--muted); }
.upload-item progress { grid-column: 1 / -1; width: 100%; height: .4rem; }
.upload-item.is-failed .upload-stage { color: var(--urgent-fg); font-weight: 600; }
.usage { margin: 0 0 1.5rem; max-width: 30rem; }
.usage progress { width: 100%; height: .5rem; }
.file-kinds { margin: 1.5rem 0 1rem; }
.file-kinds [aria-current=page] { background: var(--accent-soft); color: var(--accent); }
.file-grid { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; }
.file-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.file-thumb { aspect-ratio: 4 / 3; background: var(--border); display: grid; place-items: center; overflow: hidden; color: var(--muted); font-weight: 700; }
.file-thumb img, .file-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-body { padding: .7rem .8rem .8rem; display: grid; gap: .35rem; font-size: .85rem; }
.file-name { font-weight: 600; overflow-wrap: anywhere; }
.file-meta { color: var(--muted); }
.file-body .actions { margin-top: .25rem; }

/* ---------- QR codes ---------- */
.qr-preview { max-width: 18rem; background: #ffffff; border-radius: var(--radius); padding: .75rem; margin-bottom: 1rem; }
.qr-preview img { display: block; width: 100%; height: auto; }

/* ---------- public site ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 .5rem; }
.steps { padding-left: 1.3rem; margin: 0 0 2rem; max-width: 46rem; }
.steps li { margin-bottom: .6rem; }
.faq { max-width: 46rem; margin-bottom: 1.5rem; }
.faq details { border-bottom: 1px solid var(--border); padding: .85rem 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: .6rem 0 0; color: var(--muted); }
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.1rem; margin-top: 1.75rem; }
.card-grid + h2, .card-grid + p { margin-top: 1.5rem; }

/* ---------- ideas ---------- */
.search-line { display: flex; gap: .5rem; margin-top: 1rem; max-width: 40rem; }
.search-line input[type="search"] { flex: 1 1 auto; min-width: 0; }
.search-line .btn { flex: 0 0 auto; }
.chip-sep { width: 1px; align-self: stretch; background: var(--border-strong); margin-inline: .25rem; flex: 0 0 auto; }
.filter-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: .75rem 0 .35rem; }
.filter-heading:first-child { margin-top: 0; }

/* Ideas filter bar: one drop-down per question instead of a wall of pills. */
.filter-bar { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.filter-dd-wrap { position: relative; }
.filter-dd > summary { list-style: none; }
.filter-dd > summary::-webkit-details-marker { display: none; }
.filter-dd-face { min-height: 2.4rem; padding: .35rem .8rem .35rem 1rem; gap: .3rem; max-width: 16rem; }
.filter-dd-face span { overflow: hidden; text-overflow: ellipsis; }
.filter-dd-face svg { width: 1rem; height: 1rem; opacity: .65; transition: transform .15s; }
.filter-dd[open] > .filter-dd-face { border-color: var(--accent); color: var(--accent); }
.filter-dd[open] > .filter-dd-face svg { transform: rotate(180deg); }
.filter-dd-panel {
    position: absolute; z-index: 30; top: calc(100% + .4rem); left: 0;
    min-width: 15rem; max-height: min(70vh, 30rem); overflow-y: auto;
    padding: .5rem; border: 1.5px solid var(--border); border-radius: var(--radius);
    background: var(--bg); box-shadow: 0 12px 32px rgb(0 0 0 / .14);
}
.filter-dd-panel.is-wide { display: grid; grid-template-columns: repeat(2, minmax(12rem, 1fr)); gap: .25rem 1rem; min-width: 28rem; }
.filter-dd-panel .filter-heading { margin: .5rem .6rem .25rem; }
.filter-dd-section ul { list-style: none; margin: 0; padding: 0; }
.filter-dd-item { display: flex; align-items: center; gap: .55rem; padding: .45rem .6rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.filter-dd-item:hover { background: var(--surface); color: var(--accent); }
.filter-dd-check { display: grid; place-items: center; width: 1.1rem; height: 1.1rem; flex: none; border: 1.5px solid var(--border-strong); border-radius: 5px; }
.filter-dd-check svg { width: .75rem; height: .75rem; opacity: 0; }
.filter-dd-item.is-on { color: var(--accent); font-weight: 600; }
.filter-dd-item.is-on .filter-dd-check { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.filter-dd-item.is-on .filter-dd-check svg { opacity: 1; }
/* Phones: the panel spans the bar, so no menu runs off the screen. */
@media (max-width: 40rem) {
    .filter-dd-wrap { position: static; }
    .filter-dd-panel, .filter-dd-panel.is-wide { left: 0; right: 0; min-width: 0; grid-template-columns: minmax(0, 1fr); }
    .filter-dd-item { white-space: normal; }
}
.filter-grid .chip-row { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
.filter-grid .filter-chip { min-height: 2.2rem; padding: .3rem .85rem; font-size: .85rem; }

.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .75rem; }
.list-head .result-count, .list-head .section-title { margin: 0; }
.sort-tabs { display: flex; gap: .25rem; }
.sort-tabs a { padding: .35rem .85rem; border-radius: var(--pill); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.sort-tabs a:hover { color: var(--accent); background: var(--surface-2); }
.sort-tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.list-head .view-tabs { margin-left: auto; }
.view-tabs a { display: inline-flex; align-items: center; gap: .35rem; }
.view-tabs svg { width: 16px; height: 16px; flex: none; }

/* Ideas as a table: one line of title, one of summary, the facets in narrow columns. */
.idea-table td { vertical-align: top; }
.idea-table .col-idea { white-space: normal; min-width: 16rem; width: 100%; }
.idea-table-title { display: block; font-weight: 700; color: var(--text); text-decoration: none; }
.idea-table-title:hover { color: var(--accent); text-decoration: underline; }
.idea-table-summary { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .86rem; margin-top: .15rem; }
.idea-table td:not(.col-idea) { color: var(--muted); font-size: .86rem; }
.idea-table .tag:empty { display: none; }
.idea-table .col-from a { color: inherit; }
.idea-table-play { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; color: var(--accent); text-decoration: none; font-variant-numeric: tabular-nums; }
.idea-table-play svg { width: 14px; height: 14px; }
.idea-table-play:hover { text-decoration: underline; }
@media (max-width: 58rem) { .idea-table .col-type { display: none; } }
@media (max-width: 46rem) { .idea-table .col-from { display: none; } .idea-table-summary { -webkit-line-clamp: 2; } }
@media (max-width: 36rem) { .idea-table .col-mode, .idea-table .col-video { display: none; } .idea-table .col-idea { min-width: 0; } .idea-table th, .idea-table td { padding: .65rem .7rem; } }

.section-title { margin: 2rem 0 .75rem; }
.idea-grid li.idea-card { display: flex; flex-direction: column; gap: .4rem; }
.idea-card h2 { font-size: 1.08rem; line-height: 1.3; }
.idea-card .idea-summary { color: var(--text); font-size: .92rem; flex: 1 1 auto; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.idea-facets { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; }
.idea-card .idea-facets { margin-top: 0; }
.idea-meta { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .2rem !important; }
.idea-meta a { color: inherit; }
.tag-cost { background: var(--accent-soft); color: var(--accent); }
.hero .idea-facets { margin-bottom: .75rem; }
.hero .tag { font-size: .82rem; }


.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.two-col > * { min-width: 0; }
@media (min-width: 58rem) { .two-col { grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; } .side-panel { position: sticky; top: 5rem; } }
.idea-body { max-width: 46rem; }
.idea-body h2 { font-size: 1.2rem; margin: 1.75rem 0 .5rem; }
.idea-body h2:first-child { margin-top: 0; }
/* Idea page video: a poster that becomes the YouTube player on press. */
.video-player { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.75rem; border-radius: var(--radius); overflow: hidden; background: #000; scroll-margin-top: 5rem; }
.video-player iframe, .video-facade { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-facade { display: block; color: #fff; text-decoration: none; }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video-facade:hover img, .video-facade:focus-visible img { opacity: 1; }
.video-play { position: absolute; top: 50%; left: 50%; width: 4.5rem; height: 4.5rem; margin: -2.25rem 0 0 -2.25rem; display: grid; place-items: center; border-radius: 50%; background: #1f5c45; color: #fff; box-shadow: 0 6px 24px rgb(0 0 0 / .35); transition: transform .15s; }
.video-play svg { width: 2rem; height: 2rem; margin-left: .2rem; }
.video-facade:hover .video-play, .video-facade:focus-visible .video-play { transform: scale(1.08); }
.video-label { position: absolute; left: .75rem; bottom: .75rem; padding: .3rem .7rem; border-radius: 999px; background: rgb(0 0 0 / .7); color: #fff; font-size: .9rem; font-weight: 600; }
.source-out { margin: .5rem 0 0; text-align: center; }
.video-player + h2 { margin-top: 0; }
.facts { display: grid; gap: 1rem; margin: 0 0 .5rem; max-width: 65ch; }
.facts dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.facts dd { margin: .15rem 0 0; }
.idea-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1.5rem; }
.idea-tags .chip { text-decoration: none; }
.idea-tags .chip:hover { background: var(--accent-soft); color: var(--accent); }
.side-panel .card { margin-bottom: 1rem; }
.source-title { font-weight: 600; margin-bottom: .25rem; }
.source-card .btn, .save-card .btn-primary { width: 100%; justify-content: center; margin-top: .5rem; }
.list-picker { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.list-picker form { margin: 0; }
.list-picker .btn.is-on { background: var(--accent-soft); color: var(--accent); }
.list-note { grid-column: 1 / -1; border: 0 !important; padding: 0 .5rem !important; margin-top: -.5rem; }
.list-note p { font-style: italic; }

/* ---------- saved lists and admin forms ---------- */
.saved-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: .75rem; }
.saved-item { display: flex; gap: 1rem; align-items: flex-start; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; }
.saved-main { flex: 1 1 auto; min-width: 0; }
.saved-item h2 { font-size: 1.1rem; margin: .3rem 0 .2rem; }
.saved-item .idea-summary { margin: 0 0 .4rem; font-size: .92rem; }
.note-form { display: flex; gap: .5rem; margin-top: .6rem; }
.note-form input { flex: 1 1 auto; min-width: 0; min-height: 2.4rem; }
.saved-remove { flex: 0 0 auto; margin: 0; }
@media (max-width: 40rem) { .saved-item { flex-direction: column; } }
.blurb-form { display: flex; gap: .4rem; min-width: 18rem; }
.blurb-form input { flex: 1 1 auto; min-height: 2.2rem; font-size: .9rem; }

/* ---- merged duplicates: the other videos that covered the same business ---- */
.other-sources { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--border, #e5e7eb); }
.other-sources h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); margin: 0 0 .4rem; }
.other-sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .9rem; }

/* ---- source video on cards, audience tags ---- */
.idea-card .idea-source { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); margin: 0; min-width: 0; }
.idea-card .idea-source svg { width: 14px; height: 14px; flex: none; color: var(--accent, #e0592a); }
.idea-card .idea-source a { color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.idea-card .idea-source a:hover { text-decoration: underline; color: var(--text); }
.idea-card .idea-time { flex: none; font-variant-numeric: tabular-nums; }
.tag-who { background: var(--surface-2, #f3f0fa); }
.chip-label { align-self: center; font-size: .8rem; font-weight: 600; color: var(--muted); margin-right: .25rem; }

/* ---------- home page ---------- */
/* Full-bleed bands inside main > .wrap: the same negative-margin trick as .hero. */
.home-hero, .home-band, .home-credits {
    margin-inline: calc(50% - 50vw);
    padding-inline: calc(50vw - 50%);
}
.home-hero {
    position: relative;
    overflow: hidden;
    margin-top: -1.75rem;
    padding-block: 3rem 3.5rem;
    text-align: center;
    background-color: var(--surface);
    /* A quiet green glow behind the headline over a surface-to-page wash: depth without a pattern. */
    background-image:
        radial-gradient(ellipse 60% 55% at 50% 0%, var(--accent-soft), transparent 70%),
        linear-gradient(var(--surface), var(--bg));
    border-bottom: 1px solid var(--border);
}
@media (min-width: 48rem) { .home-hero { padding-block: 4.5rem 6.5rem; } }
.home-hero-inner { position: relative; max-width: 48rem; margin-inline: auto; }
.home-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    margin: 0 0 1.25rem;
    padding: .35rem .9rem;
    border-radius: var(--pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .85rem; font-weight: 700;
}
.home-h1 { font-size: 2.6rem; line-height: 1.04; letter-spacing: -.04em; font-weight: 800; margin: 0; text-wrap: balance; }
@media (min-width: 48rem) { .home-h1 { font-size: 4.6rem; } }
.home-mark {
    background-image: linear-gradient(var(--cta), var(--cta));
    background-repeat: no-repeat;
    background-position: 0 94%;
    background-size: 100% .12em;
}
.home-sub { font-size: 1.2rem; font-weight: 700; color: var(--text); max-width: 38rem; margin: 1.25rem auto 0; }
@media (min-width: 48rem) { .home-sub { font-size: 1.35rem; } }
/* Headline entrance: the words rise in one after another, then the underline draws across. */
.home-rise .w { display: inline-block; animation: home-rise .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 80ms); }
.home-rise .home-mark { animation: home-underline .5s ease-out .75s both; }
@keyframes home-rise { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }
@keyframes home-underline { from { background-size: 0 .12em; } to { background-size: 100% .12em; } }
.home-count { display: inline-block; text-align: center; font-variant-numeric: tabular-nums; color: var(--cta); }
.home-lede { font-size: 1.02rem; color: var(--muted); max-width: 36rem; margin: .75rem auto 2.25rem; }

.home-search {
    display: flex; align-items: center; gap: .5rem;
    max-width: 44rem; margin: 0 auto;
    padding: .5rem .5rem .5rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--pill);
    background: var(--bg);
    box-shadow: 0 24px 60px rgba(31, 92, 69, .14);
    transition: box-shadow .3s, border-color .3s;
}
.home-search:focus-within { border-color: var(--accent); box-shadow: 0 24px 60px rgba(31, 92, 69, .24); }
.home-search-icon { width: 22px; height: 22px; flex: 0 0 auto; color: var(--muted); }
.home-search input[type="search"] {
    flex: 1 1 auto; min-width: 0; height: 3rem;
    border: 0; background: transparent; box-shadow: none;
    font: inherit; font-size: 1.1rem; color: var(--text);
    padding: 0;
}
.home-search input[type="search"]:focus { outline: none; box-shadow: none; }
.home-search input::placeholder { color: var(--muted); opacity: 1; }
.home-search-btn { min-height: 3.25rem; padding-inline: 1.6rem; flex: 0 0 auto; white-space: nowrap; }
.home-search-btn svg { width: 18px; height: 18px; }
@media (max-width: 39.99rem) {
    .home-search-lbl { display: none; }
    .home-search-btn { padding-inline: 1rem; min-width: 3.25rem; }
}
.home-popular { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.4rem; }
.home-popular-label { align-self: center; font-size: .88rem; font-weight: 700; color: var(--muted); margin-right: .25rem; }
.home-qchip {
    display: inline-flex; align-items: center;
    min-height: 2.75rem; padding: 0 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--pill);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    font-size: .9rem; font-weight: 600;
    transition: border-color .2s, color .2s, transform .2s;
}
.home-qchip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* Facet pills floating at the hero's edges: decoration only, hidden below 64rem. */
.home-float { display: none; }
@media (min-width: 64rem) { .home-float { display: block; position: absolute; inset: 0; pointer-events: none; } }
.home-tagf {
    position: absolute;
    display: inline-flex; align-items: center;
    padding: .5rem .9rem;
    border-radius: var(--pill);
    font-size: .85rem; font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--shadow);
    animation: home-drift 9s ease-in-out infinite;
}
.home-tagf.d2 { animation-delay: -3s; } .home-tagf.d3 { animation-delay: -6s; } .home-tagf.d4 { animation-delay: -1.5s; }
.home-tagf.d5 { animation-delay: -4.5s; } .home-tagf.d6 { animation-delay: -7.5s; }
@keyframes home-drift { 0%, 100% { transform: translate(0, 0) rotate(-2deg); } 50% { transform: translate(8px, -14px) rotate(2deg); } }
.tone-green { background: var(--tone-green-bg); color: var(--tone-green-fg); }
.tone-blue { background: var(--tone-blue-bg); color: var(--tone-blue-fg); }
.tone-amber { background: var(--tone-amber-bg); color: var(--tone-amber-fg); }
.tone-orange { background: var(--tone-orange-bg); color: var(--tone-orange-fg); }
.tone-violet { background: var(--tone-violet-bg); color: var(--tone-violet-fg); }

/* Creators credited: a slow strip of names. */
.home-credits {
    display: flex; align-items: center; gap: 1.75rem;
    padding-block: 1.5rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.home-credits-label { margin: 0; flex: 0 0 auto; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.home-marquee {
    flex: 1 1 auto; min-width: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.home-strip { display: flex; gap: 3rem; width: max-content; animation: home-left 40s linear infinite; }
@keyframes home-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.home-cr { display: inline-flex; align-items: center; gap: .75rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--muted); white-space: nowrap; }
.home-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }

/* Section heads */
.home-section { padding-block: 4rem 1.5rem; }
@media (min-width: 48rem) { .home-section { padding-block: 5.5rem 1.5rem; } }
.home-section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.home-eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0; }
.home-h2 { font-size: 1.9rem; line-height: 1.12; letter-spacing: -.03em; font-weight: 800; margin: .6rem 0 0; }
@media (min-width: 48rem) { .home-h2 { font-size: 2.6rem; } }
.home-lead { font-size: 1.1rem; color: var(--muted); max-width: 40rem; margin: .9rem 0 0; }
.home-all {
    display: inline-flex; align-items: center; gap: .5rem;
    min-height: 2.75rem; padding: 0 1.1rem;
    border: 1.5px solid var(--accent);
    border-radius: var(--pill);
    color: var(--accent);
    font-weight: 700; font-size: .92rem;
    text-decoration: none;
    transition: background .2s;
}
.home-all:hover { background: var(--accent-soft); color: var(--accent); }
.home-all svg { width: 16px; height: 16px; transition: transform .25s; }
.home-all:hover svg { transform: translateX(4px); }

/* Category tiles */
.home-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 2rem; }
@media (min-width: 40rem) { .home-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 58rem) { .home-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .home-cats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.home-cat {
    display: flex; flex-direction: column; gap: .85rem;
    padding: 1.2rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.home-cat:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-lift); color: var(--text); }
.home-ci { width: 52px; height: 52px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; transition: transform .35s cubic-bezier(.2, .8, .2, 1.4); }
.home-cat:hover .home-ci { transform: rotate(-8deg) scale(1.1); }
.home-ci svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-cat-l { font-weight: 800; font-size: 1rem; line-height: 1.25; letter-spacing: -.01em; }
.home-cat-n { font-size: .82rem; font-weight: 700; color: var(--muted); margin-top: -.5rem; }

/* Figures band */
.home-band { padding-block: 4rem; }
@media (min-width: 48rem) { .home-band { padding-block: 5.5rem; } }
.home-stats-band { margin-top: 3rem; background: var(--accent); color: var(--accent-text); }
.home-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
@media (min-width: 48rem) { .home-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem; } }
.home-stat-n { font-size: 2.4rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; margin: 0; }
@media (min-width: 48rem) { .home-stat-n { font-size: 3.6rem; } }
.home-stat-l { margin: .6rem 0 0; font-weight: 600; opacity: .85; }

/* Audiences */
.home-who { background: var(--surface); margin-bottom: -3rem; } /* meets the footer: cancels main's bottom padding */
.home-aud { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 40rem) { .home-aud { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .home-aud { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.home-at {
    display: flex; flex-direction: column; gap: .7rem;
    padding: 1.35rem;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid transparent;
    color: var(--text);
    text-decoration: none;
    transition: transform .25s, border-color .25s;
}
.home-at:hover { transform: translateY(-4px); border-color: var(--accent); color: var(--text); }
.home-at-ic { width: 48px; height: 48px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; transition: transform .35s cubic-bezier(.2, .8, .2, 1.4); }
.home-at-ic svg { width: 24px; height: 24px; }
.home-at:hover .home-at-ic { transform: rotate(-8deg) scale(1.08); }
.home-at-t { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.home-at-h { color: var(--muted); font-size: .92rem; }
.home-at-n { font-size: .82rem; font-weight: 800; color: var(--accent); margin-top: auto; }

/* ---------- find my idea and situation pages ---------- */
.home-match { display: inline-block; margin-top: 1.5rem; font-size: .98rem; color: var(--muted); text-decoration: none; }
.home-match strong { color: var(--accent); }
.home-match:hover strong { text-decoration: underline; }

.match-top { margin-top: 1.5rem; }
.match-panel > summary { list-style: none; display: inline-flex; cursor: pointer; }
.match-panel > summary::-webkit-details-marker { display: none; }
.match-panel[open] > summary { background: var(--accent-soft); }
/* Before any answer the questions are the whole page, so the fold has nothing to open. */
.match-panel.is-first > summary { display: none; }
.match-form { max-width: 52rem; margin: 1.5rem 0 0; }
.match-panel.is-first .match-form { margin-top: .5rem; }
.match-q { border: 0; margin: 0 0 1.75rem; padding: 0; min-width: 0; }
.match-q legend { font-weight: 800; font-size: 1.15rem; margin-bottom: .75rem; padding: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.choice {
    position: relative;
    display: flex; flex-direction: column; justify-content: center; gap: .1rem;
    min-height: var(--control-h);
    padding: .55rem 1.1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice-l { font-weight: 700; }
.choice:has(input:checked) .choice-l { color: var(--accent); }
.choice-h { font-size: .82rem; color: var(--muted); }
.choice-any .choice-l { font-weight: 600; color: var(--muted); }
/* "Not sure" is the starting state, not a choice: chosen, it keeps a plain outline. */
.choice-any:has(input:checked) { background: var(--bg); box-shadow: none; border-color: var(--border-strong); border-style: dashed; }
.choice-any:has(input:checked) .choice-l { color: var(--muted); }
.match-submit { display: flex; flex-direction: column; align-items: flex-start; gap: .85rem; margin-top: .5rem; }
@media (min-width: 40rem) { .match-submit .btn-lg { width: auto; } }

.match-results { margin-top: 1.5rem; scroll-margin-top: 5rem; }
.match-h2 { margin-bottom: .25rem; }
.match-because { margin-bottom: 1rem; }
.match-aside { margin-bottom: 1rem; }
.match-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 0; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }

.situation-grid { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; }
@media (min-width: 40rem) { .situation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .situation-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.situation {
    display: flex; flex-direction: column; gap: .4rem; height: 100%;
    padding: 1.2rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    transition: transform .25s, border-color .25s;
}
.situation:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--text); }
.situation-t { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.situation-h { color: var(--muted); font-size: .92rem; }
.situation-n { font-size: .82rem; font-weight: 800; color: var(--accent); margin-top: auto; padding-top: .35rem; }
.situation-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.25rem 0 1rem; }
.situation-bar .hint { margin: 0; }
.situation-more { margin: 2.5rem 0 1rem; }
.situation-links { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.situation-links a { display: inline-block; padding: .45rem .95rem; border: 1px solid var(--border-strong); border-radius: var(--pill); text-decoration: none; color: var(--text); font-size: .92rem; }
.situation-links a:hover { border-color: var(--accent); color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
    .home-tagf, .home-strip, .home-rise .w, .home-rise .home-mark { animation: none; }
    .home-cat, .home-at, .home-qchip, .home-ci, .home-at-ic, .home-all svg, .situation, .choice { transition: none; }
}
