* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  margin: 0px;
  font-size: 16.5px;
  font-family: "Roboto", "Open Sans", sans-serif;
  line-height: 1.42857143;
}

body {
  -webkit-print-color-adjust: exact !important;
}

/*
.pos-cont {
    margin-left: auto;
    margin-right: auto;
    width: 80%;
    min-width: 370px;
    font-family: 'Raleway', sans-serif;
    user-select: none;
    position: relative;
}
*/

.center-text {
  text-align: center;
}

.column-1 {
  display: grid;
  gap: 4px;
  float: left;
  width: 100%;
  min-width: 300px;
}

.column-3 {
  float: left;
  width: 33.33%;
  min-width: 300px;
}

.line {
  border-top: 1px solid rgba(0, 0, 0, 1);
  width: 100%;
}

.question-container {
  margin: 5px;
  display: flex;
  flex-wrap: wrap;
}

.question-container>.column-3 {
  padding: 5px 0px;
}

.question-cotainer:after {
  content: "";
  display: table;
  clear: both;
}

.m-question {
  position: relative;
}

/*
.section1 .answer-text-t {
    color: rgba(0, 150, 0, 1);
}
*/

.section4 .answer-text-t {
  color: rgba(0, 150, 0, 1);
}

.section2 .answer-text-f,
.section1 .answer-text-f {
  color: rgba(180, 0, 0, 1);
}

.options {
  position: absolute;
  top: 4px;
  left: 10px;
}

.answer-t {
  color: #4184dd;
}

.answer-f {
  color: #f0506e;
}

.m-options {
  text-align: center;
}

.multiple .options,
.gender .options {
  position: absolute;
  top: -3px;
  right: 5px;
  left: auto;
}


.m-answer {
  font-size: 50px !important;
  position: relative;
}

.answer-fe {
  color: red;
  background-color: rgba(255, 0, 0, .1);
}

.answer-fe.chosen {
  background-color: rgba(255, 0, 0, .3);
}

.multiple .answers-2,
.gender .answers-2 {
  display: inline-block;
  text-align: center;
}

.multiple .answer,
.gender .answer {
  font-size: 20px !important;
  position: relative;
  margin-left: 5px;
  padding: 3px;
  border-radius: 5px;
}

.fa-female,
.fa-male {
  padding: 3px 30px !important;
}


.multiple .answer-t {
  background-color: rgba(65, 133, 221, 0)
}

.multiple .answer-f {
  background-color: rgba(240, 80, 109, 0);
  color: #f0506e;
}

.multiple .answer-t.chosen {
  color: white;
  background-color: rgb(65, 133, 221)
}

.multiple .answer-f.chosen {
  color: white;
  background-color: rgb(240, 80, 109)
}

.answer-m {
  color: blue;
  background-color: rgba(0, 0, 255, 0.1)
}

.answer-m.chosen {
  background-color: rgba(0, 0, 255, 0.3)
}

.m-answer-t {
  color: green;
  background-color: rgba(0, 255, 0, .1);
}

.m-answer-f {
  color: red;
  background-color: rgba(255, 0, 0, .1);
}

.m-answers-2 {
  width: 49%;
  display: inline-block;
}

.m-ans-number {
  position: absolute;
  top: 0px;
  left: 2px;
  font-size: 20px;
  font-family: "Roboto", "Work Sans", sans-serif;
}

.m-active-question-text {
  font-weight: bold;
}

.reversed .scalebar-1 {
  border-top: 4px solid rgba(0, 155, 0, .3)
}

.reversed .scalevalue-1 {
  color: rgba(0, 155, 0, .9)
}

.reversed .scalebar-2 {
  border-top: 4px solid rgba(175, 165, 0, .3)
}

.reversed .scalevalue-2 {
  color: rgba(175, 165, 0, .9)
}

.reversed .scalebar-3 {
  border-top: 4px solid rgba(255, 165, 0, .4);
}

.reversed .scalevalue-3 {
  color: rgba(255, 165, 0, .9)
}

.reversed .scalebar-4 {
  border-top: 4px solid rgba(255, 0, 0, .3)
}

.reversed .scalevalue-4 {
  color: rgba(180, 0, 0, .8)
}

