/* Clarisa style guide: tokens first, then components. Every page shares this
   file; see /style for each piece on one page. Colours are checked for
   contrast (WCAG AA) against the backgrounds they sit on. */

/* ---------------------------------------------------------------- Fonts --
   Self-hosted (SIL Open Font License, see fonts/LICENSE-*.txt), so no
   visitor data goes to a font service. Fraunces is only the "Clarisa"
   wordmark; headings are Source Serif 4; everything people read, type or
   compare (numbers included) is Figtree. */
@font-face {
    font-family: "Fraunces";
    src: url("/static/fonts/fraunces.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("/static/fonts/source-serif-4.woff2") format("woff2");
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Figtree";
    src: url("/static/fonts/figtree.woff2") format("woff2");
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Figtree";
    src: url("/static/fonts/figtree-italic.woff2") format("woff2");
    font-weight: 300 900;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("/static/fonts/atkinson-hyperlegible.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("/static/fonts/atkinson-hyperlegible-bold.woff2") format("woff2");
    font-weight: 500 800;
    font-display: swap;
}

/* --------------------------------------------------------------- Tokens -- */
:root {
    /* Colour */
    --navy: #1B2B4B;            /* headings, primary buttons, the brand */
    --navy-hover: #2A3F68;
    --text: #2B3345;            /* body text */
    --muted: #5C6474;           /* secondary text (5.2:1 or better on every surface) */
    --link: #2C4A86;
    --bg: #FBF8F3;              /* warm cream page */
    --surface: #FFFFFF;         /* cards */
    --sand: #F3EEE5;            /* quiet panels inside cards */
    --line: #E7E0D5;            /* dividers, card borders */
    --field-border: #8A93A6;    /* form fields (3:1 against white) */

    --honey-bg: #FBEFD3;  --honey-ink: #6A4708;  --honey-line: #E2B85A;  /* needs your answer */
    --sage-bg: #E4EEE6;   --sage-ink: #255238;   --sage-line: #8DB59A;   /* done, saved, yes */
    --blush-bg: #F8E6E3;  --blush-ink: #7A3333;  --blush-line: #DDA9A2;  /* problems */
    --info-bg: #E8EDF6;   --info-line: #9FB0D3;                          /* for your information */
    --lilac-bg: #EFE9F6;  --lilac-ink: #4E3D73;                          /* a field of work (Find jobs) */
    --chip-bg: #EEF0F5;
    --danger: #A4262C;
    --focus: #2C4A86;
    /* The pearl finish, used sparingly: the logo, a hero edge, the score ring */
    --pearl: linear-gradient(120deg, #F4E8F1 0%, #E5ECF8 35%, #F7F0E0 65%, #E3F1EC 100%);

    /* Type */
    --font-brand: "Fraunces", Georgia, serif;   /* the wordmark only */
    --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
    --text-xs: 0.8125rem;   /* 13px: fine print only */
    --text-sm: 0.875rem;    /* 14px: labels, meta lines */
    --text-md: 1.0625rem;   /* 17px: body */
    --text-lg: 1.3125rem;   /* 21px: card titles */
    --text-xl: 1.625rem;    /* 26px: section headings */
    --text-2xl: 2.0625rem;  /* 33px */
    --text-3xl: 2.5625rem;  /* 41px: page titles */

    /* Space (8px steps, with 4 and 12 for tight spots) */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
    --s-6: 32px; --s-7: 48px; --s-8: 64px;

    /* Shape */
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --shadow: 0 1px 2px rgba(27, 43, 75, .05), 0 4px 16px rgba(27, 43, 75, .05);
    --shadow-lift: 0 2px 4px rgba(27, 43, 75, .07), 0 10px 28px rgba(27, 43, 75, .09);
    --page-width: 1040px;
}

/* ----------------------------------------------------------------- Base -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--text-md);
    line-height: 1.6;
}
h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--navy);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 var(--s-3);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
p { margin: 0 0 var(--s-3); }
a { color: var(--link); text-underline-offset: 0.15em; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
b, strong { font-weight: 650; }
small, .muted { color: var(--muted); font-size: var(--text-sm); }
.num { font-variant-numeric: tabular-nums; }
pre {
    white-space: pre-wrap;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    background: var(--sand);
    border-radius: var(--radius-sm);
    padding: var(--s-3) var(--s-4);
    margin: var(--s-2) 0;
}
kbd { font-size: var(--text-xs); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; background: var(--surface); }

/* ---------------------------------------------------------- Site header -- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.site-header .inner {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: var(--s-2) var(--s-4);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-2) var(--s-5);
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    text-decoration: none;
    color: var(--navy);
    min-height: 48px;
}
.brand img { height: 40px; width: auto; display: block; }
.partner-brand img { max-width: 160px; object-fit: contain; }   /* a partner's own logo (app/partners.py) */
.partner-brand span { font-family: var(--font-display); }        /* Fraunces is Clarisa's wordmark only */
.brand span {
    font-family: var(--font-brand);
    font-size: 1.625rem;
    font-weight: 560;
    letter-spacing: -0.01em;
    font-variation-settings: "opsz" 48;
}
.site-nav { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.site-nav a {
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}
.site-nav a:hover { color: var(--navy); text-decoration: underline; }

.container {
    max-width: var(--page-width);
    margin: 0 auto;
    padding: var(--s-5) var(--s-4) var(--s-8);
}

/* -------------------------------------------------------- Page heading -- */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s-4) var(--s-5);
    margin: var(--s-2) 0 var(--s-5);
}
.page-head h1 { margin: 0 0 var(--s-1); }
.page-head .meta { color: var(--muted); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); }
.page-head .actions { margin: 0; }

/* Jump links between the sections of a long page */
.section-nav {
    display: flex;
    gap: var(--s-2);
    overflow-x: auto;
    padding: 2px 2px var(--s-2);
    margin: 0 0 var(--s-4);
    scrollbar-width: thin;
}
.section-nav a {
    flex: none;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--navy);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.section-nav a:hover { border-color: var(--navy); }
.section-nav .count { color: var(--muted); font-weight: 400; margin-left: 4px; }

/* ---------------------------------------------------------------- Cards -- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: var(--s-5);
    margin-bottom: var(--s-5);
    scroll-margin-top: var(--s-4);
}
.card > h2:first-child, .card-head h2 { margin-top: 0; }
.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--s-1) var(--s-4);
    margin-bottom: var(--s-3);
}
.card-head h2 { margin: 0; }
.card-head .muted { margin: 0; }
.card .lead { color: var(--muted); margin-top: calc(-1 * var(--s-2)); }
.card > .lead:first-child { margin-top: 0; }

/* A card that asks something of the person */
.card.needs {
    background: linear-gradient(var(--honey-bg), var(--honey-bg)) padding-box;
    border: 1px solid var(--honey-line);
    box-shadow: none;
}
.card.needs > h2::before {
    content: "";
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--honey-line);
    margin-right: 10px;
    vertical-align: middle;
    position: relative; top: -3px;
}
.card.needs .muted { color: var(--honey-ink); }
.card.needs .job { background: var(--surface); border-color: var(--honey-line); }

/* An item inside a card: a job, a school, a project */
.job {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--s-4) var(--s-5);
    margin-bottom: var(--s-3);
    scroll-margin-top: var(--s-4);
}
.job:last-of-type { margin-bottom: 0; }
.job.review { border-color: var(--honey-line); box-shadow: inset 4px 0 0 var(--honey-line); }
.job .head {
    font-size: var(--text-lg);
    font-weight: 650;
    color: var(--navy);
    line-height: 1.3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1) var(--s-2);
}
.job .meta { color: var(--muted); font-size: var(--text-sm); margin-top: 2px; }
/* A job folds to its title and dates; the arrow says it opens */
.job-fold > summary { display: block; list-style: none; cursor: pointer; position: relative; padding-right: 2rem;
                     color: inherit; font-size: inherit; font-weight: inherit; min-height: 0; }
