/* Shared quiz tool. Colors and fonts come from the theme's custom properties; --tone is the quiz accent.
   Phone layout first; the wide layout starts at 900px. */
[data-gf-tool] [hidden] { display: none !important; }

/* thin bar that stands in for the page header while answering */
.qz-slim { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin: 0 0 6px; }
.qz-slim strong { font: 700 16px/1.2 var(--display); }
.qz-show { min-height: 44px; padding: 0 2px 0 8px; border: 0; background: none; color: var(--ink); font: 600 14px/1 var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.qz { padding: 16px; border: 1.5px solid var(--ink); border-radius: 20px; background: var(--card); box-shadow: 0 6px 0 var(--ink); }
.qz[data-view="intro"] { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }

/* question view */
.qz-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 22px; font-size: 13px; }
.qz-status p { margin: 0; }
.qz-count { display: flex; align-items: baseline; gap: 6px; font-weight: 700; }
.qz-cur { color: var(--tone); font: 700 15px/1 var(--mono); }
.qz-private { color: var(--dim); }
.qz-ticks { display: flex; gap: 2px; margin-top: 8px; }
.qz-ticks i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.qz-ticks .is-done { background: var(--tone); }
.qz-ticks .is-now { background: var(--ink); }
.qz-prompt { display: flex; align-items: center; justify-content: center; max-width: 720px; min-height: 5.2em; margin: 14px auto; font: 700 21px/1.3 var(--display); letter-spacing: -0.01em; text-align: center; text-wrap: balance; }

