/* Curs ESP32 · Mateixa paleta que els vídeos: placa, tapet de taller i editor.
   L'únic color d'accent és la llum del LED (#FF4A2E): classes fetes, perills i celebració. */

/* Fonts servides des del mateix servidor (variables, només llatí, que inclou el català). Llicència OFL a fonts/ */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/open-sans.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/oswald.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Code Pro";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/source-code-pro.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f4f5f1;
  --surface: #ffffff;
  --surface-2: #eceee9;
  --ink: #1e2b30;
  --muted: #56666b;
  --line: #d9e0dc;
  --grid: #e3e8e4;
  --pcb: #13563b;
  --pcb-2: #1e7a52;
  --silk: #f3f1e7;
  --copper: #b8702a;
  --copper-ink: #8a4f14;
  --teal: #00767a;
  --teal-soft: #dcefed;
  --led: #ff4a2e;
  --led-ink: #c42d14;
  --led-soft: #ffe6e0;
  --warn: #8a5a00;
  --warn-soft: #fff3d6;
  --code-bg: #12191d;
  --code-ink: #dfe7e3;
  --shadow: 0 1px 2px rgba(30, 43, 48, 0.06), 0 8px 24px rgba(30, 43, 48, 0.06);

  --f-display: "Oswald", "Arial Narrow", sans-serif;
  --f-text: "Open Sans", system-ui, sans-serif;
  --f-code: "Source Code Pro", ui-monospace, Menlo, monospace;

  --amplada-text: 44rem;
  --temari: 17rem;
  --index: 13rem;
  --barra-sup: 3.5rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141c22;
    --surface: #1b262d;
    --surface-2: #22303a;
    --ink: #e6ebe8;
    --muted: #9aaab0;
    --line: #2f3e48;
    --grid: #1a242a;
    --teal: #4cc2bf;
    --teal-soft: #173638;
    --led-ink: #ff7a63;
    --copper-ink: #e3a061;
    --led-soft: #3a1d18;
    --warn: #f2c25b;
    --warn-soft: #33290f;
    --code-bg: #0d1316;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141c22;
  --surface: #1b262d;
  --surface-2: #22303a;
  --ink: #e6ebe8;
  --muted: #9aaab0;
  --line: #2f3e48;
  --grid: #1a242a;
  --teal: #4cc2bf;
  --teal-soft: #173638;
  --led-ink: #ff7a63;
  --copper-ink: #e3a061;
  --led-soft: #3a1d18;
  --warn: #f2c25b;
  --warn-soft: #33290f;
  --code-bg: #0d1316;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--barra-sup) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-text);
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: 0.01em; line-height: 1.15; }
h2 { font-size: 1.75rem; margin: 0 0 1rem; display: flex; align-items: center; gap: 0.6rem; }
h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--teal); text-underline-offset: 0.15em; }
code, kbd, samp, pre { font-family: var(--f-code); font-size: 0.9em; }
:not(pre) > code { background: var(--surface-2); padding: 0.08em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 0.35em; background: var(--surface); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.petit { font-size: 0.875rem; color: var(--muted); }
.nota { display: block; font-size: 0.875rem; color: var(--muted); }

.salta { position: absolute; left: -999px; }
.salta:focus { left: 1rem; top: 0.5rem; z-index: 100; background: var(--surface); padding: 0.5rem 1rem; }

/* ── Botons ───────────────────────────────────────────────────────────── */

.btn-primari, .btn-secundari, .btn-text, .copia {
  display: inline-flex; align-items: center; gap: 0.4rem;
  border-radius: 8px; text-decoration: none; font-weight: 600;
}
.btn-primari {
  background: var(--pcb); color: var(--silk); border: 0;
  padding: 0.65rem 1.1rem; min-height: 2.75rem;
}
.btn-primari:hover:not(:disabled) { background: var(--pcb-2); }
.btn-primari:disabled { background: var(--surface-2); color: var(--muted); }
.btn-primari.gran { font-size: 1.1rem; padding: 0.9rem 1.5rem; min-height: 3.25rem; }
.btn-secundari {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  padding: 0.5rem 0.9rem; min-height: 2.5rem; font-size: 0.95rem;
}
.btn-secundari:hover { border-color: var(--teal); }
.btn-text { background: none; border: 0; padding: 0.25rem 0; color: var(--teal); font-size: 0.9rem; }
.btn-text:hover { text-decoration: underline; }
.copia {
  background: transparent; border: 1px solid currentColor; color: inherit; opacity: 0.85;
  font-size: 0.8rem; padding: 0.2rem 0.6rem; font-family: var(--f-text);
}
.copia:hover { opacity: 1; }
.icona {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  background: none; border: 0; border-radius: 8px;
}
.icona:hover { background: var(--surface-2); }
.icona svg, .btn-taller svg { width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── LED (marca de classe feta) ───────────────────────────────────────── */

.led {
  display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; flex: none;
  background: var(--surface-2); border: 1px solid var(--line);
}
.led.encès, .feta > a > .led, li.feta > span > .led {
  background: var(--led); border-color: var(--led);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--led) 25%, transparent), 0 0 10px var(--led);
}

/* ── Barra superior ───────────────────────────────────────────────────── */

