:root {
  --ink: #171717;
  --cream: #f7f4ee;
  --gold: #b89757;
  --gold-dark: #8b6a32;
  --sage: #171717;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, sans-serif;
  line-height: 1.5;
}
.wrap {
  max-width: 950px;
  margin: auto;
  padding: 24px 20px 42px;
}
.wrap::before {
  content: "";
  display: block;
  width: min(390px, 80vw);
  height: 110px;
  margin: 0 auto 18px;
  background: url("res-life-logo.png?v=20260826-2") center/contain no-repeat;
}
.wrap.wide {
  max-width: 1250px;
}
.narrow {
  max-width: 600px;
  margin: auto;
}
.hero {
  text-align: center;
  padding: 20px 0 45px;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1.05;
  margin: 15px auto;
  max-width: 850px;
}
.hero > p:last-child {
  font-size: 1.15rem;
  color: #5d625f;
  max-width: 680px;
  margin: auto;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: bold;
  color: var(--gold-dark);
}
.choices,
.top-three,
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid #dedbd3;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 3px 15px #00000008;
}
.choices .card p {
  min-height: 75px;
}
.button {
  display: inline-block;
  border: 0;
  border-radius: 11px;
  background: var(--sage);
  color: #fff;
  padding: 12px 20px;
  font-weight: bold;
  text-decoration: none;
}
.button.secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid #ccc;
}
.button:disabled {
  opacity: 0.35;
}
.center {
  text-align: center;
}
.muted {
  color: #666;
}
label {
  display: block;
  font-weight: bold;
  margin-top: 18px;
}
input {
  width: 100%;
  padding: 12px;
  border: 1px solid #c9c7c1;
  border-radius: 10px;
  margin-top: 6px;
}
.back {
  border: 0;
  background: none;
  color: var(--gold-dark);
  font-weight: bold;
  margin-bottom: 20px;
}
.matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.matrix label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 13px;
  margin: 0;
}
.matrix small,
.bar-row small {
  display: block;
  color: #777;
}
.matrix input {
  width: 75px;
  margin: 0;
  text-align: center;
}
.step {
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  font-weight: bold;
}
.progress {
  height: 8px;
  background: #ddd;
  border-radius: 9px;
  margin: 15px 0 25px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--gold);
}
fieldset {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 20px;
  margin: 0 0 14px;
}
legend {
  font-weight: bold;
  padding: 0 5px;
}
.scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.scale label {
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px;
  margin: 0;
  font-size: 0.72rem;
}
.scale label.selected {
  background: #f1e8d7;
  border-color: var(--gold);
}
.scale input {
  display: none;
}
.scale strong,
.scale span {
  display: block;
}
.scale strong {
  font-size: 1.1rem;
}
.pager,
.report-actions,
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}
.report-head {
  margin: 35px 0;
}
.report-head h1 {
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  margin: 7px 0;
}
.success,
.notice {
  color: #286142;
  font-weight: bold;
}
.top-three {
  grid-template-columns: repeat(3, 1fr);
}
.top-three article {
  background: var(--ink);
  color: #fff;
  border-radius: 22px;
  padding: 25px;
  border-top: 5px solid var(--gold);
}
.top-three small {
  color: #e6c786;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.top-three > article > b {
  font-size: 3rem;
}
.top-three em {
  font-size: 1rem;
  font-style: normal;
  color: #cce2d7;
}
.profile {
  margin-top: 25px;
}
.bar-row {
  display: grid;
  grid-template-columns: 190px 1fr 70px;
  align-items: center;
  gap: 15px;
  margin: 14px 0;
}
.bar-row i {
  height: 14px;
  background: #eee;
  border-radius: 8px;
  overflow: hidden;
}
.bar-row u {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--gold));
}
.definitions {
  margin-top: 35px;
}
.definitions > div,
.definition-page > div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.definitions h3 {
  display: flex;
  justify-content: space-between;
}
.definitions small {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777;
}
.stats {
  grid-template-columns: repeat(3, 1fr);
  margin: 25px 0;
}
.stats b {
  font-size: 2.4rem;
  color: var(--gold-dark);
  display: block;
}
.table-card {
  background: #fff;
  border-radius: 18px;
  overflow: auto;
  border: 1px solid #ddd;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  background: var(--ink);
  color: #fff;
  border-bottom: 3px solid var(--gold);
}
th,
td {
  text-align: left;
  padding: 13px;
  border-bottom: 1px solid #eee;
}
.result-row {
  cursor: pointer;
}
.result-row:hover td {
  background: #f7f0e3;
}
.result-row a {
  color: var(--gold-dark);
}
.empty {
  text-align: center;
  padding: 25px;
}
.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
.user-list > div {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.user-list small {
  display: block;
}
.link-danger {
  background: none;
  border: 0;
  color: #a22;
}
.error {
  color: #a22;
}
.setup-warning {
  position: fixed;
  bottom: 10px;
  left: 10px;
  background: #fff3cd;
  padding: 10px;
  border: 1px solid #e5c65c;
}
@media (max-width: 700px) {
  .choices,
  .top-three,
  .stats,
  .definitions > div,
  .definition-page > div,
  .matrix {
    grid-template-columns: 1fr;
  }
  .scale span {
    display: none;
  }
  .bar-row {
    grid-template-columns: 135px 1fr 55px;
  }
  .admin-form {
    grid-template-columns: 1fr;
  }
  .admin-head {
    align-items: flex-start;
    gap: 15px;
    flex-direction: column;
  }
}
@page {
  size: Letter portrait;
  margin: 0.42in;
}
@media print {
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  html,
  body {
    font-size: 8.5pt;
    background: #fff;
  }
  .no-print,
  .setup-warning {
    display: none !important;
  }
  .wrap,
  .wrap.wide {
    max-width: none;
    padding: 0;
  }
  .wrap::before {
    width: 2.35in;
    height: 0.72in;
    margin: 0 0 0.08in;
  }
  .report-head {
    margin: 0 0 0.16in;
  }
  .report-head .eyebrow {
    font-size: 7pt;
  }
  .report-head h1 {
    font-size: 23pt;
    margin: 2px 0;
  }
  .report-head p {
    margin: 3px 0;
  }
  .top-three {
    gap: 0.1in;
  }
  .top-three article {
    border-radius: 8px;
    padding: 0.12in;
    min-height: 1.18in;
  }
  .top-three h2 {
    font-size: 13pt;
    margin: 4px 0;
  }
  .top-three > article > b {
    font-size: 22pt;
  }
  .top-three p {
    font-size: 7.5pt;
    line-height: 1.25;
    margin: 5px 0 0;
  }
  .profile {
    margin-top: 0.14in;
    padding: 0.16in;
    border-radius: 8px;
  }
  .profile h2 {
    font-size: 14pt;
    margin: 0 0 4px;
  }
  .bar-row {
    grid-template-columns: 1.55in 1fr 0.48in;
    gap: 8px;
    margin: 4px 0;
    line-height: 1.1;
  }
  .bar-row small {
    font-size: 6.5pt;
  }
  .bar-row i {
    height: 7px;
  }
  .profile > p {
    font-size: 7pt;
    margin: 6px 0 0;
  }
  .definitions {
    break-before: page;
    margin: 0;
  }
  .definitions > h2,
  .definition-page > h2 {
    font-size: 16pt;
    margin: 0 0 0.12in;
  }
  .definitions > div,
  .definition-page > div {
    grid-template-columns: 1fr 1fr;
    gap: 0.09in;
  }
  .definitions article {
    padding: 0.11in;
    border-radius: 6px;
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }
  .definition-page {
    break-before: page;
    page-break-before: always;
  }
  .definition-page:first-child {
    break-before: auto;
    page-break-before: auto;
  }
  .definitions h3 {
    font-size: 10pt;
    margin: 0 0 3px;
  }
  .definitions p {
    font-size: 7.3pt;
    line-height: 1.22;
    margin: 3px 0;
  }
  .definitions small {
    font-size: 6.5pt;
  }
  .card {
    box-shadow: none;
  }
}