/* five bars, shortest (strongly disagree) to tallest (strongly agree); each carries its word */
.qz-scale { --bar: 64px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 8px; }
.qz-pick { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; color: var(--ink); font: 700 12px/1.2 var(--text); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-bar { display: flex; align-items: flex-end; justify-content: center; height: calc(var(--bar) * var(--h)); padding-bottom: 5px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--card); box-shadow: 0 3px 0 var(--ink); transition: transform 100ms, box-shadow 100ms; }
.qz-bar kbd { display: none; color: var(--dim); font: 700 12px/1 var(--mono); }
.qz-word { min-height: 2.4em; text-align: center; }
.qz-pick:active .qz-bar { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.qz-pick[aria-pressed="true"] .qz-bar { background: var(--tone); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.qz-pick[aria-pressed="true"] .qz-bar kbd { color: #ffffff; }
.qz-pick[aria-pressed="true"] .qz-word { color: var(--tone); text-decoration: underline; text-underline-offset: 3px; }
.qz-pick:focus-visible { outline: none; }
.qz-pick:focus-visible .qz-bar { outline: 3px solid var(--ink); outline-offset: 2px; }
.qz-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; margin-top: 6px; color: var(--dim); font-size: 13px; }
.qz-back { min-height: 44px; padding: 0 12px 0 0; border: 0; background: none; color: var(--ink); font: 700 14px/1 var(--text); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.qz-back:disabled { opacity: 0.5; text-decoration: none; cursor: default; }
.qz-keys { display: none; }

/* result view: the card (the same image that Save downloads), then the actions */
.qz-hero { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qz-side { display: contents; }
.qz-eyebrow { order: -1; align-self: flex-start; margin: 0; color: var(--tone); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.qz-frame { width: min(100%, 320px); aspect-ratio: 4 / 5; margin: 0; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 18px; background: var(--tone); box-shadow: 0 6px 0 var(--ink); }
.qz-card { display: block; width: 100%; height: 100%; }
.qz-card:not([src]) { visibility: hidden; }
/* The card prints the result name, so on narrow screens the heading is for screen readers only. */
.qz-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.qz-name:focus { outline: none; }
.qz-line { align-self: stretch; margin: 2px 0 0; color: var(--copy); line-height: 1.45; }
.qz-second { align-self: flex-start; margin: 0; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--volt); font: 700 13px/1.2 var(--mono); }
.qz-do { align-self: stretch; display: flex; flex-wrap: wrap; gap: 10px 8px; margin-top: 4px; }
.qz-btn { flex: 1 1 140px; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--card); color: var(--ink); font: 700 15px/1.2 var(--text); cursor: pointer; box-shadow: 0 3px 0 var(--ink); transition: transform 100ms, box-shadow 100ms; }
.qz-btn-solid { flex-basis: 100%; background: var(--tone); color: #ffffff; }
.qz-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.qz-btn:disabled { opacity: 0.6; cursor: default; }
.qz-again { flex: 1 1 100%; min-height: 44px; border: 0; background: none; color: var(--ink); font: 700 15px/1.2 var(--text); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.qz[data-view="shared"] .qz-again { min-height: 48px; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--tone); color: #ffffff; text-decoration: none; box-shadow: 0 3px 0 var(--ink); }
.qz-note { align-self: stretch; min-height: 1.5em; margin: 0; color: var(--dim); font-size: 14px; overflow-wrap: anywhere; }
/* No image could be made: show the name as text instead. */
.qz-nocard .qz-frame { display: none; }
.qz-nocard .qz-name { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; font-size: 40px; }

.qz-more { display: grid; gap: 20px; margin-top: 18px; padding-top: 18px; border-top: 1.5px solid var(--ink); }
.qz-rank { list-style: none; display: grid; align-content: start; gap: 8px; margin: 0; padding: 0; font-size: 14px; font-weight: 700; }
.qz-rank li { display: grid; grid-template-columns: 84px 1fr 48px; align-items: center; gap: 10px; min-height: 26px; }
.qz-rank-bar { height: 12px; overflow: hidden; border: 1.5px solid var(--ink); border-radius: 6px; background: var(--card); }
.qz-rank-bar i { display: block; height: 100%; background: var(--dim); }
.qz-rank .is-first .qz-rank-name { color: var(--tone); }
.qz-rank .is-first i { background: var(--tone); }
.qz-rank b { font-family: var(--mono); text-align: right; }
.qz-about p { margin: 0 0 14px; color: var(--copy); line-height: 1.6; }
.qz-cols { display: grid; gap: 14px; }
.qz-about h3 { margin: 0 0 6px; color: var(--dim); font: 700 13px/1.3 var(--text); letter-spacing: 0.08em; text-transform: uppercase; }
.qz-about ul { margin: 0; padding-left: 20px; color: var(--copy); }
.qz-cols p { margin: 0; }
.qz-deeper { margin: 0; }
.qz-deeper a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tone); font-weight: 700; }
.qz-next { margin-top: 18px; padding-top: 18px; border-top: 1.5px solid var(--ink); }
.qz-next-title { margin: 0; font: 700 20px/1.2 var(--display); }

@media (hover: hover) {
  .qz-pick:hover .qz-bar { background: var(--volt); }
  .qz-pick[aria-pressed="true"]:hover .qz-bar { background: var(--tone); }
  .qz-btn:hover { background: var(--volt); color: var(--ink); }
}
@media (hover: hover) and (pointer: fine) {
  .qz-bar kbd { display: block; }
  .qz-keys { display: inline; }
}

@media (min-width: 900px) {
  .qz { padding: 22px 36px 18px; border-radius: 24px; }
  .qz-status { font-size: 14px; }
  .qz-ticks { gap: 4px; margin-top: 10px; }
  .qz-ticks i { height: 8px; border-radius: 4px; }
  .qz-prompt { min-height: 3.75em; margin: 18px auto; font-size: 30px; line-height: 1.25; }
  .qz-scale { --bar: 84px; gap: 12px; }
  .qz-pick { font-size: 14px; }
  .qz-word { min-height: 1.2em; }

  .qz[data-view="result"], .qz[data-view="shared"] { padding: 32px 36px; }
  .qz-hero { flex-direction: row; gap: 44px; }
  .qz-frame { flex: 0 0 340px; }
  .qz-side { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
  .qz-eyebrow { order: 0; }
  .qz-name { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; font-size: 52px; line-height: 1.02; letter-spacing: -0.03em; }
  .qz-line { margin: 0; font-size: 19px; }
  .qz-do { max-width: 420px; margin-top: 8px; }
  .qz-more { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; margin-top: 32px; padding-top: 28px; }
  .qz-deeper { grid-column: 1 / -1; }
  .qz-next { margin-top: 28px; padding-top: 24px; }
}