.job-fold > summary::before { display: none; }
.job-fold > summary:hover { color: inherit; text-decoration: none; }
.job-fold > summary::-webkit-details-marker { display: none; }
.job-fold > summary::after { content: ""; position: absolute; right: .25rem; top: .45rem; width: .55rem; height: .55rem;
                             border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
                             transform: rotate(45deg); transition: transform .15s; }
.job-fold[open] > summary::after { transform: rotate(-135deg); top: .7rem; }
.job-fold > summary:hover .head { text-decoration: underline; text-underline-offset: 3px; }
.job-fold > summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; border-radius: 4px; }
.job ul { margin: var(--s-3) 0 var(--s-2); padding-left: 1.25em; }
.job li { margin: 2px 0; }
.job li::marker { color: var(--muted); }
.job-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--s-1) var(--s-4);
    margin-top: var(--s-3);
    padding-top: var(--s-3);
    border-top: 1px solid var(--line);
}
.job-actions details[open] { flex-basis: 100%; }
.preview { font-size: var(--text-sm); color: var(--muted); margin: var(--s-2) 0; }
.question { font-weight: 650; color: var(--navy); margin: var(--s-3) 0 var(--s-1); }

/* Small numbers at a glance */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-3); }
.stat { background: var(--sand); border-radius: var(--radius); padding: var(--s-3) var(--s-4); color: var(--muted); font-size: var(--text-sm); }
.stat { min-width: 0; }
.stat b { overflow-wrap: break-word; hyphens: auto; }
.stat b { display: block; font-size: var(--text-xl); font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.2; }
.grid.result-figures { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }   /* hiring results: two across on a phone */
.result-figures + p { margin-top: var(--s-2); }

/* Label / value rows (contact details, settings) */
.rows { margin: 0; }
.rows > div {
    display: grid;
    grid-template-columns: minmax(120px, 200px) 1fr;
    gap: var(--s-1) var(--s-4);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--line);
}
.rows > div:first-child { border-top: 0; padding-top: 0; }
.rows dt { color: var(--muted); font-size: var(--text-sm); font-weight: 600; padding-top: 2px; }
.rows dd { margin: 0; min-width: 0; }
.rows dd.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table.visits { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
table.visits th, table.visits td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
table.visits thead th { color: var(--muted); font-weight: 600; }
/* Admin: social media followers over 90 days (app/social_stats.py); a missing day is a gap */
.social-chart { margin: var(--s-4) 0 0; }
.social-chart figcaption { font-size: var(--text-sm); margin-bottom: var(--s-1); }
.social-chart svg { display: block; width: 100%; height: 90px; overflow: visible; }
.social-chart polyline { fill: none; stroke: var(--navy); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.social-chart .dot { stroke-width: 6; stroke-linecap: round; }   /* a day on its own, between gaps */
.social-chart .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.social-entry { margin-top: var(--s-4); }
.social-entry summary { cursor: pointer; font-weight: 600; }

/* -------------------------------------------------------------- Buttons --
   Primary: the one main action in a place. Secondary: an equal alternative.
   Quiet (.link): small actions that sit in text. Danger: removing things. */
button, a.button, .button {
    font: inherit;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-2);
    min-height: 44px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--navy);
    background: var(--navy);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
button:hover, a.button:hover, .button:hover { background: var(--navy-hover); border-color: var(--navy-hover); color: #fff; }
button.secondary-plain, a.button.secondary, .button.secondary {
    background: var(--surface);
    color: var(--navy);
    border-color: var(--navy);
}
button.secondary-plain:hover, a.button.secondary:hover, .button.secondary:hover { background: var(--chip-bg); color: var(--navy); }
button.secondary {   /* the outlined "remove" style */
    background: var(--surface);
    color: var(--danger);
    border-color: var(--blush-line);
}
button.secondary:hover { background: var(--blush-bg); color: var(--danger); border-color: var(--danger); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.danger:hover { background: #87191F; border-color: #87191F; }
button.link {
    background: none;
    border: 0;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    color: var(--link);
    font-size: var(--text-sm);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
button.link:hover { background: none; color: var(--navy); }
button.link.danger { color: var(--danger); background: none; }
button.small, a.button.small { min-height: 36px; padding: 6px 14px; font-size: var(--text-sm); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-3); }

/* ---------------------------------------------------------------- Forms -- */
form { margin: 0; }
form.edit, form.inline-add {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: var(--s-3) var(--s-4);
    margin-top: var(--s-3);
}
form.edit.desc, form.occ-form, form.review { display: block; }
form.edit.desc button, form.occ-form button { margin-top: var(--s-3); }
/* Longer forms, one field per line (the self-employment program page) */
form.edit.stacked { display: block; }
form.edit.stacked > label { display: block; margin: var(--s-3) 0 var(--s-1); }
form.edit.stacked > label.check { display: flex; gap: var(--s-2); align-items: center; }
form.edit.stacked > input:not([type=checkbox]):not([type=hidden]), form.edit.stacked > select,
form.edit.stacked > textarea { display: block; width: 100%; max-width: 36rem; }
form.edit.stacked > button { margin-top: var(--s-3); }
/* A milestone: its tick box and name on one line, then its date and note */
.milestones form.edit > label.check { flex: 1 1 100%; display: flex; flex-direction: row; justify-content: flex-start;
    gap: var(--s-2); align-items: center; }
.milestones form.edit > label.check input { width: 1.25rem; height: 1.25rem; margin: 0; }
.summary-form textarea { width: 100%; }
.credentials-offered { margin-top: var(--s-5); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.credential-offer { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); justify-content: space-between; align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.credential-offer:last-child { border-bottom: 0; }
.credential-offer > div:first-child { flex: 1 1 320px; }
.credential-offer p { margin: var(--s-1) 0 0; }
.credential-offer a.small { font-size: var(--text-sm); font-weight: 400; margin-left: var(--s-1); white-space: nowrap; }
.credential-offer .offer-actions { display: flex; gap: var(--s-3); align-items: center; }
#summary .summary-text { margin: 0 0 var(--s-2); }
#summary > .actions { align-items: center; gap: var(--s-3); flex-wrap: wrap; }
form.inline, form.chip-x, form.remove { display: inline; }
label {
    display: flex;
    flex-direction: column;
    gap: var(--s-1);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
}
label.inline { flex-direction: row; align-items: center; gap: var(--s-2); font-weight: 400; font-size: var(--text-md); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search],
input[type=password], input[type=url], select, textarea {
    font: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--surface);
    border: 1.5px solid var(--field-border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    min-height: 44px;
    max-width: 100%;
}
input[type=text], input[type=tel], form.edit input[type=email] { width: 300px; }
input[type=number] { width: 120px; font-variant-numeric: tabular-nums; }
input[type=search], form.desc textarea, label textarea { width: 100%; }
textarea { line-height: 1.5; }
select { padding-right: 32px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
input::placeholder, textarea::placeholder { color: #7A8293; }
input[type=radio], input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy); margin: 0; }
input[type=file] { font: inherit; font-size: var(--text-sm); }
fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--s-2) var(--s-4) var(--s-3);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-2) var(--s-4);
}
legend { font-size: var(--text-sm); font-weight: 600; padding: 0 var(--s-1); }
.pair { display: flex; gap: var(--s-2); align-items: center; }
form.inline-add input[type=text] { flex: 1 1 240px; }
input.note { flex: 1; min-width: 200px; }

/* ---------------------------------------------------- Show more / Edit --
   <details> used for "Edit", "Change", "Add a job": a quiet link that opens
   a panel underneath. */
details > summary {
    cursor: pointer;
    color: var(--link);
    font-size: var(--text-sm);
    font-weight: 600;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
    content: "";
    width: 7px; height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .15s;
    margin-right: 2px;
}
details[open] > summary::before { transform: rotate(45deg); }
details > summary:hover { color: var(--navy); text-decoration: underline; }
details[open] > :not(summary) { margin-top: var(--s-2); }
details.add {
    margin-top: var(--s-4);
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
    padding: var(--s-3) var(--s-4);
}
details.add > summary { font-size: var(--text-md); }
details.add[open] { border-style: solid; background: var(--sand); }
details.remove-ask { display: inline-block; }
details.remove-ask > summary { color: var(--danger); }
details.remove-ask > summary::before { display: none; }
details.remove-ask[open] {
    display: block;
    background: var(--blush-bg);
    border-radius: var(--radius-sm);
    padding: var(--s-2) var(--s-3);
}
details.remove-ask form.remove span { margin-right: var(--s-2); color: var(--blush-ink); font-size: var(--text-sm); }

/* ---------------------------------------------------------------- Chips -- */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--chip-bg);
    color: var(--navy);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    font-size: var(--text-sm);
    line-height: 1.4;
}
.chip-x button, .chip-q {
    background: none;
    border: 0;
    min-height: 0;
    padding: 0;
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 600;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
}
.chip-q { border: 1px solid var(--field-border); width: 18px; height: 18px; font-size: 11px; margin-left: 6px; }
.chip-q:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-x button:hover { background: var(--blush-bg); color: var(--danger); }
/* The credential wallet (profile certifications): one row per credential */
ul.wallet { list-style: none; margin: 0; padding: 0; }
ul.wallet > li { margin-bottom: var(--s-2); }
ul.wallet > li > .chip { margin-right: var(--s-1); }
ul.wallet details.add { margin-top: var(--s-1); }
.wallet-form fieldset { border: 0; padding: 0; margin: var(--s-2) 0; }
.wallet-form fieldset input[type=date] { margin-right: var(--s-2); }
/* Filling in a program form (program_fill.html): each field under its tick box; job rows scroll sideways on a phone */
.fill-field { margin-bottom: var(--s-2); }
.table-scroll { overflow-x: auto; max-width: 100%; }
.fill-rows { border-collapse: collapse; }
.fill-rows th { text-align: left; font-size: var(--text-sm); padding: var(--s-1); }
.fill-rows td { padding: 2px var(--s-1); }
.fill-rows input[type=text] { min-width: 9rem; }

