/* ApplyAtelier pilot. One hand-written stylesheet, system fonts, no external requests. */
:root {
  --bg: #faf7f2; --surface: #fffdfa; --surface-2: #f3eee5; --ink: #2a2723; --muted: #655f55;
  --line: #e6dfd2; --line-strong: #cfc6b4;
  --accent: #4a6760; --accent-hover: #3b554f; --accent-ink: #ffffff; --accent-soft: #e8eeea;
  --good: #4b6b52; --good-soft: #e9f0ea; --warn: #7a5c25; --warn-soft: #f6efdc;
  --stop: #86504b; --stop-soft: #f6e9e6; --focus: #3c5f8f;
  --shadow: 0 1px 2px rgba(40, 30, 10, .04);
  --radius: 10px; --radius-sm: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --gutter: 16px; --tap: 44px;
  /* one spacing scale: 4, 8, 12, 16, 24, 32, 48 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --small: .875rem; /* 14px: the smallest text anywhere */
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--ink);
  background: var(--bg); min-height: 100vh; display: flex; flex-direction: column;
  overflow-wrap: anywhere;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
main { flex: 1 0 auto; padding-block: 24px 56px; }
.wrap { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 660px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 12px; letter-spacing: -.005em; }
h1 { font-size: 2rem; margin-top: 8px; margin-bottom: var(--s3); }
@media (min-width: 768px) { h1 { font-size: 2.35rem; } }
h2, .h2 { font-size: 1.5rem; }
.h3 { font-size: 1.25rem; margin-top: 28px; }
.h4 { font-size: 1.1rem; font-family: var(--font); font-weight: 650; }
p { margin: 0 0 14px; }
.lead { font-size: 1.06rem; color: var(--muted); }
.subtle, .hint { color: var(--muted); font-size: var(--small); }
.hint { margin: 2px 0 8px; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }

.skip-link { position: absolute; left: 12px; top: -80px; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; z-index: 50; }
.skip-link:focus { top: 12px; }

/* header, footer */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.wordmark { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 8px; min-height: var(--tap); display: inline-flex; align-items: center; }
.site-nav a:hover { background: var(--surface-2); }
.site-nav a[aria-current="page"] { font-weight: 650; background: var(--accent-soft); color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--small); padding-block: 14px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.foot .btn { margin-left: auto; }
.banner, .offline-note { background: var(--warn-soft); color: var(--warn); padding: 10px 0; font-size: var(--small); border-bottom: 1px solid var(--line); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap);
  padding: 10px 22px; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 600;
  font-size: .98rem; cursor: pointer; text-decoration: none; background: transparent; color: var(--ink);
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.secondary { background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent); }
.btn.secondary:hover { background: var(--accent-soft); }
.btn.quiet { color: var(--accent); padding-inline: 12px; }
.btn.quiet:hover { background: var(--accent-soft); }
.btn.destructive { background: var(--stop); color: var(--surface); }
.btn.destructive:hover { filter: brightness(1.1); }
.btn.small { min-height: var(--tap); padding: 6px 14px; font-size: var(--small); }
.btn.icon { padding: 8px; min-width: var(--tap); }
.btn.block { width: 100%; margin-top: 16px; }
.btn[disabled], .btn[aria-busy="true"] { background: var(--surface-2); color: var(--muted); border: 1.5px dashed var(--line-strong); cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn-hint { color: var(--muted); font-size: var(--small); margin: var(--s2) 0 0; }
.btn:active:not([disabled]) { transform: translateY(1px); }
.actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.actions .btn.primary:last-child { margin-left: auto; }
@media (max-width: 520px) { .actions .btn { flex: 1 1 100%; } .actions .btn.primary:last-child { margin-left: 0; } }
.downloads { display: flex; flex-wrap: wrap; gap: var(--s3); margin-block: var(--s2) var(--s5); }

/* cards, notices, badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin-block: var(--s5); box-shadow: var(--shadow); }
.card.plain { box-shadow: none; background: transparent; }
.card > :last-child { margin-bottom: 0; }
.notice { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); margin-block: 14px; }
.notice.error { background: var(--stop-soft); color: var(--stop); border-color: transparent; }
.notice.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.notice.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.notice ul { margin: 4px 0 0; padding-left: 20px; }
.notice a { color: inherit; }
.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: var(--small); font-weight: 650; background: var(--accent-soft); color: var(--accent); }
.badge.soft { background: var(--surface-2); color: var(--muted); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.stop { background: var(--stop-soft); color: var(--stop); }
.empty-state { text-align: center; padding-block: 40px; }
.empty-state .lead { margin-inline: auto; }
.ticks { list-style: none; padding: 0; margin: 0 0 14px; }
.ticks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 4px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--small); }

/* landing */
.hero { padding-block: 0; }
.hero h1 { font-size: 2.1rem; }
@media (min-width: 768px) { .hero h1 { font-size: 2.6rem; } }
.two-col { display: grid; gap: 8px 32px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1.1fr 1fr; align-items: start; } }