.barra-sup {
  position: sticky; top: 0; z-index: 30; height: var(--barra-sup);
  display: flex; align-items: center; gap: 0.5rem; padding: 0 0.75rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.marca {
  display: flex; align-items: center; gap: 0.55rem;
  font: 600 1.1rem var(--f-display); letter-spacing: 0.03em; color: var(--ink); text-decoration: none;
}
.barra-sup-dreta { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.btn-taller {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.35rem 0.85rem; font-size: 0.9rem; font-weight: 600;
}
.btn-taller:hover { border-color: var(--teal); }

/* ── Disposició: temari | classe | índex ──────────────────────────────── */

.pagina {
  display: grid;
  grid-template-columns: var(--temari) minmax(0, 1fr) var(--index);
  gap: 0 2.5rem;
  max-width: 88rem; margin: 0 auto;
}
main { min-width: 0; max-width: var(--amplada-text); width: 100%; justify-self: center; padding: 2rem 0 6rem; }

/* Temari */
.temari {
  position: sticky; top: var(--barra-sup); align-self: start;
  height: calc(100dvh - var(--barra-sup)); overflow-y: auto;
  padding: 1.25rem 0.75rem 2rem 1rem;
  border-right: 1px solid var(--line);
  font-size: 0.9rem;
}
.t-cap { margin-bottom: 1rem; }
.t-curs { display: block; font: 600 1.05rem var(--f-display); color: var(--ink); text-decoration: none; margin-bottom: 0.6rem; }
.t-total { display: grid; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.t-total strong { color: var(--ink); }
.t-fase { border-top: 1px solid var(--line); }
.t-fase summary {
  list-style: none; cursor: pointer; padding: 0.7rem 0.25rem 0.6rem;
  display: grid; gap: 0.4rem;
}
.t-fase summary::-webkit-details-marker { display: none; }
.t-fase-nom { font: 600 0.8rem var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.t-fase-num {
  display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; margin-right: 0.2rem;
  border-radius: 4px; background: var(--surface-2); color: var(--ink); font-size: 0.75rem;
}
.t-fase ol { list-style: none; margin: 0 0 0.6rem; padding: 0; }
.t-fase li > a, .t-fase li > span {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: baseline; gap: 0.5rem;
  padding: 0.4rem 0.4rem; border-radius: 6px; color: var(--ink); text-decoration: none;
}
.t-fase li > a .led, .t-fase li > span .led { align-self: center; }
.t-fase li > a:hover { background: var(--surface-2); }
.t-fase li.actual > a, .t-fase a[aria-current] { background: var(--teal-soft); font-weight: 600; }
.t-num { font-family: var(--f-code); font-size: 0.8rem; color: var(--muted); }
.t-titol { line-height: 1.3; }
.t-min { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.no-publicada > span { color: var(--muted); }
.no-publicada .t-titol { opacity: 0.75; }
.t-peu { border-top: 1px solid var(--line); padding-top: 0.75rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.t-peu label { cursor: pointer; }

/* Barres de progrés */
.barra {
  --p: 0;
  display: block; height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; position: relative;
}
.barra::after {
  content: ""; position: absolute; inset: 0; width: calc(var(--p) * 100%);
  background: var(--led); border-radius: inherit; transition: width 0.4s ease;
}
.barra.gran { height: 6px; }

/* Índex de la classe */
.index {
  position: sticky; top: var(--barra-sup); align-self: start;
  padding: 2.25rem 1rem 2rem 0; font-size: 0.875rem;
}
.index-titol { font: 600 0.75rem var(--f-display); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.6rem; }
.index ol, .full-seccions ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.index a, .full-seccions a {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0 0.3rem 0.8rem; margin-left: -2px;
  border-left: 2px solid transparent; color: var(--muted); text-decoration: none;
}
.index a:hover, .full-seccions a:hover { color: var(--ink); }
.index li.actual a, .full-seccions li.actual a { color: var(--ink); font-weight: 600; border-left-color: var(--teal); }
.index-marca {
  width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 1.5px solid var(--line); flex: none;
  display: grid; place-items: center; font-size: 0.6rem; color: var(--surface);
}
li.feta .index-marca { background: var(--teal); border-color: var(--teal); }
li.feta .index-marca::after { content: "✓"; font-weight: 700; }

/* ── Capçalera de la classe ───────────────────────────────────────────── */

.cap-classe { margin-bottom: 2.5rem; }
.fase { font: 600 0.85rem var(--f-display); text-transform: uppercase; letter-spacing: 0.1em; color: var(--teal); margin: 0 0 0.4rem; }
.fase .sep { color: var(--muted); }
h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin: 0 0 0.6rem; }
.promesa { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.xips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0 0 1rem; }
.xips li {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.25rem 0.8rem; font-size: 0.875rem;
}
.punt-placa { width: 0.7rem; height: 0.7rem; border-radius: 2px; background: var(--pcb); }
.xip-estat { color: var(--muted); }
.xip-estat.feta { color: var(--led-ink); border-color: var(--led) !important; font-weight: 600; }
.cap-accions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.agenda summary { list-style: none; }
.agenda summary::-webkit-details-marker { display: none; }
.agenda-cos {
  margin-top: 0.5rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  display: grid; gap: 0.75rem; max-width: 24rem;
}
.agenda-cos label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.agenda-cos input { font: inherit; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); }
.agenda-cos .petit { margin: 0; }
.progres-classe .barra { height: 3px; }

/* ── Blocs ────────────────────────────────────────────────────────────── */

.bloc { padding: 2.5rem 0; border-top: 1px solid var(--line); position: relative; }
.bloc-icona {
  display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line); font-size: 1.05rem; font-family: var(--f-text);
}
.sentinella { position: absolute; bottom: 0; height: 1px; width: 1px; }

/* Vídeo */
.video { margin: 0 0 1rem; }
.video video {
  display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px;
  background: #0d1316; box-shadow: var(--shadow);
}
.video figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.transcripcio { margin-bottom: 1.5rem; }
.transcripcio summary, .com-funciona summary, .errors summary, .pistes summary { cursor: pointer; font-weight: 600; }
.transcripcio[open] { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 1rem; }
.transcripcio p { font-size: 0.95rem; color: var(--muted); }
.transcripcio p:first-of-type { margin-top: 0.75rem; }

/* Pregunta de predicció */
.prediccio {
  border-left: 4px solid var(--teal); background: var(--teal-soft); border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
}
.prediccio p { margin-bottom: 0.5rem; }
.prediccio details p { margin: 0.5rem 0 0; }
.prediccio summary { cursor: pointer; color: var(--teal); font-weight: 600; }

/* Llistes amb caselles */
.llista-check, .passos { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.5rem; }
.passos { counter-reset: pas; }
.passos[start="5"] { counter-reset: pas 4; }
.llista-check label, .passos label, .porta label {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 0.75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.75rem 1rem; cursor: pointer;
}
.passos > li { counter-increment: pas; }
.passos label { grid-template-columns: auto auto 1fr; }
.passos label::before {
  content: counter(pas); order: -1;
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--surface-2); font: 600 0.85rem var(--f-display);
}
.passos label:has(input:checked)::before { background: var(--teal); color: var(--surface); }
input[type="checkbox"] {
  appearance: none; width: 1.35rem; height: 1.35rem; margin: 0.12rem 0 0; flex: none;
  border: 2px solid var(--muted); border-radius: 5px; background: var(--surface); cursor: pointer;
  display: grid; place-items: center;
}
input[type="checkbox"]::after { content: "✓"; font-weight: 700; font-size: 0.9rem; color: var(--surface); transform: scale(0); transition: transform 0.12s; }
input[type="checkbox"]:checked { background: var(--teal); border-color: var(--teal); }
input[type="checkbox"]:checked::after { transform: scale(1); }
label:has(input:checked) { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }
label:has(input:checked) > span:not(.insignia) { color: var(--muted); }
.llista-check.gran label { padding: 1rem 1.15rem; font-size: 1.05rem; }
.ordre {
  display: flex; align-items: center; gap: 0.75rem; margin: 0.5rem 0 0 3.6rem;
  background: var(--code-bg); color: var(--code-ink); border-radius: 8px; padding: 0.6rem 0.8rem;
}
.ordre code { background: none !important; color: inherit; padding: 0; flex: 1; overflow-wrap: anywhere; font-size: 0.85rem; }

/* Insígnies */
.insignia {
  align-self: center; white-space: nowrap;
  font: 600 0.72rem var(--f-text); text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted);
}
.insignia.nou { background: var(--teal-soft); color: var(--teal); }
.insignia.ja { background: var(--surface-2); color: var(--muted); text-transform: none; letter-spacing: 0; }

/* Porta: comprovació que cal marcar abans de continuar */
.porta { margin: 1.25rem 0; }
.porta label { border: 2px dashed var(--teal); background: var(--teal-soft); }
.porta.oberta label { border-style: solid; }
.porta .petit { margin: 0.4rem 0 0 0.25rem; }
.tancat { opacity: 0.4; filter: grayscale(1); transition: opacity 0.2s; }

/* Preguntes de repàs */
.preguntes { padding: 0; margin: 0; list-style: none; counter-reset: q; display: grid; gap: 0.75rem; }
.pregunta {
  counter-increment: q; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.25rem 1rem 3.25rem; position: relative;
}
.pregunta::before {
  content: counter(q); position: absolute; left: 1rem; top: 1rem;
  display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 6px;
  background: var(--surface-2); font: 600 0.9rem var(--f-display);
}
.pregunta > p { font-weight: 600; margin-bottom: 0.75rem; }
.resposta { border-top: 1px dashed var(--line); padding-top: 0.75rem; }
.autoaval { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.autoaval button {
  border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 0.3rem 0.9rem; font-size: 0.9rem;
}
.autoaval [data-aval="sabia"][aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--surface); }
.autoaval [data-aval="no"][aria-pressed="true"] { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.pregunta[data-aval="no"]::after {
  content: "Et tornarà a sortir al repàs d'una classe propera."; display: block; margin-top: 0.5rem;
  font-size: 0.85rem; color: var(--muted);
}

/* Diagrama de flux de la teoria */
.flux { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.flux li {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.75rem; font-size: 0.9rem; line-height: 1.4;
}
.flux li:not(:last-child)::after {
  content: "→"; position: absolute; right: -0.5rem; top: 50%; transform: translate(50%, -50%);
  color: var(--muted); z-index: 1; background: var(--bg); line-height: 1;
}
.flux-n {
  display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; margin-bottom: 0.4rem;
  background: var(--pcb); color: var(--silk); font: 600 0.8rem var(--f-display);
}

/* Callouts: només tres tipus */
.callout { border-radius: 10px; padding: 1rem 1.25rem; margin: 1.25rem 0; border: 1px solid; }
.callout p:last-child { margin: 0; }
.callout-titol { font: 600 0.85rem var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.35rem !important; }
.callout.perill { background: var(--led-soft); border-color: var(--led); }
.callout.perill .callout-titol { color: var(--led-ink); }
.callout.perill .callout-titol::before { content: "⚡ "; }
.callout.atencio { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.callout.atencio .callout-titol { color: var(--warn); }
.callout.atencio .callout-titol::before { content: "⚠ "; }
.callout.truc { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 40%, transparent); }

/* C++ d'avui: la mateixa caixa a totes les classes */
.cpp-caixa {
  background: var(--pcb); color: var(--silk); border-radius: 14px; padding: 1.25rem 1.5rem;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}
.cpp-caixa dl { margin: 0; display: grid; gap: 1rem; }
.cpp-caixa dt { font: 600 1.05rem var(--f-display); letter-spacing: 0.02em; color: #ffd9a8; }
.cpp-caixa dd { margin: 0.2rem 0 0; }
.cpp-caixa :not(pre) > code { background: rgba(0, 0, 0, 0.25); color: #fff; }
.cpp-caixa pre.mini { margin: 0.5rem 0 0; background: rgba(0, 0, 0, 0.3); }
.cpp-caixa .c-com { color: #a9c2ba; } /* el gris dels comentaris no arriba al contrast AA sobre el verd */

/* Taula de pins */
.taula-pins-embolcall { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.taula-pins { width: 100%; border-collapse: collapse; font-size: 0.925rem; }
.taula-pins th, .taula-pins td { text-align: left; padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.taula-pins thead th { font: 600 0.75rem var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); background: var(--surface-2); }
.taula-pins tbody tr:last-child > * { border-bottom: 0; }
.taula-pins tbody th { font-weight: 600; }

/* Codi */
pre {
  margin: 0; padding: 1rem 1.1rem; overflow-x: auto; border-radius: 10px;
  background: var(--code-bg); color: var(--code-ink); font-size: 0.875rem; line-height: 1.6; tab-size: 2;
}
.codi-i-sortida { display: grid; gap: 1rem; margin: 1.25rem 0; }
.codi, .sortida, .resum { margin: 0; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.codi figcaption, .sortida figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: #1c262b; color: #aab8b4; font: 600 0.8rem var(--f-code); padding: 0.5rem 0.75rem 0.5rem 1rem;
}
.codi-accions { display: flex; gap: 0.4rem; }
.codi pre, .sortida pre { border-radius: 0; }
code.numerat { counter-reset: l; display: block; }
code.numerat .linia { display: block; counter-increment: l; padding-left: 2.6em; position: relative; white-space: pre; }
code.numerat .linia::before {
  content: counter(l); position: absolute; left: 0; width: 1.8em; text-align: right; color: #56666b; user-select: none;
}
.c-com { color: #7f9690; font-style: italic; }
.c-str { color: #f0b37e; }
.c-num { color: #ff8a73; }
.c-key { color: #6fd3cf; }
.c-fn { color: #9ad48a; }
.sortida { background: var(--code-bg); }
.sortida .baud { font-weight: 400; }
.sortida samp { color: #7ee2a0; font-size: 0.875rem; }
.sortida-nota { color: #9aaab0; font-size: 0.8rem; padding: 0 1rem 0.9rem; margin: 0; }
@media (min-width: 1500px) {
  .codi-i-sortida { grid-template-columns: 1.6fr 1fr; align-items: start; }
}
.com-funciona { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 1rem; }
.com-funciona dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1rem; margin: 0.75rem 0 0; font-size: 0.95rem; }
.com-funciona dt { font-family: var(--f-code); font-size: 0.85rem; color: var(--muted); padding-top: 0.15rem; }
.com-funciona dd { margin: 0; }

/* Errors */
.errors { margin-top: 2rem; }
.errors h3 { margin-top: 0; }
.errors details { border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
.errors summary { font-weight: 600; line-height: 1.4; }
.errors summary code { font-size: 0.85em; }
.errors details p { margin: 0.6rem 0 0; font-size: 0.95rem; }

/* Repte */
.repte-targeta {
  border: 2px solid var(--ink); border-radius: 14px; padding: 1.25rem 1.5rem; margin-bottom: 1rem;
  background: var(--surface);
  background-image: radial-gradient(var(--grid) 1px, transparent 1px); background-size: 16px 16px;
}
.repte-enunciat { font-size: 1.2rem; }
.repte-rellotge { margin: 0; font-weight: 600; color: var(--teal); }
.pistes { display: grid; gap: 0.5rem; }
.pistes details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 1rem; }
.pistes details p:last-child { margin-bottom: 0; }
.pistes details[open] summary { margin-bottom: 0.5rem; }
.solucio.bloquejada summary { color: var(--muted); cursor: not-allowed; }
.solucio.bloquejada summary::before { content: "🔒 "; }
.solucio pre { margin-top: 0.75rem; }

/* Tancament */
.resum { background: var(--surface); border: 1px solid var(--line); margin-bottom: 1.5rem; box-shadow: none; }
.resum figcaption {
  display: flex; justify-content: space-between; align-items: center;
  font: 600 0.85rem var(--f-display); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); color: var(--muted);
}
.resum ol { margin: 0; padding: 1rem 1rem 1rem 2.5rem; display: grid; gap: 0.4rem; }
.notes { display: grid; gap: 0.5rem; margin-bottom: 2rem; }
.notes label { font-weight: 600; }
.notes textarea {
  font: inherit; font-size: 0.95rem; width: 100%; padding: 0.75rem 1rem; resize: vertical;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink);
}
.notes .btn-text { justify-self: start; }
.acabar { display: grid; justify-items: start; gap: 0.5rem; }

/* Avís de continuar */
.continua {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: 0.75rem; max-width: calc(100vw - 2rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 0.5rem; font-size: 0.95rem; width: max-content;
}
.continua .btn-primari { font-weight: 400; }
.continua strong { margin-left: 0.25rem; }

.sortida :not(pre) > code { background: rgba(255, 255, 255, 0.08); color: inherit; }
.cap-classe + .bloc { border-top: 0; }
.agenda summary { gap: 0.5rem; }

/* Celebració */
.celebracio {
  border: 0; border-radius: 16px; padding: 2rem 2.25rem; text-align: center; max-width: 24rem;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.celebracio::backdrop { background: rgba(10, 16, 20, 0.6); }
.celebracio h2 { justify-content: center; font-size: 2rem; margin-top: 1rem; }
.celebracio-led {
  width: 3rem; height: 3rem; margin: 0 auto; border-radius: 10px; background: var(--led);
  animation: encen 1.2s ease-out both;
}
@keyframes encen {
  0% { background: #3a4750; box-shadow: none; }
  40% { background: var(--led); box-shadow: 0 0 0 10px color-mix(in srgb, var(--led) 25%, transparent), 0 0 60px 10px var(--led); }
  100% { background: var(--led); box-shadow: 0 0 0 6px color-mix(in srgb, var(--led) 20%, transparent), 0 0 30px var(--led); }
}

/* ── Barres de navegació del mòbil i del mode taller ───────────────────── */

.barra-inf, .taller-barra, .full-seccions, .vel { display: none; }

@media (max-width: 1180px) {
  .pagina { grid-template-columns: minmax(0, 1fr) var(--index); gap: 0 2rem; padding: 0 1.5rem; }
  .temari {
    position: fixed; z-index: 50; left: 0; top: 0; height: 100dvh; width: min(20rem, 86vw);
    background: var(--bg); transform: translateX(-100%); transition: transform 0.25s ease;
    box-shadow: var(--shadow); border-right: 1px solid var(--line);
  }
  .temari.obert { transform: none; }
  .vel { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(10, 16, 20, 0.45); }
  .vel[hidden] { display: none; }
}
@media (min-width: 1181px) {
  [data-obre="temari"] { display: none; }
}

@media (max-width: 860px) {
  body { font-size: 1rem; }
  .pagina { grid-template-columns: minmax(0, 1fr); padding: 0 1rem; }
  main { padding-bottom: 7rem; }
  .index { display: none; }
  .btn-taller { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
  .barra-inf {
    display: grid; grid-template-columns: 3.25rem 1fr 3.25rem; gap: 0.5rem;
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .barra-inf button {
    min-height: 2.9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.1rem;
  }
  .barra-inf-seccio { font-size: 0.95rem !important; font-weight: 600; }
  .barra-inf-seccio::after { content: " ▴"; color: var(--muted); }
  .full-seccions:not([hidden]) {
    display: block; position: fixed; z-index: 35; left: 0.75rem; right: 0.75rem; bottom: 4.5rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 1rem;
  }
  .full-seccions a { padding-top: 0.55rem; padding-bottom: 0.55rem; }
  .continua { bottom: 5rem; }
  .flux { grid-template-columns: 1fr 1fr; }
  .flux li:nth-child(2)::after { display: none; }
  .ordre { margin-left: 0; }
  .llista-check label, .passos label { padding: 0.7rem 0.8rem; gap: 0.6rem; }
  .com-funciona dl { grid-template-columns: 1fr; gap: 0.1rem; }
  .com-funciona dd { margin-bottom: 0.5rem; }
}

/* Mode taller: una secció per pantalla, lletra gran, botons grans */
body.taller { font-size: 1.2rem; }
body.taller .temari, body.taller .index, body.taller .cap-classe, body.taller .barra-inf, body.taller .continua { display: none !important; }
body.taller .pagina { grid-template-columns: minmax(0, 1fr); }
body.taller main { max-width: 52rem; padding-bottom: 8rem; }
body.taller .bloc { display: none; border-top: 0; }
body.taller .bloc.visible { display: block; }
body.taller .btn-taller { background: var(--ink); color: var(--bg); border-color: var(--ink); }
body.taller input[type="checkbox"] { width: 1.7rem; height: 1.7rem; }
body.taller pre { font-size: 1rem; }
body.taller .taller-barra {
  display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 0.75rem;
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: var(--ink); color: var(--bg);
}
.taller-barra button {
  min-height: 3.5rem; border-radius: 12px; border: 0; background: var(--bg); color: var(--ink); font-weight: 700; font-size: 1.1rem;
}
.taller-barra .taller-surt { background: transparent; color: var(--bg); border: 1px solid; min-width: 4rem; }
[data-taller-pas] { font: 600 1rem var(--f-display); letter-spacing: 0.04em; text-align: center; }
@media (max-width: 600px) {
  body.taller .taller-barra { grid-template-columns: 1fr 1fr auto; }
  [data-taller-pas] { grid-column: 1 / -1; grid-row: 1; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Impressió: fitxa de taller ───────────────────────────────────────── */

@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --ink: #000; --muted: #444; --line: #bbb; --teal-soft: #f2f7f6; --warn-soft: #fbf6ea; --led-soft: #fbefec; }
  @page { margin: 1.6cm 1.4cm; }
  body { font-size: 10.5pt; background: #fff; }
  .barra-sup, .temari, .index, .barra-inf, .taller-barra, .continua, .cap-accions, .progres-classe, .full-seccions,
  #video, .notes, .acabar, .copia, .salta, .vel, .autoaval, [data-mostra], .repte-targeta button, .repte-rellotge,
  .idea-clau textarea, .idea-clau summary, .wokwi, .solucio, .sentinella, .com-funciona > summary { display: none !important; }
  .pagina { display: block; }
  main { max-width: none; padding: 0; }
  body.taller .bloc, .bloc { display: block !important; padding: 0.8rem 0; border-top: 1px solid #ccc; }
  h2, h3 { break-after: avoid-page; }
  pre, figure, table, .callout, .pregunta, .porta, .resum, .idea-clau { break-inside: avoid; }
  pre, .cpp-caixa { background: #f6f6f6 !important; color: #000 !important; border: 1px solid #ccc; }
  .c-com, .c-str, .c-num, .c-key, .c-fn, .sortida samp, .cpp-caixa dt { color: #000 !important; }
  .c-com { font-style: italic; }
  .codi figcaption, .sortida figcaption { background: #eee; color: #000; }
  .sortida { background: #f6f6f6; }
  .resposta[hidden] { display: block !important; }
  .resposta { border-top: 1px dashed #bbb; margin-top: 0.4rem; padding-top: 0.4rem; }
  .tancat { opacity: 1; filter: none; }
  input[type="checkbox"] { appearance: none; width: 0.9em; height: 0.9em; border: 1.5px solid #000; border-radius: 2px; }
  .cap-classe::after { content: "Versió per imprimir · les respostes de les preguntes són a sota de cada una. La solució del repte, només a la web."; display: block; font-size: 8.5pt; color: #444; margin-top: 0.5rem; }
  a { color: inherit; }
  .peu-classe { border: 0; padding: 1rem 0 0; }
}

/* ══ Portada ════════════════════════════════════════════════════════════ */

.visualment-amagat {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.inici-main { max-width: 74rem; margin: 0 auto; padding: 0 1.5rem 4rem; }
.seccio-inici { padding: 3.5rem 0 1rem; }
.seccio-inici h2 { font-size: 2rem; }
.seccio-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 2rem; margin-bottom: 1.5rem; }
.seccio-cap h2 { margin: 0; }
.seccio-cap .petit { max-width: 40rem; margin: 0; flex-basis: 100%; }
.punt-placa.s3 { background: #2b3136; outline: 1px solid var(--muted); outline-offset: -1px; }
.punt-placa.cap { background: transparent; outline: 1px dashed var(--muted); outline-offset: -1px; }
.insignia.estat-feta { background: var(--led-soft); color: var(--led-ink); }

/* Presentació */
.heroi {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 3rem;
  padding: 3.5rem 0 1rem;
}
.heroi h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.heroi-accions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 1.5rem 0 0.5rem; }
.heroi-accions .btn-text { font-size: 1rem; }
.heroi-img { margin: 0; }
.heroi-img img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: var(--shadow); }

/* Mapa de progrés */
.progres-total { margin: 0; color: var(--muted); }
.progres-total strong { color: var(--ink); font-size: 1.15rem; }
.mapa { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
.mapa-fase {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem;
  display: grid; align-content: start; gap: 0.6rem;
}
.mapa-nom { margin: 0; font: 600 0.85rem var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; }
.mapa-leds { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.led-classe {
  display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--line);
  font: 600 0.75rem var(--f-code); color: var(--muted);
}
.led-classe.feta {
  background: var(--led); border-color: var(--led); color: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--led) 22%, transparent), 0 0 12px color-mix(in srgb, var(--led) 70%, transparent);
}
.led-classe.seguent { border: 2px dashed var(--teal); color: var(--teal); animation: espera 2s ease-in-out infinite; }
@keyframes espera { 50% { background: var(--teal-soft); } }
.mapa-hores { margin: 0; font-size: 0.8rem; color: var(--muted); }
.mapa-fita { margin: 0; font-size: 0.85rem; line-height: 1.4; }
.mapa-fase.completa { border-color: color-mix(in srgb, var(--led) 50%, var(--line)); }
.mapa-fase.completa .mapa-fita::before { content: "✓ "; color: var(--led-ink); font-weight: 700; }

/* Temari */
.temari-inici { display: grid; gap: 2rem; }
.ti-cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.ti-cap h3 { margin: 0; font-size: 1.35rem; display: flex; align-items: center; gap: 0.5rem; }
.ti-cap .t-fase-num { width: 1.6rem; height: 1.6rem; font-size: 0.9rem; }
.ti-fita { margin: 0; color: var(--muted); font-size: 0.95rem; }
.ti-hores { white-space: nowrap; }
.ti-classes { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.tc > a, .tc > div {
  display: grid; grid-template-columns: auto 2.6rem minmax(0, 1fr) auto; align-items: center; gap: 1rem;
  padding: 0.9rem 1.1rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.tc > a:hover { border-color: var(--teal); }
.tc.seguent > a, .tc.seguent > div { border: 2px solid var(--teal); }
.tc.feta .led { background: var(--led); border-color: var(--led); box-shadow: 0 0 8px var(--led); }
.tc-num { font: 600 0.9rem var(--f-code); color: var(--muted); }
.tc-cos { display: grid; gap: 0.1rem; }
.tc-titol { font-weight: 700; }
.tc-obj { font-size: 0.9rem; color: var(--muted); line-height: 1.45; }
.tc-meta { display: flex; align-items: center; gap: 0.5rem 1rem; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }
.tc-placa { display: inline-flex; align-items: center; gap: 0.35rem; }
.tc.no-publicada .tc-titol { color: var(--muted); }

/* Com és una classe */
.blocs-classe { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.75rem; counter-reset: b; }
.blocs-classe li {
  counter-increment: b; display: grid; align-content: start; gap: 0.3rem; position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem;
}
.blocs-classe li::after {
  content: counter(b); position: absolute; top: 0.8rem; right: 0.9rem; font: 600 0.8rem var(--f-code); color: var(--muted);
}
.blocs-classe .bloc-icona { margin-bottom: 0.3rem; }
.blocs-classe span:last-child { font-size: 0.875rem; color: var(--muted); line-height: 1.45; }
.regles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.regles .callout { margin: 0; }
.llegenda-cables { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; }
.llegenda-cables ul { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; gap: 0.35rem; }
.llegenda-cables li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; }
.cable { width: 2rem; height: 0.4rem; border-radius: 99px; background: var(--c); flex: none; outline: 1px solid color-mix(in srgb, var(--muted) 45%, transparent); }
.llegenda-cables .petit { margin: 0; }

/* Material */
.taula-material td, .taula-material thead th { white-space: nowrap; }
.taula-material td { width: 1%; }
.taula-material th .insignia { margin-left: 0.4rem; }
.taula-material tr.destacat > * { background: var(--teal-soft); }

/* On es desa / diploma */
.dues-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.desat-accions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.desat-accions label { cursor: pointer; }
.diploma-targeta {
  background: var(--surface); border: 1px dashed var(--line); border-radius: 14px; padding: 1.5rem;
}
.diploma-targeta h2::before { content: "🔒"; font-size: 1.2rem; }
.diploma-targeta.desbloquejat { border: 2px solid var(--led); }
.diploma-targeta.desbloquejat h2::before { content: "🎓"; }
.diploma-form { display: grid; gap: 0.75rem; }
.diploma-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.diploma-form input { font: inherit; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.diploma-form .btn-primari { justify-self: start; }
.peu { border-top: 1px solid var(--line); text-align: center; padding: 2rem 1rem 3rem; color: var(--muted); font-size: 0.875rem; }
.diploma { display: none; }

@media (max-width: 1100px) {
  .mapa { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blocs-classe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .inici-main { padding: 0 1rem 3rem; }
  .heroi { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2rem; }
  .heroi-img { order: -1; }
  .mapa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .regles, .dues-col { grid-template-columns: 1fr; }
  .tc > a, .tc > div { grid-template-columns: auto 2.4rem minmax(0, 1fr); gap: 0.4rem 0.75rem; padding: 0.8rem 0.9rem; }
  .tc-meta { grid-column: 3; flex-wrap: wrap; white-space: normal; }
}
@media (max-width: 480px) {
  .blocs-classe { grid-template-columns: 1fr; }
  .mapa-fase { padding: 0.8rem; }
  .led-classe { width: 1.75rem; height: 1.75rem; }
}

@media print {
  body.imprimint-diploma > *:not(.diploma) { display: none !important; }
  body.imprimint-diploma .diploma { display: grid; place-items: center; min-height: 100vh; }
  .diploma-marc {
    border: 6px double #13563b; padding: 3rem 4rem; text-align: center; max-width: 46rem;
    font-family: var(--f-text); color: #1e2b30;
  }
  .diploma-eyebrow { font: 600 1rem var(--f-display); text-transform: uppercase; letter-spacing: 0.2em; color: #13563b; }
  .diploma-certifica { margin-top: 2rem; }
  .diploma-nom { font: 700 2.8rem var(--f-display); margin: 0.5rem 0 1.5rem; }
  .diploma-cos { font-size: 1.1rem; }
  .diploma-data { margin-top: 2rem; color: #56666b; }

}

/* ── Caixes fixes de cada classe (càlcul ràpid, error típic, idea clau) ── */

.caixes-classe { list-style: none; padding: 0; margin: -1rem 0 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.caixes-classe li {
  display: grid; align-content: start; gap: 0.3rem;
  background: var(--teal-soft); border: 1px dashed color-mix(in srgb, var(--teal) 45%, transparent); border-radius: 12px; padding: 1rem;
}
.caixes-classe span:last-child { font-size: 0.875rem; color: var(--muted); line-height: 1.45; }

.calcul { margin-top: 2rem; }
.calcul > h3 { margin-top: 0; }
.calcul .preguntes { counter-reset: q; }
.calcul .pregunta { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal) 35%, transparent); }
.calcul .pregunta::before { content: "🧮"; background: transparent; font-size: 1.1rem; }

.callout.error-tipic { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.callout.error-tipic .callout-titol { color: var(--warn); }
.callout.error-tipic .callout-titol::before { content: "⚠ "; }

.idea-clau {
  background: var(--surface); border: 2px solid var(--copper); border-radius: 12px; padding: 1.1rem 1.25rem; margin-bottom: 1.5rem;
  display: grid; gap: 0.6rem;
}
.idea-clau .callout-titol { color: var(--copper-ink); }
.idea-clau .callout-titol::before { content: "💡 "; }
.idea-clau label { font-weight: 600; font-size: 0.95rem; }
.idea-clau textarea {
  font: inherit; width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); resize: vertical;
}
.idea-clau details summary { cursor: pointer; color: var(--teal); font-weight: 600; }
.idea-clau blockquote { margin: 0.6rem 0 0; padding: 0.6rem 1rem; border-left: 4px solid var(--copper); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 1.05rem; }

/* Taula de la família ESP32 i altres taules petites de teoria */
.taula-pins-embolcall + p, .taula-pins-embolcall { margin-bottom: 1rem; }
.fila-nostra > * { background: var(--teal-soft); }

/* ── Portada: seguretat, xuleta, laboratori i autoavaluació ── */

.seguretat { margin-top: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; }
.seguretat .callout-titol { color: var(--led-ink); }
.seguretat .callout-titol::before { content: "🦺 "; }
.seguretat ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.35rem; grid-template-columns: 1fr 1fr; column-gap: 2rem; }
.seguretat li { font-size: 0.95rem; }
.xuleta-avis { margin: 1.25rem 0 0; font-size: 1rem; }
.enllac-xuleta { font-size: 0.95rem; text-decoration: none; margin-right: 0.5rem; white-space: nowrap; }
/* Al mòbil, els enllaços de la capçalera només mostren la icona (el nom es continua llegint amb lector de pantalla) */
@media (max-width: 480px) {
  .enllac-xuleta { font-size: 1.15rem; margin-right: 0; padding: 0.35rem 0.45rem; }
  .enllac-nom { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.t-xuleta { border-top: 1px solid var(--line); padding-top: 0.75rem; margin: 0 0 0.75rem; font-size: 0.9rem; }
.t-xuleta a { text-decoration: none; font-weight: 600; }

.mapa-aval { justify-self: start; font-size: 0.85rem; }
.btn-secundari.mapa-aval { padding: 0.35rem 0.75rem; min-height: 0; }
.aval-dialeg {
  border: 0; border-radius: 16px; padding: 1.75rem 2rem; width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.aval-dialeg::backdrop { background: rgba(10, 16, 20, 0.6); }
.aval-dialeg h2 { margin-bottom: 0.25rem; }
.aval-criteri { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 0.75rem 0; }
.aval-criteri legend { float: left; width: 100%; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }
.aval-notes { clear: both; display: flex; gap: 0.4rem; }
.aval-notes label { cursor: pointer; }
.aval-notes input { position: absolute; opacity: 0; pointer-events: none; }
.aval-notes span {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); font: 600 1rem var(--f-display);
}
.aval-notes input:checked + span { background: var(--teal); border-color: var(--teal); color: var(--surface); }
.aval-notes input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.aval-consell { margin: 1rem 0; font-weight: 600; color: var(--teal); }

/* ── Pàgina de la xuleta ── */

.xuleta-main { max-width: 60rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.xuleta-main h2 { margin-top: 3rem; }
.xuleta-main .taula-pins td { font-size: 0.9rem; }
.xuleta-index { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.xuleta-index a { display: inline-block; padding: 0.4rem 0.8rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); text-decoration: none; font-size: 0.9rem; }
.arbre { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; counter-reset: arbre; }
.arbre li {
  counter-increment: arbre; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 0.8rem 1rem 0.8rem 3.25rem;
}
.arbre li::before {
  content: counter(arbre); position: absolute; left: 1rem; top: 0.8rem; display: grid; place-items: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--pcb); color: var(--silk); font: 600 0.85rem var(--f-display);
}
.arbre li:not(:last-child)::after { content: "↓ si tot està bé"; display: block; margin-top: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.arbre .si-no { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 0.2rem; }
.pin-ok { color: var(--teal); font-weight: 700; }
.pin-no { color: var(--led-ink); font-weight: 700; }
.pin-compte { color: var(--warn); font-weight: 700; }

@media (max-width: 860px) {
  .caixes-classe, .projectes { grid-template-columns: 1fr; }
  .seguretat ol { grid-template-columns: 1fr; }
  .enllac-xuleta { font-size: 0.85rem; }
  .xuleta-main { padding: 1.5rem 1rem 3rem; }
}
.idea-clau details.bloquejada summary { color: var(--muted); cursor: not-allowed; }
.idea-clau details.bloquejada summary::before { content: "🔒 "; }

/* ── Portada per mòduls: projectes, dos blocs al mapa, temari i segells ── */

.projectes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 0.75rem; }
.projecte {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.25rem;
  display: grid; align-content: start; gap: 0.4rem;
}
.projecte h3 { margin: 0; font-size: 1.35rem; }
.projecte p { margin: 0; }
.projecte.destacat { border: 2px solid var(--led); box-shadow: var(--shadow); }
.projecte-cap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.projecte-meta { font-size: 0.85rem; color: var(--muted); }
.mapa-bloc { font-size: 1.1rem; margin: 1.25rem 0 0.6rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.mapa-moduls { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.mapa-practiques { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mapa-mini { font-weight: 700; }
.mapa-fa { margin: 0; font-size: 0.8rem; color: var(--muted); }
.ti-bloc { display: grid; gap: 1.5rem; }
.ti-bloc + .ti-bloc { margin-top: 1.5rem; }
.ti-bloc-titol { font-size: 1.6rem; margin: 0; }
.ti-bloc > .petit { margin: -1.25rem 0 0; }
.ti-cap h4 { margin: 0; font: 600 1.25rem var(--f-display); display: flex; align-items: center; gap: 0.5rem; }
.ti-cap h4 .t-fase-num, .projecte .t-fase-num { width: auto; min-width: 1.6rem; height: 1.6rem; padding: 0 0.35rem; font-size: 0.85rem; }
.t-fase-num { width: auto; min-width: 1.25rem; padding: 0 0.25rem; }
.t-bloc { font: 600 0.75rem var(--f-display); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 1rem 0 0.4rem; }
.segells-titol { margin: 1.25rem 0 0.4rem; font-weight: 600; font-size: 0.9rem; }
.segells { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); }
.segell.fet { color: var(--ink); font-weight: 600; }
.diploma-segells { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .mapa-moduls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .projectes { grid-template-columns: 1fr 1fr; }
  .projecte.destacat { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .mapa-moduls, .mapa-practiques { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .mapa-practiques { grid-template-columns: 1fr; }
}
.tc-despres { color: var(--teal); font-weight: 600; }

/* ── Pàgina de components ── */

.comp-filtres { display: grid; gap: 0.75rem; margin: 1.5rem 0 0.5rem; }
.comp-cerca input {
  font: inherit; width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink);
}
.comp-xips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.comp-xips button {
  padding: 0.35rem 0.8rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 0.9rem;
}
.comp-xips button[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--surface); }
.comp-tinc { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; cursor: pointer; }
.comp-grup h2 { margin: 2.25rem 0 0.75rem; }
.comp { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 0.6rem; scroll-margin-top: calc(var(--barra-sup) + 1rem); }
.comp[open] { border-color: color-mix(in srgb, var(--teal) 45%, var(--line)); }
.comp summary { cursor: pointer; list-style: none; padding: 0.85rem 1.1rem; display: grid; gap: 0.3rem; }
.comp summary::-webkit-details-marker { display: none; }
.comp-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.comp-nom { font-weight: 700; font-size: 1.05rem; }
.comp-cap .insignia { text-transform: none; letter-spacing: 0; }
.comp-que { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.comp-cos { padding: 0 1.1rem 1rem; border-top: 1px dashed var(--line); }
.comp-cos > p:first-child { margin-top: 0.9rem; }
.comp-sub { font: 600 0.8rem var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 1rem 0 0.35rem; }
.comp-dades { margin: 0 0 0.75rem; padding-left: 1.2rem; display: grid; gap: 0.2rem; }
.comp-cos pre { margin: 0 0 0.75rem; }
.comp-cos pre code { white-space: pre; }
.comp-classes { margin-bottom: 0.3rem; }
.comp-enllac { font-size: 0.85rem; margin: 0; }
.insignia.estat-kit { background: var(--teal-soft); color: var(--teal); }
.insignia.estat-comprat { background: var(--teal-soft); color: var(--teal); }
.insignia.estat-llista { background: var(--warn-soft); color: var(--warn); }
.insignia.estat-ampliacio { background: var(--surface-2); color: var(--muted); }
.comp[data-estat="ampliacio"] .comp-nom { color: var(--muted); }

/* ── Pàgina de recursos ── */

.rec-inici { margin-top: 2rem; }
.rec-inici-llista {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.75rem;
}
.rec-inici-llista a {
  display: grid; align-content: start; gap: 0.3rem; height: 100%; padding: 0.5rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.rec-inici-llista a:hover { border-color: var(--teal); }
.rec-inici-llista img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; }
.rec-inici-titol { font-weight: 600; font-size: 0.9rem; line-height: 1.3; }
.rec-inici-llista .petit { font-size: 0.8rem; }
.rec-tots { margin-top: 2.75rem; }
.rec-filtres { grid-template-columns: 1fr auto; align-items: end; }
.rec-filtres .comp-xips { grid-column: 1 / -1; }
.rec-modul { display: grid; gap: 0.2rem; font-size: 0.8rem; color: var(--muted); }
.rec-modul select {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem 0.75rem; max-width: 100%;
}
.rec-grup-nom { font-size: 1.35rem; margin: 2.25rem 0 0.2rem; }
.rec-grup > .petit { margin: 0 0 0.75rem; }
.rec {
  display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.9rem;
  margin-bottom: 0.6rem; scroll-margin-top: calc(var(--barra-sup) + 1rem);
}
.rec.ressaltat { animation: ressalta 1.6s ease-out; }
@keyframes ressalta { from { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); } }
.rec-mini { position: relative; display: block; }
.rec-mini img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.rec-durada {
  position: absolute; right: 0.3rem; bottom: 0.3rem; padding: 0 0.35rem; border-radius: 4px;
  background: rgba(0, 0, 0, 0.75); color: #fff; font: 600 0.75rem var(--f-text);
}
.rec-cos { min-width: 0; }
.rec-titol { font: 700 1.02rem/1.35 var(--f-text); margin: 0 0 0.35rem; }
.rec-titol a { color: var(--ink); text-decoration: none; }
.rec-titol a:hover { color: var(--teal); text-decoration: underline; }
.rec-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.5rem; font-size: 0.85rem; color: var(--muted); margin: 0 0 0.5rem; }
.rec-meta .insignia { text-transform: none; letter-spacing: 0; }
.insignia.nivell-inicial { background: var(--teal-soft); color: var(--teal); }
.insignia.nivell-mitja { background: var(--warn-soft); color: var(--warn); }
.insignia.nivell-avancat { background: var(--led-soft); color: var(--led-ink); }
.rec-que { font-size: 0.95rem; line-height: 1.55; margin: 0 0 0.5rem; }
.rec-extra { list-style: none; padding: 0; margin: 0 0 0.5rem; font-size: 0.9rem; display: grid; gap: 0.25rem; }
.rec-extra li::before { content: "➕ "; }
.rec-avis { font-size: 0.875rem; background: var(--warn-soft); border-radius: 8px; padding: 0.4rem 0.65rem; margin: 0 0 0.5rem; }
.rec-avis::before { content: "⚠ "; color: var(--warn); }
.rec-classes { font-size: 0.875rem; margin: 0; color: var(--muted); }
.rec-seccio h2 { margin-top: 3rem; }
.rec-enllacos { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.rec-enllacos li {
  display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr; gap: 0.25rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.65rem 0.9rem; font-size: 0.95rem;
}
.rec-enllacos a { font-weight: 600; }
.rec-enllacos span:not(.visualment-amagat) { color: var(--muted); }
.rec-peu { margin-top: 2.5rem; }

@media (max-width: 600px) {
  /* La miniatura al costat del títol; la descripció, a sota i a tota l'amplada */
  .rec { grid-template-columns: 7rem 1fr; gap: 0.4rem 0.75rem; padding: 0.75rem; }
  .rec-cos { display: contents; }
  .rec-mini { grid-row: span 2; }
  .rec-titol, .rec-meta { grid-column: 2; }
  .rec-meta { align-self: start; }
  .rec-que, .rec-extra, .rec-avis, .rec-classes { grid-column: 1 / -1; }
  .rec-que { margin-top: 0.25rem; }
  .rec-filtres { grid-template-columns: 1fr; }
  .rec-enllacos li { grid-template-columns: 1fr; }
  .rec-inici-llista { grid-template-columns: repeat(2, 1fr); }
}

/* Classe: «Per anar més lluny» */
.mes-lluny { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.mes-lluny .callout-titol { color: var(--teal); }
.mes-lluny > .petit { margin: 0 0 0.75rem; }
.mes-lluny-llista { list-style: none; padding: 0; margin: 0 0 0.75rem; display: grid; gap: 0.65rem; }
.mes-lluny-llista li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; align-items: start; }
.mes-lluny-llista img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.mes-lluny-llista .ml-titol { font-weight: 600; line-height: 1.35; display: block; }
.mes-lluny-llista .petit { display: block; margin-top: 0.15rem; }
.mes-lluny-tots { margin: 0; font-size: 0.9rem; }
@media print { .mes-lluny img { display: none; } .mes-lluny-llista li { grid-template-columns: 1fr; } }
.amb-kit { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.amb-kit .callout-titol { color: var(--teal); }
.amb-kit > .petit { margin: 0 0 0.75rem; }
.amb-kit-llista { margin: 0 0 0.75rem; padding-left: 1.2rem; display: grid; gap: 0.4rem; }
.amb-kit-llista .petit { display: block; }

/* ── Wokwi, prompt per a la IA, imprimir i llicència ───────────────────── */

.callout.wokwi { background: var(--surface-2); border-color: var(--line); }
.callout.wokwi .callout-titol { color: var(--teal); }
.callout.wokwi ol { margin: 0.25rem 0 0.75rem; padding-left: 1.25rem; }
.callout.wokwi li { margin: 0.2rem 0; }

.cap-accions { align-items: flex-start; }
.prompt-ia .agenda-cos { max-width: 34rem; }
.prompt-veure { margin-top: 0.5rem; }
.prompt-veure summary { cursor: pointer; font-size: 0.875rem; color: var(--teal); }
.prompt-text {
  white-space: pre-wrap; max-height: 18rem; overflow: auto; margin: 0.5rem 0 0;
  font-size: 0.78rem; line-height: 1.45; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem;
}

.peu-llicencia { margin: 0.4rem 0 0; font-size: 0.8rem; }
.peu-llicencia a, .peu a { color: var(--muted); }
.peu-classe { margin-top: 2rem; }

/* ── Preguntes per repassar (portada) ─────────────────────────────────── */

.repassar { margin-top: 2rem; }
.repassar > .petit { max-width: 44rem; }
.repassar-llista { list-style: none; padding: 0; margin: 0.75rem 0 0; display: grid; gap: 0.6rem; }
.repassar-item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 10px; padding: 0.8rem 1rem; }
.repassar-q { margin: 0 0 0.35rem; }
.repassar-q .insignia { margin-right: 0.35rem; }
.repassar-item details { margin: 0.25rem 0; }
.repassar-item summary { cursor: pointer; color: var(--teal); font-size: 0.9rem; }
.repassar-item details p { margin: 0.35rem 0 0; }
.pregunta.ressaltada { outline: 3px solid var(--warn); outline-offset: 4px; border-radius: 10px; }

/* ── 404 ──────────────────────────────────────────────────────────────── */

.pagina-404 { min-height: 60vh; }
.pagina-404 .btn-primari { display: inline-block; margin-top: 1rem; }
.prompt-veure summary { list-style: revert; }

/* ── El meu material ──────────────────────────────────────────────────── */

.material-accions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin: 1.5rem 0; }
.material-resum { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.25rem 1.25rem 1rem; }
.material-resum h2 { margin-top: 1rem !important; }
.mat-falta { padding-left: 1.3rem; display: grid; gap: 0.3rem; }
.mat-grup h2 { margin-top: 2.5rem; }
.mat-llista { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.mat-fila {
  display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 1rem;
  scroll-margin-top: 5rem;
}
.mat-fila.destacat { border: 2px solid var(--teal); }
.mat-info .petit { display: block; margin-top: 0.15rem; }
.mat-tria { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mat-tria label {
  display: inline-flex; align-items: center; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  padding: 0.35rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--ink);
}
.mat-tria input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mat-tria label:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.mat-tria label:has(input[value="tinc"]:checked) { background: var(--teal); border-color: var(--teal); color: var(--surface); }
.mat-tria label:has(input[value="equivalent"]:checked) { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); }
.mat-tria label:has(input[value="no"]:checked) { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
@media (max-width: 640px) { .mat-fila { grid-template-columns: 1fr; } }

/* ── Compte i administració ───────────────────────────────────────────── */

.compte-formularis { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.compte-form { display: grid; gap: 0.75rem; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.compte-form h2 { margin: 0 !important; font-size: 1.2rem; }
.compte-form p { margin: 0; }
.compte-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.compte-form input:not([type="checkbox"]), .taula-admin select {
  font: inherit; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink);
}
.compte-form .compte-accepto { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 400; }
.compte-form button { justify-self: start; }
.compte-form.perill { border-color: color-mix(in srgb, var(--led) 45%, var(--line)); }
.compte-error { color: var(--led-ink); font-weight: 600; font-size: 0.9rem; }
.compte-error:empty { display: none; }
.compte-estat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0.25rem 1.25rem 1rem; margin: 1.5rem 0; }
.compte-dades { padding-left: 1.2rem; }
.compte-dades li:empty { display: none; }
.taula-admin th .nota, .taula-admin td .nota { margin-top: 0.15rem; }
.admin-accions { white-space: nowrap; }
.admin-accions .btn-text { display: block; }
.admin-avis code { user-select: all; font-size: 1.05rem; }
.admin-detall { margin-top: 2rem; }
