
:root {
  --ink: #1b2333; --muted: #55607a; --line: #dbe1ee; --bg: #f3f5fb; --card: #ffffff;
  --accent: #27458f; --accent-dark: #1b3270; --accent-soft: #e8eefc; --accent-line: #b9c8ee;
  --bad: #8a4b08; --warn: #7a4f00; --ok: #1e6b3a; --focus: #0b57d0;
  --field: #6c7894; --radius: 14px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(27, 35, 51, .06), 0 4px 14px rgba(27, 35, 51, .06);
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink);
  background: var(--bg); line-height: 1.55; font-size: 1.0625rem; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: .9em; word-break: break-all; }
h1 { font-size: 2rem; line-height: 1.2; margin: .3rem 0 .8rem; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .7rem; }
small { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: var(--accent); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; top: .5rem; }

header.top { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; padding: .8rem 1.6rem;
  background: linear-gradient(100deg, #1a2b63, #27458f); color: #fff; }
header.top a { color: #fff; text-decoration: none; }
header.top .brand { font-weight: 750; font-size: 1.3rem; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .6rem; }
header.top .brand img.logo { height: 28px; width: auto; display: block; }
header.top .sub { color: #dbe4ff; font-size: .95rem; }
header.top nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; align-items: center; }
header.top nav a { padding: .3rem .1rem; border-bottom: 2px solid transparent; }
header.top nav a:hover { border-bottom-color: #fff; }
header.top button.link { color: #fff; font-size: 1rem; }
header.top :focus-visible { outline-color: #fff; }
.lang { display: inline-flex; gap: .15rem; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: .1rem; }
.lang a { padding: .1rem .6rem; border-radius: 999px; border-bottom: 0; font-size: .9rem; }
.lang a.on { background: #fff; color: var(--accent-dark); font-weight: 700; }

main { max-width: 1500px; margin: 0 auto; padding: 1.4rem 1.6rem 4rem; }
.flash { background: #e6f4ea; border: 1px solid #a9d6b7; padding: .6rem .9rem; border-radius: var(--radius-sm); color: #14502b; }
.notice { background: #fff6dd; border: 1px solid #e3c36b; padding: .7rem .9rem; border-radius: var(--radius-sm); color: #5a3d00; }
.error { color: var(--bad); font-weight: 600; }
.hint { color: var(--muted); font-size: .95rem; margin: .2rem 0 .7rem; }
.empty { color: var(--muted); font-style: italic; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem;
  margin: 0 0 1.2rem; min-width: 0; box-shadow: var(--shadow); }
.card.narrow { max-width: 560px; margin: 2rem auto; }

form label { display: block; margin: 0 0 .7rem; font-weight: 600; font-size: .97rem; }
form label.check { display: inline-flex; gap: .4rem; font-weight: 400; margin-right: 1rem; }
input, select, textarea { display: block; width: 100%; max-width: 100%; margin-top: .25rem; padding: .55rem .7rem; min-height: 2.6rem;
  font: inherit; color: var(--ink); border: 1px solid var(--field); border-radius: var(--radius-sm); background: #fff; }
textarea { min-height: 4.5rem; }
input:hover, select:hover, textarea:hover { border-color: var(--accent); }
input[type=checkbox], input[type=radio] { display: inline; width: 1.15rem; height: 1.15rem; min-height: 0; margin: 0; accent-color: var(--accent); flex: none; }
input[type=file] { padding: .45rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 .7rem; }
legend { font-weight: 600; font-size: .97rem; }
button, a.button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600;
  padding: .55rem 1.1rem; min-height: 2.6rem; border-radius: var(--radius-sm); border: 1px solid var(--accent);
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; }
button:hover, a.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
button.secondary, a.button.secondary { background: #fff; color: var(--accent); border-color: var(--accent-line); }
button.secondary:hover, a.button.secondary:hover { background: var(--accent-soft); color: var(--accent-dark); }
button.big, a.button.big { font-size: 1.1rem; padding: .75rem 1.5rem; min-height: 3rem; }
button.danger, a.button.danger { background: #fff; border-color: var(--bad); color: var(--bad); }
button.link { background: none; border: none; padding: 0; min-height: 0; color: var(--accent); text-decoration: underline; font-weight: 400; }
button.link:hover { background: none; color: var(--accent-dark); }
button.link.danger, a.danger { color: var(--bad); background: none; }
form.inline { display: inline; }
details.add { margin-top: .8rem; }
details.add summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: .6rem; }
.scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
table.list th, table.list td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; color: var(--muted); white-space: nowrap; }
table.list td.actions { white-space: nowrap; }
table.list td.actions > * { margin-right: .6rem; }
table.list tr:target, li:target { background: #fff4c2; }
ul.paths { margin: 0; padding-left: 1rem; }

.badge { display: inline-block; white-space: nowrap; font-size: .78rem; font-weight: 600; border-radius: 10px; padding: .05rem .55rem; }
p.ok { color: var(--ok); }
span.lvl { display: inline-block; padding: .05rem .5rem; border-radius: 4px; font-weight: 600; font-size: .85rem; }
.card form + h2 { margin-top: 1.4rem; }
.sev { font-weight: 600; white-space: nowrap; }
@media (max-width: 1100px) {
  table.list th { white-space: normal; }
  table.list th, table.list td { padding: .4rem .35rem; }
}

/* refused forms keep what was typed */
.field-error { display: block; margin-top: .25rem; color: var(--bad); font-weight: 600; font-size: .85rem; }
label:has(.field-error) > input, label:has(.field-error) > select, label:has(.field-error) > textarea,
fieldset:has(> .field-error) { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.card h3 { font-size: 1rem; margin: 1rem 0 .5rem; }

/* ===== quick path (home and the four screens) ===== */
.hero { max-width: 52rem; padding: .6rem 0 .4rem; }
.hero h1 { font-size: 2.5rem; }
.lead { font-size: 1.2rem; color: #333d55; max-width: 46rem; margin: 0 0 1.2rem; }
.honesty { background: var(--accent-soft); border: 1px solid var(--accent-line); border-left: 6px solid var(--accent);
  border-radius: var(--radius-sm); padding: .9rem 1.2rem; margin: 0 0 1.6rem; max-width: 62rem; }
.honesty h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-dark); margin: 0 0 .3rem; }
.honesty p { margin: 0; color: #1d2a55; }
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; margin: 0 0 2rem; }
a.way { display: flex; flex-direction: column; gap: .45rem; background: #fff; border: 2px solid var(--line); border-radius: 18px;
  padding: 1.4rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
a.way:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--ink); }
a.way.primary { border-color: var(--accent); }
.way-n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.way-t { font-size: 1.3rem; font-weight: 700; }
.way-d { color: var(--muted); flex: 1; }
.way-go { color: var(--accent); font-weight: 700; margin-top: .4rem; }
.continue { max-width: 52rem; }
ul.recent { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
ul.recent a { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .8rem 1rem; text-decoration: none; color: var(--ink); }
ul.recent a:hover { border-color: var(--accent); }
.r-name { font-weight: 600; }
.r-when { color: var(--muted); font-size: .95rem; }
.empty-state { background: #fff; border: 2px dashed var(--accent-line); border-radius: var(--radius); padding: 1.4rem; color: var(--muted); text-align: center; }
.empty-state p { margin: 0 0 .8rem; }

nav.stepper { margin: 0 0 1.2rem; }
.step-count { margin: 0 0 .4rem; font-weight: 700; color: var(--accent-dark); font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
nav.stepper ol { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
nav.stepper li a, nav.stepper li span { display: flex; align-items: center; gap: .5rem; padding: .35rem .9rem .35rem .4rem; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
nav.stepper .n { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #e4e9f5; color: var(--ink); font-size: .9rem; }
nav.stepper li.done a { color: var(--accent-dark); }
nav.stepper li.done .n { background: var(--ok); color: #fff; }
nav.stepper li.current a, nav.stepper li.current span { background: var(--accent); border-color: var(--accent); color: #fff; }
nav.stepper li.current .n { background: #fff; color: var(--accent-dark); }

form.flow { max-width: 56rem; }
form.flow.wide { max-width: 72rem; }
.q { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0 0 1.1rem; box-shadow: var(--shadow); }
details.q > summary { cursor: pointer; list-style-position: inside; }
details.q > summary .q-t, details.q > summary .opt { display: inline; }
/* A fieldset's legend is drawn on the border; a floated legend sits inside the card like a label does. */
fieldset.q { min-width: 0; }
fieldset.q > legend { float: left; width: 100%; }
fieldset.q > legend + * { clear: both; }
.more-risks > h3, .more-risks .risk-card { margin-top: .6rem; }
.more-risks h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.q label, .q legend { display: block; font-weight: 400; margin: 0 0 .5rem; padding: 0; }
.q-t { display: block; font-size: 1.2rem; font-weight: 700; line-height: 1.35; color: var(--ink); }
.opt { color: var(--muted); font-weight: 400; }
.example { display: block; color: var(--muted); font-size: .98rem; margin: .15rem 0 .4rem; font-weight: 400; }
.q label.dk { display: inline-flex; align-items: center; gap: .5rem; margin: .5rem 0 0; color: var(--muted); font-size: .98rem; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .7rem; margin: .5rem 0 .3rem; }
.q label.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .7rem; align-items: start; align-content: start; margin: 0;
  padding: .8rem .9rem; background: #fff; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
/* control on the left, title on the first line, description under it (one column, not two side by side) */
.choice > input { grid-column: 1; grid-row: 1 / span 2; margin-top: .2rem; }
.choice .c-t, .choice .c-d { grid-column: 2; display: block; }
.choice .c-t { font-weight: 600; }
.choice .c-d { color: var(--muted); font-size: .92rem; font-weight: 400; }
.q label.choice:hover { border-color: var(--accent); }
.q label.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.q label.choice:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.field-error { display: block; margin-top: .3rem; color: var(--bad); font-weight: 600; font-size: .95rem; }

.flow .actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: flex-end; position: sticky; bottom: 0;
  background: linear-gradient(to top, var(--bg) 75%, rgba(243,245,251,0)); padding: 1.2rem 0 1rem; margin-top: .4rem; }
.flow .actions a.button:first-child { margin-right: auto; }

section.family { margin: 0 0 1.6rem; }
section.family h2 { font-size: 1.4rem; margin-bottom: .1rem; }
.risk-card { background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--accent-line); border-radius: var(--radius-sm);
  padding: 1rem 1.2rem; margin: 0 0 .8rem; box-shadow: var(--shadow); }
.risk-card:has(.keep-box:checked) { border-left-color: var(--accent); }
.risk-card:not(:has(.keep-box:checked)) { background: #fafbfe; }
.risk-card:not(:has(.keep-box:checked)) .r-title { color: var(--muted); }
.risk-card.has-error { border-left-color: var(--bad); }
.risk-card label.keep { display: flex; align-items: center; gap: .7rem; margin: 0 0 .3rem; cursor: pointer; font-weight: 700; font-size: 1.1rem; }
.risk-card .keep-box { width: 1.4rem; height: 1.4rem; }
.r-desc { margin: .2rem 0 .4rem; color: #333d55; }
.meta { margin: .15rem 0; color: var(--muted); font-size: .93rem; }
.badges { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 .2rem; }
.badge.always { background: #fff1cc; color: #5a3d00; border: 1px solid #e3c36b; }
.badge.mine { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid var(--accent-line); }
.reason { margin-top: .6rem; }
.risk-card:has(.keep-box:checked) .reason:not(.needed) { display: none; }
.row-card .sev:not(:has(select option:checked:not([value=""]))) .reason:not(.needed) { display: none; }
.reason label { font-size: .95rem; color: var(--muted); font-weight: 400; margin-bottom: .2rem; }
.count-line { font-weight: 600; color: var(--accent-dark); }
.add-row { display: grid; grid-template-columns: 2fr 1fr; gap: 0 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.add-row fieldset.inline-set { grid-column: 1 / -1; border: 0; padding: 0; margin: 0; }
.add-row fieldset legend { font-weight: 600; margin-bottom: .2rem; }
.add-row label.check { margin-right: 1.2rem; }

.row-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin: 0 0 1.2rem; box-shadow: var(--shadow); scroll-margin-top: 1rem; }
.row-card.has-error { border-color: var(--bad); }
.row-card header h2 { font-size: 1.3rem; margin-bottom: .1rem; }
.rid { display: inline-block; background: var(--accent-soft); color: var(--accent-dark); border-radius: 6px; padding: 0 .5rem; font-size: .95rem; margin-right: .3rem; }
.row-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 2rem; margin-top: .8rem; }
.blk { min-width: 0; }
/* the `.sev` rule (nowrap, bold) must not leak into the severity block of a row card */
.row-card .blk.sev { white-space: normal; font-weight: 400; overflow-wrap: anywhere; }
.row-card .blk.sev .proposed { margin: .1rem 0 .5rem; }
.blk label { font-weight: 400; }
fieldset.blk { border: 0; padding: 0; margin: 0; }
fieldset.blk legend { padding: 0; margin-bottom: .4rem; }
.blk .q-t { font-size: 1.05rem; }
.blk legend small { display: block; }
.meas-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; padding: .4rem 0; border-top: 1px solid var(--line); }
.meas-row .m-t { flex: 1 1 18rem; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--accent-line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg-opt { margin: 0; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt span { display: block; padding: .35rem .9rem; font-size: .93rem; font-weight: 600; color: var(--accent-dark); border-right: 1px solid var(--accent-line); white-space: nowrap; }
.seg-opt:last-child span { border-right: 0; }
.seg-opt:hover span { background: var(--accent-soft); }
.seg-opt input:checked + span { background: var(--accent); color: #fff; }
.seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.row-card fieldset.meas { grid-column: 1 / -1; margin-top: 1rem; }
.blk label.check { display: flex; align-items: flex-start; gap: .6rem; margin: 0 0 .4rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .97rem; }
.blk label.check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent-line); }
.blk label.check:has(input:disabled) { opacity: .55; }
.proposed { margin: .1rem 0 .4rem; }
.result { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 1rem 0 0; padding-top: .9rem; border-top: 1px dashed var(--line); font-weight: 600; }
.result .lvl { font-size: 1rem; padding: .15rem .8rem; border-radius: 999px; }

.conf { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.conf-n { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.big-n { font-size: 3.4rem; line-height: 1; font-weight: 800; color: var(--accent-dark); }
.band { border-radius: 999px; padding: .1rem .8rem; font-weight: 700; font-size: .95rem; }
.band.b-low { background: #fff1cc; color: #5a3d00; }
.band.b-medium { background: var(--accent-soft); color: var(--accent-dark); }
.band.b-high { background: #dff1e5; color: #14502b; }
.conf > div:last-child { flex: 1 1 22rem; min-width: 0; }
.conf h2 { margin-bottom: .3rem; }
progress { width: 100%; height: .8rem; appearance: none; border: 0; border-radius: 999px; background: #e1e6f3; overflow: hidden; display: block; margin: .2rem 0 .6rem; }
progress::-webkit-progress-bar { background: #e1e6f3; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.facts { color: var(--muted); font-size: .95rem; }
.maps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
@media (min-width: 1100px) { .maps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.maps figure { margin: 0; min-width: 0; }
.maps figcaption { font-weight: 700; font-size: 1.1rem; margin-bottom: .3rem; }
.maps svg { display: block; width: 100%; height: auto; }
details.legend-table { grid-column: 1 / -1; margin-top: .4rem; }
details.legend-table summary { cursor: pointer; font-weight: 600; color: var(--accent); }
ol.actions-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
ol.actions-list li { display: flex; gap: 1rem; align-items: flex-start; padding: .8rem 1rem; background: #fafbfe; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.a-n { display: grid; place-items: center; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; }
.a-t { margin: 0; font-weight: 600; }
ul.assumptions { padding-left: 1.2rem; }
ul.assumptions li { margin: 0 0 .5rem; }
.badge.k-default, .badge.k-dont_know { background: #fff1cc; color: #5a3d00; }
.badge.k-catalogue { background: var(--accent-soft); color: var(--accent-dark); }
.next-steps .btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: .6rem; }

@media (max-width: 900px) { .row-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  main { padding: 1rem 1rem 3rem; }
  header.top { padding: .7rem 1rem; }
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 2rem; }
  .add-row { grid-template-columns: minmax(0, 1fr); }
  .q, .row-card { padding: 1rem; }
}
@media (max-width: 560px) {
  nav.stepper .t { display: none; }
  nav.stepper li.current .t { display: inline; }
}
@media (prefers-reduced-motion: reduce) { a.way { transition: none; } a.way:hover { transform: none; } }

/* Expert screens (workshops, register, editors) */
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; align-items: end; }
.grid-form > button, .grid-form > a { justify-self: start; margin-bottom: .7rem; }
.grid-form fieldset { grid-column: 1 / -1; }
.study-body > * { min-width: 0; }
.register-scroll { border: 1px solid var(--line); border-radius: 4px; }
.register-scroll:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
table.register { width: max-content; min-width: 100%; }
table.register th { white-space: nowrap; }
table.register td { max-width: 25rem; overflow-wrap: anywhere; }
table.kv th { text-align: left; color: var(--muted); padding: .2rem 1rem .2rem 0; width: 9rem; vertical-align: top; }
table.kv { margin-bottom: 1rem; }
.via { color: var(--muted); }
.count { display: inline-block; min-width: 1.6rem; text-align: center; font-size: .8rem; background: #e8ecf3;
  border-radius: 10px; padding: 0 .4rem; color: var(--muted); }
.badge.ok { background: #dff1e5; color: var(--ok); }
.badge.warn { background: #fdeccc; color: var(--warn); }
.badge.bad { background: #fdeccc; color: var(--bad); }
.study-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .8rem; }
.study-head .cal { color: var(--muted); font-size: .9rem; }
nav.tabs { display: flex; flex-wrap: wrap; gap: .2rem; border-bottom: 2px solid var(--line); margin: 0 0 1rem; }
nav.tabs a { padding: .45rem .8rem; text-decoration: none; border-radius: 6px 6px 0 0; color: var(--ink); }
nav.tabs a.active { background: var(--accent); color: #fff; }
h2.ws { font-size: 1.2rem; margin: 0 0 .8rem; }
.study-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1rem; align-items: start; }
.checks-panel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem;
  position: sticky; top: .6rem; max-height: calc(100vh - 1.2rem); overflow: auto; }
ul.checks { padding-left: 1.1rem; margin: 0; font-size: .9rem; }
ul.checks li { margin-bottom: .4rem; }
ul.checks li.err::marker { color: var(--bad); }
ul.checks li.wrn::marker { color: var(--warn); }
ul.checks li.err { color: var(--bad); }
a.goto { font-weight: 600; white-space: nowrap; }
@media (max-width: 1100px) {
  .study-body { grid-template-columns: minmax(0, 1fr); }
  .checks-panel { position: static; max-height: none; order: -1; }
}
/* Engine SVG maps stay side by side; the expandable tables remain available below. */
.engine-maps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.engine-maps figure { margin: 0; min-width: 0; }
.engine-maps figcaption { font-weight: 700; }
.engine-maps svg { display: block; width: 100%; height: auto; }
.tabular-maps { margin-top: 1rem; }
/* risk grid */
.grids { display: flex; flex-wrap: wrap; gap: 1.5rem; }
figure.grid-wrap { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas:
  "cap cap" "y grid" ". x"; flex: 1 1 420px; max-width: 620px; }
figure.grid-wrap figcaption { grid-area: cap; font-weight: 700; margin-bottom: .4rem; }
.axis-y { grid-area: y; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; color: var(--muted);
  font-size: .85rem; padding: 0 .3rem; }
.axis-x { grid-area: x; text-align: center; color: var(--muted); font-size: .85rem; padding-top: .3rem; }
table.grid { grid-area: grid; table-layout: fixed; }
table.grid th { font-size: .8rem; padding: .3rem; text-align: center; font-weight: 700; }
table.grid th small { display: block; font-weight: 400; }
table.grid thead th.corner { width: 6.5rem; }
table.grid tbody th { text-align: right; }
table.grid td { height: 4.6rem; border: 2px solid #fff; vertical-align: top; padding: .25rem; }
.lvl-name { display: block; font-size: .72rem; opacity: .85; margin-bottom: .2rem; }
a.chip { display: inline-block; font-size: .8rem; font-weight: 700; padding: .05rem .4rem; margin: 0 .2rem .2rem 0;
  border-radius: 4px; background: rgba(255,255,255,.85); color: #111; border: 1px solid rgba(0,0,0,.35); text-decoration: none; }
ul.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .9rem; }
table.register td.c-label { min-width: 16rem; }
table.register td.c-id, table.register td.c-level, table.register td.c-level_target { white-space: nowrap; }
/* iteration 2: editors for workshops 2 to 5, highlight, progress strip */
tr.hl > td, li.hl { background: #fff4c2; }
tr.hl > td:first-child, li.hl { box-shadow: inset 4px 0 0 #d39b00; }
.grid-form .wide, .grid-form p.derived, .grid-form .form-actions { grid-column: 1 / -1; }
.grid-form .form-actions { margin-bottom: .6rem; }
.grid-form label.check { align-self: center; margin-bottom: .6rem; }
p.derived { margin: 0 0 .6rem; }
.chk { display: block; font-size: .8rem; color: var(--muted); }
.chk.ok { color: var(--ok); }
.chk.bad { color: var(--bad); font-weight: 600; }
.dec { display: inline-block; font-size: .8rem; padding: 0 .45rem; border-radius: 4px; background: #e8ecf3; }
.dec-selected { background: #dff1e5; color: var(--ok); }
.dec-discarded { color: var(--muted); text-decoration: line-through; }
form.sync { margin: 0 0 .6rem; }
table.paths-form td, table.paths-form th { padding: .2rem .4rem; text-align: left; vertical-align: middle; }
table.paths-form th { font-size: .8rem; color: var(--muted); font-weight: 600; }
table.paths-form td:first-child { white-space: nowrap; }
table.paths-form input, table.paths-form select { margin-top: 0; }
table.paths-form label.check { margin: 0; font-weight: 400; }
table.list td.c-description, table.list td.c-label { min-width: 14rem; }
table.list td.c-id { white-space: nowrap; }
table.list td.c-severity { min-width: 9rem; }
ol.progress { list-style: none; padding: 0; margin: 0 0 .4rem; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
ol.progress li a { display: block; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 6px;
  text-decoration: none; color: var(--ink); border-left-width: 5px; }
ol.progress li.ps-ok a { border-left-color: var(--ok); }
ol.progress li.ps-warn a { border-left-color: #d39b00; }
ol.progress li.ps-bad a { border-left-color: var(--bad); }
ol.progress li.ps-none a { border-left-color: var(--line); }
ol.progress b { display: block; }
.ps-n, .ps-c { display: block; font-size: .85rem; }
.ps-c { color: var(--muted); }
li.ps-bad .ps-c { color: var(--bad); font-weight: 600; }
li.hl { padding-left: .4rem; margin-left: -.4rem; }
table.paths-form { table-layout: auto; }
table.paths-form td:nth-child(2) { width: 58%; }
table.paths-form td:nth-child(3) { width: 30%; }
table.list td.c-likelihood, table.list td.c-likelihood_target { min-width: 8.5rem; }
@media (max-width: 1100px) {
  table.list td.c-label, table.list td.c-description { min-width: 9rem; }
  table.list td.c-severity { min-width: 7rem; }
  table.list td.c-likelihood, table.list td.c-likelihood_target { min-width: 5.5rem; }
  table.list th { white-space: normal; }
  table.list th, table.list td { padding: .4rem .35rem; }
}
ul.more-paths { margin: .2rem 0 .4rem 1.2rem; padding: 0; font-size: .9rem; }

/* Expert switch (page header), "How it works", home line, results: what is in place, one-line actions */
.expert-switch { display: inline-flex; margin: 0; }
header.top button.switch { display: inline-flex; align-items: center; gap: .5rem; background: none; border: 0; padding: .3rem .1rem;
  min-height: 0; color: #fff; font-weight: 600; font-size: 1rem; cursor: pointer; text-decoration: none; }
header.top button.switch:hover { background: none; color: #fff; }
button.switch .track { position: relative; width: 2.2rem; height: 1.2rem; border-radius: 999px; background: rgba(255,255,255,.35);
  border: 1px solid rgba(255,255,255,.8); flex: none; }
button.switch .track::after { content: ""; position: absolute; top: .1rem; left: .12rem; width: .85rem; height: .85rem; border-radius: 50%;
  background: #fff; transition: left .15s; }
button.switch[aria-checked="true"] .track { background: #cfe8d8; }
button.switch[aria-checked="true"] .track::after { left: 1.1rem; background: var(--ok); }
.badge.expert-on { background: #fff6dd; color: #5a3d00; border: 1px solid #e3c36b; font-size: .85rem; }
.built-on { margin: 0 0 .6rem; color: var(--muted); }
.in-place { margin: 0; padding-left: 1.2rem; }
.in-place li { margin: 0 0 .3rem; }
.a-how { color: var(--muted); font-weight: 400; }
article.how { max-width: 52rem; }
article.how h3 { font-size: 1.05rem; margin: 1rem 0 .4rem; }
.finding p { margin: .15rem 0; }
.finding p b { display: inline-block; min-width: 8.5rem; color: var(--accent-dark); font-weight: 650; }
.risk-finding { border-top: 1px solid var(--line); padding: .7rem 0; }
.risk-finding:first-of-type { border-top: 0; }
.risk-finding h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
p.closing { margin: 1.2rem 0 0; padding: .9rem 1.2rem; background: #e6f4ea; border: 1px solid #a9d6b7; border-radius: var(--radius-sm);
  color: #14502b; font-weight: 650; font-size: 1.1rem; }

/* Round 3: "Now and after" has one compact row per risk; the results page is short, with collapsed sections. */
.risk-row { padding: .7rem 0; border-top: 1px solid var(--line); scroll-margin-top: 1rem; }
.risk-row:first-of-type { border-top: 0; }
.risk-row.has-error { border-left: 4px solid var(--bad); padding-left: .8rem; }
.risk-row h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
.risk-row .rr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1rem; }
.risk-row .rr label { font-size: .95rem; font-weight: 400; color: var(--muted); }
.risk-row .rr select { width: 100%; }
.risk-row:not(:has(.sev select option:checked:not([value=""]))) .reason:not(.needed) { display: none; }
.risk-row .result { margin-top: .5rem; padding-top: .5rem; }
@media (max-width: 700px) { .risk-row .rr { grid-template-columns: minmax(0, 1fr); } }
fieldset.meas { border: 0; padding: 0; margin: 1rem 0 0; }
fieldset.meas legend { font-weight: 700; padding: 0; margin-bottom: .2rem; }
p.summary { margin: 0 0 1rem; padding: .9rem 1.2rem; background: #e6f4ea; border: 1px solid #a9d6b7; border-radius: var(--radius-sm);
  color: #14502b; font-weight: 650; font-size: 1.15rem; }
p.rough { margin: 0 0 .6rem; color: var(--muted); }
.maps-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 1100px) { .maps-wrap { grid-template-columns: minmax(0, 3fr) minmax(14rem, 1fr); } .maps-wrap .maps { grid-template-columns: minmax(0, 1fr); } }
.map-key ol { margin: 0; padding-left: 1.6rem; }
.map-key li { margin: .25rem 0; }
details.see-all, details.in-place-box, details.assumed { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1.2rem; margin: 0 0 1rem; }
details.see-all > summary, details.in-place-box > summary, details.assumed > summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); font-size: 1.1rem; }
.conf .cap { color: var(--muted); font-size: .95rem; }

/* public mode: the "Open a saved file" block of the studies page */
.open-file { margin-top: 1.6rem; max-width: 36rem; }
.open-file[hidden] { display: none; }
.open-file form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.open-file .error:empty { display: none; }

footer.publisher { max-width: 60rem; margin: 2rem auto 2.5rem; padding: 0 1.25rem; color: #5b6770; font-size: .95rem; text-align: center; }
footer.publisher a { font-weight: 600; }

/* Send my study to CPLT (public mode) */
.share-form label { display: block; margin: .7rem 0; }
.share-form label.choice { display: flex; align-items: flex-start; gap: .6rem; }
.share-form button { margin-top: .4rem; }