/* forms */
label { display: block; font-weight: 600; margin: 16px 0 4px; }
input[type="text"], input[type="password"], input[type="number"], input[type="email"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 10px 14px; min-height: var(--tap); }
textarea { resize: vertical; line-height: 1.55; }
textarea.tall { min-height: 280px; }
input:hover, textarea:hover, select:hover { border-color: var(--muted); }
[aria-invalid="true"] { border-color: var(--stop); }
.field-error { color: var(--stop); font-weight: 600; font-size: var(--small); margin: 6px 0 0; }
.counter { text-align: right; color: var(--muted); font-size: var(--small); margin: 4px 0 0; min-height: 1.4em; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.group { margin-top: 24px; }
fieldset.group > legend { font-weight: 650; padding: 0; margin-bottom: 4px; }
fieldset.bare > legend.q-text { font-family: var(--serif); font-size: 1.35rem; line-height: 1.35; padding: 0; margin-bottom: 10px; font-weight: 600; }
.row2 { display: grid; gap: 0 16px; }
.row3 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 2fr 1fr 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; margin: 14px 0; cursor: pointer; min-height: var(--tap); }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: none; }
.check input { margin-top: 2px; }
.choices { display: grid; gap: var(--s3); margin-block: var(--s3); }
.choices.inline { display: flex; flex-wrap: wrap; }
.choice { display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 16px; min-height: var(--tap);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-weight: 500; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease; }
.choice:hover { border-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.choices.cards .choice { padding: 14px 18px; }
.inline-form { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.inline-form input { width: 100px; }

/* stepper */
.stepper { margin-bottom: 24px; }
.step-count { font-size: var(--small); color: var(--muted); margin: 0 0 6px; }
.stepper ol { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; }
.stepper li { flex: 1 1 0; min-width: 0; border-top: 3px solid var(--line-strong); padding-top: 8px; }
.stepper li.done { border-color: var(--accent); }
.stepper li.current { border-color: var(--accent); }
.stepper a, .step-static { display: flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; font-size: var(--small); min-height: 28px; }
.stepper li.current .step-static { color: var(--ink); font-weight: 650; }
.stepper a:hover { color: var(--accent); }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid currentColor; font-size: var(--small); font-weight: 650; flex: none; }
.stepper li.done .num, .stepper li.current .num { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.lbl { display: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li.current .lbl { display: inline; }
@media (min-width: 720px) { .lbl { display: inline; } .stepper ol { gap: 12px; } }

/* tabs and dropzone */
.tablist { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tab { font: inherit; font-weight: 600; background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 10px 16px; min-height: var(--tap); cursor: pointer; color: var(--muted); margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 28px 20px; text-align: center; background: var(--bg); transition: border-color .15s ease, background-color .15s ease; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-main { font-weight: 650; margin-bottom: 4px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-input:focus-visible + .btn { outline: 3px solid var(--focus); outline-offset: 2px; }
.file-meta { display: grid; gap: 4px 16px; margin: 16px auto 0; max-width: 360px; text-align: left; }
.file-meta div { display: flex; gap: 12px; }
.file-meta dt { color: var(--muted); min-width: 56px; }
.file-meta dd { margin: 0; font-weight: 600; }
.photo-figure { margin: 10px 0 0; }
.photo-preview { display: block; border-radius: 6px; object-fit: cover; border: 1px solid var(--line-strong); }
.auth-question { margin: 6px 0; }

/* questions */
.q-progress { font-weight: 650; margin-bottom: 6px; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-2); display: block; }
progress::-webkit-progress-bar { background: var(--surface-2); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; transition: width .4s ease; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
progress.thin { height: 6px; }
.q-card .why { color: var(--muted); font-size: var(--small); }
.req { font-size: var(--small); color: var(--muted); }
.profile-card .item-title { font-family: var(--font); font-size: 1.05rem; margin-bottom: 4px; }
.profile-card p { color: var(--muted); }

/* progress card */
.progress-card { text-align: left; }
.progress-card .step-now { margin: 12px 0 0; color: var(--muted); font-weight: 600; }

/* verdict */
.reasons { padding-left: 22px; }
.reasons li { margin-bottom: 6px; }
.review-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-block: 10px; background: var(--bg); box-shadow: none; }

/* documents */
.previews { display: grid; gap: 16px; }
@media (min-width: 900px) { .previews { grid-template-columns: 1fr 1fr; } }
.pdf { width: 100%; height: 540px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
@media (min-width: 900px) { .pdf { height: 640px; } }
.review h2, .review h3 { font-family: var(--font); }
.prose h1, .prose h2, .prose h3 { margin-top: 28px; }
.prose ul { padding-left: 22px; }

/* tables */
.table-wrap { overflow-x: auto; }
table.apps { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.apps th, table.apps td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: var(--small); }
table.apps thead th { color: var(--muted); font-size: var(--small); font-weight: 650; background: var(--surface-2); }
.row-actions { white-space: nowrap; }
.wrap-text { max-width: 360px; }
@media (max-width: 640px) {
  table.apps.stack thead, table.apps thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  table.apps tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.apps th, table.apps td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; text-align: right; }
  table.apps [data-label]::before { content: attr(data-label); color: var(--muted); font-weight: 600; text-align: left; }
  .row-actions { justify-content: flex-end; }
}
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.admin-nav a { padding: 10px 14px; text-decoration: none; color: var(--muted); min-height: var(--tap); display: inline-flex; align-items: center; border-bottom: 3px solid transparent; }
.admin-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: .06em; background: var(--surface); padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); }
.danger-zone { border-color: var(--stop); }

/* dialog and toasts */
.dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(20, 15, 5, .5); }
.toasts { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow); pointer-events: auto; }
.save-state { font-size: var(--small); color: var(--muted); margin: 2px 0 0; }
.save-state:empty { display: none; }

/* skeleton */
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; border-radius: 8px; min-height: 1em; }