/* --------------------------------------------------------------- Badges -- */
.badge {
    display: inline-block;
    background: var(--honey-bg);
    color: var(--honey-ink);
    border-radius: var(--radius-pill);
    padding: 1px 10px;
    font-size: var(--text-xs);
    font-weight: 650;
    font-family: var(--font-body);
    letter-spacing: 0.01em;
    vertical-align: middle;
}
.badge.mine, .badge.kind-update { background: var(--info-bg); color: var(--navy); }
.badge.kind-add, .badge.good { background: var(--sage-bg); color: var(--sage-ink); }
.badge.kind-restore { background: var(--sand); color: var(--muted); }
label.inline.sub-choice { margin-left: 1.75rem; font-size: 0.95em; }   /* "Also send that it was confirmed", under its job */

/* -------------------------------------------------------------- Notices -- */
.notice {
    border-radius: var(--radius);
    padding: var(--s-3) var(--s-4);
    margin-bottom: var(--s-4);
    border: 1px solid transparent;
}
.notice.ok { background: var(--sage-bg); color: var(--sage-ink); border-color: var(--sage-line); }
.notice.err { background: var(--blush-bg); color: var(--blush-ink); border-color: var(--blush-line); }
.notice.warn { background: var(--honey-bg); color: var(--honey-ink); border-color: var(--honey-line); }
.notice a { color: inherit; font-weight: 650; }
.notice.info { background: var(--info-bg); color: var(--navy); border-color: var(--info-line); }
#coach p, #coach-tips p { margin: 0 0 var(--s-2); }
ul.coach { margin: 0 0 var(--s-2); padding-left: 1.2em; }
ul.coach li { margin-bottom: var(--s-1); }
#draft textarea { display: block; width: 100%; margin-top: var(--s-1); }

/* A self-employment program's rules in short (/program) */
.rules dt { font-weight: 650; margin-top: var(--s-4); }
.rules dt:first-child { margin-top: 0; }
.rules dd { margin: 0; }
.rules dd p { margin: var(--s-1) 0; }
.rules .source { font-size: var(--text-sm); }

/* Side notes inside a job: "shown as one job", "add what you did" */
.same-job-note, .add-what, .placement {
    border-radius: var(--radius);
    padding: var(--s-3) var(--s-4);
    margin: var(--s-3) 0;
    font-size: var(--text-md);
}
.same-job-note { background: var(--info-bg); color: var(--navy); border: 1px solid var(--info-line); }
.add-what { background: var(--honey-bg); border: 1px solid var(--honey-line); }
.add-what .muted { color: var(--honey-ink); }
.add-what p:last-child { margin-bottom: 0; }
.add-what .typical ul { margin: var(--s-1) 0 0 1.2em; padding: 0; }
.placement { background: var(--sand); margin-left: var(--s-4); }
.occ-line { font-size: var(--text-sm); color: var(--muted); margin: 2px 0 0; }
.occ-line i { font-style: normal; }

/* -------------------------------------------- Choosing an occupation -- */
.occ-confirm { margin: var(--s-2) 0; }
.occ-guess { margin-bottom: var(--s-3); }
.occ-confirm .actions { margin: var(--s-3) 0 var(--s-2); }
.duties { display: block; font-size: var(--text-sm); color: var(--text); margin: 2px 0; }
.examples { font-size: var(--text-sm); color: var(--muted); }
.occ-guess .examples { display: block; }
label.occ {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: var(--s-2);
    cursor: pointer;
    font-weight: 400;
    font-size: var(--text-md);
    background: var(--surface);
}
label.occ:hover { border-color: var(--field-border); }
label.occ:has(input:checked) { border-color: var(--navy); background: var(--info-bg); }
label.occ input { margin-top: 4px; }
.occ-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.occ-head { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: baseline; }
form.occ-form .occ-search { margin: var(--s-2) 0; }
.role-label { margin: var(--s-3) 0 var(--s-1); }
.suggestion {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--s-1) var(--s-3);
    padding: var(--s-2) 0;
    border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------- Tables -- */
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td.words del { background: var(--blush-bg); color: var(--blush-ink); }
td.words ins { background: var(--sage-bg); color: var(--sage-ink); text-decoration: none; }
table.diff td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }

/* ------------------------------------------------- Review list (imports) -- */
label.change {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--line);
    font-weight: 400;
    font-size: var(--text-md);
    cursor: pointer;
}
label.change:last-child { border-bottom: 0; }
label.change input { margin-top: 4px; }
.change .what { display: flex; flex-direction: column; gap: var(--s-1); flex: 1; min-width: 0; }
.change .note { color: var(--honey-ink); font-size: var(--text-sm); }

/* --------------------------------------------------- Progress and tabs -- */
.progress { height: 8px; background: var(--chip-bg); border-radius: var(--radius-pill); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--navy); border-radius: var(--radius-pill); }
.tabs { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.tabs a {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--navy);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: 600;
}
.tabs a.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* --------------------------------------------------------------- Dialog -- */
dialog {
    max-width: 480px;
    width: calc(100% - 32px);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lift);
    padding: var(--s-5);
    color: var(--text);
}
dialog::backdrop { background: rgba(27, 43, 75, .35); }
.beta-dialog { max-width: 640px; }
.beta-dialog h2 { margin: 0 0 var(--s-3); }
.beta-dialog-body { max-height: min(60vh, 520px); overflow-y: auto; padding-right: var(--s-2); }
.beta-dialog .dialog-actions { display: flex; gap: var(--s-3); margin-top: var(--s-4); }
.beta-accept { margin: var(--s-3) 0; }
label.beta-agree[hidden] { display: none; }   /* replaced by the pop-up when JavaScript runs */
.beta-accept .ok { color: var(--sage-ink); font-weight: 600; }
#skill-dialog h3 { margin: 0 32px var(--s-2) 0; text-transform: capitalize; }
#skill-dialog .dialog-close { position: absolute; top: 10px; right: 12px; margin: 0; }
#skill-dialog .dialog-close button {
    background: none; border: 0; color: var(--muted);
    font-size: 22px; min-height: 0; width: 36px; height: 36px; padding: 0; border-radius: 50%;
}
#skill-dialog .dialog-close button:hover { background: var(--chip-bg); color: var(--navy); }
#skill-dialog .related { border-left: 3px solid var(--line); padding: 2px var(--s-3); margin: var(--s-2) 0; }
#skill-dialog .related p { margin: var(--s-1) 0; font-size: var(--text-sm); }
#skill-dialog .dialog-actions { margin-top: var(--s-4); }

