/* =============================================================
   PrintMyQR — hoja de estilo única
   1 Tokens · 2 Reset · 3 Utilidades · 4 Tipografía · 5 Componentes
   6 Herramienta · 7 Secciones · 8 Anuncios · 9 Responsive · 10 Motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:            #f6f6f4;
  --bg-soft:       #ffffff;
  --bg-sunk:       #eeeeea;
  --surface:       #ffffff;
  --surface-2:     #f9f9f7;
  --ink:           #16171c;
  --ink-soft:      #4c505c;
  --ink-faint:     #7b8090;
  --line:          #e2e2dc;
  --line-strong:   #cfcfc7;
  --accent:        #e8481c;
  --accent-ink:    #ffffff;
  --accent-soft:   #fdece6;
  --ok:            #16794a;
  --ok-soft:       #e6f4ec;
  --warn:          #9a5b00;
  --warn-soft:     #fdf1de;
  --danger:        #b3261e;
  --danger-soft:   #fbeae8;

  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     22px;
  --shadow:        0 1px 2px rgba(16,17,22,.05), 0 8px 24px -12px rgba(16,17,22,.18);
  --shadow-lg:     0 2px 4px rgba(16,17,22,.05), 0 24px 60px -24px rgba(16,17,22,.28);

  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: "Space Grotesk", var(--font-body);

  --container: 1140px;
  --gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0f1014;
    --bg-soft:     #16181e;
    --bg-sunk:     #0a0b0e;
    --surface:     #181a21;
    --surface-2:   #1e212a;
    --ink:         #f2f3f5;
    --ink-soft:    #b6bac6;
    --ink-faint:   #868c9c;
    --line:        #2b2f3a;
    --line-strong: #3b4150;
    --accent:      #ff6a3d;
    --accent-ink:  #1a0d07;
    --accent-soft: #2c1810;
    --ok:          #56d99b;
    --ok-soft:     #12291f;
    --warn:        #f0b866;
    --warn-soft:   #2a2115;
    --danger:      #ff8a80;
    --danger-soft: #2e1715;
    --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg:   0 2px 4px rgba(0,0,0,.4), 0 24px 60px -24px rgba(0,0,0,.75);
  }
}

:root[data-theme="dark"] {
  --bg:          #0f1014;
  --bg-soft:     #16181e;
  --bg-sunk:     #0a0b0e;
  --surface:     #181a21;
  --surface-2:   #1e212a;
  --ink:         #f2f3f5;
  --ink-soft:    #b6bac6;
  --ink-faint:   #868c9c;
  --line:        #2b2f3a;
  --line-strong: #3b4150;
  --accent:      #ff6a3d;
  --accent-ink:  #1a0d07;
  --accent-soft: #2c1810;
  --ok:          #56d99b;
  --ok-soft:     #12291f;
  --warn:        #f0b866;
  --warn-soft:   #2a2115;
  --danger:      #ff8a80;
  --danger-soft: #2e1715;
  --shadow:      0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg:   0 2px 4px rgba(0,0,0,.4), 0 24px 60px -24px rgba(0,0,0,.75);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =============================================================
   3. Utilidades
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 820px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }
.stack > * + * { margin-top: 1em; }
.nowrap { white-space: nowrap; }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.15rem); }
h3 { font-size: clamp(1.08rem, 1rem + .4vw, 1.28rem); }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.02rem, .96rem + .35vw, 1.2rem); color: var(--ink-soft); }
.eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}

/* =============================================================
   5. Componentes
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; line-height: 1.2;
  text-decoration: none; transition: background .16s ease, border-color .16s ease, transform .1s ease, color .16s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn--dark { background: var(--ink); color: var(--bg-soft); }
.btn--dark:hover { background: color-mix(in srgb, var(--ink) 85%, #888); }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--ink-faint); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 24px; font-size: 1.02rem; border-radius: 13px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--accent-ink); opacity: .9; animation: spin .8s linear infinite;
}
.btn--ghost.is-busy::after { color: var(--ink); }
.btn small { display: block; font-weight: 500; opacity: .8; font-size: .78rem; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
}
.badge--ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; text-decoration: none; letter-spacing: -.02em; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg-soft);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 17px; height: 17px; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a { font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--ink-soft); padding: 8px 11px; border-radius: 8px; }
.header-nav a:hover { color: var(--ink); background: var(--surface-2); }
.theme-toggle {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink-soft);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.theme-toggle svg { width: 17px; height: 17px; }

/* =============================================================
   6. La herramienta
   ============================================================= */