/* work in progress: a spinner beside the title and a softly pulsing bar, so the page never looks frozen */
.working { display: flex; align-items: center; gap: 10px; }
.spinner { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .spinner { animation: spin .9s linear infinite; }
  .step.current .step-mark { animation: spin 1s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  progress.pulse { animation: pulse 1.6s ease-in-out infinite; }
  @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
  .skeleton { animation: shimmer 1.4s ease-in-out infinite; }
  @keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
  .toast { animation: rise .2s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { border-top-color: var(--accent); border-right-color: var(--accent); }
  progress.pulse { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .stepper { display: none; } }

input[type="file"] { font: inherit; color: var(--muted); max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; margin-right: 12px; min-height: var(--tap); padding: 8px 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--surface-2); }

/* quiet details, in one place */
.trial-note { background: var(--accent-soft); color: var(--accent); padding: 8px 0; font-size: var(--small); border-bottom: 1px solid var(--line); }
details.more { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 4px; }
details.more > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; list-style-position: inside; }
details.more[open] > summary { margin-bottom: 4px; }

/* five quiet dots for a rating */
.dots { display: flex; gap: 4px; margin-block: 6px; }
.dot { position: relative; display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); margin: 0; cursor: pointer; }
.dot input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.dot-mark { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: transparent;
  transition: background-color .15s ease, border-color .15s ease; }
.dot:hover .dot-mark { border-color: var(--accent); }
.dot:has(input:checked) .dot-mark { background: var(--accent); border-color: var(--accent); }
.dot:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* spacing between a field and the button after it, in every form */
input + .btn, textarea + .btn, select + .btn, form > .btn { margin-top: 16px; }
.card + .card, form > .card { margin-top: 16px; }
form > .hint:last-of-type { margin-top: 16px; }
.row2 > div, .row3 > div { min-width: 0; }

/* phones: no sideways scrolling, tables become stacked lists, forms stack */
@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; }
  .inline-form { flex-wrap: wrap; justify-content: flex-end; }
  .inline-form input { width: 100%; max-width: 160px; }
  .admin-nav a { padding-inline: 10px; }
  .card { padding: 16px; }
  .code { font-size: 1rem; overflow-wrap: anywhere; }
}

/* W4b: quality over quantity. A quiet letter, a serif title, thin rules, one muted accent. */
.letter { max-width: 44rem; margin-inline: auto; padding: 28px 4px 12px; }
.letter-title { font-size: 2rem; font-weight: 500; letter-spacing: .005em; margin: 4px 0 8px; }
.eyebrow { font-size: var(--small); letter-spacing: .1em; text-transform: uppercase; font-variant-caps: all-small-caps;
  color: var(--muted); margin: 0 0 4px; }
