:root {
  --ink: #193734;
  --muted: #667b77;
  --green: #087b69;
  --light: #eaf4ef;
  --paper: #f7f9f6;
  --line: #dfe7e1;
  --gold: #e6b75b;
  --shadow: 0 7px 28px #24493b08;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    15px/1.6 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--paper);
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  cursor: pointer;
}
a,
button,
input,
select,
textarea {
  outline-offset: 4px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ce9b32;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  padding: 30px 20px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -1px;
  margin: 0 12px 32px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2px;
  font-weight: 500;
  color: var(--muted);
}
nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 550;
  color: #536a64;
  margin: 2px 0;
}
nav a:before {
  content: attr(data-icon);
  font-size: 17px;
  width: 22px;
  text-align: center;
  font-weight: 500;
}
nav a.active,
nav a:hover {
  background: var(--light);
  color: var(--green);
}
.nav-label {
  display: block;
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #85938f;
  margin: 20px 12px 7px;
  font-weight: 700;
}
.sidebar-foot {
  margin-top: auto;
  padding: 25px 12px 0;
}
.sidebar-foot small {
  color: var(--muted);
  font-size: 11px;
  display: block;
  margin-top: 20px;
}
.help-link {
  font-size: 12px;
  font-weight: 650;
}
.workspace {
  margin-left: 252px;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 40px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.topbar form {
  display: flex;
  margin-left: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: center;
}
.topbar input {
  border: 0;
  background: none;
  max-width: 225px;
  padding: 9px 12px;
  font-size: 12px;
}
.topbar button {
  border: 0;
  background: none;
  padding: 5px 14px;
  color: var(--muted);
  font-size: 23px;
}
main {
  max-width: 1380px;
  padding: 38px 44px 70px;
  margin: auto;
  min-height: 80vh;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head h1 {
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 6px 0 10px;
}
.muted {
  color: var(--muted);
}
.page-head p {
  margin: 0;
  max-width: 720px;
}
.badge {
  display: inline-block;
  background: var(--light);
  color: var(--green);
  padding: 4px 9px;
  font-size: 10px;
  letter-spacing: 0.5px;
  border-radius: 5px;
  font-weight: 700;
}
.badge.warn {
  background: #fff3d8;
  color: #79540f;
}
.badge.neutral {
  background: #f0f2f0;
  color: #64736b;
}
.hero {
  background: #e9f2e9;
  border: 1px solid #d7e5d7;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  overflow: hidden;
  margin-bottom: 25px;
  min-height: 328px;
}
.hero-copy {
  padding: 38px;
}
.hero h2 {
  font-family: Georgia, serif;
  font-size: 43px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -1px;
  margin: 20px 0;
}
.hero p {
  font-size: 14px;
  max-width: 480px;
  color: #4c675c;
}
.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px;
}
.orbit {
  width: 244px;
  height: 244px;
  border: 1px solid #abcabb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.orbit:before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  border: 1px dashed #abcabb;
  border-radius: 50%;
}
.orbit img {
  width: 96px;
  height: 96px;
  z-index: 1;
  box-shadow: 0 12px 45px #45877320;
  border-radius: 28px;
}
.orbit-label {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 13px;
  border-radius: 8px;
  font-size: 11px;
  box-shadow: var(--shadow);
}
.orbit-label.a {
  top: 8px;
  left: -30px;
}
.orbit-label.b {
  bottom: 20px;
  right: -25px;
}
.orbit-label.c {
  top: 95px;
  right: -58px;
}
.button,
button.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--green);
  border-radius: 7px;
  background: var(--green);
  color: #fff;
  padding: 10px 17px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.button.secondary,