.reversed .scalebar-5 {
  border-top: 4px solid rgba(180, 0, 0, 0.5)
}

.reversed .scalevalue-5 {
  color: rgba(150, 0, 0, 1)
}

.scalebar-1 {
  border-top: 4px solid rgba(255, 0, 0, .3)
}

.scalebar-2 {
  border-top: 4px solid rgba(255, 165, 0, .4);
}

.scalebar-3 {
  border-top: 4px solid rgba(175, 165, 0, .3)
}

.scalebar-4 {
  border-top: 4px solid rgba(0, 155, 0, .3)
}

.scalevalue-1 {
  color: rgba(180, 0, 0, .8)
}

.scalevalue-2 {
  color: rgba(255, 165, 0, .9)
}

.scalevalue-3 {
  color: rgba(175, 165, 0, .9)
}

.scalevalue-4 {
  color: rgba(0, 155, 0, .9)
}

.graphprint {
  display: none;
}

#fscore {
  display: inline-block;
}

#name {
  display: inline-block;
  flex-grow: 1;
  text-align: center;
}

#date {
  display: inline-block;
}

.printinfo {
  display: none;
  white-space: nowrap;
  align-items: flex-end;
}

.printinfo h1 {
  margin: 0px;
}

@page {
  margin: 1cm 1.5cm;
  size: letter portrait;
}

.mental .options {
  position: relative;
  display: inline-block;
}


.clear {
  clear: both;
}

#dashboard {
  display: none;
}

#dashboard h1 {
  margin: 100px 0 80px 0;
  padding: 80px 0 0 0;
  border-top: 1px solid #caced2;
  font-family: "Roboto", "Work Sans", sans-serif;
  font-size: 42px;
  color: #001629;
  text-align: center;
}

.required {
  color: #de283f;
  font-style: italic;
  font-size: 14px;
}

.required .asterisk {
  font-size: 22px;
  position: relative;
  top: 5px;
}

#reset {
  position: relative !important;
  width: 102px;
  /* height: 30px; */
  color: #fff !important;
  /* background-color: #1198d7 !important; */
  cursor: pointer;
  font-family: "Roboto", "Work Sans", sans-serif;
  /* font-size: 16px; */
  text-align: center;
  /* line-height: 30px; */
  /* border:0 !important; */
  border-radius: 0 !important;
  padding: 0px !important;
  top: 1px !important;
  right: 0 !important;
  display: inline-block;
  margin-right: 5px;
}

#score {
  position: relative !important;
  width: 126px;
  /* height: 30px; */
  /* color: #1198d7 !important; */
  background-color: #fff !important;
  cursor: pointer;
  font-family: "Roboto", "Work Sans", sans-serif;
  /* font-size: 16px; */
  text-align: center;
  /* line-height: 30px; */
  /* border:1px solid #1198d7 !important; */
  border-radius: 0 !important;
  padding: 0px !important;
  top: 1px !important;
  right: 0 !important;
  display: inline-block;
}

#score b {
  font-weight: 400;
}

#nameinput {
  position: relative !important;
  /* color: #1198d7 !important; */
  /* line-height: 30px; */
  font-family: "Roboto", "Work Sans", sans-serif;
  /* font-size: 16px; */
  background-color: #fff !important;
  border: 1px solid #4a8adf !important;
  border-radius: 0 !important;
  padding: 0px 10px !important;
  top: 1px !important;
  right: 0 !important;
  /* height: 30px; */
  display: inline-block;
  cursor: pointer;
  margin-right: 5px;
}

#nameinput>.title {
  display: inline-block;
  /* font-size: 16px !important; */
  /* font-weight: 400 !important; */
  /* line-height: 30px !important; */
  /* padding: 0 !important; */
}

#ninput {
  display: none;
  border-radius: 0 !important;
  border: 0 !important;
  /* height: 30px !important; */
  /* line-height: 30px !important; */
  outline: none !important;
}

.title {
  font-family: "Roboto", "Work Sans", sans-serif;
  color: #012c6d;
  font-size: 1.059rem !important;
  font-weight: 700 !important;
  padding: 0 0 5px 10px;
}

.section>.title {
  font-family: "Roboto", "Work Sans", sans-serif;
  color: #012c6d;
  font-size: 1.059rem !important;
  font-weight: 700 !important;
  margin: 0px !important;
  height: 50px !important;
  line-height: 46px !important;
  padding: 0 20px 0 20px !important;
}