.label { font-family: var(--font); font-size: 1.1rem; font-weight: 650; letter-spacing: normal; text-transform: none; color: var(--ink); margin: 0 0 var(--s2); }
.recommendation { font-family: var(--serif); font-size: 1.35rem; color: var(--accent); margin: 0 0 28px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.columns { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 28px; }
@media (min-width: 720px) { .columns { grid-template-columns: 1fr 1fr; gap: 48px; } }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 10px 0; border-top: 1px solid var(--line); line-height: 1.55; }
.plain-list li:first-child { border-top: 0; padding-top: 0; }
.closing { font-size: 1.08rem; line-height: 1.7; margin: 8px 0 28px; }
.reasons-block, .looked, .verify { margin-block: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.looked .plain-list li { color: var(--muted); font-size: var(--small); padding-block: 6px; border-top: 0; }
.letter .review-item { border: 0; border-top: 1px solid var(--line); padding: 16px 0; margin: 0; }
.letter .actions { margin-top: 24px; }
.reviewed { display: flex; align-items: center; gap: 8px; color: var(--accent); margin: 0 0 16px; }
.reviewed .mark { flex: none; }
.small-caps { font-variant-caps: all-small-caps; letter-spacing: .12em; font-weight: 600; }
.quiet-line { color: var(--muted); font-style: italic; }
.apps .view { display: block; }
.apps .sub { display: block; font-size: var(--small); color: var(--muted); }
.facts li { font-size: 1.05rem; }

/* W4c: the in-page PDF viewer and the readiness block */
.doc-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-block: 4px 12px; }
.pdf-viewer { width: 100%; min-height: 120px; }
.pdf-pages { display: grid; gap: 12px; justify-items: center; }
.pdf-page { width: 100%; display: flex; justify-content: center; }
.pdf-page canvas { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.pdf-viewer[data-state="ready"] [data-viewer-loading] { display: none; }
.readiness { margin-block: 8px 20px; }
.readiness .ready-title { font-family: var(--serif); margin-bottom: 4px; }
.readiness .lead { margin-top: 0; }
.checklist { margin: 8px 0 12px; }
.checklist .check { margin: 8px 0; font-weight: 400; }
.quiet-link { margin: 0 0 12px; }

/* profile review */
.review-row { display: grid; gap: 6px; align-items: end; }
.review-item.is-done { border-color: var(--line-strong); }
.review-item textarea, .review-row input[type="text"], .review-row input[type="email"] { width: 100%; }
.review-count { font-weight: 600; }
.chip-form { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.before { color: var(--muted); }

/* follow-up question: the stored text the question is about */
.q-quote { margin: 0 0 12px; padding: 0; }
.q-quote blockquote { margin: 4px 0 0; padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.q-quote blockquote p { margin: 0 0 6px; }
.q-quote blockquote p:last-child { margin-bottom: 0; }

/* profile review: skill groups are closed until opened */
/* expandable sections: a chevron that turns, and a Show / Hide word (no JavaScript) */
summary.expander { list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
summary.expander::-webkit-details-marker { display: none; }
summary.expander .chev { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); margin: 0 4px 0 2px; transition: transform .15s ease; }
details[open] > summary.expander .chev { transform: rotate(45deg); }
summary.expander .toggle { margin-left: auto; font-size: var(--small); }
summary.expander .when-open, details[open] > summary.expander .when-closed { display: none; }
details[open] > summary.expander .when-open { display: inline; }
.skill-group { padding: 0; margin: 0 0 10px; }
.skill-group > summary, .skill-more > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; }
.skill-group > .chips, .skill-more > .chips { padding: 0 14px 12px; }
.skill-more { margin: 0 0 4px; }
.skill-more > summary { color: var(--accent); font-weight: 600; }
.skill-group .chip-form { display: flex; align-items: center; gap: 6px; }
.skill-group .chips li { max-width: 100%; overflow-wrap: anywhere; }
@media (max-width: 420px) { .skill-group .chips { display: block; } .skill-group .chips li { margin-bottom: 8px; border-radius: var(--radius-sm); } }

/* profile review: summary, states, compact fixes, sticky bar */
.review-summary .open-list { margin: 6px 0 0; padding-left: 1.2rem; }
.review-summary li { margin-bottom: 4px; overflow-wrap: anywhere; }
.badge.state-open { background: var(--warn-soft); color: var(--warn); }
.badge.state-optional { background: var(--surface-2); color: var(--muted); }
.badge.state-fixed, .badge.state-correct { background: var(--good-soft); color: var(--good); }
.review-item.state-fixed, .review-item.state-correct { padding-top: 6px; padding-bottom: 6px; }
.fixes { margin: 6px 0; }
.fixes > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--muted); }
.fix-list { list-style: none; margin: 0; padding: 0; }
.fix-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
mark.was { background: var(--stop-soft); color: var(--stop); }
mark.now { background: var(--good-soft); color: var(--good); }
.fix-it > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.confirm-bar { position: sticky; bottom: 0; z-index: 5; background: var(--surface); border-top: 1px solid var(--line-strong); padding: 10px var(--gutter); margin: 24px calc(-1 * var(--gutter)) 0; box-shadow: 0 -2px 6px rgba(40, 30, 10, .06); }
.confirm-bar .actions { margin-top: 6px; }
.bar-status.is-open { color: var(--warn); font-weight: 600; }
.skip-rest { margin-top: 12px; }
.linklike { background: none; border: 0; padding: 8px 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; min-height: var(--tap); }
.h3.inline { display: inline; margin: 0; }
details.card > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; }