/* ------------------------------------------------------ Page sections --
   Pieces the profile introduced; any page can use them. */
.count {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 7px;
    margin-left: 6px;
    border-radius: var(--radius-pill);
    background: var(--chip-bg);
    color: var(--navy);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 650;
    text-align: center;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.section-nav .count { background: none; padding: 0; min-width: 0; margin-left: 6px; color: var(--muted); font-weight: 400; }
.card.needs .count { background: var(--honey-line); color: #3D2903; }
.card.needs .lead { color: var(--honey-ink); }
/* One question inside "Needs your answer" */
.ask {
    background: var(--surface);
    border: 1px solid var(--honey-line);
    border-radius: var(--radius);
    padding: var(--s-4) var(--s-5);
    margin-top: var(--s-3);
    scroll-margin-top: var(--s-4);
}
.ask h3 { font-size: var(--text-lg); margin-bottom: var(--s-1); }
.card.needs .ask .muted { color: var(--muted); }
.ask .not-mine { margin-top: var(--s-3); }
/* A quiet block inside a card: suggestions, extra lists */
.panel {
    background: var(--sand);
    border-radius: var(--radius);
    padding: var(--s-4) var(--s-5);
    margin-top: var(--s-4);
}
.panel h3 { font-size: var(--text-md); font-family: var(--font-body); font-weight: 650; margin-bottom: var(--s-1); }
.panel .suggestion:first-of-type { border-top: 0; }
.suggestion .choice { margin-left: auto; display: inline-flex; align-items: center; gap: var(--s-3); }
h3.sub {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 650;
    color: var(--muted);
    margin: var(--s-4) 0 var(--s-2);
}
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-4) var(--s-5); }   /* row gap: stacked on a phone */
.two-col h3.sub { margin-top: 0; }
.job .wording { margin: 0 0 var(--s-2); }
.job-skills { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-3); }
.job-skills .chip { background: var(--sand); font-size: var(--text-xs); padding: 2px 10px; }
.job-actions > a { font-size: var(--text-sm); font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; }
.ws-ask { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: var(--s-3) 0 0; }
label.wide, p.wide { flex-basis: 100%; }
.small-link { font-size: var(--text-sm); font-weight: 600; }
.card.quiet { background: transparent; box-shadow: none; border-style: dashed; }
.card.quiet details + details { margin-top: var(--s-2); }

/* ------------------------------------------------------------- Matches -- */
/* Score ring: the ring fills to the score, the number sits inside, so the
   score never depends on colour alone */
.score {
    --size: 64px;
    flex: 0 0 var(--size);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: conic-gradient(var(--navy) calc(var(--score) * 1%), var(--chip-bg) 0);
    display: grid;
    place-items: center;
}
.score span {
    width: calc(var(--size) - 12px);
    height: calc(var(--size) - 12px);
    border-radius: 50%;
    background: var(--surface);
    display: grid;
    place-items: center;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}
.card.match { display: flex; gap: var(--s-5); align-items: flex-start; }
.match-body { flex: 1; min-width: 0; }
.match-body h2 { font-size: var(--text-lg); margin: 0 0 2px; }
.match-body h2 a { color: var(--navy); text-decoration-thickness: 1px; }
.match-body .meta { color: var(--muted); font-size: var(--text-sm); }
.facts {
    list-style: none;
    padding: 0;
    margin: var(--s-3) 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}
.facts li { background: var(--sand); border-radius: var(--radius); padding: 3px 12px; font-size: var(--text-sm); }
.also-in { font-size: var(--text-sm); color: var(--muted); margin: var(--s-2) 0 0; }
.closer-note { font-size: var(--text-sm); margin: var(--s-2) 0 0; }
.far-jobs { padding-left: 0; list-style: none; }
.far-jobs li { padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.drive-for-pay { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-top: var(--s-2); }
.why-list { margin: 0 0 var(--s-2); padding-left: 1.4em; }
.why-list li { margin: 3px 0; padding-left: 4px; }
.why-list.good li::marker { content: "+"; color: var(--sage-ink); font-weight: 700; }
.why-list.gap li::marker { content: "–"; color: var(--danger); font-weight: 700; }
.training { margin: var(--s-2) 0 0; padding-left: 1.2em; font-size: var(--text-sm); }
.training li { margin: var(--s-1) 0; }
.job-notes { font-size: var(--text-sm); color: var(--honey-ink); background: var(--honey-bg); border-radius: var(--radius-sm); padding: var(--s-2) var(--s-3); margin: var(--s-3) 0 0; }
.match-actions { margin-top: var(--s-4); display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; }
/* What the person's limits hid */
.hidden-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--s-1) var(--s-4);
    padding: var(--s-3) 0;
    border-top: 1px solid var(--line);
}
.hidden-row:first-of-type { border-top: 0; padding-top: 0; }
.hidden-row .count-big { min-width: 72px; font-size: var(--text-lg); font-weight: 700; color: var(--navy); }
.hidden-row .why { flex: 1 1 260px; }

/* ---------------------------------------------------------- Task pages --
   One job at a time (polish, pick skills, a resume for a job): a narrower
   column so lines stay easy to read. */
.task { max-width: 760px; margin: 0 auto; }
.task.wide { max-width: var(--page-width); }
h1.card-title { font-size: var(--text-2xl); margin-bottom: var(--s-2); }
.steps { color: var(--muted); font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--s-1); }
form.stack { display: block; }
form.stack > label:not(.inline):not(.duty):not(.pill) { margin: var(--s-4) 0 var(--s-1); }
form.stack > label:first-child, form.stack > input[type=hidden]:first-child + label { margin-top: 0; }
form.stack input[type=text], form.stack textarea { width: 100%; }
form.stack input.strong { font-weight: 650; }
form.stack + form.stack { margin-top: var(--s-2); }
form.stack .actions { margin-top: var(--s-5); margin-bottom: 0; }
.quiet-actions { gap: var(--s-5); }
/* "What's sent to the AI service": said plainly before anything is sent */
.ai-note {
    background: var(--info-bg);
    border: 1px solid var(--info-line);
    border-radius: var(--radius);
    padding: var(--s-3) var(--s-4);
    font-size: var(--text-sm);
    margin: var(--s-3) 0 var(--s-4);
}
/* "Check this": something Clarisa added that the person should confirm */
.check-note {
    color: var(--honey-ink);
    background: var(--honey-bg);
    border-radius: var(--radius-sm);
    padding: var(--s-2) var(--s-3);
    font-size: var(--text-sm);
    margin: var(--s-2) 0;
}
.your-lines { padding-left: 1.4em; margin: var(--s-2) 0 var(--s-4); }
.your-lines li { margin: var(--s-1) 0; }
.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.side-by-side > div:first-child { color: var(--muted); }
.bullet-edit { margin-bottom: var(--s-4); }
.bullet-edit textarea { width: 100%; margin: var(--s-1) 0; field-sizing: content; min-height: 3.5em; }
/* Tick-a-pill choices (which skills fit this line) */
.ws-line { border-top: 1px solid var(--line); padding: var(--s-4) 0; }
.ws-line:first-of-type { border-top: 0; padding-top: 0; }
.said { margin-bottom: var(--s-3); }
.said q { quotes: "“" "”"; font-style: italic; }
.pick-pills { display: flex; flex-wrap: wrap; gap: var(--s-2); }
label.pill {
    flex-direction: row;
    align-items: center;
    gap: var(--s-2);
    padding: 7px 14px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    background: var(--surface);
    min-height: 40px;
}
label.pill:hover { border-color: var(--field-border); }
label.pill:has(input:checked) { border-color: var(--navy); background: var(--info-bg); }
label.pill.have { color: var(--muted); cursor: default; background: var(--sand); border-color: var(--sand); }
label.pill.none { border-style: dashed; }
/* Choosing one kind of work: same look as the occupation choices */
label.duty {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: var(--s-2);
    cursor: pointer;
    font-weight: 400;
    font-size: var(--text-md);
    background: var(--surface);
}
label.duty:hover { border-color: var(--field-border); }
label.duty:has(input:checked) { border-color: var(--navy); background: var(--info-bg); }
label.duty input { margin-top: 4px; }
.pick { background: var(--sand); border-radius: var(--radius); padding: var(--s-4) var(--s-5); margin: var(--s-3) 0 var(--s-4); }
.pick .name { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; color: var(--navy); line-height: 1.25; }
.pick ul { margin: var(--s-2) 0 0; padding-left: 1.2em; }
.pick .examples { margin-top: var(--s-2); }
details.not-quite { margin-top: var(--s-5); }
details.not-quite form, .not-quite > form { margin-top: var(--s-3); }
.not-quite .occ-search { width: 100%; margin-bottom: var(--s-3); }

