/* Patch Hero, the grown-ups' page (DEC-085 step 4). Calm and readable: cards on the page, the quiz first, then
   eye checks, tips, the star chart and the letter. Logical properties serve English and Arabic alike. The chart and
   the letter each print on their own. */

.gu.wrap {
  max-width: 50rem;
}
.gu {
  display: grid;
  gap: 20px;
  padding-block: 12px 48px;
}
.gu-head {
  display: grid;
  gap: 10px;
}
.gu-head h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
:root[lang='ar'] .gu-head h1,
:root[lang='ar'] .gu h2 {
  letter-spacing: 0;
  line-height: 1.35;
}
.gu-lead {
  color: var(--color-muted);
  font-size: 1.125rem;
}
.gu-back,
.gu-jump a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--color-graphite);
  font-weight: 600;
}
.gu-back {
  justify-self: start;
}
.gu-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
}
.lang-btn {
  min-height: var(--target-min);
  padding-inline: 20px;
  border: 2px solid var(--color-graphite);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  color: var(--color-graphite);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.lang-btn:hover {
  background: var(--color-mist);
}

.gu-card {
  display: grid;
  gap: 12px;
  padding: 22px clamp(16px, 4vw, 28px);
  border: 1px solid var(--color-line);
  border-radius: 24px;
  background: var(--color-page);
  scroll-margin-top: 16px;
}
.gu h2 {
  font-size: clamp(1.375rem, 4.5vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.gu h3 {
  font-size: 1.125rem;
}
.gu-muted {
  color: var(--color-muted);
}
.gu-small {
  font-size: 0.9375rem;
}

/* On the questions' own page: the ways on to the rest. */
.gu-more {
  display: grid;
  gap: 4px;
}
.gu-more a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--color-graphite);
  font-weight: 700;
}

/* The quick questions */
.gu-questions {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
}
.gu-q {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: var(--color-mist);
  counter-increment: q;
}
.gu-statement {
  font-size: 1.0625rem;
  font-weight: 700;
}
.gu-statement::before {
  content: counter(q) '. ';
  color: var(--color-muted);
}
.gu-choices {
  display: flex;
  gap: 10px;
}
.gu-choice {
  flex: 1 1 0;
  max-width: 12rem;
  min-height: 52px;
  border: 2px solid var(--color-graphite);
  border-radius: var(--radius-pill);
  background: var(--color-page);
  color: var(--color-graphite);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.gu-choice[aria-pressed='true'] {
  background: var(--color-graphite);
  color: #fff;
}
.gu-why {
  padding: 10px 14px;
  border-inline-start: 4px solid var(--color-amber);
  border-radius: 8px;
  background: var(--color-page);
}
.gu-right .gu-why {
  border-inline-start-color: #1d9e75;
}
.gu-score {
  font-size: 1.125rem;
  font-weight: 800;
}
.gu-score:empty {
  display: none;
}
.gu-link-button {
  justify-self: start;
  min-height: var(--target-min);
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-graphite);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.gu-link-button[hidden] {
  display: none;
}

/* Lists */
.gu-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-inline-start: 1.4em;
}
.gu-ticks {
  padding-inline-start: 0;
  list-style: none;
}
.gu-ticks li {
  position: relative;
  padding-inline-start: 34px;
}
.gu-ticks li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 0.15em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-amber);
  box-shadow: inset 0 0 0 6px #fff6dc;
}
.gu-urgent {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--color-graphite);
  color: #fff;
  font-weight: 600;
}

/* The star chart */
.gu-fields {
  display: grid;
  gap: 8px;
}
.gu-field {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  font-weight: 700;
}
.gu-blank {
  flex: 1;
  min-width: 6rem;
  border-bottom: 2px solid var(--color-graphite);
  height: 1.2em;
}
.gu-chart-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 3px;
  text-align: center;
}
.gu-chart-table th {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
}
.gu-chart-table thead td {
  background: none;
}
.gu-chart-table tbody th {
  width: 6.5em;
  text-align: start;
}
.gu-chart-table td {
  padding: 3px;
  border-radius: 10px;
  background: #fff6dc;
}
.gu-star {
  display: block;
  width: 100%;
  max-width: 34px;
  height: auto;
  margin-inline: auto;
  aspect-ratio: 1;
  fill: #fff;
  stroke: var(--color-amber);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.gu-print {
  justify-self: start;
}

/* The letter */
.gu-letter-text {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px dashed var(--color-line);
  border-radius: 16px;
  line-height: 1.6;
}
.gu-letter-text ul {
  margin: 0;
  padding-inline-start: 1.4em;
}
.gu-sign {
  margin-top: 12px;
  font-weight: 700;
}

/* Printing: only the part asked for, in black on white, with no buttons. */
@media print {
  .top,
  .gu-head,
  .gu-no-print,
  .gu-card:not(.gu-printable),
  .gu-muted.gu-small {
    display: none !important;
  }
  body[data-print='chart'] #gu-letter,
  body[data-print='letter'] #gu-chart {
    display: none !important;
  }
  .gu-card {
    border: 0;
    padding: 0;
  }
  .gu-star {
    max-width: 48px;
  }
}
