:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --text: #1d2330;
    --muted: #6b7280;
    --line: #e3e6eb;
    --accent: #2f5bd3;
    --accent-dark: #2448ac;
    --ok: #1f8a4c;
    --ok-bg: #e5f5ec;
    --warn: #a15c00;
    --warn-bg: #fff4e0;
    --danger: #c0392b;
    --weekend: #f0f1f4;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.err { color: var(--danger); font-size: .82rem; }
.ok-text { color: var(--ok); font-weight: 600; }
.warn-text { color: var(--warn); font-weight: 600; }

/* --- Structure --- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; width: 220px; z-index: 10;
    display: flex; flex-direction: column; gap: 1.25rem;
    background: #0b1f4d; color: #fff; padding: 1.1rem .75rem; overflow-y: auto;
}
.sidebar a { color: #d6dcef; }
.sidebar a:hover { color: #fff; text-decoration: none; }
.brand { font-weight: 700; font-size: 1.05rem; color: #fff !important; padding: 0 .6rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.sidebar nav a { display: block; padding: .5rem .6rem; border-radius: 6px; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .07); }
.sidebar nav a.active { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }
/* Sous-menus (CRA, …) */
.sidebar details.group > summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    padding: .5rem .6rem; border-radius: 6px; color: #fff; font-weight: 600;
}
.sidebar details.group > summary::-webkit-details-marker { display: none; }
.sidebar details.group > summary::after { content: "▸"; font-size: .8em; color: #9aa3bd; transition: transform .15s; }
.sidebar details.group[open] > summary::after { transform: rotate(90deg); }
.sidebar details.group > summary:hover { background: rgba(255, 255, 255, .07); }
.sidebar .group-items { display: flex; flex-direction: column; gap: .1rem; margin: .1rem 0 .35rem .6rem;
    padding-left: .5rem; border-left: 1px solid rgba(255, 255, 255, .12); }
.who { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem;
    padding: .9rem .6rem 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.who form { margin: 0; }
body.has-sidebar { padding-left: 220px; }

/* Petits écrans : la barre latérale repasse en haut */
@media (max-width: 760px) {
    body.has-sidebar { padding-left: 0; }
    .sidebar { position: static; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; }
    .brand { padding: 0; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: .1rem; flex-basis: 100%; order: 3; }
    .sidebar nav a { padding: .35rem .55rem; }
    .sidebar details.group { flex-basis: 100%; }
    .sidebar details.group > summary { padding: .35rem .55rem; }
    .sidebar .group-items { flex-direction: row; flex-wrap: wrap; margin: 0 0 .25rem; padding-left: .4rem; }
    .who { flex-direction: row; align-items: center; gap: .75rem; padding: 0; border: 0; margin-left: auto; }
}

main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.page-head {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1rem;
}
.page-head p { margin: 0; }
.toolbar { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
form.inline { display: inline-flex; margin: 0; }

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.narrow { max-width: 560px; }
.stack { display: flex; flex-direction: column; gap: .9rem; }
.table-wrap { padding: 0; overflow-x: auto; }

/* --- Formulaires --- */
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; }
input, select {
    font: inherit; padding: .42rem .55rem; border: 1px solid #c9ced8; border-radius: 6px;
    background: #fff; color: inherit; min-width: 0;
}
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem 1.5rem; }
.form-grid .full { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; }
legend { font-weight: 600; padding: 0 .3rem; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .4rem 1rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
    font: inherit; font-weight: 500; padding: .42rem .85rem; border-radius: 6px;
    border: 1px solid #c9ced8; background: #fff; color: var(--text); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f0f2f6; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); border-color: #e7b7b1; }
.btn.danger:hover { background: #fdf0ee; }
button.link { background: none; border: 0; color: #d6dcef; cursor: pointer; font: inherit; padding: 0; }
button.link:hover { color: #fff; }

/* --- Messages --- */
.flash {
    padding: .65rem .9rem; border-radius: var(--radius); margin-bottom: 1rem;
    background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe3cd;
}
.flash.error { background: #fdecea; color: var(--danger); border-color: #f2c4bf; }
.banner {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
    padding: .6rem .9rem; border-radius: var(--radius); margin-bottom: 1rem;
    background: #eef2fc; border: 1px solid #d3dcf5;
}
.banner form { margin: 0; }
.banner.ok { background: var(--ok-bg); border-color: #bfe3cd; }
.banner.warn { background: var(--warn-bg); border-color: #f1d9ad; }

.tag {
    display: inline-block; padding: .05rem .45rem; border-radius: 999px; font-size: .78rem;
    background: #eceef2; color: #4b5260; margin: 0 .15rem .15rem 0;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }

.dot {
    display: inline-block; width: .8rem; height: .8rem; border-radius: 50%;
    background: #ccc; border: 1px solid transparent; vertical-align: -1px;
}
.dot[data-v="A"] { background: #dfe2e7; border-color: #9aa1ad; }

/* --- Tableaux de liste --- */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbfc; }
table.list tr:last-child td { border-bottom: 0; }
tr.dim td { opacity: .6; }
td.actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
td.actions form { margin: 0; }

/* --- Grille de saisie --- */
.ts-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1rem; align-items: start; }
.summary { position: sticky; top: 1rem; }
.summary table { width: 100%; border-collapse: collapse; }
.summary td { padding: .25rem .2rem; }
.summary td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.fill-bar {
    display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
    padding-bottom: .75rem; margin-bottom: .5rem; border-bottom: 1px solid var(--line);
}
table.ts { width: 100%; border-collapse: collapse; }
table.ts th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: .3rem .4rem; }
table.ts th.hint { font-weight: 400; }
table.ts td { padding: .18rem .4rem; }
table.ts td.day { white-space: nowrap; width: 8rem; font-variant-numeric: tabular-nums; }
table.ts .dname { display: inline-block; width: 2.4rem; color: var(--muted); }
table.ts tr.weekend td { background: var(--weekend); }
table.ts tr.weekend td.day { color: var(--muted); }
table.ts tr.week-start td { border-top: 2px solid var(--line); }
table.ts select { width: 100%; }
table.ts select.fullday { color: var(--muted); }
select.slot[data-v="A"] { background: #e7e9ed; border-color: #9aa1ad; border-style: dashed; color: #4b5260; }
select.slot:disabled { opacity: 1; color: var(--text); cursor: not-allowed; }

.save-bar {
    position: sticky; bottom: 0; display: flex; justify-content: flex-end; align-items: center; gap: 1rem;
    background: var(--surface); padding: .75rem 0 .25rem; margin-top: .5rem; border-top: 1px solid var(--line);
}

/* --- Connexion --- */
.login-card { max-width: 380px; margin: 8vh auto 0; padding: 2rem; }
.login-card h1 { margin-bottom: .2rem; }

@media (max-width: 860px) {
    .ts-layout { grid-template-columns: 1fr; }
    .summary { position: static; }
    table.ts th.hint, table.ts td:nth-child(4) { display: none; }
}

/* Récapitulatif consultants × projets (Feuilles de présence) */
.summary-head { margin-top: 2rem; }
.summary-head h2 { margin: 0 0 .2rem; }
table.matrix th.num, table.matrix td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.matrix tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: #fafbfc; }
table.matrix tbody tr:last-child td { border-bottom: 1px solid var(--line); }

/* Ajouts version Next.js */
.link-btn { background: none; border: 0; color: #d6dcef; cursor: pointer; font: inherit; padding: 0; }
.link-btn:hover { color: #fff; }
.err-summary { color: var(--danger); font-size: .9rem; grid-column: 1 / -1; }

/* --- Sourcing / listes / clients --- */
textarea {
    font: inherit; padding: .5rem .6rem; border: 1px solid #c9ced8; border-radius: 6px;
    background: #fff; color: inherit; resize: vertical; min-height: 4.5rem; width: 100%;
}
textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
h3 { font-size: .95rem; margin: .25rem 0 0; }
.nowrap { white-space: nowrap; }
.crumbs { margin: 0 0 .2rem; font-size: .82rem; color: var(--muted); }
.btn.small { padding: .1rem .45rem; font-size: .8rem; }
.span2 { grid-column: span 2; }

.tabs { display: flex; gap: .25rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.tabs a { padding: .5rem .9rem; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; margin-bottom: -1px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

.lists-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(480px, 1fr)); gap: 1rem; align-items: start; }
.list-card { display: flex; flex-direction: column; gap: .75rem; }
.list-card h2 { margin: 0; }
.add-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.add-row input:not([type=color]) { flex: 1 1 160px; }
input[type=color] { width: 2.4rem; height: 2.1rem; padding: .15rem; cursor: pointer; }
table.compact th, table.compact td { padding: .35rem .5rem; vertical-align: middle; }
table.compact input { width: 100%; }
table.compact input.wide { min-width: 12rem; }
table.compact input.num-input { width: 4.5rem; }
table.compact input[type=color] { width: 2.6rem; }
table.compact input.wide { min-width: 10rem; }
table.compact td.actions { flex-wrap: nowrap; gap: .25rem; }
table.compact .btn { padding: .3rem .55rem; font-size: .85rem; }
.add-contact { border-top: 1px solid var(--line); padding-top: 1rem; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; padding: .75rem 1rem; }
.filters input[type=search] { flex: 1 1 220px; }
.filters select { max-width: 220px; }

/* Fiche besoin : deux colonnes comme dans BoondManager */
.need-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.need-side { display: flex; flex-direction: column; gap: 1rem; }
.need-layout h2 { margin-bottom: 1rem; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid > label:not(.check) > select, .form-grid > label:not(.check) > input, .form-grid > label > textarea { width: 100%; }
fieldset.plain { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
fieldset.plain legend { padding: 0; font-weight: 500; margin-bottom: .3rem; }
.field-label { display: block; font-weight: 500; margin-bottom: .35rem; }
.inline-choices { display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap; }
.range { display: flex; gap: .5rem; align-items: center; }
.range input { flex: 1; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.form-foot { display: flex; gap: .5rem; justify-content: space-between; margin-top: 1rem; }
.form-foot form { margin: 0; }
[hidden] { display: none !important; }

.docs { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.docs li { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; padding: .35rem .5rem; background: #f7f8fa; border-radius: 6px; }
.docs li a { font-weight: 500; word-break: break-all; }
.docs li .btn { margin-left: auto; }
.dropzone { border: 1.5px dashed #c9ced8; border-radius: var(--radius); padding: .9rem; text-align: center; background: #fbfcfd; }
.dropzone.over { border-color: var(--accent); background: #eef2fc; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone label { cursor: pointer; font-weight: 500; display: inline; }
.dropzone p { margin: .3rem 0 0; }
.dropzone .pending { list-style: none; margin: .5rem 0 0; padding: 0; text-align: left; }
.dropzone:focus-within { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); }

/* Liste déroulante avec recherche (besoins.js) */
.picker { position: relative; font-weight: 400; }
.picker-box {
    min-height: 2.2rem; padding: .3rem 1.8rem .3rem .55rem; border: 1px solid #c9ced8; border-radius: 6px; background: #fff;
    cursor: pointer; display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; position: relative;
}
.picker-box::after { content: "▾"; position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8rem; }
.picker-box:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: .2rem; background: #e8edfb; color: #213a86; border-radius: 999px; padding: .05rem .2rem .05rem .55rem; font-size: .85rem; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .25rem; border-radius: 50%; }
.chip button:hover { background: rgba(0, 0, 0, .08); }
.picker-pop {
    position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #c9ced8;
    border-radius: 6px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); padding: .4rem;
}
.picker-search { width: 100%; margin-bottom: .3rem; }
.picker-list { max-height: 260px; overflow-y: auto; }
.picker-group { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: .5rem .5rem .2rem; font-weight: 600; }
.picker-opt { padding: .35rem .5rem; border-radius: 4px; cursor: pointer; display: flex; align-items: center; gap: .4rem; }
.picker-opt:hover { background: #f0f2f6; }
.picker-opt.on { background: #e8edfb; font-weight: 500; }
.picker-opt .box { width: .95rem; height: .95rem; border: 1.5px solid #9aa1ad; border-radius: 3px; flex: none; }
.picker-opt.on .box { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px #fff; }
.picker-opt.clear { color: var(--muted); }
.picker-empty { padding: .5rem; }

@media (max-width: 1100px) {
    .need-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .lists-grid { grid-template-columns: 1fr; }
    .form-grid.two { grid-template-columns: 1fr; }
    .span2 { grid-column: auto; }
}

/* --- Candidats --- */
.strong { font-weight: 600; }
.tabs.grouped { align-items: flex-end; }
.tab-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 0 .2rem .6rem .8rem; font-weight: 600; }
.tab-group:first-child { padding-left: 0; }
.tabs .count { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: #eceef2; color: #4b5260; font-size: .75rem; text-align: center; }
.tabs a.active .count { background: #e8edfb; color: var(--accent); }

.cand-head { display: flex; gap: .9rem; align-items: center; margin-bottom: .75rem; }
.cand-head h1 { margin: 0; }
.cand-head p { margin: .1rem 0 0; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.avatar { width: 3rem; height: 3rem; border-radius: 50%; background: #0b1f4d; color: #fff; display: grid; place-items: center; font-weight: 600; flex: none; }
.state-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .55rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font-size: .85rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.card-head h2 { margin: 0; }
.card-link { margin: .75rem 0 0; font-size: .85rem; }
.inset { background: #f7f8fa; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
tr.edit-row td { background: #f7f8fa; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.money { text-align: right; font-variant-numeric: tabular-nums; }

.cand-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1rem; align-items: start; }
.cand-col { display: flex; flex-direction: column; gap: 1rem; }
.cand-col h2 { margin-bottom: .75rem; }
.contact-list { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.contact-list li { display: flex; gap: .5rem; align-items: baseline; word-break: break-all; }
.contact-list .ico { width: 1.1rem; color: var(--muted); text-align: center; flex: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: .9rem 0; }
dl.facts { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1rem; margin: 0; }
dl.facts .full { grid-column: 1 / -1; }
dl.facts dt { font-size: .75rem; color: var(--muted); }
dl.facts dd { margin: .1rem 0 0; }

.actions-sum { display: grid; grid-template-columns: minmax(150px, 1fr) 3fr; gap: 1rem; }
.counts { display: flex; flex-direction: column; gap: .5rem; }
.count-item { display: flex; flex-direction: column; }
.count-item strong { font-size: 1.25rem; }
.count-item.big strong { font-size: 1.8rem; }
.action-list { display: flex; flex-direction: column; gap: .6rem; }
.action-item { position: relative; border-bottom: 1px solid var(--line); padding: 0 2rem .6rem 0; }
.action-item header { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.action-body { font-size: .85rem; margin-top: .3rem; max-height: 7.5rem; overflow: auto; }
.action-del { position: absolute; right: 0; top: 0; margin: 0; }
.add-action { margin-top: .9rem; }
.add-action > summary { list-style: none; display: inline-flex; }
.add-action > summary::-webkit-details-marker { display: none; }
.add-action[open] > summary { margin-bottom: .75rem; }
.pos-sum { display: grid; grid-template-columns: minmax(150px, 1fr) 3fr; gap: 1rem; }
.pos-list { display: flex; flex-direction: column; gap: .5rem; }
.pos-item { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: start; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.pos-item .dot { margin-top: .3rem; }

.mini-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: -.25rem 0 1rem; }
.mini-tabs button { border: 0; background: none; font: inherit; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; padding: .5rem .8rem; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.mini-tabs button.active { color: var(--text); border-bottom-color: var(--text); font-weight: 600; }
.dt-title { text-align: center; font-size: 1.15rem; margin: .25rem 0 1rem; }
.dt-block { margin-bottom: .9rem; }
.dt-block .label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .2rem; }
.dt-block p { margin: 0 0 .3rem; }
.dt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stars { color: #f5a623; letter-spacing: .05em; margin-right: .35rem; }
.tool-list, .exp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.cand-foot { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.25rem; }
.cand-foot a { margin-left: auto; }

.rep-row { display: flex; gap: .4rem; align-items: center; margin-bottom: .35rem; }
.rep-row > input, .rep-row > select { flex: 1 1 0; width: 0; min-width: 0; }
.rep-row > .btn { flex: none; }
.rep-row.exp-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; padding: .5rem; background: #f7f8fa; border-radius: 6px; }
.rep-row.exp-row > input { width: auto; }
.rep-row.exp-row > textarea { grid-column: 1 / -1; min-height: 3rem; }
@media (max-width: 700px) { .rep-row.exp-row { grid-template-columns: 1fr auto; } .rep-row.exp-row > input { grid-column: 1; } }
.link-add { border: 0; background: none; padding: 0; font: inherit; font-weight: 500; color: var(--text); text-decoration: underline; cursor: pointer; align-self: flex-start; }
.ratings { display: flex; flex-direction: column; gap: .2rem; }
.ratings:empty { display: none; }
.rating-row { display: flex; align-items: center; gap: .6rem; }
.stars-input { display: inline-flex; flex-direction: row-reverse; }
.stars-input input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label { cursor: pointer; color: #cfd3da; font-size: 1.15rem; line-height: 1; padding: 0 .05rem; font-weight: 400; display: inline; }
.stars-input input:checked ~ label, .stars-input label:hover, .stars-input label:hover ~ label { color: #f5a623; }
.stars-input input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 2px; }
table.history td { vertical-align: top; }

@media (max-width: 1100px) {
    .cand-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .form-grid.three, dl.facts, .dt-two, .actions-sum, .pos-sum { grid-template-columns: 1fr; }
}