.hero { padding: clamp(26px, 4vw, 46px) 0 10px; }
.hero-head { max-width: 780px; }
.hero-head h1 { margin-bottom: 12px; }
.hero-head h1 .hl { color: var(--accent); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.tool {
  margin-top: clamp(18px, 3vw, 26px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.tool-grid { display: grid; grid-template-columns: 1fr; }
.tool-controls { padding: clamp(18px, 2.4vw, 26px); min-width: 0; }
.tool-preview {
  padding: clamp(18px, 2.4vw, 26px);
  background: var(--surface-2); border-top: 1px solid var(--line);
  min-width: 0;
}

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label {
  display: block; font-size: .82rem; font-weight: 700; letter-spacing: .01em;
  color: var(--ink-soft); margin-bottom: 7px;
}
.field-hint { font-size: .8rem; color: var(--ink-faint); margin-top: 6px; }

.input, .select, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  background: var(--bg-soft); border: 1px solid var(--line-strong); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--ink-faint); }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-sunk); border-radius: 12px; }
.seg button {
  flex: 1 1 28%; padding: 9px 10px; border: 0; background: transparent; color: var(--ink-soft);
  font-weight: 700; font-size: .87rem; border-radius: 9px; transition: background .15s ease, color .15s ease;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg-soft); color: var(--ink-soft); font-size: .85rem; font-weight: 600;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg-soft); }

.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.emoji-grid button {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); font-size: 1.25rem; line-height: 1; display: grid; place-items: center;
}
.emoji-grid button:hover { border-color: var(--ink-faint); }
.emoji-grid button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }

.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.color-pick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--bg-soft); }
.color-pick input[type="color"] {
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; flex: none;
}
.color-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line-strong); border-radius: 7px; }
.color-pick .cp-text { min-width: 0; }
.color-pick .cp-name { font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.color-pick .cp-hex { font-size: .76rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

.palettes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.palette-btn { width: 40px; height: 22px; border-radius: 6px; border: 1px solid var(--line-strong); padding: 0; overflow: hidden; display: flex; }
.palette-btn span { flex: 1; }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.range-val { font-variant-numeric: tabular-nums; font-weight: 700; font-size: .88rem; min-width: 62px; text-align: right; }

.uploader {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px dashed var(--line-strong); border-radius: 11px; background: var(--bg-soft);
  font-size: .86rem; color: var(--ink-soft); font-weight: 600; width: 100%; text-align: left;
}
.uploader:hover { border-color: var(--accent); color: var(--ink); }
.center-current { display: flex; align-items: center; gap: 10px; margin-top: 9px; font-size: .84rem; color: var(--ink-soft); }
.center-current img { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line); object-fit: contain; background: var(--bg-soft); }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; font-size: .84rem; text-decoration: underline; }

