* { box-sizing: border-box; }
:root {
  color-scheme: light;
  --ink: #173026;
  --muted: #496158;
  --coffee: #123c2d;
  --accent: #176443;
  --copper: #43866a;
  --paper: #f1f7f3;
  --wash: #e7f2eb;
  --line: #cedfd4;
  --shadow: 0 8px 24px rgb(26 65 45 / 7%);
}
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 system-ui, sans-serif; }
.site-header { background: var(--coffee); color: #f8fff9; border-bottom: 3px solid #6cb090; }
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.bar { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.brand strong { font-size: 1.26rem; letter-spacing: -.025em; }
.brand strong span { color: #a0e0bc; }
.brand-mark {
  width: 38px; height: 38px; position: relative; flex: none; border-radius: 50%;
  border: 1px solid #a0d9ba;
  background:
    radial-gradient(circle at center, #e7f9ee 0 9px, transparent 9.5px 12px, #a0d9ba 13px 13.5px, transparent 14.5px),
    conic-gradient(from 18deg, transparent 0 3deg, #7cce9e99 4deg 65deg, transparent 66deg);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; background: #176443;
  clip-path: polygon(33% 0, 67% 0, 67% 33%, 100% 33%, 100% 67%, 67% 67%, 67% 100%, 33% 100%, 33% 67%, 0 67%, 0 33%, 33% 33%);
}
nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
nav a, .quiet { color: #f8fff9; padding: 7px 11px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: .88rem; }
nav a:hover, .quiet:hover { background: #23543e; }
main { padding: 44px 0 72px; }
.page-heading { margin-bottom: 20px; }
.page-heading p { color: var(--muted); margin: 8px 0 0; }
h1, h2, h3 { line-height: 1.2; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0; letter-spacing: -.055em; color: var(--coffee); }
h2 { font-size: 1.16rem; margin: 0 0 .85em; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; margin: 0 0 .55em; }
p { margin: 0 0 1em; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: clamp(17px, 3vw, 26px); margin: 0 0 18px; box-shadow: var(--shadow); }
.auth { width: min(470px, calc(100% - 36px)); padding-top: clamp(40px, 10vh, 98px); }
.auth .card { border-top: 3px solid var(--copper); }
.auth button { width: 100%; }
.narrow { max-width: 470px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.row label { flex: 1 1 180px; margin: 0; }
label { display: block; font-weight: 650; font-size: .92rem; margin-bottom: 15px; }
input, select, textarea { width: 100%; display: block; min-height: 45px; margin-top: 6px; color: var(--ink); background: #fbfefc; border: 1px solid #aec9b8; border-radius: 9px; padding: 10px 12px; font: 400 1rem/1.4 system-ui, sans-serif; }
input::placeholder, textarea::placeholder { color: #587065; }
input[readonly] { background: var(--wash); }
textarea { min-height: 120px; resize: vertical; }
button, .button { display: inline-block; background: var(--accent); color: white; padding: 10px 16px; border: 1px solid transparent; border-radius: 9px; font: 650 .93rem/1.55 system-ui, sans-serif; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #104c33; }
:focus-visible { outline: 3px solid #21724e; outline-offset: 3px; }
.site-header :focus-visible { outline-color: #d8f8e3; }
.secondary { background: #e6f1ea; color: #24523b; border-color: #c7dcce; }
.secondary:hover { background: #d8ebe0; }
.quiet { background: transparent; border-color: #83ad96; }
.muted { color: var(--muted); }
.tile { color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 5px; }
.tile:hover { border-color: #579779; background: #f8fff9; }
.tile strong { font-size: 1.08rem; overflow-wrap: anywhere; }
.tile span { color: var(--muted); overflow-wrap: anywhere; }
.tile .tile-action, .tile-action span { color: var(--accent); font-weight: 650; }
.modules .tile { border-left: 4px solid var(--copper); }
.survey-section { padding-bottom: 12px; }
.survey-section h2 { display: flex; align-items: baseline; gap: 10px; }
.topic-id { flex: none; border-radius: 7px; padding: 4px 8px; background: var(--wash); color: var(--accent); font-size: .85rem; }
.question { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 245px); align-items: center; gap: 9px 22px; border-top: 1px solid var(--line); padding: 13px 0; margin: 0; }
.question-id { color: var(--accent); margin-right: 4px; font-variant-numeric: tabular-nums; }
.question select { margin-top: 0; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(min(185px, 100%), 1fr)); }
.metrics .card { padding: 17px 19px; }
.metrics span { display: block; color: var(--muted); font-size: .85rem; }
.metrics strong { display: block; color: var(--coffee); font-size: clamp(1.3rem, 3vw, 1.9rem); letter-spacing: -.04em; }
.tone-low { --risk: #426623; --risk-bg: #edf3e6; }
.tone-medium { --risk: #785400; --risk-bg: #fff1c8; }
.tone-high { --risk: #a22e2c; --risk-bg: #fae7e4; }
.tone-neutral { --risk: #53635a; --risk-bg: #eef4ef; }
.metrics strong[class] { color: var(--risk); }
.report-note { padding: 12px 15px; border-left: 3px solid var(--copper); border-radius: 0 8px 8px 0; background: var(--wash); color: #3b5948; font-size: .9rem; margin-bottom: 22px; }
.risk-summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.risk-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(78px, auto); gap: 10px; align-items: center; font-size: .9rem; }
.risk-value { font-weight: 650; font-variant-numeric: tabular-nums; }
.risk-badge { justify-self: end; padding: 2px 8px; border-radius: 999px; background: var(--risk-bg); color: var(--risk); font-size: .77rem; font-weight: 700; text-align: center; }
progress { display: block; width: 100%; margin-top: 5px; height: 7px; border: 0; border-radius: 999px; overflow: hidden; background: var(--wash); accent-color: var(--risk); }
progress::-webkit-progress-bar { background: var(--wash); }
progress::-webkit-progress-value { background: var(--risk); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--risk); border-radius: 999px; }
.detail-heading { margin-top: 27px; }
.actions, form.row { margin-bottom: 16px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
th, td { border-bottom: 1px solid var(--line); padding: 9px; text-align: center; vertical-align: top; }
thead th { background: var(--wash); color: var(--coffee); }
tbody tr:nth-child(even) { background: #f4f9f5; }
th:first-child { text-align: left; min-width: 210px; }
.notes li { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 12px; }
@media (max-width: 600px) {
  .wrap { width: calc(100% - 30px); }
  .bar { min-height: 64px; }
  main { padding-top: 28px; }
  .question { grid-template-columns: 1fr; }
  .row > button, .row > form { flex-shrink: 0; }
  .risk-line { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; }
}
@media print {
  body, .site-header { background: #fff; color: #172e23; }
  .site-header { border-bottom: 1px solid var(--line); }
  .brand strong span { color: var(--accent); }
  .wrap { width: 100%; }
  .bar { min-height: auto; }
  main { padding: 18px 0 0; }
  nav, .actions { display: none; }
  .card { padding: 10px; border-radius: 0; box-shadow: none; }
  .scroll { overflow: visible; }
  table { font-size: 8pt; }
  th, td { padding: 4px; }
  tr, .risk-summary li { break-inside: avoid; }
  progress, .risk-badge { print-color-adjust: exact; }
}

.survey-context { display:flex; flex-wrap:wrap; gap:4px 14px; align-items:center; margin:-6px 0 24px; color:var(--muted); }
.survey-context strong { color:var(--coffee); }
.survey-context span { overflow-wrap:anywhere; }
.profile-card { border-top:3px solid var(--copper); }
.profile-card h2 { margin-bottom:20px; }
.profile-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:16px; }
.profile-grid label { grid-column:span 2; margin:0; display:flex; flex-direction:column; justify-content:space-between; }
.profile-grid label:first-child, .profile-grid label:nth-child(2) { grid-column:span 3; }
.profile-grid .profile-wide { grid-column:span 4; }
.risk-summary ul { gap:0; }
.risk-summary li + li { border-top:1px solid var(--line); }
.risk-line { grid-template-columns:minmax(0,2fr) minmax(85px,3fr) 65px 106px; gap:16px; min-height:54px; padding:8px 0; }
.risk-value { text-align:right; white-space:nowrap; }
.risk-badge { min-width:64px; }
.risk-line progress { margin:0; height:10px; }
@media(max-width:720px) {
  .risk-line { grid-template-columns:minmax(0,1fr) auto auto; gap:7px 12px; padding:12px 0; }
  .risk-title { grid-column:1 / -1; }
  .profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
  .profile-grid label, .profile-grid label:nth-child(2) { grid-column:span 1; }
  .profile-grid label:first-child, .profile-grid .profile-wide { grid-column:1 / -1; }
}
@media(max-width:390px) {
  .profile-grid { grid-template-columns:minmax(0,1fr); }
}
@media print {
  .risk-line { grid-template-columns:minmax(0,2fr) minmax(65px,3fr) 52px 86px; min-height:0; padding:5px 0; }
  .risk-title { grid-column:auto; }
}

.project-grid { grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr)); }
.project-evaluations { list-style: none; padding: 0; margin: 12px 0 0; }
.project-evaluations li { border-top: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; align-items: baseline; }
.project-evaluations li:last-child { padding-bottom: 0; }
.project-evaluations .evaluation-name { color: var(--ink); font-size: .86rem; font-weight: 650; }
.project-evaluations .evaluation-count { color: var(--accent); background: var(--wash); border-radius: 20px; padding: 2px 9px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.project-evaluations .evaluation-expiry { grid-column: 1 / -1; font-size: .82rem; }

.company-fields { margin-bottom: 18px; }
.company-fields .company-description { grid-column: 1 / -1; }
.company-logo { display: block; max-width: min(100%, 240px); max-height: 120px; object-fit: contain; }
.project-details summary { font-weight: 700; cursor: pointer; }
.project-details[open] summary { margin-bottom: 14px; }

.scale-question { display:block; min-width:0; padding:0 0 16px; margin:0 0 13px; border:0; border-bottom:1px solid var(--line); }
.scale-question:last-child { border-bottom:0; margin-bottom:0; }
.scale-question legend { padding:0 0 9px; font-size:.96rem; font-weight:650; }
.scale-options { display:flex; flex-wrap:wrap; gap:7px; }
.scale-choice { position:relative; display:flex; margin:0; font-size:.82rem; cursor:pointer; }
.scale-choice input { position:absolute; width:1px; height:1px; min-height:0; margin:0; opacity:0; }
.scale-choice span { display:flex; align-items:center; gap:6px; min-height:42px; padding:6px 11px; border:2px solid transparent; border-radius:8px; background:var(--scale,#e8f2ec); color:#241d1a; }
.scale-choice strong { font-size:.93rem; }
.scale-choice input:checked + span { border-color:#173d2d; box-shadow:inset 0 0 0 1px #fff; }
.scale-choice input:focus-visible + span { outline:3px solid #21724e; outline-offset:2px; }
.scale-choice:hover span { filter:brightness(.95); }
.scale-blank span { background:#fff; border-color:var(--line); font-weight:500; }
.scale-blank input:checked + span { border-color:#719984; }
.tone-scale-1 { --scale:#ff6b60; }
.tone-scale-2 { --scale:#ff8d39; }
.tone-scale-3 { --scale:#ffad33; }
.tone-scale-4 { --scale:#ffd82e; }
.tone-scale-5 { --scale:#ffcfab; }
.tone-scale-6 { --scale:#ccf4f7; }
.tone-scale-7 { --scale:#cef2c6; }
@media(max-width:600px) {
  .scale-choice { flex:1 0 auto; }
  .scale-choice span { min-height:44px; width:100%; justify-content:center; }
}

.danger { color:#fff; background:#a32d32; }
.danger:hover { background:#842127; }
.danger-details > summary { color:#a32d32; font-weight:700; cursor:pointer; }
.danger-details[open] > summary { margin-bottom:12px; }

.header-account { display:flex; align-items:center; gap:12px; max-width:100%; }
.account-label { display:grid; gap:1px; padding:4px 10px; border-radius:8px; min-width:0; color:#f8fff9; text-decoration:none; line-height:1.3; }
.account-label:hover { background:#23543e; }
.account-label strong { max-width:230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.88rem; }
.account-label span { font-size:.75rem; color:#a0e0bc; }
.header-account form { flex:none; }
@media(max-width:620px) {
  .bar nav { order:3; width:100%; }
  .account-label strong { max-width:min(36vw, 180px); }
}
@media print { .header-account { display:none; } }

.auth-login { width:min(940px,calc(100% - 36px)); }
.login-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); border:1px solid var(--line); border-radius:20px; overflow:hidden; box-shadow:var(--shadow); background:white; }
.login-intro { display:flex; flex-direction:column; justify-content:center; padding:clamp(22px,5vw,58px); background:#123c2d; color:#effbf2; }
.login-intro h1 { color:#fff; margin:0 0 14px; }
.login-intro p:first-child { color:#a0e0bc; font-weight:700; margin:0 0 7px; }
.login-intro p:last-child { margin:0; }
.auth-login .login-form { border:0; border-radius:0; box-shadow:none; margin:0; padding:clamp(22px,5vw,48px); }
.login-form p { margin:14px 0 0; }
.evaluation-picker { border:1px solid var(--line); border-radius:12px; padding:10px 14px; margin:0 0 16px; }
.evaluation-picker legend { padding:0 5px; font-weight:700; }
.evaluation-picker p { margin:6px 0 3px; }
.editor-check { display:flex; align-items:center; gap:8px; margin:0 0 8px; }
.editor-check input { width:17px; min-height:0; height:17px; margin:0; accent-color:var(--accent); }
.editor-section { background:#f8fcf9; box-shadow:none; }
.editor-question { padding:13px 0; margin-top:13px; border-top:1px solid var(--line); }
.editor-question textarea { min-height:64px; }
.editor-question [data-choices] { margin-top:10px; }
.editor-question [hidden] { display:none; }
.share-links { margin:9px 0 0; }
.model-instructions { white-space:pre-wrap; }
.survey-progress { padding-block:11px; }
.survey-progress progress { --risk:var(--accent); }
@media(max-width:640px) { .login-layout { grid-template-columns:1fr; } }

.page-heading-with-action { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; }
.dashboard-overview {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px;
  margin-bottom:23px; overflow:hidden; border:1px solid #2f6a52; border-radius:16px;
  background:#4b7e66; box-shadow:var(--shadow);
}
.dashboard-metric {
  display:flex; flex-direction:column; justify-content:space-between; gap:7px;
  min-height:105px; padding:16px 20px; background:linear-gradient(135deg,#123c2d,#22563f); color:#fff;
}
.dashboard-metric span { color:#d3eddd; font-size:.86rem; font-weight:550; }
.dashboard-metric strong { font-size:clamp(1.65rem,4vw,2.6rem); line-height:1.05; letter-spacing:-.04em; }
.dashboard-filters { gap:12px; padding:16px; }
.dashboard-filters label { font-size:.82rem; }
.dashboard-filters select { min-height:40px; padding:7px 9px; }
.dashboard-list-heading { display:flex; align-items:baseline; gap:10px; margin:23px 0 11px; }
.dashboard-list-heading h2 { margin:0; }
.dashboard-list-heading span { color:var(--muted); font-size:.84rem; }
.dashboard-projects { grid-template-columns:repeat(auto-fit,minmax(min(350px,100%),1fr)); }
.dashboard-projects .project-tile { border-top:3px solid #43866a; }
.project-tile-heading { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.project-tile-heading > div { min-width:0; display:grid; gap:2px; }
.project-tile-heading .project-status { flex:none; padding:2px 8px; border-radius:999px; background:#ecf1ee; color:#41594e; font-size:.75rem; font-weight:700; }
.project-tile-heading .status-active { background:#dcf2e4; color:#18513a; }
.project-tile-heading .status-closed { background:#fae7e4; color:#86232a; }
.dashboard-empty p { margin:0; color:var(--muted); }
@media(max-width:620px) {
  .dashboard-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-metric { min-height:84px; padding:12px 14px; }
  .dashboard-filters label { flex-basis:100%; }
}
