/* ============================================================
   pnautica — Carteggio Card
   Componente isolato: tutti i token sono scoped sotto .qc-cg
   per non collidere con il resto del sito.
   ============================================================ */

.qc-cg {
  --brand:        #c2591d;
  --brand-dark:   #9a4517;
  --brand-deep:   #7d370f;
  --brand-1:      #e4b695;
  --brand-2:      #ebceb3;
  --brand-3:      #f6e5d1;
  --brand-4:      #fffdef;
  --brand-tint:   #fdf6ef;

  --easy:         #6b8e6f;
  --easy-dark:    #4f6e54;
  --easy-tint:    #e8efe6;
  --medium:       #c89635;
  --medium-dark:  #9a7117;
  --medium-tint:  #f6ecd3;
  --hard:         #a83a1d;
  --hard-dark:    #832b14;
  --hard-tint:    #f3dccf;

  --bg:           #faf6ef;
  --bg-deep:      #f3ece0;
  --surface:      #ffffff;
  --line-soft:    #f3ece0;
  --line:         #ece5da;
  --line-strong:  #d8cdbe;
  --ink:          #1f1a17;
  --ink-2:        #6e655e;
  --ink-3:        #a39a92;
  --ink-4:        #c8c0b6;

  --display:      'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:         'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:         'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* default difficulty = mostarda */
  --accent:      var(--medium);
  --accent-dark: var(--medium-dark);
  --accent-tint: var(--medium-tint);

  font-family: var(--body);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 1px 2px rgba(31, 26, 23, .04),
    0 10px 28px -10px rgba(31, 26, 23, .14);
  color: var(--ink);
  line-height: 1.5;
  max-width: 720px;
  margin: 24px auto 32px;
}

.qc-cg.is-easy { --accent: var(--easy); --accent-dark: var(--easy-dark); --accent-tint: var(--easy-tint); }
.qc-cg.is-hard { --accent: var(--hard); --accent-dark: var(--hard-dark); --accent-tint: var(--hard-tint); }

.qc-cg *, .qc-cg *::before, .qc-cg *::after { box-sizing: border-box; }

/* Reset heading defaults: i tag h1/h2 vivono dentro la card per SEO,
   ma lo stile viene dato dalle classi .qc-cg__num-line / __title / __label.
   :where() azzera la specificità in modo che qualsiasi classe della card vinca. */
:where(.qc-cg h1, .qc-cg h2, .qc-cg h3) {
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
}

.qc-cg__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-dark) 100%);
}

/* Top: numero · carta + status */
.qc-cg__top {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 4px;
}
.qc-cg__num-block { display: flex; flex-direction: column; min-width: 0; }
.qc-cg__num-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 600; margin-bottom: 6px;
}

/* H1 wrapper: numero+carta su prima riga, topic editoriale sotto */
.qc-cg__h1 {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qc-cg__num-line {
  display: inline-flex; align-items: baseline; gap: 10px;
  flex-wrap: wrap;
}
.qc-cg__h1-topic {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  font-variation-settings: "opsz" 24;
}
.qc-cg__h1-link {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--brand-2);
  transition: color .15s ease, border-color .15s ease;
}
.qc-cg__h1-link:hover {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}
.qc-cg__h1-link--sub {
  font-weight: 400;
  color: var(--ink-2);
  border-bottom-style: dashed;
  border-bottom-color: var(--brand-1);
}
.qc-cg__h1-link--sub:hover { color: var(--brand-dark); border-bottom-color: var(--brand); }
.qc-cg__h1-sep { color: var(--ink-4); font-style: normal; padding: 0 2px; }
.qc-cg__num-value {
  font-family: var(--display); font-weight: 500;
  font-size: 38px; line-height: 0.95; letter-spacing: -0.03em;
  color: var(--ink); font-variation-settings: "opsz" 144;
}
.qc-cg__num-sep {
  color: var(--ink-4); font-size: 22px; font-weight: 400;
}
.qc-cg__num-chart {
  font-family: var(--mono);
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0;
  white-space: nowrap;
}

