/* PeoplePlus style. Brand colours from peopleplus.co.uk: red hsl(358 83% 38%), hover hsl(358 83% 18%),
   8px radius, soft shadow, dark grey footer. Gotham is licensed to their site, so we use system fonts
   (and the form loads nothing from other domains). */
:root {
  --ink: #1a1a1a;
  --muted: #595959;
  --line: #d1d3d4;
  --field-border: #767676;
  --surface: #ffffff;
  --page: #f6f6f6;
  --wash: #f6f6f6;
  --brand: #b01015;
  --brand-dark: #54080a;
  --brand-tint: #fbeeee;
  --footer: #333333;
  --focus: #b01015;
  --error: #b01015;
  --ok: #00704a;
  --warn: #8a5a00;
  --radius: 8px;
  --shadow: 0 0 8px 0 rgba(171, 171, 171, 0.5);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.55; color: var(--ink); background: var(--page); }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap.wide { max-width: 80rem; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.75rem; }
p { margin: 0 0 1rem; }
a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { color: var(--brand-dark); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); color: var(--brand); padding: 0.5rem 0.75rem; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 10; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { background: var(--surface); border-bottom: 4px solid var(--brand); padding: 1rem 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.logo { display: block; height: 2.75rem; width: auto; }

/* Masthead */
.masthead { padding: 2.25rem 0 1.75rem; }
.programme { display: inline-block; font-size: 0.9375rem; font-weight: 600; color: #fff; background: var(--brand); border-radius: 999px; padding: 0.15rem 0.8rem; margin-bottom: 0.9rem; }
.masthead h1 { font-size: clamp(1.9rem, 4.5vw, 2.5rem); font-weight: 700; letter-spacing: -0.015em; max-width: 20ch; }
.lede { font-size: 1.1875rem; max-width: 40ch; margin: 0; color: var(--muted); }

/* Steps: a real sequence, so the numbers carry meaning */
.step { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.5rem 0.5rem; margin-bottom: 1.75rem; }
.step h2 { font-size: 1.45rem; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.step-no { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1rem; font-weight: 700; flex: none; }
.section-note { color: var(--muted); border-left: 4px solid var(--line); padding-left: 0.875rem; margin: 0.25rem 0 1.5rem; }

/* Fields */
.field { margin: 0 0 1.6rem; padding: 0; border: 0; min-width: 0; }
.field > label, legend { display: block; font-weight: 600; margin-bottom: 0.35rem; padding: 0; }
.hint { color: var(--muted); margin: -0.15rem 0 0.5rem; }
.error { color: var(--error); font-weight: 600; margin: 0 0 0.5rem; }
.field.has-error { border-left: 4px solid var(--error); padding-left: 0.875rem; }
input[type="text"], input:not([type]), input[type="email"], input[type="tel"], input[type="search"], input[type="password"], textarea, select {
  font: inherit; color: inherit; width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--field-border); border-radius: var(--radius); background: #fff;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--brand); outline: 3px solid var(--brand-tint); outline-offset: 0; box-shadow: 0 0 0 1px var(--brand); }
textarea { resize: vertical; min-height: 7rem; }
.has-error input, .has-error textarea { border-color: var(--error); border-width: 2px; }
.w-medium { max-width: 16rem; }
.w-short { max-width: 9rem; }

.choices { display: grid; gap: 0.6rem; }
.choices.inline { grid-auto-flow: column; justify-content: start; gap: 1.5rem; }
.choice { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 400; }
.choice input { width: 1.4rem; height: 1.4rem; margin: 0; accent-color: var(--brand); flex: none; }

.money { display: flex; align-items: stretch; }
.money-prefix { display: grid; place-items: center; padding: 0 0.75rem; border: 1px solid var(--field-border); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--wash); font-weight: 600; }
.money input { border-radius: 0 var(--radius) var(--radius) 0; }

/* Receipts */
.accepted { background: var(--brand-tint); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.125rem; margin-bottom: 1rem; }
.accepted p { margin: 0; }
.accepted p + p { margin-top: 0.35rem; color: var(--ink); }
.accepted-types { font-weight: 700; font-size: 1.125rem; color: var(--brand-dark); }
.dropzone { border: 2px dashed var(--field-border); border-radius: var(--radius); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dropzone.is-dragging { border-color: var(--brand); background: var(--brand-tint); }
.dropzone:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop-text { margin: 0; color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.file-name { overflow-wrap: anywhere; }
.file-size { color: var(--muted); white-space: nowrap; margin-left: 0.5rem; }

/* Buttons */
.button { display: inline-block; font: inherit; font-weight: 600; padding: 0.7rem 1.5rem; border: 2px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; border-radius: var(--radius); text-decoration: none; transition: background-color 0.15s, border-color 0.15s; }
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.button:disabled { opacity: 0.6; cursor: progress; }
.button.secondary { background: #fff; color: var(--brand); }
.button.secondary:hover { background: var(--brand-tint); color: var(--brand-dark); }
.link-button { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font-weight: 600; }
.link-button:hover { color: var(--brand-dark); }

.submit-area { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin-bottom: 3rem; }
.submit-area .field { margin-bottom: 1.25rem; }
.progress { margin: 1rem 0 0; font-weight: 600; min-height: 1.55em; }
.submit-area .progress:empty { margin: 0; min-height: 0; }

/* Error summary */
.error-summary { background: var(--surface); border: 2px solid var(--error); border-left-width: 8px; border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2rem; }
.error-summary h2 { font-size: 1.3rem; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 1.1rem; }
.error-summary a { color: var(--error); font-weight: 600; }

/* Confirmation */
.done { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 8px solid var(--ok); padding: 2rem 1.5rem; margin-bottom: 3rem; }
.done h2 { font-size: 1.75rem; color: var(--ok); }
.reference { display: inline-block; font-size: 2rem; font-weight: 700; letter-spacing: 0.06em; color: var(--brand); background: var(--brand-tint); border-radius: var(--radius); padding: 0.25rem 0.9rem; margin-bottom: 1.25rem; }

.footer { background: var(--footer); color: #fff; padding: 2rem 0 2.5rem; }
.footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.footer a { color: #fff; }
.footer a:hover { color: #fff; text-decoration-thickness: 2px; }
.footer :focus-visible { outline-color: #fff; }
.footer .logo { height: 2.25rem; }

/* Admin */
.admin-bar { background: var(--surface); border-bottom: 4px solid var(--brand); padding: 0.8rem 0; }
.admin-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-brand { display: flex; align-items: center; gap: 1rem; }
.admin-bar .logo { height: 2.25rem; }
.admin-bar h1 { font-size: 1.2rem; margin: 0; padding-left: 1rem; border-left: 1px solid var(--line); }
.admin-bar span { color: var(--muted); }
.admin-bar a { color: var(--brand); font-weight: 600; }
.admin-main { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.25rem 1.5rem 1rem; margin-top: 1.5rem; }
.filters { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; margin: 1.25rem 0; }
.filters .field { margin: 0; }
.filters input { min-width: 16rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { border-bottom: 2px solid var(--brand); white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover td { background: var(--wash); }
tr.is-selected td, tr.is-selected:hover td { background: var(--brand-tint); }
.tag { display: inline-block; padding: 0.05rem 0.6rem; font-size: 0.85rem; font-weight: 600; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; }
.tag.ok { color: var(--ok); }
.tag.warn { color: var(--warn); }
.tag.bad { color: var(--error); }
.tag.muted { color: var(--muted); }
.detail { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 6px solid var(--brand); padding: 1.25rem 1.5rem; margin: 1.75rem 0 3rem; }
.detail-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.detail dl { display: grid; grid-template-columns: minmax(10rem, max-content) 1fr; gap: 0.4rem 1.5rem; margin: 1rem 0 1.5rem; }
.detail dt { font-weight: 600; }
.detail dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { color: var(--muted); padding: 1.5rem 0; }
.status-form { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 0.5rem; max-width: 36rem; }
.status-form .field { margin-bottom: 1rem; }
@media (max-width: 40rem) {
  .detail dl { grid-template-columns: 1fr; }
  .detail dd { margin-bottom: 0.5rem; }
  .step, .submit-area { padding-left: 1.1rem; padding-right: 1.1rem; }
  .admin-bar h1 { border-left: 0; padding-left: 0; }
}

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

/* ---------- Call scheduling ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: 1.75rem; margin: 1.5rem 0 3rem; align-items: start; }
@media (max-width: 64rem) { .layout { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.5rem 1rem; min-width: 0; }
.panel h2 { font-size: 1.45rem; }
.row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.row .field { flex: 1 1 12rem; }
input[type="datetime-local"] { font: inherit; color: inherit; width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--field-border); border-radius: var(--radius); background: #fff; }
.has-error select, .has-error input[type="datetime-local"] { border-color: var(--error); border-width: 2px; }
.person { border: 0; border-top: 1px solid var(--line); padding: 1rem 0 0; margin: 0 0 1.25rem; min-width: 0; }
.person-legend { font-size: 1.15rem; font-weight: 700; color: var(--brand); padding: 0 0.5rem 0 0; }
.person .field { margin-bottom: 1.15rem; }
.choice.small { font-size: 0.95rem; margin-top: 0.45rem; }
.choice.small input { width: 1.2rem; height: 1.2rem; }
.choice:has(input:disabled) { color: var(--muted); cursor: not-allowed; }
.list-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; }
.filters.compact { margin: 0 0 1rem; align-items: center; }
.filters.compact select { width: auto; }
.filters .choice input { min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.panel .detail { box-shadow: none; border: 1px solid var(--line); border-top: 6px solid var(--brand); margin: 1.5rem 0 0.5rem; }
.detail h3 { font-size: 1.3rem; margin: 0; }
.detail h4 { margin: 0 0 0.5rem; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.button.danger { background: #fff; color: var(--error); border-color: var(--error); }
.button.danger:hover { background: var(--brand-tint); color: var(--brand-dark); border-color: var(--brand-dark); }

/* Some components set display:flex, which would otherwise override the hidden attribute. */
[hidden] { display: none !important; }
/* Activity log */
.tabs { display: flex; gap: 0.25rem; border-bottom: 2px solid var(--line); margin: 0.5rem 0 0.25rem; flex-wrap: wrap; }
.tab { font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: 0.5rem 1rem; color: var(--muted); cursor: pointer; }
.tab:hover { color: var(--brand-dark); }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.wrap-text { overflow-wrap: anywhere; max-width: 28rem; }
.stat-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0 1.5rem; }
.stat { display: flex; flex-direction: column; min-width: 10rem; padding: 0.75rem 1rem; border-radius: var(--radius); background: var(--brand-tint); border-left: 4px solid var(--brand); }
.stat-number { font-size: 1.75rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat-label { font-weight: 600; }
.stat-none { color: var(--ok); font-weight: 600; margin: 0; }
.security-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr)); gap: 1.5rem 2rem; }
.security-grid td, .security-grid th { white-space: nowrap; }
@media (max-width: 40rem) { .security-grid { grid-template-columns: 1fr; } }
.security-grid h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }


.small-button { padding: 0.4rem 0.9rem; font-size: 0.95rem; }
.header-tools { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ---------- CV Builder ---------- */
.site-header .header-tools a, .site-header .header-tools .link-button { font-weight: 600; }
.panel + .panel { margin-top: 1.5rem; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin: 0 0 1.75rem; }
.card > h2 { font-size: 1.6rem; }
.note { background: var(--wash); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 0 0 1.5rem; }
.note > :last-child { margin-bottom: 0; }
.note.tip { background: #eef6f2; border-left-color: var(--ok); }
.note.tip strong:first-child { color: var(--ok); }
.note.warn { background: #fdf6e6; border-left-color: var(--warn); }
.note.brand { background: var(--brand-tint); border-left-color: var(--brand); }
.note ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.big-input { font-size: 1.25rem !important; letter-spacing: 0.08em; max-width: 16rem; }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.4em; max-width: 12rem; text-align: center; font-variant-numeric: tabular-nums; }
.inline-field { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.inline-field input { flex: 1 1 14rem; }
.show-toggle { margin-top: 0.5rem; }

/* Sign-in */
.signin-wrap { max-width: 34rem; }
.qr { display: block; width: 220px; height: 220px; margin: 0.5rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.secret-key { font-family: Consolas, "Courier New", monospace; font-size: 1.1rem; font-weight: 700; background: var(--wash); padding: 0.3rem 0.6rem; border-radius: 6px; word-break: break-all; }
.option-cards { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.option-card { display: flex; gap: 0.9rem; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; cursor: pointer; background: #fff; }
.option-card:hover { border-color: var(--field-border); }
.option-card:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.option-card input { width: 1.4rem; height: 1.4rem; margin: 0.15rem 0 0; accent-color: var(--brand); flex: none; }
.option-card strong { display: block; font-size: 1.1rem; }
.option-card span { color: var(--muted); }
ol.steps-list { padding-left: 1.3rem; }
ol.steps-list li { margin-bottom: 0.5rem; }

/* Wizard */
.builder { display: grid; grid-template-columns: 15rem minmax(0, 1fr) minmax(0, 30rem); gap: 1.5rem; align-items: start; margin: 1.5rem 0 3rem; }
@media (max-width: 90rem) { .builder { grid-template-columns: 14rem minmax(0, 1fr); } .builder .preview-panel { grid-column: 1 / -1; } }
@media (max-width: 56rem) { .builder { grid-template-columns: 1fr; } }
.step-nav { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.75rem 0; position: sticky; top: 1rem; }
.step-nav ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-nav li { counter-increment: step; }
.step-nav a { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 1rem; color: var(--ink); text-decoration: none; border-left: 4px solid transparent; }
.step-nav a::before { content: counter(step); display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid var(--line); font-size: 0.85rem; font-weight: 700; flex: none; background: #fff; }
.step-nav a:hover { background: var(--wash); }
.step-nav a[aria-current="step"] { border-left-color: var(--brand); background: var(--brand-tint); font-weight: 700; }
.step-nav a[aria-current="step"]::before { border-color: var(--brand); background: var(--brand); color: #fff; }
.step-nav a.is-done::before { content: "✓"; border-color: var(--ok); color: var(--ok); }
.step-nav a[aria-current="step"].is-done::before { color: #fff; background: var(--brand); border-color: var(--brand); }
.step-count { display: none; font-weight: 600; color: var(--muted); margin: 0 0 0.5rem; }
@media (max-width: 56rem) {
  .step-nav { position: static; padding: 0.5rem 0.75rem; }
  .step-nav ol { display: flex; gap: 0.35rem; overflow-x: auto; }
  .step-nav a { padding: 0.35rem; border-left: 0; }
  .step-nav a span { display: none; }
  .step-count { display: block; }
}
.step-panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.75rem 1.25rem; min-width: 0; }
.step-panel h2 { font-size: 1.75rem; }
.step-intro { font-size: 1.125rem; color: var(--muted); max-width: 44rem; }
.step-buttons { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }
.save-status { color: var(--muted); font-size: 0.95rem; min-height: 1.4em; }
.save-status.is-error { color: var(--error); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0 1rem; }
.chip { font: inherit; font-size: 0.975rem; border: 2px solid var(--field-border); background: #fff; color: var(--ink); border-radius: 999px; padding: 0.3rem 0.9rem; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.chip.add::before { content: "+ "; font-weight: 700; color: var(--brand); }
.chip.add:disabled { opacity: 0.5; cursor: default; }
.chip-group h3 { font-size: 1.05rem; margin: 1rem 0 0.25rem; }
.selected-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.selected-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--wash); border-radius: var(--radius); padding: 0.45rem 0.8rem; }
.counter { font-weight: 600; }
.counter.ok { color: var(--ok); }
.counter.warn { color: var(--warn); }

.entry { border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.25rem 0.25rem; margin: 0 0 1.25rem; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.entry-head h3 { margin: 0; font-size: 1.2rem; }
.entry-kind { color: var(--brand); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; }
.date-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; }
.date-row select { width: auto; min-width: 8rem; }
.date-row input { width: 7rem; }
.duty-row { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.duty-row input { flex: 1; }
.add-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0 1rem; }
details.examples { margin: 0 0 1.25rem; }
details.examples summary { cursor: pointer; font-weight: 600; color: var(--brand); }
details.examples blockquote { margin: 0.75rem 0; padding: 0.75rem 1rem; border-left: 4px solid var(--line); background: var(--wash); border-radius: var(--radius); }

.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.checklist li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.35rem 0; }
.checklist li::before { content: "○"; font-weight: 700; color: var(--warn); }
.checklist li.is-done::before { content: "✓"; color: var(--ok); }
.checklist li.is-done { color: var(--muted); }
.status-panel { border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.5rem; border-left: 6px solid var(--line); background: var(--wash); }
.status-panel.ok { border-left-color: var(--ok); background: #eef6f2; }
.status-panel.warn { border-left-color: var(--warn); background: #fdf6e6; }
.status-panel h3 { margin-bottom: 0.4rem; }
.status-panel > :last-child { margin-bottom: 0; }
.review-note { white-space: pre-wrap; background: #fff; border-radius: var(--radius); padding: 0.75rem 1rem; margin: 0.5rem 0; }
.design-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }

/* Preview panel */
.preview-panel { position: sticky; top: 1rem; min-width: 0; }
@media (max-width: 90rem) { .preview-panel { position: static; } }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.preview-head h2 { font-size: 1.2rem; margin: 0; }
.preview-frame { background: #e9e9ea; border-radius: var(--radius); padding: 1rem; overflow: auto; max-height: calc(100vh - 6rem); }
.preview-panel.is-wide .preview-frame { max-height: none; }

/* ---------- The CV itself (screen preview and print) ---------- */
.cv-paper { background: #fff; color: #1a1a1a; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18); width: 100%; max-width: 210mm; margin: 0 auto; padding: 18mm; font-size: 10.5pt; line-height: 1.4; }
.preview-frame .cv-paper { padding: 9%; font-size: clamp(8px, 1.05vw, 10.5pt); }
.cv-paper h1 { font-size: 2.3em; margin: 0 0 0.1em; line-height: 1.1; letter-spacing: 0; }
.cv-paper .cv-headline { font-style: italic; color: #4d4d4d; font-size: 1.15em; margin: 0 0 0.3em; }
.cv-paper .cv-contact { margin: 0 0 1.2em; }
.cv-paper .cv-contact span + span::before { content: "|"; margin: 0 0.75em; color: #999; }
.cv-paper h2 { font-size: 1.1em; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid currentColor; padding-bottom: 0.15em; margin: 1.3em 0 0.6em; display: block; }
.cv-paper p { margin: 0 0 0.6em; }
.cv-paper ul { margin: 0.2em 0 0.6em; padding-left: 1.3em; }
.cv-paper li { margin-bottom: 0.15em; }
.cv-paper ul.cv-columns { columns: 2; column-gap: 2em; }
.cv-paper .cv-entry { margin-bottom: 0.8em; break-inside: avoid; }
.cv-paper .cv-entry-head { display: flex; justify-content: space-between; gap: 1em; font-weight: 700; }
.cv-paper .cv-dates { white-space: nowrap; }
.cv-paper .cv-sub { font-style: italic; color: #4d4d4d; }
.cv-classic { font-family: Georgia, "Times New Roman", Times, serif; text-align: left; }
.cv-classic h1, .cv-classic .cv-headline, .cv-classic .cv-contact { text-align: center; }
.cv-classic h2 { color: #1a1a1a; }
.cv-modern { font-family: Calibri, "Segoe UI", Arial, Helvetica, sans-serif; }
.cv-modern h1 { color: #1f3a5f; }
.cv-modern .cv-contact { border-bottom: 3px solid #1f3a5f; padding-bottom: 0.8em; }
.cv-modern h2 { color: #1f3a5f; border-bottom-color: #1f3a5f; }
.cv-empty { color: #8a8a8a; font-style: italic; }

/* Admin additions */
.admin-layout { display: grid; grid-template-columns: minmax(0, 34rem) minmax(0, 1fr); gap: 1.75rem; margin: 1.5rem 0 3rem; align-items: start; }
@media (max-width: 70rem) { .admin-layout { grid-template-columns: 1fr; } }
tbody tr.clickable { cursor: pointer; }
.login-slip { border: 2px dashed var(--brand); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1rem 0; background: #fff; }
.login-slip dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0.75rem 0; }
.login-slip dt { font-weight: 600; }
.login-slip dd { margin: 0; }
.login-slip .code { font-family: Consolas, "Courier New", monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.12em; color: var(--brand); }
.review-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.review-list li { border-left: 4px solid var(--line); padding: 0.25rem 0 0.25rem 0.9rem; margin-bottom: 0.75rem; }
.review-list li.ok { border-left-color: var(--ok); }
.review-list li.warn { border-left-color: var(--warn); }
.section-block { border-top: 1px solid var(--line); margin-top: 1.5rem; padding-top: 1rem; }
.section-block h3 { font-size: 1.25rem; }

/* ---------- Print: only the chosen area ---------- */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  body.printing * { visibility: hidden; }
  body.printing .print-target, body.printing .print-target * { visibility: visible; }
  body.printing .print-target { position: absolute; left: 0; top: 0; width: 100%; }
  body.printing .preview-frame { background: none; padding: 0; max-height: none; overflow: visible; }
  .cv-paper.print-target, .print-target .cv-paper { box-shadow: none; max-width: none; padding: 18mm !important; font-size: 10.5pt !important; }
  .login-slip.print-target { border: 0; padding: 20mm; font-size: 13pt; }
}
