:root {
  color-scheme: light;
  font: 16px/1.55 Inter, "Segoe UI", system-ui, sans-serif;
  color: #172323;
  background: #f3f6f5;
  --accent: #176054;
  --muted: #526562;
  --line: #d6e0dd;
  --control-height: 44px;
  --control-font: 600 .9375rem/1.25 Inter, "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { max-width: 900px; margin: 0 auto; padding: 24px 18px 64px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #172323; font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; background: #d9ebe5; color: #124d43; }
header > a:last-child:not(.brand) { font-size: .875rem; }
nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; margin: -12px 0 18px; font-size: .875rem; color: var(--muted); }
main { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 5vw, 42px); box-shadow: 0 12px 36px #183e3410; }
main.compact { max-width: 700px; margin-inline: auto; }
h1 { margin: 0 0 24px; font-size: clamp(1.65rem, 4vw, 2.25rem); line-height: 1.15; letter-spacing: -.035em; overflow-wrap: anywhere; }
h2 { margin: 26px 0 8px; font-size: 1.05rem; }
a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
label { display: block; margin: 0 0 18px; font-weight: 600; }
input:not([type=radio]):not([type=checkbox]), textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; min-height: var(--control-height);
  border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; color: inherit; font: inherit; font-weight: 400;
}
textarea { resize: vertical; }
:focus-visible { outline: 3px solid #358679; outline-offset: 2px; }
fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 650; }
.scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.scale label { display: grid; place-items: center; position: relative; margin: 0; min-width: 0; cursor: pointer; }
.scale input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.scale span { display: grid; place-items: center; width: 100%; min-height: var(--control-height); height: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; font: var(--control-font); font-variant-numeric: tabular-nums; }
.scale label:hover span { border-color: #69968c; }
.scale input:checked + span { background: var(--accent); color: white; border-color: var(--accent); }
.scale input:focus-visible + span { outline: 3px solid #358679; outline-offset: 2px; }
.scale.scenarios { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; }
.scenarios span { min-height: 58px; padding: 8px; text-align: center; overflow-wrap: anywhere; }
.task-hint { color: var(--muted); font-size: .9375rem; margin: 0 0 12px; }
.link-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=file] { padding: 4px 8px 4px 4px; }
input[type=file]::file-selector-button { min-height: 34px; margin-right: 10px; padding: 5px 9px; border: 0; border-radius: 6px; color: #124d43; background: #e2efeb; font: var(--control-font); cursor: pointer; }
.upload { margin-bottom: 6px; }
small { display: block; color: var(--muted); }
button { min-height: var(--control-height); padding: 8px 15px; border: 1px solid var(--line); border-radius: 10px; background: #f5f8f7; color: #214641; font: var(--control-font); cursor: pointer; }
button:hover { background: #e7f0ed; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.primary:hover { background: #104e43; }
.actions { margin: 22px 0 0; }
.inline { display: inline; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
td, th { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
th { color: var(--muted); }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 0; }
[role=alert] { color: #862b25; background: #fff0ed; border-radius: 10px; padding: 10px 12px; }
@media (max-width: 510px) {
  body { padding-inline: 12px; }
  header { margin-bottom: 16px; }
  .scale { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .scale.scenarios { grid-template-columns: 1fr; }
  .scenarios span { min-height: var(--control-height); }
  .link-fields { grid-template-columns: 1fr; gap: 0; }
  .primary { width: 100%; }
}