.qc-cg__status {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase;
  font-weight: 700; padding: 7px 12px; border-radius: 100px;
  background: var(--brand-3); color: var(--brand-deep);
}
.qc-cg__status-dot { width: 5px; height: 5px; background: var(--brand); border-radius: 50%; }
.qc-cg__status.is-new { background: var(--easy-tint); color: var(--easy-dark); }
.qc-cg__status.is-new .qc-cg__status-dot { background: var(--easy); }
.qc-cg__status.is-review { background: var(--hard-tint); color: var(--hard-dark); }
.qc-cg__status.is-review .qc-cg__status-dot { background: var(--hard); }

/* Alias IDs */
.qc-cg__alias {
  padding: 0 20px 12px;
  font-family: var(--mono);
  font-size: 12px; letter-spacing: 0.02em;
  color: var(--ink-2); font-weight: 500;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
}
.qc-cg__alias-k {
  font-family: var(--body);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}
.qc-cg__alias-v {
  color: var(--ink);
  padding: 2px 7px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.qc-cg__alias-sep { color: var(--ink-4); }

/* Progress bars */
.qc-cg__progress {
  padding: 12px 18px 14px;
  display: grid; gap: 8px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
}
.qc-cg__pg-row {
  display: grid;
  grid-template-columns: 130px 1fr 60px;
  align-items: center;
  gap: 12px;
}
.qc-cg__pg-label {
  font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-2); font-weight: 600;
}
.qc-cg__pg-track {
  height: 5px; background: var(--line);
  border-radius: 100px; position: relative; overflow: hidden;
}
.qc-cg__pg-track > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-radius: 100px;
}
.qc-cg__pg-count {
  font-family: var(--mono); font-size: 12px;
  color: var(--ink-2); text-align: right;
  letter-spacing: -0.02em;
}
.qc-cg__pg-count b { color: var(--ink); font-weight: 600; }

/* Difficulty + history */
.qc-cg__diff {
  padding: 12px 18px 14px;
  background: var(--brand-tint);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.qc-cg__diff-left { display: flex; align-items: center; gap: 12px; }
.qc-cg__diff-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; color: var(--accent);
  padding: 6px 11px; background: var(--accent-tint); border-radius: 4px;
}
.qc-cg__stars { display: inline-flex; gap: 4px; align-items: center; }
.qc-cg__star { width: 16px; height: 16px; color: var(--accent); }
.qc-cg__star--empty { color: var(--ink-4); }
.qc-cg__diff-history {
  font-size: 13px; color: var(--ink-2);
  font-family: var(--display); font-variation-settings: "opsz" 24;
}
.qc-cg__diff-history b {
  font-family: var(--mono); font-weight: 600; color: var(--accent-dark);
}
.qc-cg__diff-history em { font-style: italic; color: var(--ink-2); }

/* Problem statement */
.qc-cg__problem {
  padding: 22px 22px 16px;
  position: relative;
}
.qc-cg__problem::before {
  content: '';
  position: absolute; top: 22px; left: 8px;
  width: 3px; height: calc(100% - 38px);
  background: var(--accent);
  border-radius: 2px; opacity: .35;
}
.qc-cg__problem-label {
  font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
  margin-bottom: 10px;
}
.qc-cg__problem-text {
  font-family: var(--display); font-weight: 400;
  font-size: 18px; line-height: 1.55; letter-spacing: -0.005em;
  color: var(--ink); font-variation-settings: "opsz" 24;
  white-space: pre-wrap; margin: 0;
}