/* first-page brand card */
.brand-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  padding: 28px var(--gutter) 24px; text-align: center; width: 100%; margin: 0; }
.brand-title { font-size: 2.75rem; line-height: 1.1; font-weight: 600; margin: 0; letter-spacing: -.01em; text-align: center; }
.brand-tagline { color: var(--muted); font-size: 1.1rem; margin: 6px 0 0; }
.brand-rule { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.brand-cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.brand-cols li { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.brand-icon { color: var(--accent); margin-bottom: 6px; }
.brand-cols strong { font-size: 1.05rem; }
.brand-cols span { color: var(--muted); font-size: var(--small); }
@media (max-width: 560px) { .brand-cols { grid-template-columns: 1fr; gap: 18px; } .brand-title { font-size: 2rem; } }
@media (min-width: 561px) and (max-width: 767px) { .brand-title { font-size: 2.3rem; } }
.brand-promise { text-align: center; text-align-last: center; font-size: 1.35rem; font-family: var(--serif); font-style: italic; margin: var(--s6) 0 var(--s7); width: 100%; }
.hero-title { font-size: 1.5rem; }
.headline { font-size: 1.15rem; font-weight: 600; max-width: 62ch; margin: 4px 0 14px; }
.personal-point { border-left: 3px solid var(--warn); }
.money { display: flex; align-items: center; gap: 6px; max-width: 14rem; }
.money-sign { font-weight: 600; }

/* Design system v2 (group 1): sections, justified reading text, spacing scale */
.page-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); margin-block: var(--s5); box-shadow: var(--shadow); }
.page-section > :last-child { margin-bottom: 0; }
.page-section > h2 { margin-bottom: var(--s3); }
.page-section .sec-lead { color: var(--muted); margin-bottom: var(--s4); }
.page-section .nothing { color: var(--muted); margin: 0; }
@media (max-width: 640px) { .page-section { padding: var(--s4); } }
/* Every paragraph that runs to two or more lines is justified; its last line stays left, so a one line text is simply left.
   Headings, labels, buttons, summaries and table cells stay left. Words are never cut by hyphens. The rule has no weight
   of its own (:where), so a class that centres or right aligns a text still wins. On narrow phones the lines are short, so
   everything falls back to left. */
html { hyphens: manual; -webkit-hyphens: manual; }
:where(main) :where(p, li, blockquote, dd) { text-align: justify; text-align-last: left; text-wrap: pretty; }
.prose p, .prose li, .review p, .review li, .justify { text-align: justify; text-align-last: left; text-wrap: pretty; }
@supports not (text-wrap: pretty) { :where(main) :where(p, li, blockquote, dd), .prose p, .prose li, .review p, .review li, .justify { text-align: left; } }
@media (max-width: 419px) { :where(main) :where(p, li, blockquote, dd), .prose p, .prose li, .review p, .review li, .justify { text-align: left; text-align-last: auto; } }
.btn, .label, .eyebrow, h1, h2, h3, h4, label, legend, summary, .plain-list li, .badge, .stepper li, .summary-row dt, .summary-row dd, .tag-label, .chips li { text-align: left; text-align-last: auto; }
/* a quote from the posting, set apart from our own words */
.posting-quote { margin: var(--s3) 0 var(--s4); padding: var(--s2) 0 var(--s2) var(--s4); border-left: 3px solid var(--line-strong); color: var(--ink); }
.posting-quote .quote-label { display: block; font-size: var(--small); color: var(--muted); font-weight: 600; margin: 0 0 var(--s1); }
.posting-quote blockquote, .posting-quote q { margin: 0; font-style: italic; quotes: none; text-align: left; }
.stack > * + * { margin-top: var(--s4); }


/* group 2: the steps of a job, each with a mark when done */
.steps { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: var(--s2); }
.step { display: flex; align-items: center; gap: var(--s3); color: var(--muted); }
.step-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); position: relative; background: var(--surface); }
.step.done { color: var(--ink); }
.step.done .step-mark { background: var(--accent); border-color: var(--accent); }
.step.done .step-mark::after { content: ""; position: absolute; left: 5px; top: 5px; width: 9px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg); }
.step.current { color: var(--ink); font-weight: 650; }
.step.current .step-mark { border-color: var(--accent); border-top-color: transparent; }
.step.failed { color: var(--stop); font-weight: 650; }
.step.failed .step-mark { border-color: var(--stop); }
.elapsed { margin: var(--s4) 0 0; font-variant-numeric: tabular-nums; }