/* ------------------------------------------------------ Upload, lists -- */
label.drop {
    flex: 1 1 320px;
    border: 1.5px dashed var(--field-border);
    border-radius: var(--radius);
    background: var(--sand);
    padding: var(--s-4);
}
label.drop .muted, label .muted { font-weight: 400; }
input[type=file]::file-selector-button {
    font: inherit;
    font-weight: 650;
    margin-right: var(--s-3);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--navy);
    background: var(--surface);
    color: var(--navy);
    cursor: pointer;
}
input[type=file]::file-selector-button:hover { background: var(--chip-bg); }
.table-wrap { overflow-x: auto; }
table.list { font-size: var(--text-md); }
table.list th { font-size: var(--text-sm); }
table.list tbody tr:hover, table.list tr:hover td { background: var(--sand); }
table.list td a { font-weight: 600; }
/* Buttons that stay in reach at the bottom of a long form */
.action-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-3);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -6px 20px rgba(27, 43, 75, .08);
    padding: var(--s-3) var(--s-5);
    margin-top: var(--s-5);
}
label.change .badge { align-self: flex-start; }

/* --------------------------------------------------------- Signing in -- */
.task.narrow { max-width: 480px; }
.card form + p.muted { margin: var(--s-4) 0 0; }
.danger-zone { border-color: var(--blush-line); }
.danger-zone h2 { color: var(--blush-ink); }
.or { display: flex; align-items: center; gap: var(--s-3); color: var(--muted); margin: 0 0 var(--s-5); font-size: var(--text-sm); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.found { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); background: var(--sage-bg); color: var(--sage-ink);
         border-radius: var(--radius); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); }
.found b { font-size: var(--text-lg); }
form.stack label.drop { margin: 0; }
.center { text-align: center; }
.password-field { display: flex; gap: var(--s-2); align-items: center; }
.password-field input { flex: 1; min-width: 0; }
.password-field .show-password { padding: 0 var(--s-2); min-height: 44px; }
form.stack input[type=email], form.stack input[type=password] { width: 100%; }
.site-nav .button.small { color: #fff; min-height: 36px; }
.site-nav .button.small:hover { text-decoration: none; }
button.nav-button {
    background: none; border: 0; padding: 0; min-height: 44px; border-radius: 0;
    color: var(--muted); font-size: var(--text-sm); font-weight: 600;
}
button.nav-button:hover { background: none; color: var(--navy); text-decoration: underline; }

/* ------------------------------------------------------------ Homepage -- */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--s-7);
    align-items: center;
    padding: var(--s-6) 0 var(--s-7);
}
.eyebrow { color: var(--link); font-weight: 650; font-size: var(--text-sm); margin-bottom: var(--s-2); }
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); line-height: 1.1; margin-bottom: var(--s-4); }
.hero-lead { font-size: var(--text-lg); line-height: 1.5; color: var(--text); }
.hero .actions { margin: var(--s-5) 0 var(--s-3); }
.hero-example { margin: 0; }
.hero-example .card { margin-bottom: var(--s-2); box-shadow: var(--shadow-lift); }
.hero-example figcaption { text-align: center; }
.home-section { padding: var(--s-6) 0; }
.home-section > h2 { font-size: var(--text-2xl); margin-bottom: var(--s-5); }
.steps-list { list-style: none; counter-reset: step; padding: 0; margin: 0;
              display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-5); }
.steps-list li { counter-increment: step; }
.steps-list li::before {
    content: counter(step);
    display: grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--navy); color: #fff; font-weight: 700;
    margin-bottom: var(--s-3);
}
.steps-list h3, .feature h3 { font-size: var(--text-lg); margin-bottom: var(--s-2); }
.steps-list p, .feature p { color: var(--text); margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-5); }
.feature-grid .card { margin: 0; }
.feature-grid.pairs { grid-template-columns: repeat(2, 1fr); }
.pledge-list { list-style: none; padding: 0; margin: 0; display: grid;
               grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-6); }
.pledge-list li { padding-left: var(--s-5); position: relative; }
.pledge-list li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 10px;
                          border-radius: 50%; background: var(--pearl); border: 1.5px solid var(--sage-line); }
.pledge-list b { color: var(--navy); }
.home-cta { text-align: center; padding: var(--s-7) var(--s-5); margin-top: var(--s-6); }
.home-cta h2 { max-width: 640px; margin: 0 auto var(--s-5); font-size: var(--text-2xl); }
.home-cta .actions { justify-content: center; margin: 0; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-2) var(--s-5);
               color: var(--muted); font-size: var(--text-sm); padding: var(--s-6) 0 0; border-top: 1px solid var(--line);
               margin-top: var(--s-7); }
@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; gap: var(--s-5); padding-top: var(--s-3); }
    .pledge-list, .feature-grid.pairs { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- About page -- */
.about-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); margin: var(--s-4) 0 var(--s-5); }
.about-head img { width: 160px; height: 160px; object-fit: cover; object-position: top; border-radius: 50%;
                  border: 4px solid var(--surface); box-shadow: var(--shadow-lift); }
.about-head h1 { margin-bottom: var(--s-2); }
.about-head .lead { font-size: var(--text-lg); color: var(--text); margin: 0; }
.about-text h2 { font-size: var(--text-xl); margin-top: var(--s-5); }
.about-text ul { padding-left: 1.2em; }
.about-text li { margin: var(--s-1) 0; }
/* The signature writes itself. The "Clarisa" letters (traced from the Great
   Vibes script font, SIL OFL) are uncovered by a pen: thick strokes along the
   middle of each letter, walked like a pen: straight on through crossings,
   one stroke after another at a steady speed (the times are in the SVG). */
