:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --sunk: #efede8;
  --ink: #141413;
  --ink-2: #3d3d3a;
  --muted: #73726c;
  --line: #e4e2dc;
  --line-2: #d3d0c8;
  --accent: #c42b1c;
  --accent-ink: #ffffff;
  --ok: #2f7d4f;
  --focus: #2563eb;
  --r: 14px;
  --r-s: 10px;
  --shadow: 0 1px 2px rgb(20 20 19 / .04), 0 4px 16px rgb(20 20 19 / .04);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --w: 720px;
  --gut: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111110; --surface: #1a1a19; --sunk: #222220; --ink: #f2f1ed; --ink-2: #cfcdc6;
    --muted: #9a988f; --line: #2c2b29; --line-2: #3b3a37; --accent: #ef4b3b; --ok: #4fb57a; --focus: #7aa2ff;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111110; --surface: #1a1a19; --sunk: #222220; --ink: #f2f1ed; --ink-2: #cfcdc6;
  --muted: #9a988f; --line: #2c2b29; --line-2: #3b3a37; --accent: #ef4b3b; --ok: #4fb57a; --focus: #7aa2ff;
  --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
@media (min-width: 760px) { body { padding-bottom: 0; } }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.print-only { display: none; }

/* ── Top ── */
.top {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; padding-top: env(safe-area-inset-top);
}
.top.scrolled { border-bottom-color: var(--line); }
.top-in { max-width: 1040px; margin: 0 auto; padding: 0 var(--gut); height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { font-weight: 700; font-size: 21px; letter-spacing: -.035em; text-decoration: none; }
.brand span { color: var(--accent); }
.tabs { display: none; gap: 2px; }
.tabs a { text-decoration: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 15px; font-weight: 500; transition: color .15s, background-color .15s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
@media (min-width: 760px) { .tabs { display: flex; } }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.status.on i { background: var(--ok); }
.status.off i { background: #d79b22; }

/* ── Layout ── */
main { max-width: var(--w); margin: 0 auto; padding: 8px var(--gut) 40px; }
.view { padding-top: 24px; }
@media (min-width: 760px) { .view { padding-top: 48px; } }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
h1 { font-size: clamp(34px, 8.4vw, 54px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; margin: 0; text-wrap: balance; }
.lede { font-size: 19px; line-height: 1.5; color: var(--ink-2); margin: 18px 0 0; max-width: 34em; text-wrap: pretty; }
.h2 { font-size: 22px; letter-spacing: -.02em; line-height: 1.2; margin: 48px 0 14px; font-weight: 650; }
.h3 { font-size: 17px; margin: 0 0 6px; font-weight: 650; letter-spacing: -.01em; }
.vh { margin-bottom: 28px; }
.hero { margin-bottom: 28px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.src { font-size: 13px; color: var(--muted); margin: 14px 0 0; line-height: 1.45; }
.src a { color: inherit; }
.note { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.note a { color: var(--ink); font-weight: 600; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.disc { margin: 32px 0 0; padding: 14px 16px; border-radius: var(--r-s); background: var(--sunk); font-size: 14px; color: var(--ink-2); }
.prose p { margin: 0 0 12px; color: var(--ink-2); text-wrap: pretty; }
.tag { font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg); border: 1px solid var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: transform .12s ease-out, background-color .15s, opacity .15s; -webkit-tap-highlight-color: transparent;
}
.btn small { font-weight: 500; opacity: .62; font-size: 13px; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--sunk); }

/* ── Inici ── */
.ready { display: flex; gap: 14px; align-items: center; padding: 16px 18px; margin-bottom: 12px; }
.ready-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--ink); animation: spin 0.9s linear infinite; }
.ready.ok .ready-ico { animation: none; border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/18px no-repeat; }
.ready.warn .ready-ico { animation: none; border-color: #d79b22; }
@keyframes spin { to { transform: rotate(360deg); } }
.ready-t { margin: 0; font-weight: 650; }
.ready-d { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.install { padding: 16px 18px; }
.install ol { margin: 6px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; }
.install ol li { margin: 3px 0; }
.install p { margin: 0; color: var(--ink-2); font-size: 15px; }
.kbd { display: inline-flex; vertical-align: -4px; width: 20px; height: 20px; }

.entries { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 92px 1fr auto; grid-template-rows: auto auto; column-gap: 14px; padding: 18px 2px; border-bottom: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.entry::after { content: "→"; grid-row: 1 / 3; grid-column: 3; align-self: center; color: var(--muted); transition: transform .15s ease-out; }
.entry:hover::after { transform: translateX(3px); color: var(--ink); }
.entry-n { grid-row: 1 / 3; font-size: 26px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; align-self: center; }
.entry-t { font-weight: 650; }
.entry-d { color: var(--muted); font-size: 15px; line-height: 1.4; }
.dl { margin-top: 44px; }
.dl p { margin: 0; font-size: 15px; }

/* ── SOS ── */
.sos {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n t" "n d" "c c"; column-gap: 18px; row-gap: 2px;
  padding: 22px 22px 18px; border-radius: 20px; background: var(--accent); color: var(--accent-ink); text-decoration: none; align-items: center;
  transition: transform .12s ease-out; -webkit-tap-highlight-color: transparent;
}
.sos:active { transform: scale(.985); }
.sos-n { grid-area: n; font-size: 64px; line-height: .9; font-weight: 800; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.sos-t { grid-area: t; font-weight: 700; font-size: 18px; line-height: 1.25; align-self: end; }
.sos-d { grid-area: d; opacity: .85; font-size: 14px; align-self: start; }
.sos-cta { grid-area: c; margin-top: 16px; background: rgb(255 255 255 / .18); border-radius: 12px; padding: 12px; text-align: center; font-weight: 700; }

.phones { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.phones a { display: grid; grid-template-columns: minmax(118px, 34%) 1fr; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.phones b { font-variant-numeric: tabular-nums; font-size: 17px; letter-spacing: -.01em; }
.phones span { font-weight: 550; line-height: 1.35; }
.phones small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.phones a:hover b { color: var(--accent); }

/* ── Accordion ── */
.acc { border-top: 1px solid var(--line); }
.acc details { border-bottom: 1px solid var(--line); }
.acc summary, .term summary { list-style: none; cursor: pointer; padding: 16px 2px; display: flex; align-items: center; gap: 12px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
.acc summary::-webkit-details-marker, .term summary::-webkit-details-marker { display: none; }
.acc summary span, .term summary span { flex: 1; }
.acc summary::after, .term summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease-out; }
.acc details[open] > summary::after, .term[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
.acc details > :not(summary) { margin-left: 2px; margin-right: 2px; }
.acc details[open] { padding-bottom: 18px; }
.acc ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.acc ol li { counter-increment: s; position: relative; padding: 0 0 0 34px; margin: 0 0 10px; color: var(--ink-2); text-wrap: pretty; }
.acc ol li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--sunk); font-size: 12px; font-weight: 700; display: grid; place-items: center; color: var(--ink); font-variant-numeric: tabular-nums; }
.acc details p { margin: 0 0 10px; color: var(--ink-2); }
.acc .src { margin-top: 6px; }

.metro { display: flex; align-items: center; gap: 14px; margin: 16px 0 10px; flex-wrap: wrap; }
.metro-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--line-2); }
.metro-dot.beat { animation: beat 545ms ease-out infinite; background: var(--accent); }
@keyframes beat { 0% { transform: scale(1.35); opacity: 1; } 60% { transform: scale(1); opacity: .45; } 100% { transform: scale(1); opacity: .45; } }

/* ── Kit ── */
.kit { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 18px 12px; box-shadow: var(--shadow); }
.kit-bar { display: flex; align-items: center; gap: 12px; padding: 12px 0 6px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.kit-bar i { flex: 1; height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.kit-bar b { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s ease-out; }
.kit fieldset { border: 0; margin: 0; padding: 10px 0 2px; }
.kit legend { font-size: 13px; font-weight: 650; color: var(--muted); padding: 0; margin-bottom: 4px; }
.kit label { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; cursor: pointer; line-height: 1.4; color: var(--ink-2); }
.kit input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--line-2); border-radius: 7px; background: var(--surface); display: grid; place-items: center; transition: background-color .15s, border-color .15s; cursor: pointer; }
.kit input:checked { background: var(--ink); border-color: var(--ink); }
.kit input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(-45deg) translate(1px, -1px); }
.kit input:checked + * , .kit label:has(input:checked) { color: var(--muted); }

/* ── Catalunya ── */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 0; }
@media (min-width: 560px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stats div { background: var(--surface); padding: 16px 16px 14px; }
.stats dt { font-size: 13px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats dd small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.bars { display: grid; gap: 22px; }
.bar-t { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.bar i { display: block; height: 100%; }
.bar-l { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.bar-l span { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.bar-l span::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.search { position: relative; }
.search input {
  width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 17px; padding: 0 16px 0 46px; outline: none; transition: border-color .15s, box-shadow .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2373726c' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 16px center; background-size: 20px;
}
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.munis { list-style: none; padding: 0; margin: 10px 0 0; }
.munis li { padding: 14px 2px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
.munis .m-n { font-weight: 600; }
.munis .m-c { color: var(--muted); font-size: 14px; }
.munis .m-p { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.munis .m-x { text-align: right; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.munis mark { background: color-mix(in srgb, var(--accent) 16%, transparent); color: inherit; border-radius: 3px; }
.munis .empty { display: block; color: var(--muted); border: 0; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table th { font-size: 13px; font-weight: 600; color: var(--muted); }
.table th button { all: unset; cursor: pointer; }
.table th button:focus-visible { outline: 2px solid var(--focus); border-radius: 4px; }
.table th[aria-sort] button { color: var(--ink); }
.table th[aria-sort="ascending"] button::after { content: " ↑"; }
.table th[aria-sort="descending"] button::after { content: " ↓"; }
.table .num { text-align: right; }

/* ── Biblioteca ── */
.steps { list-style: none; margin: 0; padding: 0; }
.step { margin: 0 0 40px; }
.step-t { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; margin: 0 0 14px; letter-spacing: -.01em; }
.step-t > span { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; display: grid; place-items: center; font-variant-numeric: tabular-nums; flex: none; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; background: var(--sunk); padding: 4px; border-radius: 14px; }
@media (min-width: 560px) { .seg { grid-template-columns: repeat(4, 1fr); } }
.seg button { border: 0; background: transparent; padding: 10px 8px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; min-height: 44px; transition: background-color .15s, color .15s, box-shadow .15s; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .08); }
.opts { display: grid; gap: 8px; }
.opt {
  display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 14px; align-items: start; text-align: left; width: 100%;
  padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer;
  transition: border-color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: var(--line-2); }
.opt[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt-mk { grid-row: 1 / 3; width: 22px; height: 22px; margin-top: 1px; border: 1.5px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; transition: border-color .15s, background-color .15s; }
.opt[role="checkbox"] .opt-mk { border-radius: 7px; }
.opt[aria-checked="true"] .opt-mk { border-color: var(--ink); background: var(--ink); }
.opt[aria-checked="true"] .opt-mk::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); }
.opt[role="checkbox"][aria-checked="true"] .opt-mk::after { width: 10px; height: 6px; border-radius: 0; background: none; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(-45deg) translate(1px, -1px); }
.opt-t { font-weight: 650; }
.opt-t em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--ok); margin-left: 6px; }
.opt-s { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt-d { grid-column: 2 / 4; color: var(--muted); font-size: 14px; line-height: 1.45; }
.info { padding: 16px 18px; }
.info p { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; }
.info .row { margin-top: 8px; }

.sum { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 10; margin: 0 calc(-1 * var(--gut)); padding: 10px var(--gut); }
@media (min-width: 760px) { .sum { bottom: 16px; } }
.sum-in { display: flex; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; padding: 12px 12px 12px 18px; box-shadow: 0 8px 30px rgb(20 20 19 / .1); }
.sum-fig { display: flex; flex-direction: column; line-height: 1.2; }
.sum-fig b { font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sum-in .btn { margin-left: auto; }
@media (max-width: 420px) { .sum-fig:nth-child(2) { display: none; } }

.dlist { margin-top: 24px; outline: none; }
.how { margin: 0 0 20px; padding: 16px 18px 16px 40px; background: var(--sunk); border-radius: var(--r); color: var(--ink-2); font-size: 15px; }
.how li { margin: 4px 0; }
.how a { font-weight: 600; }
.files { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.files li { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: center; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.files .f-t { font-weight: 600; }
.files .f-d { color: var(--muted); font-size: 13px; font-family: var(--mono); word-break: break-all; }
.files .btn { grid-row: 1 / 3; grid-column: 2; min-height: 40px; padding: 8px 14px; }
.files .empty { display: block; color: var(--muted); }
.term { margin-top: 16px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.term pre { background: var(--sunk); border-radius: var(--r-s); padding: 14px; overflow-x: auto; font: 12.5px/1.6 var(--mono); margin: 8px 0 12px; white-space: pre; }

/* ── Footer + bottom nav ── */
.foot { border-top: 1px solid var(--line); margin-top: 40px; }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 24px var(--gut) 32px; }
.foot p { margin: 0 0 6px; font-size: 15px; color: var(--ink-2); }
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; text-decoration: none; color: var(--muted); -webkit-tap-highlight-color: transparent; }
.bnav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.bnav a[aria-current="page"] { color: var(--ink); }
.bnav a[href="#emergencies"][aria-current="page"] { color: var(--accent); }
@media (min-width: 760px) { .bnav { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .metro-dot.beat { animation: none; background: var(--accent); }
}

/* ── Fitxer local (file://) ── */
.local [data-online] { display: none !important; }

/* ── Impressió / PDF ── */
@media print {
  @page { size: A4; margin: 16mm 15mm; }
  :root { --bg: #fff; --surface: #fff; --sunk: #f2f1ee; --ink: #000; --ink-2: #222; --muted: #555; --line: #ddd; --line-2: #bbb; --accent: #b3261e; }
  body { font-size: 11pt; padding: 0; background: #fff; }
  .top, .bnav, .skip, .ready, .install, .dl, .sum, .metro, .search, .munis, #munis-n, .term, .entries, .steps .seg, [data-online] { display: none !important; }
  .view[hidden] { display: block !important; }
  .view { padding-top: 0; break-before: page; }
  #inici, #emergencies { break-before: auto; }
  #emergencies { margin-top: 28pt; }
  .steps > .step:first-child, .step-t > span, .opt-t em, .how { display: none !important; }
  .opt[aria-checked] { border-color: #ccc !important; }
  main { max-width: none; padding: 0; }
  h1 { font-size: 26pt; }
  .h2 { font-size: 15pt; margin-top: 22pt; break-after: avoid; }
  .lede { font-size: 12pt; }
  .card, .kit, .tablewrap { box-shadow: none; }
  .acc details > summary::after { display: none; }
  .acc details { break-inside: avoid; padding-bottom: 8pt; }
  .acc summary { padding: 8pt 0 4pt; }
  .sos { background: #fff !important; color: #000; border: 2px solid var(--accent); }
  .sos-n { color: var(--accent); }
  .sos-cta { display: none; }
  .phones a, .phones li { break-inside: avoid; }
  .print-only { display: block; }
  .table.compact { font-size: 8pt; }
  .table.compact th, .table.compact td { padding: 2pt 5pt; }
  .table thead { display: table-header-group; }
  .table tr { break-inside: avoid; }
  .tablewrap { overflow: visible; border: 0; }
  .opt { break-inside: avoid; border: 1px solid #ccc; box-shadow: none !important; }
  .opt-mk { display: none; }
  .opt { grid-template-columns: 1fr auto; }
  .opt-d { grid-column: 1 / 3; }
  .dlist .files .btn { display: none; }
  .foot { break-before: avoid; }
  a { text-decoration: none; }
}