/* Note autore */
.qc-cg__note {
  margin: 0 20px 16px;
  padding: 12px 16px 12px 38px;
  background: var(--brand-4);
  border: 1px solid var(--brand-2);
  border-radius: 8px;
  font-size: 14px; line-height: 1.5;
  color: var(--ink-2);
  font-family: var(--display); font-variation-settings: "opsz" 24;
  position: relative;
}
.qc-cg__note::before {
  content: '';
  position: absolute; top: 12px; left: 14px;
  width: 14px; height: 14px;
  background: var(--brand);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5a6.5 6.5 0 1 0 0 13A6.5 6.5 0 0 0 8 1.5zm.93 9.412-1 .5a.5.5 0 0 1-.658-.643l1.5-3.5a.5.5 0 0 1 .658-.643l1 .5a.5.5 0 0 1-.21.95l-.354-.027-1.094 2.553.658-.329a.5.5 0 0 1 .5.842zM8 5.5A1 1 0 1 1 8 3.5a1 1 0 0 1 0 2z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5a6.5 6.5 0 1 0 0 13A6.5 6.5 0 0 0 8 1.5zm.93 9.412-1 .5a.5.5 0 0 1-.658-.643l1.5-3.5a.5.5 0 0 1 .658-.643l1 .5a.5.5 0 0 1-.21.95l-.354-.027-1.094 2.553.658-.329a.5.5 0 0 1 .5.842zM8 5.5A1 1 0 1 1 8 3.5a1 1 0 0 1 0 2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.qc-cg__note-lbl {
  display: inline-block;
  font-family: var(--body);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-right: 8px;
}

/* Self-feedback block */
.qc-cg__feedback {
  margin: 4px 18px 0;
  padding: 16px 16px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.qc-cg__feedback-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.qc-cg__feedback-q {
  font-family: var(--display); font-weight: 500; font-size: 16px;
  letter-spacing: -0.005em; color: var(--ink);
  font-variation-settings: "opsz" 24;
}
.qc-cg__feedback-hint {
  font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.qc-cg__feedback-status {
  font-size: 11px; color: var(--easy-dark); margin-left: 8px;
  font-family: var(--display); font-style: italic;
}
.qc-cg__rate {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.qc-cg__rate-opt {
  position: relative; cursor: pointer;
  padding: 10px 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.qc-cg__rate-opt input { position: absolute; opacity: 0; pointer-events: none; }
.qc-cg__rate-opt:hover { border-color: var(--brand-1); background: var(--brand-4); }
.qc-cg__rate-glyph {
  font-family: var(--display); font-style: italic;
  font-size: 26px; line-height: 1; font-weight: 500;
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
}
.qc-cg__rate-opt[data-tone="easy"]   .qc-cg__rate-glyph { color: var(--easy); }
.qc-cg__rate-opt[data-tone="medium"] .qc-cg__rate-glyph { color: var(--medium); }
.qc-cg__rate-opt[data-tone="hard"]   .qc-cg__rate-glyph { color: var(--hard); }
.qc-cg__rate-lbl {
  font-size: 13px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.005em;
}
.qc-cg__rate-sub {
  font-size: 11px; color: var(--ink-3); text-align: center;
  font-family: var(--display); font-style: italic;
  font-variation-settings: "opsz" 24;
}
.qc-cg__rate-opt:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-4);
  box-shadow: 0 0 0 3px var(--brand-3);
}
.qc-cg__rate-opt:has(input:checked) .qc-cg__rate-lbl { color: var(--ink); }

.qc-cg__flag {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
}
.qc-cg__flag input { position: absolute; opacity: 0; pointer-events: none; }
.qc-cg__flag:has(input:checked) {
  border-style: solid;
  border-color: var(--hard);
  background: var(--hard-tint);
}
.qc-cg__flag-box {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--ink-3);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
}
.qc-cg__flag:has(input:checked) .qc-cg__flag-box {
  border-color: var(--hard); background: var(--hard);
}
.qc-cg__flag:has(input:checked) .qc-cg__flag-box::after {
  content: ''; width: 10px; height: 6px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
.qc-cg__flag-lbl {
  font-size: 14px; font-weight: 500; color: var(--ink);
  font-family: var(--display); font-variation-settings: "opsz" 24;
}
.qc-cg__flag-lbl em {
  font-style: italic; color: var(--ink-2); font-weight: 400;
}

/* Micro-link "Segnala un problema" */
.qc-cg__report {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  text-align: right;
}
.qc-cg__report a, .qc-cg__report button {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  border: none;
  background: none;
  border-bottom: 1px dashed var(--line-strong);
  padding: 0 0 1px 0;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
  font-family: var(--display); font-variation-settings: "opsz" 24;
  font-style: italic;
}
.qc-cg__report a:hover, .qc-cg__report button:hover {
  color: var(--brand-dark); border-color: var(--brand);
}

/* Risposta del Ministero */
.qc-cg__results-block {
  margin: 14px 18px 0;
  border: 1px solid var(--brand-1);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(31, 26, 23, .04), 0 10px 24px -12px rgba(194, 89, 29, .15);
}
.qc-cg__results-head {
  padding: 14px 16px 8px;
  display: flex; align-items: center; gap: 12px;
}
.qc-cg__results-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brand-3);
  color: var(--brand-deep);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: 14px; font-variation-settings: "opsz" 144;
  flex-shrink: 0;
}
.qc-cg__results-txt { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.qc-cg__results-lbl {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand); font-weight: 700;
}
.qc-cg__results-title {
  font-family: var(--display); font-weight: 500; font-size: 16px;
  color: var(--ink); letter-spacing: -0.005em;
  font-variation-settings: "opsz" 24;
}
.qc-cg__results-body {
  padding: 4px 16px 16px 58px;
}
.qc-cg__results {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 8px;
  counter-reset: result-counter;
}
.qc-cg__results li {
  display: grid; grid-template-columns: 22px 1fr;
  align-items: baseline; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  counter-increment: result-counter;
}
.qc-cg__results li:last-child { border-bottom: none; }
.qc-cg__results li::before {
  content: counter(result-counter);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  color: var(--brand); text-align: right;
  padding-right: 6px;
  border-right: 1px solid var(--brand-2);
}
.qc-cg__results-val {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.01em;
}
.qc-cg__results.is-range {
  display: block;
  padding: 10px 14px;
  background: var(--brand-tint);
  border-radius: 8px;
}
.qc-cg__results.is-range li {
  display: block; padding: 0; border: none;
}
.qc-cg__results.is-range li::before { display: none; }
.qc-cg__results.is-range .qc-cg__results-val {
  font-size: 16px; font-family: var(--mono); font-weight: 600;
}

/* Video */
.qc-cg__video-block {
  margin: 14px 18px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}
.qc-cg__video-head {
  padding: 14px 16px 8px;
  display: flex; align-items: center; gap: 12px;
}
.qc-cg__video-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand);
  color: white;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qc-cg__video-icon svg { width: 12px; height: 12px; }