.signature { margin-top: var(--s-5); max-width: 300px; }
.signature svg { width: 100%; height: auto; display: block; }
.sig-ink { fill: var(--navy); }
.sig-pen path {
    fill: none; stroke: #fff; stroke-width: 115; stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 1 1; stroke-dashoffset: 1;
    animation-name: sig-draw; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes sig-draw { to { stroke-dashoffset: 0; } }
/* Once it's written, a pearl sheen (the logo's colours) glides across the ink once */
.sig-sheen { mix-blend-mode: screen; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
    .sig-pen path { animation: none; stroke-dashoffset: 0; }
    .sig-sheen { display: none; }
}

.still-job { margin-bottom: var(--s-3); }
.still-job > legend { font-weight: 650; color: var(--navy); font-size: var(--text-md); }

.found-jobs { list-style: none; padding: 0; margin: 0 0 var(--s-3); }
.found-jobs li { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3);
                 padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.found-jobs li:first-child { border-top: 0; }
.check-found form.actions { margin: var(--s-3) 0 0; }

/* Duty suggestions under "What did you do?" */
.duty-suggest {
    flex-basis: 100%;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
    box-shadow: var(--shadow); padding: var(--s-2); margin-top: var(--s-1);
    display: flex; flex-direction: column; gap: 2px;
}
.duty-suggest[hidden] { display: none; }
.duty-suggest p { margin: 0 var(--s-2) var(--s-1); }
button.duty-pick {
    background: none; border: 0; border-radius: var(--radius-sm); color: var(--text);
    font-weight: 400; font-size: var(--text-sm); text-align: left; justify-content: flex-start;
    min-height: 40px; padding: 6px var(--s-3); line-height: 1.4;
}
button.duty-pick:hover, button.duty-pick:focus-visible { background: var(--info-bg); color: var(--navy); }

.keyword-search { margin: 0 0 var(--s-5); }
.keyword-search label { margin-bottom: var(--s-1); }
.keyword-search .pair { flex-wrap: wrap; gap: var(--s-2) var(--s-3); }
.keyword-search input[type=search] { flex: 1 1 260px; width: auto; }
.keyword-search p { margin: var(--s-2) 0 0; }

/* The beta: a small tag by the wordmark, the terms, the agree box */
.site-header .inner > .beta-tag { margin-right: auto; margin-left: calc(-1 * var(--s-3)); }
.beta-tag {
    font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--navy); background: var(--pearl); border: 1px solid var(--info-line);
    border-radius: var(--radius-pill); padding: 2px 9px; text-decoration: none;
}
.beta-terms h3 { font-size: var(--text-lg); margin: var(--s-5) 0 var(--s-2); }
.beta-terms ul { padding-left: 1.2em; }
.beta-terms li { margin: var(--s-1) 0; }
label.beta-agree { align-items: flex-start; font-size: var(--text-sm); margin: var(--s-4) 0 0; background: var(--sand);
                   border-radius: var(--radius-sm); padding: var(--s-3); }
label.beta-agree input { margin-top: 3px; flex: none; }

/* Admin */
form.admin-switch { display: inline-block; margin-left: var(--s-3); }
.invite-made label { color: var(--sage-ink); }
.invite-made input[type=text] { flex: 1 1 320px; width: auto; }
.admin-account .head { font-size: var(--text-md); }

/* A saved message that floats in at the bottom, then steps aside */
.toast {
    position: fixed;
    left: 50%;
    bottom: var(--s-5);
    transform: translateX(-50%);
    z-index: 10;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 0;
    box-shadow: var(--shadow-lift);
    animation: toast 7s ease forwards;
}
@keyframes toast {
    0% { opacity: 0; transform: translate(-50%, 12px); }
    5%, 85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 12px); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    .toast { animation: none; position: static; transform: none; width: auto; max-width: none; margin-bottom: var(--s-4); }
}

/* ---------------------------------------------------------- Pearl touch -- */
.pearl-edge { position: relative; overflow: hidden; }
.pearl-edge::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--pearl);
}

/* ----------------------------------------------------------- Phone size -- */
@media (max-width: 640px) {
    :root { --text-3xl: 2.0625rem; --text-xl: 1.4375rem; }
    .container { padding-top: var(--s-4); }
    .card { padding: var(--s-4); border-radius: var(--radius); }
    .job { padding: var(--s-3) var(--s-4); }
    .rows > div { grid-template-columns: 1fr; }
    .brand img { height: 34px; }
    .brand span { font-size: 1.375rem; }
    input[type=text] { width: 100%; }
    form.edit > label { flex: 1 1 100%; }
    .page-head .actions { width: 100%; }
    .card.match { flex-direction: column; gap: var(--s-2); }
    .side-by-side { grid-template-columns: 1fr; gap: var(--s-3); }
    h1.card-title { font-size: var(--text-xl); }
    .score { --size: 52px; }
    .score span { font-size: var(--text-md); }
}

/* Matches: the kinds of work the person wants, first */
.list-head { margin: var(--s-6) 0 var(--s-2); }
.list-note { margin: 0 0 var(--s-4); }
.inline-form { display: inline; margin-left: .35rem; }
.match .band { margin: var(--s-1) 0 0; text-align: center; font-size: var(--text-sm); font-weight: 650; color: var(--navy); }
/* The tabs across a person's own pages (_profile_tabs.html) */
.profile-tabs { display: flex; gap: var(--s-1); overflow-x: auto; margin: var(--s-4) 0 var(--s-5);
                border-bottom: 1px solid var(--line); }
/* Still swipes sideways on a narrow screen, with no scrollbar beside or under the tabs */
.profile-tabs { overflow-y: hidden; scrollbar-width: none; }
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tabs a { padding: var(--s-2) var(--s-3); color: var(--muted); font-weight: 600; text-decoration: none;
                  border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.profile-tabs a:hover { color: var(--navy); }
.sort-by { margin: var(--s-2) 0 0; font-size: var(--text-sm); }
.sort-by a[aria-current] { font-weight: 700; color: var(--navy); text-decoration: none; }
.sort-by p { margin: var(--s-1) 0 0; }
.chip.choose { cursor: pointer; }
.chip.choose input { margin: 0 .3rem 0 0; }
.profile-tabs a[aria-current="page"] { color: var(--navy); border-bottom-color: var(--navy); }
/* "Skip to main content": the first Tab stop on every page, shown only when it has focus */
.skip-link { position: absolute; left: var(--s-3); top: -100px; z-index: 100; padding: var(--s-2) var(--s-3);
    background: var(--surface); color: var(--navy); border: 2px solid var(--navy); border-radius: 6px; font-weight: 650; }
.skip-link:focus { top: var(--s-3); }
#main:focus { outline: none; }      /* reached by the skip link: the page itself, not a control */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.applications { list-style: none; padding: 0; margin: 0; }
.applications li { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.applications li:last-child { border-bottom: 0; }
.posting-text { margin: var(--s-3) 0; }
.posting-text h3 { margin: var(--s-4) 0 var(--s-2); }
.posting-text ul { margin: var(--s-2) 0; padding-left: 1.25rem; }
.posting-text p { margin: var(--s-2) 0; }
.posting-form > .wide { flex: 1 1 100%; }
.posting-form textarea { width: 100%; min-height: 18em; display: block; margin-top: var(--s-2); }
.posting-form label.wide > .muted { display: block; font-weight: normal; }
.posting-form fieldset.needs { display: grid; gap: var(--s-3); }
.posting-form fieldset.needs input[type=text] { width: 100%; }
.posting-form fieldset.conditions { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--s-3) var(--s-4); }
.posting-form fieldset.conditions > .muted { grid-column: 1 / -1; margin: 0; }
.posting-form fieldset.conditions select { display: block; margin-top: var(--s-1); max-width: 100%; }
.posting-form fieldset.accommodations details { margin-top: var(--s-2); }
.accommodations-note, .indigenous-line { margin: var(--s-3) 0; padding: var(--s-2) var(--s-3); border-left: 3px solid var(--line); }
/* A business's own posting on Clarisa, shown to job seekers (_clarisa_posting.html) */
.clarisa-mark { font-weight: 600; color: var(--navy); }
.clarisa-posting { margin: var(--s-2) 0; }
.clarisa-posting p { margin: var(--s-1) 0; }
/* Applying through Clarisa: what the business will get */
.apply-preview dl.sent { display: grid; grid-template-columns: max-content 1fr; gap: var(--s-1) var(--s-3); margin: var(--s-3) 0; }
.apply-preview dl.sent dt { font-weight: 600; }
.apply-preview dl.sent dd { margin: 0; overflow-wrap: anywhere; }
.apply-preview .sent-list p { margin: var(--s-1) 0; }
.apply-choose fieldset { margin: var(--s-3) 0; }
.clarisa-posting .clarisa-label { font-weight: 600; margin-top: var(--s-2); }
.clarisa-posting ul { margin: var(--s-1) 0; padding-left: 1.2rem; }
.posting-form .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: var(--s-1) var(--s-4); }
.posting-form .checks .label { grid-column: 1 / -1; font-weight: 600; }
.posting-form .buttons { display: flex; gap: var(--s-3); flex-wrap: wrap; }
fieldset.pay .pair { flex-wrap: wrap; align-items: flex-end; }
.wanted-tag { display: inline-block; margin: 0 0 .4rem; padding: .1rem .6rem; border-radius: 999px;
              background: var(--sage-bg); color: var(--sage-ink); font-size: var(--text-sm); }