/* group 3: skills as compact tags (6px radius, one line of text, a small x), wrapped inside the tag when long */
.chips { gap: var(--s2); }
.chips li.tag { padding: 0; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); font-size: var(--small); max-width: 100%; display: block; }
.tag-view { display: flex; align-items: stretch; max-width: 100%; }
.tag-label { padding: 6px 10px; overflow-wrap: anywhere; line-height: 1.35; }
.tag-text, .tag-pencil, .tag-remove { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; margin: 0; }
.tag-text { display: none; padding: 6px 4px 6px 10px; text-align: left; overflow-wrap: anywhere; line-height: 1.35; min-width: 0; }
.js .tag-text { display: block; }
.js .tag-label { display: none; }
.tag-pencil { display: none; padding: 0 6px; color: var(--muted); }
.js .tag-pencil { display: inline-flex; align-items: center; }
.tag-remove { padding: 0 10px; font-size: 1.15rem; line-height: 1; color: var(--muted); border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; min-width: var(--tap); min-height: 32px; }
.tag-text:hover, .tag-pencil:hover { color: var(--accent); background: var(--accent-soft); }
.tag-remove:hover { color: var(--stop); background: var(--stop-soft); }
.tag-x { margin: 0; display: flex; }
.tag-edit { padding: 0; }
.js .tag-edit { display: none; }
.js .tag.editing .tag-edit { display: block; padding: var(--s2); }
.js .tag.editing .tag-view { display: none; }
.js .tag-edit > summary { display: none; }
.tag-edit-form { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.tag-edit-form input[type="text"] { width: 14rem; max-width: 100%; }
.tag-edit-form .btn { margin: 0; }
.skill-group .chips li.tag { margin-bottom: 0; border-radius: 6px; }
@media (max-width: 420px) { .skill-group .chips { display: flex; } .skill-group .chips li.tag { border-radius: 6px; } }
.tag-add { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; padding: 0 14px 14px; margin: 0; }
.tag-add input[type="text"] { flex: 1 1 12rem; width: auto; min-width: 0; }
.tag-add .btn { margin: 0; }

/* group 4: the "Should you apply?" page, in numbered sections */
.assessment .page-section { margin-block: var(--s6); }
.assessment .page-section h2 { font-size: 1.35rem; display: flex; align-items: center; }
.rec-title { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); margin: 0 0 var(--s2); }
.rec-why { font-size: 1.1rem; margin: 0 0 var(--s4); }
.assessment .reasons-block, .assessment .looked { border-top: 1px solid var(--line); margin-top: var(--s5); padding-top: var(--s4); }
.assessment .closing { margin-block: var(--s3) var(--s4); }
.match-count { margin-bottom: var(--s3); }
.match-list { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
.match-row { display: grid; gap: var(--s1) var(--s5); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
@media (min-width: 720px) { .match-row { grid-template-columns: 1fr 1fr; align-items: start; } }
.match-req q { font-style: italic; quotes: "\201C" "\201D"; }
.match-kind { display: inline-block; margin-left: var(--s2); font-size: var(--small); color: var(--muted); }
.match-have { overflow-wrap: anywhere; }
.match-row.found .match-sign { color: var(--good); font-weight: 700; }
.match-row.missing { background: var(--warn-soft); border-color: transparent; }
.match-row.missing .match-have { color: var(--warn); }
.assessment .review-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--s4) var(--s5); margin-block: var(--s4); }
.assessment .review-item .choices { margin-bottom: var(--s2); }
.sub-h { margin-top: var(--s5); }
.btn-hint[role="alert"] { color: var(--stop); }

/* group 5: the documents page, one card per section */
.assessment .page-section h2, .page-section > h2 { display: flex; align-items: center; }
.previews { gap: var(--s5); }
.preview > h3 { margin-bottom: var(--s2); }
.preview .doc-actions { margin-bottom: var(--s4); }
.check-list { margin: 0 0 var(--s4); padding-left: var(--s5); display: grid; gap: var(--s3); }
.check-list > li { padding-left: var(--s1); }
.check-list > li::marker { font-weight: 650; color: var(--accent); }
.check-list .check { margin: 0; font-weight: 400; }
.check-link { display: inline-block; margin: 0 0 0 36px; font-size: var(--small); }
.attach-mark { margin-right: var(--s2); }
.page-section.prepared > summary { cursor: pointer; min-height: var(--tap); }
.page-section.prepared > summary h2 { margin: 0; display: inline-flex; align-items: center; }
.page-section.prepared[open] > summary { margin-bottom: var(--s4); }
.page-section.prepared > .review, .page-section.prepared .ticks { margin-top: var(--s2); }
/* a flagged sentence: the sentence, then two buttons with room between them */
.flagged-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.flagged-item { padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.flagged-text { margin: 0 0 var(--s4); padding-left: var(--s4); border-left: 3px solid var(--warn); font-style: italic; }
.sentence-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-start; }
.sentence-actions > form { margin: 0; }
.replace-box { flex: 0 1 auto; }
.replace-box[open] { flex: 1 1 100%; }
.replace-box > summary { list-style: none; display: inline-flex; width: auto; user-select: none; }
.replace-box > summary::-webkit-details-marker { display: none; }
.replace-box[open] > summary { background: var(--accent-soft); }
.replace-box > form { margin-top: var(--s4); }
.replace-box textarea + .btn { margin-top: var(--s3); }