.qc-cg__video-txt { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.qc-cg__video-lbl {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand); font-weight: 700;
}
.qc-cg__video-title {
  font-family: var(--display); font-weight: 500; font-size: 16px;
  color: var(--ink); letter-spacing: -0.005em;
  font-variation-settings: "opsz" 24;
}
.qc-cg__video-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}
.qc-cg__video-body { padding: 4px 14px 14px; }
.qc-cg__video-frame {
  position: relative; width: 100%;
  padding-bottom: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.qc-cg__video-frame iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.qc-cg__video-soon, .qc-cg__video-locked {
  padding: 18px 20px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px dashed var(--line-strong);
  font-family: var(--display); font-style: italic; font-size: 13px;
  color: var(--ink-2);
  font-variation-settings: "opsz" 24;
  text-align: center;
}
.qc-cg__video-locked {
  padding: 24px 24px;
  font-style: normal;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border: 1px solid var(--brand);
}
.qc-cg__video-locked a {
  color: var(--brand-dark);
  font-weight: 700;
  font-style: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Actions */
.qc-cg__actions {
  padding: 18px 18px 18px;
  display: flex; gap: 10px; justify-content: flex-end;
  align-items: center; flex-wrap: wrap;
  margin-top: 14px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, transparent 0%, var(--bg) 100%);
}
.qc-cg__btn {
  border: none; padding: 13px 22px; border-radius: 10px;
  font-family: var(--body); font-size: 14px; font-weight: 600;
  letter-spacing: 0.005em; transition: all .15s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
}
.qc-cg__btn--primary {
  background: var(--brand); color: white;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .15) inset,
    0 1px 0 rgba(31, 26, 23, .08),
    0 6px 14px -6px rgba(194, 89, 29, .55);
}
.qc-cg__btn--primary:hover {
  background: var(--brand-dark); color: white;
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .15) inset,
    0 1px 0 rgba(31, 26, 23, .10),
    0 10px 20px -8px rgba(194, 89, 29, .55);
}
.qc-cg__btn--ghost {
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line-strong);
}
.qc-cg__btn--ghost:hover {
  background: var(--bg); color: var(--ink); border-color: var(--ink-3);
}