button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button.small {
  padding: 7px 13px;
  font-size: 12px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 12px 0;
}
.card p {
  font-size: 13px;
  color: var(--muted);
}
.card a.title {
  color: var(--ink);
  text-decoration: none;
}
.card a.title:hover {
  text-decoration: underline;
}
.entry {
  padding: 20px;
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s;
}
.entry:hover {
  transform: translateY(-3px);
}
.entry .icon {
  color: var(--green);
  font-size: 25px;
}
.entry h3 {
  font-size: 14px;
  margin: 12px 0 5px;
}
.entry p {
  font-size: 11px;
  margin: 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 15px;
}
.section-heading h2 {
  font-size: 20px;
  letter-spacing: -0.3px;
  margin: 0;
}
.section-heading a {
  font-size: 12px;
}
.meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.card .meta {
  padding-top: 16px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.notice {
  padding: 15px 18px;
  border: 1px solid #dbcda8;
  border-radius: 9px;
  background: #fff9e9;
  color: #745a2b;
  font-size: 13px;
  margin: 18px 0;
}
.notice.info {
  background: #edf5f2;
  border-color: #cfe0d8;
  color: #335a4e;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}
.filters label {
  font-size: 11px;
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid #bccdc4;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  max-width: 100%;
}
textarea {
  min-height: 110px;
  resize: vertical;
  width: 100%;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 5px;
}
label input,
label select {
  display: block;
  width: 100%;
  margin-top: 5px;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  display: inline-block;
  margin-right: 9px;
}
.form {
  max-width: 630px;
}
.form input:not([type="checkbox"]):not([type="radio"]),
.form select {
  width: 100%;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.reading {
  max-width: 820px;
}
.reading .lead {
  font-size: 19px;
  line-height: 1.65;
  color: #4a655c;
  margin: 24px 0 34px;
}
.reading h2 {
  font-size: 23px;
  margin-top: 32px;
}
.reading p {
  white-space: pre-line;
}
.reading .sources {
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 30px;
}
.learning-strip {
  background: #173e35;
  color: white;
  border-radius: 12px;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 28px 0;
}
.learning-strip p {
  margin: 4px 0;
  color: #bdd6c8;
  font-size: 12px;
}
.learning-strip .button {
  margin-left: auto;
  background: #d8efdd;
  border: 0;
  color: #173e35;
}
.number {
  font-family: Georgia, serif;
  font-size: 36px;
  color: #84ab96;
}
.question {
  padding: 20px;
  background: #f0f5f0;
  border-radius: 9px;
  margin: 16px 0;
}
.question label {
  font-weight: 400;
}
.feedback {
  padding: 13px;
  background: #e5f2e8;
  border-radius: 7px;
  font-size: 13px;
  margin: 12px 0;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
td,
th {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.table-wrap input,
.table-wrap select {
  min-width: 130px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #edf2ed;
  padding: 15px;
  border-radius: 8px;
  font-size: 12px;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #bacdc1;
  border-radius: 10px;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.tabs a {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
  background: white;
}
.tabs a.active {
  background: var(--green);
  color: white;
}
.pager {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  margin: 24px;
}
.link-button {
  background: none;
  border: 0;
  text-decoration: underline;
  color: var(--green);
  padding: 5px;
  font-size: 12px;
}
.danger {
  color: #993d30;
}
.risk-grid {
  display: grid;
  max-width: 360px;
  gap: 3px;
  margin-top: 15px;
}
.risk-cell {
  padding: 12px;
  text-align: center;
  background: #e9eee4;
  font-size: 12px;
}
.risk-cell.medium {
  background: #f5e4b9;
}
.risk-cell.high {
  background: #ebc2ab;
}
.risk-cell.selected {
  outline: 3px solid var(--ink);
  outline-offset: -3px;
  font-weight: bold;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -100px;
  left: 15px;
  z-index: 20;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.menu-toggle {
  display: none;
}
footer {
  border-top: 1px solid var(--line);
  padding: 25px 44px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
}
footer a {
  margin-left: 18px;
  color: var(--muted);
}
footer small {
  flex-basis: 100%;
  font-size: 10px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  background: var(--ink);
  color: white;
  border-radius: 9px;
  box-shadow: 0 8px 30px #0002;
  padding: 14px 20px;
  z-index: 99;
  display: none;
}
#toast.show {
  display: block;
}
.loading {
  padding: 60px;
  text-align: center;
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1180px) {
  .sidebar {
    width: 220px;
    padding: 25px 12px;
  }
  .workspace {
    margin-left: 220px;
  }
  .topbar {
    padding: 16px 25px;
  }
  .eyebrow {
    display: none;
  }
  main {
    padding: 28px;
  }
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero h2 {
    font-size: 36px;
  }
  .hero-art {
    transform: scale(0.8);
  }
}
@media (max-width: 850px) {
  .sidebar {
    position: relative;
    width: auto;
    padding: 16px 20px;
    display: block;
  }
  .brand {
    margin: 0;
    font-size: 22px;
  }
  .sidebar-foot {
    display: none;
  }
  .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 22px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 12px;
    background: white;
  }
  .sidebar nav {
    display: none;
    margin-top: 20px;
  }
  .sidebar nav.open {
    display: block;
  }
  .workspace {
    margin-left: 0;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    display: none;
  }
  .grid,
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
  .topbar {
    padding: 12px 20px;
    gap: 10px;
  }
  .topbar form {
    margin-left: 0;
    flex: 1;
  }
  .topbar input {
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  .hero-copy {
    padding: 28px;
  }
  main {
    padding: 24px 20px;
  }
  .page-head {
    display: block;
  }
  .page-head h1 {
    font-size: 28px;
  }
  .reading .lead {
    font-size: 17px;
  }
  .learning-strip {
    flex-wrap: wrap;
  }
  .learning-strip .button {
    margin-left: 0;
  }
  footer {
    padding: 24px 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .grid.four {
    gap: 10px;
  }
  .entry {
    padding: 14px;
  }
  .hero h2 {
    font-size: 35px;
  }
  .card {
    padding: 20px;
  }
  .topbar input {
    font-size: 11px;
  }
  .topbar .small {
    font-size: 11px;
  }
  .page-head p {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  footer,
  .actions,
  .filters {
    display: none;
  }
  .workspace {
    margin: 0;
  }
  main {
    padding: 0;
  }
  .card {
    break-inside: avoid;
    box-shadow: none;
  }
}

.risk-grid.scale3 {
  grid-template-columns: repeat(3, 1fr);
}
.risk-grid.scale5 {
  grid-template-columns: repeat(5, 1fr);
}
