:root {
  --red: #E81F25; --red-dark: #B8161B; --red-soft: #FDECEC;
  --grey: #787876; --grey-dark: #3A3A39; --grey-light: #F4F4F3; --line: #E2E2E0;
  --ink: #1F1F1F; --muted: #6B6B69;
  --b-red: #E9A3A5; --b-amber: #F4D38B; --b-green: #A9D6A0;
  --b-red-bg: #FBE7E7; --b-amber-bg: #FDF3DC; --b-green-bg: #E9F5E6;
  --radius: 10px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--grey-light); font-size: 15px; line-height: 1.55; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.topbar { background: #fff; border-bottom: 3px solid var(--red); padding: 10px 24px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar img { height: 40px; display: block; }
.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a { color: var(--grey-dark); padding: 6px 12px; border-radius: 6px; font-weight: 500; }
.topbar nav a.on, .topbar nav a:hover { background: var(--red-soft); color: var(--red); text-decoration: none; }
.topbar .who { color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: center; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 760px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.card h2 { border-left: 4px solid var(--red); padding-left: 10px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--red-dark); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--grey-dark); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--red); color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.danger { background: #fff; color: var(--red); border: 1px solid var(--red); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label { font-weight: 600; font-size: 14px; display: block; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #CFCFCC; border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red-soft); border-color: var(--red); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash.ok { background: var(--b-green-bg); border: 1px solid var(--b-green); }
.flash.err { background: var(--b-red-bg); border: 1px solid var(--b-red); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; background: var(--grey-light); color: var(--grey-dark); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t td.num, table.t th.num { text-align: right; white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.b-red { background: var(--b-red-bg); color: #8E1E1E; } .b-amber { background: var(--b-amber-bg); color: #7A5200; } .b-green { background: var(--b-green-bg); color: #2E5E22; } .b-none { background: var(--grey-light); color: var(--muted); }
td.h-red { background: var(--b-red-bg); } td.h-amber { background: var(--b-amber-bg); } td.h-green { background: var(--b-green-bg); } td.h-none { color: var(--muted); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; border-top: 4px solid var(--grey); }
.tile.red { border-top-color: #D9534F; } .tile.amber { border-top-color: #E6A817; } .tile.green { border-top-color: #4E9A40; }
.tile .big { font-size: 34px; font-weight: 700; }
.tile .lbl { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.bars .row { display: grid; grid-template-columns: 290px 1fr 48px; gap: 10px; align-items: center; margin: 5px 0; font-size: 14px; }
.bars .track { position: relative; background: var(--grey-light); height: 18px; border-radius: 4px; }
.bars .fill { height: 18px; border-radius: 4px; }
.bars .fill.red { background: var(--b-red); } .bars .fill.amber { background: var(--b-amber); } .bars .fill.green { background: var(--b-green); } .bars .fill.none { background: #ddd; }
.bars .target { position: absolute; left: 80%; top: -3px; bottom: -3px; border-left: 2px dashed var(--grey); }
.bars .val { font-weight: 700; text-align: right; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; color: var(--grey-dark); border-bottom: 3px solid transparent; font-weight: 600; }
.tabs a.on { color: var(--red); border-bottom-color: var(--red); text-decoration: none; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 6px 14px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
.copybox { display: flex; gap: 8px; } .copybox input { font-family: ui-monospace, monospace; font-size: 13px; }
.note { background: var(--grey-light); border-left: 4px solid var(--grey); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }
.note.red { border-left-color: var(--red); background: var(--red-soft); }
.toc a { display: inline-block; margin: 0 10px 6px 0; font-size: 13px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 30px 0; }
.login { max-width: 420px; margin: 8vh auto; }
.login .card { padding: 30px; } .login img { height: 54px; margin-bottom: 16px; }
@media (max-width: 720px) { .bars .row { grid-template-columns: 1fr 44px; } .bars .row .name { grid-column: 1 / -1; } .kv { grid-template-columns: 1fr; } .wrap { padding: 14px; } }

/* ---------- Survey ---------- */
.sv { max-width: 760px; margin: 0 auto; padding: 16px; }
.sv-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.sv-head img { height: 38px; }
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.progress div { height: 6px; background: var(--red); width: 0; transition: width .3s; }
.q { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; }
.q.missing { border-color: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.q .stmt { font-weight: 600; margin-bottom: 10px; }
.scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.scale button { border: 1px solid #CFCFCC; background: #fff; border-radius: 8px; padding: 8px 2px; cursor: pointer; font: inherit; font-size: 13px; line-height: 1.2; color: var(--grey-dark); }
.scale button b { display: block; font-size: 17px; }
.scale button.sel { background: var(--red); color: #fff; border-color: var(--red); }
.scale button.ne.sel { background: var(--grey); border-color: var(--grey); }
.q details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-top: 8px; }
.q textarea { min-height: 54px; margin-top: 6px; font-size: 14px; }
.sv-nav { display: flex; justify-content: space-between; gap: 10px; margin: 20px 0 40px; }
.err-msg { color: var(--red); font-size: 14px; margin-top: 8px; }
.guide td:first-child { white-space: nowrap; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { font-weight: 400; margin: 0; border: 1px solid #CFCFCC; border-radius: 999px; padding: 6px 12px; cursor: pointer; background: #fff; font-size: 14px; }
.chips input { display: none; }
.chips label.sel { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); }
.lang-pick { display: flex; gap: 12px; justify-content: center; margin: 30px 0; }
@media (max-width: 560px) { .scale { grid-template-columns: repeat(3, 1fr); } }