/* Bottone "Successivo" su due righe con kicker contestuale */
.qc-cg__btn--next {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 10px 22px 12px;
  line-height: 1.2;
  gap: 2px;
}
.qc-cg__btn-kicker {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
  font-family: var(--body);
}
.qc-cg__btn--ghost.qc-cg__btn--next .qc-cg__btn-kicker { color: var(--ink-3); }
.qc-cg__btn--ghost.qc-cg__btn--next .qc-cg__btn-main { color: var(--ink); }
.qc-cg__btn--ghost.qc-cg__btn--next:hover .qc-cg__btn-main { color: var(--brand-dark); }
.qc-cg__btn--ghost.qc-cg__btn--next:hover .qc-cg__btn-kicker { color: var(--brand); }
/* Quando il ghost-next è presente accanto al primary, va a sinistra; */
/* il primary resta all'estremità destra per il pattern UX standard.  */
.qc-cg__btn--ghost.qc-cg__btn--next { margin-right: auto; }

/* Nota inline nel kicker del primary quando next-in-tipologia == next-per-numero */
.qc-cg__btn-also {
  font-weight: 500;
  opacity: .7;
  margin-left: 2px;
}
.qc-cg__btn-main {
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 24;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.qc-cg__btn-arrow {
  display: inline-block;
  transition: transform .15s ease;
}
.qc-cg__btn--next:hover .qc-cg__btn-arrow {
  transform: translateX(3px);
}

/* ============================================================
   Completion panel — sostituisce il primary "Successivo in X"
   quando l'utente ha valutato tutti gli esercizi dello scope.
   ============================================================ */

/* Container override: ghost a sx, pannello a dx (cresce). Stack su mobile. */
.qc-cg__actions--completion {
  align-items: stretch;
  gap: 14px;
}
.qc-cg__actions--completion .qc-cg__btn--ghost.qc-cg__btn--next {
  margin-right: 0;
  align-self: center;
  flex-shrink: 0;
}
.qc-cg__actions--completion .qc-cg__completion {
  flex: 1;
  min-width: 0;
}
@media (max-width: 600px) {
  .qc-cg__actions--completion {
    flex-direction: column;
  }
  .qc-cg__actions--completion .qc-cg__completion { order: -1; }
  .qc-cg__actions--completion .qc-cg__btn--ghost.qc-cg__btn--next { width: 100%; }
}

.qc-cg__completion {
  background: var(--easy-tint);
  border: 1px solid #b8cdb8;
  border-left: 4px solid var(--easy);
  border-radius: 12px;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qc-cg__completion-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.qc-cg__completion-check {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--easy);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 2px rgba(79, 110, 84, .25);
}
.qc-cg__completion-check svg { width: 18px; height: 18px; }
.qc-cg__completion-head-txt {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.qc-cg__completion-kicker {
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--easy-dark);
  font-weight: 700;
}
.qc-cg__completion-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
  margin: 0;
}
.qc-cg__completion-stats {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-2);
  font-family: var(--display); font-style: italic;
  font-variation-settings: "opsz" 24;
}
.qc-cg__completion-stats b {
  font-family: var(--mono);
  font-weight: 600;
  font-style: normal;
  color: var(--easy-dark);
}

/* CTA principale (review) — pill verde piena */
.qc-cg__completion-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-family: var(--body);
  font-weight: 600;
  font-size: 14px;
  background: #fff;
  color: var(--easy-dark);
  border: 1px solid #b8cdb8;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.qc-cg__completion-cta:hover {
  background: var(--easy);
  color: #fff;
  border-color: var(--easy-dark);
  transform: translateY(-1px);
}
.qc-cg__completion-cta--review {
  background: var(--easy);
  color: #fff;
  border-color: var(--easy-dark);
}
.qc-cg__completion-cta--review:hover {
  background: var(--easy-dark);
}
.qc-cg__completion-cta-glyph {
  font-size: 16px;
  line-height: 1;
}
.qc-cg__completion-cta-arrow {
  margin-left: auto;
  transition: transform .15s ease;
}
.qc-cg__completion-cta:hover .qc-cg__completion-cta-arrow {
  transform: translateX(3px);
}

