:root {
    --green: #0c6a65;
    --green-dark: #0a4a46;
    --blue: #50b2d8;
    --lime: #ced82d;
    --orange: #ea5e23;
    --ink: #1d2626;
    --muted: #5d6b6b;
    --line: #dfe5e4;
    --soft: #f4f7f6;
    --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
}

a { color: var(--green); }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1180px; }

header.site {
    border-bottom: 1px solid var(--line);
    background: #fff;
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
header.site img { height: 44px; width: auto; display: block; }
header.site nav { display: flex; gap: 18px; align-items: center; font-size: 15px; }
header.site nav form { margin: 0; }

main { padding: 40px 0 64px; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 20px 0 32px; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

h1 { font-size: 32px; line-height: 1.2; margin: 0 0 16px; color: var(--green-dark); }
h2 { font-size: 22px; line-height: 1.3; margin: 0 0 12px; color: var(--green-dark); }

.lead p:first-child { font-size: 20px; font-weight: 600; color: var(--green-dark); }

.btn {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 13px 28px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: var(--green);
    color: #fff;
}
.btn:hover { background: var(--green-dark); }
.btn.secondary { background: #fff; color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.btn.small { padding: 7px 16px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }

.languages { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 28px 0; }
.languages a {
    display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; font-weight: 600; color: var(--green-dark);
}
.languages a:hover { border-color: var(--green); background: var(--soft); }

.notice { padding: 14px 18px; border-radius: var(--radius); background: var(--soft); border-left: 4px solid var(--green); margin: 0 0 24px; }
.notice.error { border-left-color: var(--orange); background: #fdf1ec; }

/* Questionnaire */
.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.progress span { display: block; height: 100%; width: 0; background: var(--lime); transition: width .25s; }
.progress-label { font-size: 14px; color: var(--muted); margin-bottom: 24px; }

fieldset.step { border: 0; padding: 0; margin: 0 0 40px; min-width: 0; }
fieldset.step legend { padding: 0; margin-bottom: 4px; }
fieldset.step legend h2 { margin: 0; }
.hint { color: var(--muted); font-size: 15px; margin: 0 0 18px; }

.choice { display: block; position: relative; margin-bottom: 10px; }
.choice input { position: absolute; opacity: 0; }
.choice span {
    display: block; padding: 14px 18px 14px 50px; border: 1px solid var(--line); border-radius: var(--radius);
    cursor: pointer; transition: border-color .15s, background .15s;
}
.choice span::before {
    content: ""; position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
    border: 2px solid #9aa9a8; border-radius: 50%;
}
.choice input:checked + span { border-color: var(--green); background: var(--soft); }
.choice input:checked + span::before { border-color: var(--green); background: radial-gradient(var(--green) 45%, #fff 50%); }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field .req { color: var(--orange); }
.field input, .field select {
    width: 100%; padding: 11px 13px; font: inherit; border: 1px solid #b9c4c3; border-radius: 8px; background: #fff;
}
.field input:focus, .field select:focus { outline: 3px solid rgba(80, 178, 216, .45); border-color: var(--blue); }
.field .error, .error-text { color: #b23c0e; font-size: 14px; margin-top: 4px; }
.field.full { grid-column: 1 / -1; }

.nav-buttons { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* With JavaScript the questionnaire shows one step at a time. */
.js-steps fieldset.step { display: none; }
.js-steps fieldset.step.current { display: block; }
.no-js-only { }
.js-steps .no-js-only { display: none; }

/* Results */
.result { display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: center; margin: 24px 0 32px; }
.tier {
    width: 170px; height: 170px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--lime); color: var(--green-dark); font-size: 52px; font-weight: 800;
}
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: 180px 1fr 44px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: 15px; }
.bar { position: relative; height: 14px; background: var(--soft); border-radius: 7px; }
.bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: #b9c4c3; }
.bar i { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--green); }
.bar i.neg { background: var(--orange); }
.bars b { text-align: right; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
td.num { text-align: right; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--soft); font-weight: 700; color: var(--green-dark); }
.badge.warn { background: #fdf1ec; color: #b23c0e; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.filters input, .filters select { padding: 8px 10px; font: inherit; font-size: 15px; border: 1px solid #b9c4c3; border-radius: 8px; }
.pagination { margin-top: 18px; font-size: 15px; }

@media (max-width: 640px) {
    h1 { font-size: 26px; }
    .fields { grid-template-columns: 1fr; }
    .result { grid-template-columns: 1fr; justify-items: center; }
    .bars { width: 100%; }
    .bars li { grid-template-columns: 1fr 1fr 40px; }
    .table-scroll { overflow-x: auto; }
}