/* group 7: the rating circles carry visible numbers, with the two ends named */
.dots { gap: var(--s2); }
.dot { height: auto; min-height: var(--tap); flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 11px; gap: var(--s1); }
.dot-n { font-size: var(--small); font-weight: 600; color: var(--ink); line-height: 1; margin-top: 2px; padding-bottom: var(--s1); }
.dot-mark { flex: none; }
.dot input { inset: 0; }
.scale-hint { display: flex; justify-content: space-between; max-width: 18rem; margin: 0 0 var(--s3); font-size: var(--small); color: var(--muted); }

/* polish after looking at the rendered pages */
.sentence-actions .btn, .sentence-actions form .btn { margin-top: 0; }
.replace-box > form .btn { margin-top: var(--s3); }
.doc-actions .btn { margin-top: 0; }

/* Button help: the explanation of a button (or of a checkbox) sits directly under it, in small muted text, close to its own
   control and with room before the next one. It is linked with aria-describedby. Nothing floats beside a button. */
.with-help { display: block; margin-block: var(--s3) var(--s4); }
.with-help > .btn { margin: 0; }
.with-help > .btn-hint, .btn-hint { display: block; margin: var(--s1) 0 0; color: var(--muted); font-size: var(--small); max-width: none; }
.with-help + .with-help { margin-top: var(--s5); }
.check + .btn-hint { margin: calc(-1 * var(--s2)) 0 var(--s4) 36px; }
.with-help > .btn.quiet { padding-inline: 0; min-width: 0; }
/* "Correct the title" is a control that opens a form, not a heading: it has an arrow, and the form it opens is set in under it */
.fix-it > summary { list-style: none; }
.fix-it > summary::-webkit-details-marker { display: none; }
.fix-it > summary::before { content: "\25B8"; display: inline-block; margin-right: var(--s2); transition: transform .15s ease; }
.fix-it[open] > summary::before { transform: rotate(90deg); }
.fix-it > form { margin: var(--s1) 0 var(--s4) var(--s2); padding-left: var(--s4); border-left: 3px solid var(--line-strong); }
p, li, .hint, .btn-hint { text-wrap: pretty; }
/* on a phone the current step gets more room, so its name is never cut */
@media (max-width: 719px) { .stepper li.current { flex-grow: 3.2; } .stepper li.current .lbl { overflow: visible; text-overflow: clip; } }

/* ---- round 3 ---- */

/* the first page: card, promise line, heading and content share one centred width, with generous space between them */
.landing { width: 100%; max-width: 760px; margin: var(--s2) auto 0; }
.landing .hero { margin-bottom: var(--s5); }
.landing .hero-title { margin-bottom: var(--s3); }
.landing .two-col { gap: var(--s5); }
@media (min-width: 820px) { .landing .two-col { grid-template-columns: 1.15fr 1fr; } }
.landing .two-col > .card, .landing .two-col > section { margin-block: 0; }

/* optional radio groups: a small link that takes the answer back (shown only with JavaScript) */
.clear-row { margin: 0 0 var(--s3); }
[data-clear-choice] { display: none; }
.js [data-clear-choice] { display: inline-flex; align-items: center; padding: 0; min-height: 32px; font-size: var(--small); }
.clear-row .linklike { padding: 0; }

/* one button row for the whole app: the same height, a 12 px gap, never one button alone on a second line on desktop */
.actions, .dialog-actions, .downloads, .doc-actions, .sentence-actions, .inline-form { align-items: center; gap: var(--s3); }
.actions > form, .dialog-actions > form, .doc-actions > form { margin: 0; display: contents; }
@media (min-width: 640px) {
  .actions, .downloads, .doc-actions { flex-wrap: nowrap; align-items: stretch; }
  .actions > .btn, .downloads > .btn, .doc-actions > .btn { white-space: nowrap; }
  .doc-actions > .btn { padding-inline: var(--s4); flex: 0 1 auto; min-width: 0; }
}
@media (max-width: 639px) { .doc-actions > .btn, .downloads > .btn { flex: 1 1 100%; } }
.actions .btn, .doc-actions .btn, .downloads .btn { margin-top: 0; }

/* date rows: Start, End, their inputs and the button share one row, one height, one centre line */
.date-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s3); }
.date-row label { margin: 0; line-height: 1; }
.date-row input[type="text"] { min-height: var(--tap); height: var(--tap); }
.date-row .btn { margin: 0; height: var(--tap); }
.date-pair { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; }
.date-row input { width: 9rem; max-width: none; min-width: 0; }
@media (max-width: 520px) {
  .date-row { flex-direction: column; align-items: stretch; }
  .date-pair { display: flex; }
  .date-pair input { width: auto; flex: 1 1 auto; }
  .date-row .btn { width: 100%; }
}