.section>.title>.required {
  font-size: 22px !important;
}

.section>.title>.titleinfo {
  color: #de283f;
}

.section>.description {
  font-family: "Roboto", "Open Sans", sans-serif;
  font-size: 1.125rem;
  color: #1e1e1e;
  padding: 15px 0 0 20px;
}

.reset {
  display: inline-block;
  float: right;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 30px 0 0 !important;
  padding: 0px !important;
  /* color: #1198d7; */
  cursor: pointer;
  text-transform: uppercase;
  /* font-size: 16px !important; */
  line-height: 50px !important;
}

.question {
  font-family: "Roboto", "Work Sans", sans-serif;
  font-size: 16.5px;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.section {
  margin-bottom: 35px;
  background: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #6ea0e2;
  border-radius: 8px;
  padding: 20px 20px;
}

.mental .answer {
  font-size: 14px !important;
  font-weight: 400;
  display: inline-block;
  border-radius: 0;
  height: 23px;
  line-height: 23px;
  border: 1px solid #4a8adf;
  background-color: #f8f8f8;
  color: #4184dd;
  padding: 0 12px;
}

.mental .answer.chosen {
  border: 1px solid transparent;
  background-color: #4a8adf;
  color: #fff;
}

.mental .active-question-text {
  display: inline-block;
  margin-right: 20px;
}

.multiple.question,
.gender.question {
  padding: 0 0 5px 10px;
}

.gender .answer-text {
  max-width: calc(100% - 80px);
}

#results {
  height: 100% !important;
  line-height: 80px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
}

#results>span {
  width: 33.33%;
  float: left;
  text-align: justify !important;
}

#results>span>span {
  display: inline-block;
  color: #de283f;
}

#results:after {
  content: "";
  display: table;
  clear: both;
}

.btn-print {
  width: 170px;
  height: 45px;
  color: #1198d7 !important;
  background-color: #fff !important;
  cursor: pointer;
  font-family: "Roboto", "Work Sans", sans-serif;
  font-size: 18px !important;
  font-weight: 800;
  text-align: center;
  line-height: 30px;
  border: 1px solid #1198d7 !important;
  border-radius: 0 !important;
  padding: 0px !important;
  margin-right: 20px;
}

.btn-result {
  width: 170px;
  height: 45px;
  color: #fff !important;
  background-color: #1198d7 !important;
  cursor: pointer;
  font-family: "Roboto", "Work Sans", sans-serif;
  font-size: 18px !important;
  font-weight: 800;
  text-align: center;
  line-height: 30px;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0px !important;
}

#table {
  font-family: Helvetica;
  font-size: 16px;
  border: 1px solid #e7eef0;
  color: #273549;
  width: 100%;
  text-align: center;
}

#table .head {
  background-color: #f3fbfe;
  color: #1758b9;
}

#table td {
  border: 1px solid #e7eef0;
  padding: 5px !important;
}

#table tr:nth-child(2n) {
  background-color: #fff
}

#table tr:nth-child(odd) {
  background-color: #f3fbfe
}

#tablechart {
  margin-bottom: 75px;
}

#chart1 {
  float: left;
  width: 50%;
  min-height: 500px;
}

#chart2 {
  float: left;
  width: 50%;
  min-height: 500px;
}

#dataopts {
  clear: both;
}

.name-bar {
  margin-bottom: 5px;
}

.name-warning {
  width: 50%;
  float: left;
  line-height: 28px;
}

.name-box {
  width: 50%;
  float: left;
  text-align: right;
}

.result-2nd {
  text-align: center !important;
}

.result-3rd {
  text-align: right !important;
}

#chartTitle {
  width: 50%;
  margin: 0 50%;
  text-align: center;
  text-transform: uppercase;
  border: 1px solid #000;
  padding: 5px;
  font-weight: 800;
  font-family: "Roboto", "Work Sans", sans-serif;
  font-size: 20px;
}

#chartTitle span {
  min-width: 120px;
  display: inline-block;
  text-transform: none;
  border-bottom: 1px solid #000;
  color: #de283f;
}