details.adv { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
details.adv > summary { cursor: pointer; font-weight: 700; font-size: .87rem; color: var(--ink-soft); list-style: none; display: flex; align-items: center; gap: 7px; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv > summary::before { content: "\FF0B"; font-size: .9em; color: var(--accent); }
details.adv[open] > summary::before { content: "\FF0D"; }
details.adv > .adv-body { margin-top: 14px; }

/* Vista previa */
.preview-block + .preview-block { margin-top: 18px; }
.preview-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.preview-title h3 { font-size: .95rem; }
.preview-title .tag { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }

.qr-stage {
  display: grid; place-items: center; padding: 16px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 180px;
}
.qr-stage canvas, .qr-stage svg { width: 100% !important; height: auto !important; max-width: 260px; border-radius: 6px; }

.viewer {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background:
    radial-gradient(120% 90% at 50% 8%, var(--bg-soft) 0%, color-mix(in srgb, var(--bg-sunk) 78%, var(--bg-soft)) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; touch-action: none; cursor: grab;
}
.viewer:active { cursor: grabbing; }
.viewer canvas { width: 100%; height: 100%; display: block; }
.viewer-msg {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; justify-items: center;
  padding: 20px; text-align: center; font-size: .87rem; color: var(--ink-faint); background: var(--bg-soft);
}
.viewer-msg[hidden] { display: none; }
.viewer-hint {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  font-size: .74rem; font-weight: 600; color: var(--ink-faint);
  background: color-mix(in srgb, var(--bg-soft) 82%, transparent);
  padding: 4px 9px; border-radius: 999px; pointer-events: none;
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Avisos de impresión */
.checks { display: grid; gap: 7px; margin-top: 12px; }
.check {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 9px 12px; border-radius: 10px; font-size: .84rem; line-height: 1.45;
}
.check b { font-weight: 700; }
.check--ok   { background: var(--ok-soft);     color: var(--ok); }
.check--warn { background: var(--warn-soft);   color: var(--warn); }
.check--bad  { background: var(--danger-soft); color: var(--danger); }
.check i { font-style: normal; flex: none; }

/* Descargas */
.downloads { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.dl-main { display: grid; gap: 9px; }
.dl-secondary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dl-secondary .btn { flex: 1 1 130px; }
.dl-note { font-size: .79rem; color: var(--ink-faint); margin-top: 10px; }
.privacy-badge {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 14px;
  font-size: .82rem; color: var(--ink-soft); background: var(--bg-sunk);
  padding: 11px 13px; border-radius: 11px;
}

/* =============================================================
   7. Secciones de contenido
   ============================================================= */
.section { padding: clamp(38px, 6vw, 66px) 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 700px; margin-bottom: clamp(22px, 3vw, 34px); }
.section-head h2 { margin-bottom: 10px; }

.steps { display: grid; gap: 16px; grid-template-columns: 1fr; counter-reset: step; }
.step { position: relative; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-n {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; margin-bottom: 13px;
}
.step h3 { margin-bottom: 6px; }
.step p { font-size: .92rem; color: var(--ink-soft); }

.uses { display: grid; gap: 14px; grid-template-columns: 1fr; }
.use { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.use-emoji { font-size: 1.5rem; line-height: 1; margin-bottom: 11px; display: block; }
.use h3 { font-size: 1.02rem; margin-bottom: 6px; }
.use p { font-size: .89rem; color: var(--ink-soft); }
a.use { text-decoration: none; display: block; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
a.use:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
a.use h3 { color: var(--ink); }
a.use::after { content: " →"; color: var(--accent); font-weight: 700; }

.prose { max-width: 760px; }
.prose h2 { margin-bottom: 14px; }
.prose h3 { margin: 26px 0 8px; }
.prose p { color: var(--ink-soft); margin-bottom: 13px; }
.prose ul { color: var(--ink-soft); padding-left: 20px; margin-bottom: 13px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }

.faq { display: grid; gap: 9px; max-width: 800px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 18px;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 15px 0; font-weight: 700; font-size: .97rem;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "\FF0B"; color: var(--accent); flex: none; font-weight: 700; }
.faq details[open] summary::after { content: "\FF0D"; }
.faq .faq-a { padding-bottom: 16px; color: var(--ink-soft); font-size: .93rem; }

/* Pie */
.site-footer { padding: 34px 0; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-note { font-size: .8rem; color: var(--ink-faint); }

/* =============================================================
   8. Huecos de anuncios (placeholders — sin código de terceros)
   ============================================================= */
.ad-slot {
  display: grid; place-items: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--line) 45%, transparent) 10px 11px);
  color: var(--ink-faint);
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.ad-slot.is-live {
  border: 0; background: none; color: inherit;
  font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none;
  display: block; overflow: hidden;
}
.ad-slot--leaderboard { min-height: 100px; margin: 26px 0 0; }
.ad-slot--incontent   { min-height: 250px; margin: 30px 0; }
.ad-slot--dialog      { min-height: 250px; width: 100%; margin-top: 4px; }
.ad-slot--toast       { min-height: 74px; width: 100%; }

@media (min-width: 780px) {
  .ad-slot--leaderboard { min-height: 90px; }
}

dialog.ad-dialog {
  border: 0; padding: 0; margin: auto;              /* el reset de márgenes lo descentraba */
  border-radius: var(--radius-lg); max-width: 380px; width: calc(100% - 32px);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
dialog.ad-dialog:not([open]) { display: none; }
dialog.ad-dialog::backdrop { background: rgba(10,11,14,.55); backdrop-filter: blur(2px); }
.ad-dialog-inner { padding: 18px; }
.ad-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ad-dialog-head p { font-size: .88rem; color: var(--ink-soft); }
.ad-dialog-head strong { display: block; color: var(--ink); font-family: var(--font-head); font-size: 1.02rem; }
.ad-close {
  flex: none; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-soft); display: grid; place-items: center; font-size: 1.05rem; line-height: 1;
}
.ad-close:hover { color: var(--ink); border-color: var(--line-strong); }

.ad-toast {
  position: fixed; right: 14px; bottom: 14px; z-index: 60; width: min(280px, calc(100vw - 28px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 12px;
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.3,1);
}
.ad-toast.is-open { transform: translateY(0); }
.ad-toast-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ad-toast-head span { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }


/* ── Aviso de cookies ─────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--surface); border-top: 1px solid var(--line-strong);
  box-shadow: 0 -12px 40px -20px rgba(16,17,22,.35);
  transform: translateY(105%); transition: transform .34s cubic-bezier(.2,.8,.3,1);
  max-height: 88vh; overflow-y: auto;
}
.cookie-banner.is-open { transform: translateY(0); }
.cookie-inner {
  max-width: var(--container); margin-inline: auto;
  padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 16px; align-items: start;
}
.cookie-text > strong { font-family: var(--font-head); font-size: 1.02rem; display: block; margin-bottom: 5px; }
.cookie-text p strong { color: var(--ink); }
.cookie-text p { font-size: .88rem; color: var(--ink-soft); line-height: 1.55; }
.cookie-legal { font-size: .8rem !important; margin-top: 9px; }
.cookie-legal a { color: var(--accent); font-weight: 600; }

.cookie-detail { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cookie-opt { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.cookie-opt input { margin-top: 3px; flex: none; width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.cookie-opt input:disabled { cursor: default; opacity: .55; }
.cookie-opt b { color: var(--ink); }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.cookie-actions .btn { flex: 1 1 auto; }
.cookie-actions .link-btn { padding: 10px 4px; }

@media (min-width: 860px) {
  .cookie-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 28px; padding-block: 20px; }
  .cookie-actions { flex-direction: column; align-items: stretch; min-width: 230px; }
  .cookie-actions .btn { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: none; } }


/* ── ¿No tienes impresora? · servicio de impresión afiliado ───────────── */
.printsvc {
  margin-top: 26px; padding: clamp(20px, 3vw, 28px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.printsvc-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.printsvc-emoji { font-size: 1.9rem; line-height: 1; flex: none; }
.printsvc h2 { font-size: clamp(1.15rem, 1rem + .7vw, 1.5rem); margin-bottom: 6px; }
.printsvc-head p { font-size: .92rem; color: var(--ink-soft); max-width: 62ch; }
.printsvc-nota {
  /* es la declaración de afiliado: tiene que leerse, así que va en ink-soft
     (7,6:1 en claro) y no en ink-faint, que se quedaba en 3,9:1 */
  margin-top: 12px; font-size: .8rem; line-height: 1.55; color: var(--ink-soft);
  max-width: 74ch;
}
.printsvc-nota strong { color: var(--ink); }
/* guía en español del presupuestador (que solo existe en inglés) */
.printsvc-guia {
  margin-top: 18px; padding: clamp(14px, 2vw, 20px);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.printsvc-guia h3 { font-size: .98rem; margin-bottom: 12px; }
.printsvc-pasos { list-style: none; counter-reset: pasoi; display: grid; gap: 12px; }
.printsvc-pasos li {
  counter-increment: pasoi; position: relative; padding-left: 34px;
  font-size: .88rem; line-height: 1.6; color: var(--ink-soft); max-width: 72ch;
}
.printsvc-pasos li::before {
  content: counter(pasoi); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  /* el número es texto pequeño: el naranja puro se queda en 3,9:1 sobre blanco,
     así que lo oscurecemos un 10 % y usamos la tinta de acento del tema */
  background: color-mix(in srgb, var(--accent) 90%, #000); color: var(--accent-ink);
  font-size: .74rem; font-weight: 700;
  display: grid; place-items: center;
}
.printsvc-pasos strong { color: var(--ink); }
.printsvc-pasos em {
  font-style: normal; font-family: var(--mono, ui-monospace, monospace);
  font-size: .92em; background: var(--surface); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px;
}
.printsvc-pasos code {
  font-size: .92em; background: var(--surface); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px;
}
.printsvc-glosario { margin-top: 14px; }
.printsvc-glosario summary {
  cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--ink-soft);
  padding: 6px 0;
}
.printsvc-glosario summary:hover { color: var(--ink); }
.printsvc-glosario dl {
  margin-top: 8px; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 6px 16px; font-size: .84rem; line-height: 1.5;
}
.printsvc-glosario dt { font-weight: 600; color: var(--ink); }
.printsvc-glosario dd { color: var(--ink-soft); }
@media (max-width: 520px) {
  .printsvc-glosario dl { grid-template-columns: 1fr; gap: 2px; }
  .printsvc-glosario dd { margin-bottom: 8px; }
}
.printsvc-stage { margin-top: 18px; }
.printsvc-stage iframe {
  width: 100%; min-height: 460px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-soft);
}
.printsvc-stage .ts-embed-tslink { font-size: .78rem; color: var(--ink-faint); margin-bottom: 8px; }
.printsvc-stage .ts-embed-tslink a { color: var(--ink-faint); }
.ad-dialog-tip {
  font-size: .86rem; color: var(--ink-soft); background: var(--surface-2);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.5;
}
.ad-dialog-tip a { color: var(--accent); font-weight: 700; }

/* =============================================================
   9. Responsive
   ============================================================= */
@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .uses  { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .tool-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .tool-preview { border-top: 0; border-left: 1px solid var(--line); }
  .preview-inner { position: sticky; top: 78px; }
  .uses { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .header-nav a.hide-sm { display: none; }
  .color-row { grid-template-columns: 1fr; }
  .hero { padding-top: 16px; }
  .hero-head .lead { font-size: .97rem; line-height: 1.55; }
  .hero-badges {
    flex-wrap: nowrap; overflow-x: auto; margin-top: 12px;
    scrollbar-width: none; -ms-overflow-style: none;
    padding-bottom: 2px;
  }
  .hero-badges::-webkit-scrollbar { display: none; }
  .hero-badges .badge { flex: none; font-size: .76rem; padding: 5px 10px; }
  .tool { margin-top: 14px; }
}

/* =============================================================
   10. Reduced motion
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ad-toast { transition: none; }
  .spinner { animation-duration: 2s; }
}

/* Sin JavaScript */
.nojs-warn { display: none; }
html.no-js .nojs-warn {
  display: block; margin-top: 18px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--warn-soft); color: var(--warn); font-size: .9rem; font-weight: 600;
}
html.no-js .tool-grid { display: none; }
