/* RE-USE Assessment Portal: plain stylesheet. No fonts, scripts or images from outside the portal (guide, 9.6).
   Colors are defined once here; designers can restyle the whole portal from these variables. */
:root {
  --navy: #1f3557;
  --navy-dark: #172843;
  --ink: #1d2433;
  --muted: #5a6475;
  --line: #d9dee7;
  --soft: #f4f6f9;
  --accent: #1f3557;
  --ok: #1e6b3a;
  --ok-bg: #e5f3ea;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --bad: #9b1c1c;
  --bad-bg: #fde8e8;
  --focus: #f0a500;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: #fff; line-height: 1.5; }
a { color: var(--navy); }
a:focus, button:focus, input:focus, select:focus, textarea:focus, summary:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.bar { background: var(--navy); color: #fff; }
.bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; }
.brand { font-weight: 700; }
.area { font-weight: 400; opacity: .8; margin-left: 8px; font-size: .9rem; }
.bar nav a, .bar .linkbtn { color: #fff; margin-left: 14px; font-size: .9rem; }
.envbar { background: var(--warn-bg); color: var(--warn); text-align: center; font-size: .85rem; padding: 4px; }
main { padding-top: 24px; padding-bottom: 32px; }
h1 { font-size: 1.6rem; margin: .2em 0 .6em; }
h2 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.05rem; margin: 1.2em 0 .4em; }
.lead { font-size: 1.05rem; }
.muted, .small { color: var(--muted); font-size: .9rem; }
.foot { border-top: 1px solid var(--line); padding-top: 12px; padding-bottom: 24px; color: var(--muted); font-size: .85rem; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin: 16px 0; background: #fff; }
.note { border-left: 4px solid var(--navy); background: var(--soft); padding: 10px 14px; margin: 12px 0; }
.msg { padding: 10px 14px; border-radius: 4px; margin: 8px 0; }
.msg-error { background: var(--bad-bg); color: var(--bad); }
.msg-success, .msg-info { background: var(--ok-bg); color: var(--ok); }
.error { background: var(--bad-bg); color: var(--bad); padding: 10px 14px; border-radius: 4px; }
button, .button { display: inline-block; background: var(--navy); color: #fff; border: 0; border-radius: 4px; padding: 9px 18px; font-size: 1rem; cursor: pointer; text-decoration: none; }
button.secondary, .button.secondary { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
button.danger { background: var(--bad); }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-size: inherit; }
form.inline { display: inline; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=number], select, textarea { width: 100%; padding: 8px; border: 1px solid #aab3c2; border-radius: 4px; font-size: 1rem; font-family: inherit; }
textarea { min-height: 80px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.options { list-style: none; padding: 0; margin: 12px 0; }
.options li { margin: 6px 0; }
.options label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; margin: 0; cursor: pointer; }
.options input { margin-top: 4px; }
.options .help { display: block; color: var(--muted); font-size: .85rem; }
.progress { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--navy); }
.qmeta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; color: var(--muted); font-size: .85rem; margin: 6px 0 14px; }
.section-label { text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; color: var(--muted); }
.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; flex-wrap: wrap; }
table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { background: var(--navy); color: #fff; font-weight: 600; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; border-radius: 10px; padding: 1px 8px; font-size: .8rem; background: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.pill-strong { background: var(--navy); color: #fff; border-color: var(--navy); }
.pill-late { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.pill-wait { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.steps { list-style: none; padding: 0; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.steps .n { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--navy); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
.steps .done .n { background: var(--navy); color: #fff; }
.steps .current { font-weight: 700; }
.result-item { padding: 8px 0; border-bottom: 1px solid var(--line); }
.result-item .label { color: var(--muted); font-size: .9rem; }
.result-item .value { font-size: 1.05rem; }
.first-screen { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.first-screen .card { margin: 0; }
details { margin: 8px 0; }
summary { cursor: pointer; color: var(--navy); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.danger-zone { border-color: var(--bad); }
code, .mono { font-family: Consolas, "Courier New", monospace; font-size: .88rem; word-break: break-all; }
@media print { .bar nav, .foot, .envbar, form, .skip { display: none; } a { color: inherit; } }
/* Utility classes (inline style attributes are blocked by the content security policy). */
.flush { margin-top: 0; }
.prewrap { white-space: pre-line; }
.narrow-form { max-width: 420px; }
label.plain { font-weight: 400; }
.spaced { margin-left: 12px; }
fieldset.bare { border: 0; padding: 0; margin: 0; }
.step-state { margin-left: auto; }
progress.progress { width: 100%; height: 6px; appearance: none; border: 0; background: var(--soft); border-radius: 3px; }
progress.progress::-webkit-progress-bar { background: var(--soft); border-radius: 3px; }
progress.progress::-webkit-progress-value { background: var(--navy); border-radius: 3px; }
progress.progress::-moz-progress-bar { background: var(--navy); }
/* Tables on participant pages become stacked cards on a phone (guide 9.6: the pages work at 360 pixels). */
@media (max-width: 640px) {
  table.stack thead { position: absolute; left: -9999px; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack td { display: block; border: 0; padding: 2px 0; }
  table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; color: var(--muted); }
}
.table-wrap:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
/* Navigation in the header: wraps neatly on a narrow screen. */
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.bar nav a, .bar .linkbtn { margin-left: 0; }
.qr svg { width: 200px; height: 200px; background: #fff; }
/* Charts of design version charts-0.1 (guide 9.6): shapes in SVG, words in HTML, so they read at 360 pixels and print.
   Color is never the only carrier of meaning: every mark has its words beside it or in the legend. */
.pill-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.chart { margin: 10px 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.chart figcaption { margin-bottom: 8px; }
.chart-legend { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .85rem; color: var(--muted); }
.chart-legend .key { display: inline-block; width: 18px; height: 10px; margin-right: 6px; vertical-align: middle; }
.chart-legend .key-zero { width: 6px; height: 14px; border-left: 2px solid var(--ink); }
.chart-legend .key-expected { width: 6px; height: 14px; border-left: 3px dashed var(--navy); }
.chart-legend .key-limit { width: 6px; height: 14px; border-left: 3px solid var(--bad); }
.chart-legend .key-yours { background: var(--navy); }
.chart-legend .key-base { height: 0; border-top: 3px solid var(--navy); }
.chart-legend .key-downside { height: 0; border-top: 3px dashed var(--warn); }
.chart-legend .key-funding { height: 0; border-top: 2px dashed var(--bad); }
.chart-legend .key-zero-h { height: 0; border-top: 1.5px solid var(--ink); }
.tornado-row { margin: 6px 0 10px; }
.tornado-label { font-size: .92rem; margin-bottom: 2px; }
.tornado-values { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.strip { display: block; }
.strip .track, .cash .track { fill: var(--soft); }
.strip .bar-range { fill: #8ea3c2; }
.strip .bar-yours { fill: var(--navy); }
.strip .bar-yours.bar-beyond { fill: var(--bad); }
.line-zero { stroke: var(--ink); stroke-width: 1.5; }
.line-base { stroke: var(--navy); stroke-width: 3; stroke-dasharray: 4 3; }
.line-limit { stroke: var(--bad); stroke-width: 3; }
.line-funding { stroke: var(--bad); stroke-width: 2; stroke-dasharray: 6 4; }
svg.cash { display: block; width: 100%; height: 200px; }
.cash polyline { fill: none; stroke-width: 2.5; }
.cash .series-base { stroke: var(--navy); }
.cash .series-downside { stroke: var(--warn); stroke-dasharray: 6 4; }
.cash-axis { display: flex; justify-content: space-between; color: var(--muted); }
/* Visuals of the section Beyond money (update B.1, Table 7): one neutral track, this case filled, the comparison open,
   no colored bands; a reference as a dashed line. Identity never depends on color alone (filled against open). */
.impact { margin: 6px 8px 14px; }
.impact svg { overflow: visible; }
.framework { margin: 2px 0 0; }
.strip .bar-open { fill: #fff; stroke: var(--navy); stroke-width: 1.5; }
.whisker { stroke: var(--ink); stroke-width: 1.5; }
.line-mark { stroke: var(--navy); stroke-width: 3; }
.line-ref { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }
.mark-filled { fill: var(--navy); }
.mark-open { fill: #fff; stroke: var(--navy); stroke-width: 2; }
.scale-ends { display: flex; justify-content: space-between; }
.chart-legend .key-track { background: var(--soft); border: 1px solid var(--line); }
.chart-legend .key-open { background: #fff; border: 1.5px solid var(--navy); }
.chart-legend .key-filled { width: 12px; height: 12px; border-radius: 50%; background: var(--navy); }
.chart-legend .key-ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--navy); }
.chart-legend .key-ref { width: 6px; height: 14px; border-left: 2px dashed var(--ink); }
@media print { .chart, .impact { break-inside: avoid; } }

/* A question on the Module 2 questions page whose answer is incomplete. */
fieldset.has-error { border-color: var(--bad); border-width: 2px; }
/* A field over both columns of .grid2 (the longer texts of a component class). */
.grid2 .span2 { grid-column: 1 / -1; }
textarea.mono { width: 100%; }

/* The summary at the top of the results page (usability review, B7). */
.summary .verdict { font-size: 1.5rem; font-weight: 700; margin: 8px 0; }
.summary .verdict .muted { font-size: 1rem; font-weight: 400; }
.toc { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* The next step for the research team (usability review, B10 and B13). */
.next-step { font-size: .85rem; margin-top: 4px; }