@media (max-width: 1135px) AND (min-width: 760px) {
  .column-3 {
    width: 50%;
  }

  .splitcolumn {
    width: 100% !important;
    padding: 0px !important;
  }

  .splitcolumn>.title {
    padding-left: 5px !important;
  }

  .mini {
    width: 50%;
    display: inline-block !important;
    float: left;
    padding: 5px;
  }

  #chartTitle {
    width: 96%;
    margin: 0 2% 15px 2%;
  }
}

@media (max-width: 760px) {
  .column-3 {
    width: 100% !important;
  }

  .name-bar {
    margin-bottom: 5px;
  }

  .name-warning {
    width: 100%;
  }

  .name-box {
    text-align: left;
    width: 100%;
  }

  #chart1 {
    width: 100%;
  }

  #chart2 {
    width: 100%;
  }

  #results>span {
    width: 100%;
  }

  #results {
    line-height: 50px !important;
  }

  .result-2nd {
    text-align: justify !important;
  }

  .result-3rd {
    text-align: justify !important;
  }

  #tablechart {
    margin-bottom: 0;
  }

  #chartTitle {
    width: 96%;
    margin: 0 2% 15px 2%;
    position: relative;
    top: 520px;
  }
}



/* ====== Generic table layout ====== */
.question-table-element {
  width: 100%;
  border-collapse: collapse;
  font-family: system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Prevent the table from overflowing its parent */
  max-width: 100%;
}

.question-table-element th,
.question-table-element td {
  border: 1px solid #d1d5db;
  /* neutral gray */
  padding: 0.75rem 1rem;
  /* readable touch-friendly spacing */
}

/* ====== Header styling ====== */
.question-table-element thead th {
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
  text-align: left;
  /* Keep headers visible when the user scrolls */
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ====== Body rows ====== */
.question-table-element tbody tr:nth-child(even) {
  background: #fafafa;
  /* subtle zebra striping */
}

.question-table-element tbody tr:hover {
  background: #e0f2fe;
  /* light blue hover feedback */
}

/* Center the radio-button columns */
.question-table-element td:nth-child(2),
.question-table-element td:nth-child(3) {
  text-align: center;
  width: 10rem;
  /* keeps text column wide */
}

.question-table-element label {
  display: none;
}

/* Make the radios easy to hit / see */
.question-table-element input[type="radio"] {
  /* Increase visual size without changing hit-box */
  transform: scale(1.25);
  cursor: pointer;
  accent-color: #2563eb;
  /* modern browsers: blue accent */
}

/* ====== Small-screen stacking ====== */
@media (max-width: 600px) {
  .question-table-element thead {
    /* Hide the header row — we’ll emulate labels in the cells */
    clip: rect(0 0 0 0);
    height: 1px;
    width: 1px;
    overflow: hidden;
    position: absolute;
  }


  .question-table-element label {
    display: inline-block;
  }

  .question-table-element,
  .question-table-element tbody,
  .question-table-element tr,
  .question-table-element td {
    display: block;
    width: 100%;
  }

  .question-table-element tr {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  }

  .question-table-element td {
    /* Add a pseudo “label” pulled from the original <th> text */
    position: relative;
    text-align: left;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .question-table-element td:last-child {
    border-bottom: none;
  }

  .question-table-element td::before {
    content: attr(data-label);
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #6b7280;
    white-space: pre-wrap;
  }

  /* radios now float right for a cleaner look */
  .question-table-element td:nth-child(2),
  .question-table-element td:nth-child(3) {
    text-align: left;
    width: auto;
  }
}

/* =============== Each checklist row =============== */
.checkbox-container {
  display: flex;               /* align box + label horizontally */
  align-items: center;       /* vertically center the checkbox */
  gap: 0.5rem;
  background: #fff;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;   /* light gray frame */
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
  transition: background 0.15s ease-in-out, box-shadow 0.15s;
}

.checkbox-container:hover {
  background: #f9fafb;
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.06);
}

/* =============== Checkbox itself =============== */
.question-input[type="checkbox"] {
  /* enlarge the hit-area without messing with true click box */
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #2563eb;          /* modern browsers: blue accent */
  cursor: pointer;
  flex-shrink: 0;                 /* never let it compress */
}

/* =============== Label text =============== */
.checkbox-container label {
  cursor: pointer;
  font-size: 0.9375rem;           /* ≈ 15 px – readable, compact */
  line-height: 1.4;
  color: #374151;                 /* gray-800 */
}

/* =============== Focus states =============== */
.question-input:focus-visible + label {
  outline: 2px solid #2563eb;
  outline-offset: 4px;
}



/* =========================
   Each question “card”
   ========================= */
.question.question-multiple-choice {
  background: #ffffff;
  border: 1px solid #e5e7eb;         /* gray-200 */
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / .06);
}