/* Find jobs: filters, and the ad text in two lines that open in place */
.job-search .filters { margin-top: var(--s-3); gap: var(--s-3); }
.job-search .filters label { margin: 0; font-size: var(--text-sm); }
.job-search .filters select { display: block; margin-top: var(--s-1); }
.job-summary { margin: var(--s-2) 0 0; font-size: var(--text-sm); }
.job-text { margin-top: var(--s-2); font-size: var(--text-sm); }
details.job-text > summary { display: block; cursor: pointer; list-style: none; color: var(--text); font-weight: 400; }
details.job-text > summary::before { display: none; }
.job-text summary::-webkit-details-marker { display: none; }
.job-text .preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.job-text .more, .job-text .less { color: var(--navy); text-decoration: underline; }
.job-text .less, .job-text[open] .preview, .job-text[open] .more { display: none; }
.job-text[open] .less { display: inline; }
.job-text[open] p { margin-top: var(--s-1); }
.job-text p { margin: 0; }

/* Find jobs: the public job search */
.job-search .pair { align-items: flex-end; }
.job-search label.grow { flex: 1 1 220px; margin: 0; }
.job-search label.grow input[type=search] { flex: none; width: 100%; }   /* in a column label: no 260px height */
.job-search-note { margin: calc(-1 * var(--s-3)) 0 var(--s-4); }
.job-source { margin: var(--s-2) 0 0; font-size: var(--text-sm); color: var(--muted); }
.pager { display: flex; gap: var(--s-4); justify-content: center; align-items: center; margin: var(--s-5) 0; }

/* Matches: the search settings, folded into one quiet line */
.search-settings { margin: 0 0 var(--s-4); color: var(--muted); font-size: var(--text-sm); }
.search-settings summary { cursor: pointer; list-style: none; }
.search-settings summary::-webkit-details-marker { display: none; }
.search-settings .change { color: var(--navy); text-decoration: underline; margin-left: var(--s-1); white-space: nowrap; }
.search-settings[open] .change { display: none; }
.search-settings-body { margin-top: var(--s-2); padding: var(--s-3) var(--s-4); background: var(--sand); border-radius: var(--radius); color: var(--text); }
.search-settings-body p { margin: 0 0 var(--s-2); }
.search-settings-body ul { margin: 0 0 var(--s-2); padding-left: 1.2em; }
.search-settings-body li { margin: var(--s-1) 0; }

/* Touch screens: small controls get a finger-sized target (24px is the minimum;
   these aim higher). The desktop look is unchanged. */
@media (pointer: coarse) {
    .chip-q { width: 28px; height: 28px; font-size: 13px; }
    .chip-x button { min-width: 28px; min-height: 28px; }
    button.link, a.small, a.small-link { display: inline-flex; align-items: center; min-height: 32px; }
}

/* A posting that deserves care: what it does, said plainly */
.cautions { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.cautions li { background: var(--honey-bg); color: var(--honey-ink); border-left: 3px solid var(--honey-line); border-radius: var(--radius); padding: var(--s-2) var(--s-3); font-size: var(--text-sm); margin-top: var(--s-1); }

/* Find jobs: a pearl search band, and cards with a soft picture and colour for the field */
/* A calm card with a thin pearl edge along the top (the pearl is used sparingly) */
.search-band, .head-band { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
               border-radius: var(--radius-lg); padding: var(--s-5) var(--s-5) var(--s-3); margin-bottom: var(--s-4); }
.search-band::before, .head-band::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--pearl); }
.search-band .page-head { margin-top: 0; }
.search-band .job-search { margin-bottom: var(--s-2); }
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s-4); align-items: start; }
.job-grid > .card { margin: 0; }
:where(.job-card, .card.match) { --tone-bg: var(--chip-bg); --tone-ink: var(--text); }   /* a field colour (.tone-*) wins */
.tone-honey { --tone-bg: var(--honey-bg); --tone-ink: var(--honey-ink); }
.tone-sage { --tone-bg: var(--sage-bg); --tone-ink: var(--sage-ink); }
.tone-blush { --tone-bg: var(--blush-bg); --tone-ink: var(--blush-ink); }
.tone-info { --tone-bg: var(--info-bg); --tone-ink: var(--link); }
.tone-lilac { --tone-bg: var(--lilac-bg); --tone-ink: var(--lilac-ink); }
.job-head { display: flex; gap: var(--s-3); align-items: flex-start; }
.job-head-text { min-width: 0; }
.job-head h2 { font-size: var(--text-lg); margin: 0 0 2px; }
.job-head h2 a { color: var(--navy); text-decoration-thickness: 1px; }
.job-head .meta { color: var(--muted); font-size: var(--text-sm); }
.field-tile { flex: none; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
              background: var(--tone-bg); color: var(--tone-ink); }
.job-pay { margin: var(--s-3) 0 0; font-weight: 600; color: var(--navy); }
.job-card .facts { margin-top: var(--s-2); }
.field-chip { background: var(--tone-bg); color: var(--tone-ink); }
.field-line { margin: var(--s-2) 0 0; }
.field-line .field-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 12px 3px 9px; font-size: var(--text-sm); }
.search-band .search-settings { margin-bottom: var(--s-3); }
.search-band .keyword-search { margin-bottom: var(--s-2); }
.head-band .page-head { margin: 0; }
.field-tile.small { width: 30px; height: 30px; border-radius: 9px; margin-right: var(--s-2); vertical-align: middle; }

/* ---------------------------------------------------------- Job details -- */
/* One posting's details (_job_details.html): a side panel from the job search
   and matches, a full-screen sheet on phones, and the same on /jobs/<id> */
.job-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-top: var(--s-3); }
.job-card-actions .job-source { margin: 0; }
.job-card-actions .button { min-height: 36px; padding: 6px 14px; font-size: var(--text-sm); }
dialog.job-panel {
    margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(560px, 100%); max-width: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg); border-right: 0; padding: var(--s-5) var(--s-5) var(--s-6);
    overflow-y: auto; overscroll-behavior: contain;
}
dialog.job-panel[open] { animation: panel-in .18s ease-out; }
@keyframes panel-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.job-panel[open] { animation: none; } }
@media (max-width: 640px) {
    dialog.job-panel { width: 100%; border-radius: 0; border: 0; padding: var(--s-4) var(--s-4) var(--s-6); }
}
.job-panel .dialog-close { position: sticky; top: 0; float: right; margin: calc(-1 * var(--s-2)) calc(-1 * var(--s-2)) 0 0; z-index: 1; }
.job-panel .dialog-close button {
    background: var(--surface); border: 1px solid var(--line); color: var(--muted);
    font-size: 22px; min-height: 0; width: 40px; height: 40px; padding: 0; border-radius: 50%;
}
.job-panel .dialog-close button:hover { background: var(--chip-bg); color: var(--navy); }
.job-details h2 { margin: var(--s-2) 0 var(--s-1); font-size: var(--text-xl); }
.job-details h2:focus { outline: none; }
.job-details .meta { color: var(--muted); font-size: var(--text-sm); margin: 0; }
.jd-section { margin-top: var(--s-5); }
.jd-section h3 { margin: 0 0 var(--s-2); font-size: var(--text-md); color: var(--navy); }
.jd-list { margin: 0; padding: 0; list-style: none; }
.jd-list li { padding: var(--s-2) 0 var(--s-2) 1.4em; border-top: 1px solid var(--line); position: relative; }
.jd-list li:first-child { border-top: 0; }
.jd-list li::before { content: "•"; position: absolute; left: .3em; color: var(--muted); }
.jd-list.plain li { padding-top: 3px; padding-bottom: 3px; border: 0; }
.jd-tag { display: inline-block; margin-right: 4px; padding: 0 8px; border-radius: var(--radius-pill); font-size: var(--text-xs);
          font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.jd-tag.have { background: var(--sage-bg); color: var(--sage-ink); border-color: var(--sage-line); }
.jd-tag.gap, .jd-tag.expiring { background: var(--honey-bg); color: var(--honey-ink); border-color: var(--honey-line); }
.jd-tag.expired { background: var(--blush-bg); color: var(--blush-ink); border-color: var(--blush-line); }
.jd-note { display: block; color: var(--muted); font-size: var(--text-sm); }
.jd-links { font-size: var(--text-sm); }
.jd-trade { background: var(--honey-bg); border-radius: var(--radius-sm); padding-right: var(--s-2) !important; }
.jd-source { margin: var(--s-2) 0 0; font-size: var(--text-xs); color: var(--muted); }
.jd-ad { margin: 0; font-size: var(--text-sm); }
.jd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-5); }
.job-page { max-width: 760px; }
.back-link { margin: 0 0 var(--s-3); }