/* Lista alternative (altri sotto-argomenti / argomenti) */
.qc-cg__completion-alt {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qc-cg__completion-alt-label {
  font-family: var(--body);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.qc-cg__completion-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.qc-cg__completion-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.qc-cg__completion-item:hover {
  background: var(--brand-tint);
  border-color: var(--brand-1);
  color: var(--brand-dark);
}
.qc-cg__completion-item-name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 24;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.qc-cg__completion-item-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}
.qc-cg__completion-item:hover .qc-cg__completion-item-meta {
  color: var(--brand-dark);
}
.qc-cg__completion-item-arrow {
  transition: transform .15s ease;
}
.qc-cg__completion-item:hover .qc-cg__completion-item-arrow {
  transform: translateX(2px);
}

/* Variante "carteggio" — accent piu' marcato per la celebrazione */
.qc-cg__completion--carteggio .qc-cg__completion-check {
  background: var(--brand);
  box-shadow: 0 1px 2px rgba(194, 89, 29, .3);
}
.qc-cg__completion--carteggio .qc-cg__completion-kicker {
  color: var(--brand);
}

/* ============================================================
   Hint modal "Hai svolto questo esercizio?" — appare una volta
   per utente quando ha guardato il video e clicca prossimo
   senza aver dato la valutazione.
   ============================================================ */
.qc-cg-hint {
  --brand:        #c2591d;
  --brand-dark:   #9a4517;
  --bg:           #faf6ef;
  --line:         #ece5da;
  --line-strong:  #d8cdbe;
  --ink:          #1f1a17;
  --ink-2:        #6e655e;
  --ink-3:        #a39a92;
  --display:      'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body:         'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: var(--body);
}
.qc-cg-hint[hidden] { display: none !important; }
.qc-cg-hint__bg {
  position: absolute;
  inset: 0;
  background: rgba(31, 26, 23, .55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
}
.qc-cg-hint__dialog {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow:
    0 1px 2px rgba(31, 26, 23, .04),
    0 24px 60px -12px rgba(31, 26, 23, .35);
  animation: qc-cg-hint-pop .25s cubic-bezier(.2, .9, .3, 1);
}
@keyframes qc-cg-hint-pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.qc-cg-hint__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
  margin: 0 0 12px;
}
.qc-cg-hint__text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 20px;
}
.qc-cg-hint__text b {
  color: var(--ink);
  font-weight: 600;
}
.qc-cg-hint__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.qc-cg-hint__btn {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: 10px;
  padding: 11px 18px;
  cursor: pointer;
  transition: all .15s ease;
  border: 1px solid transparent;
}
.qc-cg-hint__btn--ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-strong);
}
.qc-cg-hint__btn--ghost:hover {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--ink-3);
}
.qc-cg-hint__btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .15) inset,
    0 1px 0 rgba(31, 26, 23, .08),
    0 6px 14px -6px rgba(194, 89, 29, .55);
}
.qc-cg-hint__btn--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
}
/* Opt-out esplicito: link discreto sotto le 2 azioni principali.
   Solo questo click silenzia il modal per sempre (localStorage flag). */
.qc-cg-hint__optout {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 4px;
  background: none;
  border: none;
  font-family: var(--display);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  cursor: pointer;
  border-bottom: 1px dashed transparent;
  transition: color .15s ease, border-color .15s ease;
}
.qc-cg-hint__optout:hover {
  color: var(--ink);
  border-bottom-color: var(--ink-3);
}
@media (max-width: 480px) {
  .qc-cg-hint__dialog { padding: 22px 20px 18px; }
  .qc-cg-hint__title { font-size: 20px; }
  .qc-cg-hint__actions { flex-direction: column-reverse; }
  .qc-cg-hint__btn { width: 100%; }
}