/* Title + optional description */
.question-title {
  font-weight: 600;
  color: #111827;                    /* gray-900 */
  margin-bottom: 0.75rem;
  line-height: 1.35;
}

.question-description {
  font-size: 0.875rem;               /* 14 px */
  color: #6b7280;                    /* gray-500 */
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-style: italic;
}

/* =========================
   Option list
   ========================= */
.question-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Make the clickable card around each radio */
.option-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;         /* gray-300 */
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.option-container:hover {
  background: #f9fafb;
  box-shadow: 0 2px 4px rgb(0 0 0 / .05);
}

/* =========================
   Radio input itself
   ========================= */
.question-input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #2563eb;             /* indigo-600 */
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;                            /* reset default margin */
}

/* Visually highlight the card when its radio is checked */
.question-input:checked + label,
.option-container:has(.question-input:checked) {
  background: #eff6ff;               /* indigo-100 */
  border-color: #2563eb;
}

/* =========================
   Label text
   ========================= */
.option-container label {
  cursor: pointer;
  color: #374151;                    /* gray-700 */
  line-height: 1.35;
}

/* Keyboard-focus ring for accessibility */
.question-input:focus-visible + label,
.option-container:has(.question-input:focus-visible) {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

/* =============================
   “Other conditions” number card
   ============================= */
.question.question-number {
  background: #fff;
  border: 1px solid #e5e7eb;          /* gray-200 */
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;                       /* space between title & input row */
}

/* Question text */
.question-number .question-title {
  font-weight: 600;
  color: #111827;                     /* gray-900 */
  line-height: 1.35;
}

/* =============================
   Input + buttons row
   ============================= */
.input-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;                    /* lets items wrap on narrow screens */
}

/* Number input */
.input-number {
  width: 6rem;                        /* fits “20” comfortably */
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.4;

  border: 1px solid #d1d5db;          /* gray-300 */
  border-radius: 0.5rem;
  background: #f9fafb;
  color: #374151;                     /* gray-700 */

  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-number:focus {
  outline: none;
  border-color: #2563eb;              /* indigo-600 */
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
/* Remove default spinners */
.input-number::-webkit-outer-spin-button,
.input-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-number[type="number"] { -moz-appearance: textfield; }

/* =============================
   Add / Remove buttons
   ============================= */
.button-add,
.button-remove {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

/* “+1” – primary action */
.button-add {
  background: #dc2626;                 /* indigo-600 */
  color: #fff;
  border-color: #fca5a5;               /* red-300 */
}
.button-add:hover {
  background: #f87171;                 /* red-400 */
}
.button-add:focus-visible {
  outline: 2px solid #dc2626;          /* indigo-600 */
  outline-offset: 3px;
}

/* “–1” – secondary / danger action */
.button-remove {
  background: #fff;
  color: #dc2626;                     /* red-600 */
  border-color: #fca5a5;              /* red-300 */
}
.button-remove:hover { background: #fee2e2; }
.button-remove:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 3px;
}

/* =============================
   Responsive tweaks
   ============================= */
@media (max-width: 420px) {
  .input-container {
    flex-direction: column;
    align-items: stretch;
  }
  .input-number,
  .button-add,
  .button-remove {
    width: 100%;
  }
}

/* ===========================
   Frailty score – results card
   =========================== */
.results {
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #6ea0e2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

/* Primary score line */
.results .score-text {
  font-size: 1.25rem;                  /* ≈ 20 px */
  font-weight: 700;
  color: black;                    /* red-800 */
  line-height: 1.3;
}

/* Narrative interpretation */
.results .interpretation-text {
  font-size: 1rem;
  color: #4b5563;                      /* gray-600 */
  line-height: 1.5;
}