/* ------------------------------------------------------ Display options -- */
/* Chosen by the person on /display (app/display.py), one class each on <html>.
   Off unless they turn them on: Clarisa looks the same for everyone else. */
html.d-text-large { font-size: 118.75%; }      /* body 17px -> about 20px */
html.d-text-larger { font-size: 137.5%; }      /* body about 23px */

html.d-contrast {
    --text: #10141F; --muted: #2B3345; --link: #1A3266; --navy: #0F1B33; --focus: #0F1B33;
    --bg: #FFFFFF; --sand: #FFFFFF; --chip-bg: #FFFFFF;
    --line: #5C6474; --field-border: #2B3345; --info-line: #2C4A86;
    --honey-ink: #4A3105; --sage-ink: #173823; --blush-ink: #5C1F1F; --lilac-ink: #33264F;
}
html.d-contrast .card, html.d-contrast .notice, html.d-contrast .chip { border-color: var(--line); }
html.d-contrast .muted, html.d-contrast .small-link { color: var(--muted); }

html.d-focus :focus-visible, html.d-focus :focus:not(#main) {
    outline: 4px solid var(--navy); outline-offset: 3px; box-shadow: 0 0 0 7px #FFD84D;
}

html.d-motion *, html.d-motion *::before, html.d-motion *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
}

html.d-spacing body { line-height: 1.85; letter-spacing: 0.04em; word-spacing: 0.12em; }
html.d-spacing p, html.d-spacing li { margin-bottom: 1em; }

html.d-underline a { text-decoration: underline; text-underline-offset: 0.2em; }

html.d-readable { --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
                  --font-display: "Atkinson Hyperlegible", Georgia, serif; }

/* The /display page */
.display-options .size { margin-right: var(--s-5); }
.display-options .option { display: grid; width: 100%; grid-template-columns: auto 1fr; gap: 0 var(--s-3); align-items: start;
                           padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.display-options .option:first-of-type { border-top: 0; }
.display-options .option input { margin-top: 0.3em; }
.display-options .option .hint { grid-column: 2; color: var(--muted); font-size: var(--text-sm); }

/* An agency's code slip and outcomes sheet (templates/agency.html): the slip big enough to read
   out, and each printed alone */
.code-big { font-size: 1.75rem; letter-spacing: 0.08em; margin: 0.5rem 0; }
@media print {
    body:has(.code-slip) .site-header, body:has(.code-slip) .head-band, body:has(.code-slip) .profile-tabs,
    body:has(.code-slip) .card:not(.code-slip), body:has(.code-slip) .notice, body:has(.code-slip) footer,
    .code-slip .no-print, .outcomes-sheet .no-print,
    body:has(.outcomes-sheet) .site-header, body:has(.outcomes-sheet) .profile-tabs, body:has(.outcomes-sheet) footer,
    body:has(.outcomes-report) .head-band, body:has(.outcomes-report) .notice,
    body:has(.slips) .site-header, body:has(.slips) footer, .no-print { display: none !important; }
    .slips .code-slip { break-inside: avoid; border: 1px dashed currentColor; }
    .outcomes-report { border: 0; box-shadow: none; padding: 0; }
    .outcomes-report table { break-inside: avoid; }
}

/* Meets your search settings (_fits_needs.html): the person's own limits, beside the score.
   Plain small text, no badge or fill, so it never outweighs the score or reads as a verdict on it;
   only the check marks are green. */
.fits-needs { margin: 0 0 var(--s-2); font-size: var(--text-sm); color: var(--muted); }
.fits-needs > summary { display: block; color: var(--muted); font-weight: 400; }   /* one line of text, not the link look */
.fits-needs > summary::before { display: inline-block; margin-right: .4rem; vertical-align: .1em; }
.fits-needs .fits-label { font-weight: 600; }
.fits-needs ul { margin: var(--s-1) 0; padding-left: 1.2rem; color: var(--text); }
.fits-needs .fit-met .fit-mark { color: var(--sage-ink); font-weight: 700; }
.fits-needs p { margin: 0; }
/* Job-search lessons (/lessons/<slug>, app/lessons.py): easy to read, a quoted example set off */
.task.lesson-page { max-width: 46rem; }
.lesson blockquote { margin: var(--s-3) 0; padding: var(--s-2) var(--s-3); border-left: 3px solid var(--line); }
.lesson blockquote p { margin: 0 0 var(--s-2); }

/* "?" beside something, with a short pop-up that links to its Help topic (help_tip in app/help_topics.py).
   Shows on hover and keyboard focus; a tap or click keeps it open (clarisa.js). */
.help-tip { position: relative; display: inline-block; vertical-align: middle; margin-left: var(--s-1); }
.help-tip-q {
    width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 50%;
    border: 1px solid var(--field-border); background: var(--surface); color: var(--navy);
    font: 700 var(--text-xs)/1 var(--font-body); cursor: help; box-shadow: none;
}
.help-tip-q:hover, .help-tip.open .help-tip-q { background: var(--navy); color: var(--surface); border-color: var(--navy); }
.help-tip-pop {
    display: none; position: absolute; z-index: 30; top: 100%; left: 50%; margin-top: var(--s-2);
    transform: translateX(calc(-50% + var(--tip-shift, 0px)));
    width: max-content; max-width: min(280px, calc(100vw - 32px));
    padding: var(--s-2) var(--s-3); background: var(--surface); color: var(--text);
    border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift);
    font: 400 var(--text-sm)/1.45 var(--font-body); text-align: left; text-decoration: none; white-space: normal;
}
.help-tip-pop::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-1 * var(--s-2) - 1px); height: var(--s-2); }
.help-tip:hover .help-tip-pop, .help-tip:focus-within .help-tip-pop, .help-tip.open .help-tip-pop { display: block; }
.help-tip.closed .help-tip-pop { display: none; }
.help-tip-more { display: block; margin-top: var(--s-1); color: var(--link); font-weight: 650; text-decoration: underline; }
.help-tip-pop:hover .help-tip-more { text-decoration-thickness: 2px; }

/* -------------------------------------------- First setup (first_setup.py) -- */
.setup-count { margin: 0 0 var(--s-2); color: var(--muted); font-weight: 650; font-size: 0.9rem; }
.setup-step .progress, .task > .progress { margin-bottom: var(--s-4); }
.setup-step h2 { margin: 0 0 var(--s-2); }
.setup-buttons .actions { margin-bottom: var(--s-2); }
.setup-left-list { margin: 0; padding-left: 1.2em; }
.setup-left-list li { margin-bottom: var(--s-2); }
.setup-left-list a { font-weight: 650; }
.setup-left-list .muted { display: block; }