/* "Should you apply?": the reasons are a numbered list, the looked-at facts a two column summary */
.assessment .reasons-block { border-top: 0; padding-top: 0; margin-top: var(--s5); }
.reasons-list { margin: var(--s2) 0 0; padding-left: var(--s5); display: grid; gap: var(--s3); }
.reasons-list > li { padding-left: var(--s1); line-height: 1.55; }
.reasons-list > li::marker { font-weight: 650; color: var(--accent); }
.assessment .closing { margin-top: var(--s5); }
.looked .label { margin-bottom: var(--s3); }
.summary-list { margin: 0; display: grid; }
.summary-row { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: var(--s1) var(--s5); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.summary-row:first-child { border-top: 0; padding-top: 0; }
.summary-row dt { color: var(--muted); font-weight: 600; }
.summary-row dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .summary-row { grid-template-columns: 1fr; } }
.assessment .page-section > .looked:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

/* the feedback form: the two documents as two rows, each a two part segmented control */
.rate-rows { display: grid; gap: var(--s3); margin-top: var(--s2); }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.rate-name { flex: 0 0 8rem; font-weight: 600; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.segmented label { position: relative; display: block; margin: 0; font-weight: 500; }
.segmented label + label { border-left: 1px solid var(--line-strong); }
.segmented input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 var(--s5); min-width: 7rem; transition: background-color .15s ease, color .15s ease; }
.segmented label:hover span { background: var(--surface-2); }
.segmented label:has(input:checked) span { background: var(--accent); color: var(--accent-ink); font-weight: 650; }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.rate-row .clear-row { margin: 0; }
@media (max-width: 420px) { .rate-name { flex-basis: 100%; } }

/* Edit my documents: one rhythm for every group, and the CV arranged section by section */
.cv-group { margin: 0 0 var(--s6); }
.cv-group > legend { margin-bottom: var(--s2); }
.cv-group > legend + label { margin-top: var(--s2); }
.cv-group > legend + label.sr-only + textarea, .cv-group > legend + label.sr-only + input { margin-top: 0; }
.words-h, .preview-h { margin-top: var(--s6); }
.card .actions { margin-top: var(--s5); }
.arrange { margin-top: var(--s4); }
.arrange .hint { margin-bottom: var(--s4); }
.arrange-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.arrange-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); padding: var(--s3) var(--s4); }
.arrange-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); }
.arrange-name { font-weight: 650; }
.arrange-buttons { display: flex; flex-wrap: wrap; gap: var(--s3); }
.arrange-buttons .btn, .arrange-entry-list .btn { margin: 0; }
.arrange-entries { margin-top: var(--s2); }
.arrange-entries > summary { cursor: pointer; min-height: var(--tap); display: flex; align-items: center; color: var(--accent); font-weight: 600; }
.arrange-entry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.arrange-entry-list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); padding: var(--s2) 0; border-top: 1px solid var(--line); }
.arrange-entry-list > li:first-child { border-top: 0; }
.arrange-entry { flex: 1 1 14rem; min-width: 0; }
.arrange-sub { margin-top: var(--s5); }
@media (max-width: 520px) { .arrange-buttons { width: 100%; display: grid; grid-template-columns: 1fr 1fr; } .arrange-buttons .btn:last-child { grid-column: 1 / -1; } }

/* centred blocks stay centred, and short list items in narrow columns stay left, so no line shows wide gaps */
.brand-card p, .brand-cols li, .brand-cols span, .empty-state p { text-align: center; text-align-last: center; }
.ticks li, .two-col .card li, .stepper li, .chips li, .steps li, .arrange-entry-list li, .match-row, .match-row span { text-align: left; text-align-last: auto; }

/* K3: a checklist has no numbers (the box is the marker, level with the first line); reasons keep their numbers,
   level with the first line, with the wrapped lines hanging under the text */
.check-list { list-style: none; padding: 0; margin: 0 0 var(--s4); display: grid; gap: var(--s3); }
.check-list > li { padding: 0; }
.check-list .check { align-items: flex-start; gap: var(--s3); min-height: 0; line-height: 1.55; }
.check-list .check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; }
.check-list .check-link { margin-left: calc(20px + var(--s3)); }
.reasons-list { list-style: none; counter-reset: reason; padding: 0; margin: var(--s2) 0 0; display: grid; gap: var(--s3); }
.reasons-list > li { counter-increment: reason; display: grid; grid-template-columns: 1.9em minmax(0, 1fr); column-gap: var(--s2); padding: 0; line-height: 1.55; }
.reasons-list > li::before { content: counter(reason) "."; font-weight: 650; color: var(--accent); text-align: right; }
