/* Spain Prescription · identidad de la presentación definitiva v1.0 */
:root {
  color-scheme: light;
  --petrol: #0d3a4e;
  --petrol-2: #124a62;
  --teal: #127b8a;
  --teal-mid: #248593;
  --teal-deep: #0e6c7a;
  --mist: #e5f1f3;
  --line: #cfe3e7;
  --red: #b3261e;
  --red-dark: #8f1d17;
  --rose: #fae9e9;
  --ink: #1b2b33;
  --muted: #4a5e68;
  --bar: 7.4rem;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(13 58 78 / .06), 0 8px 24px -12px rgb(13 58 78 / .18);
  font-family: Arial, "Liberation Sans", Helvetica, sans-serif;
  background: white;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar) + 1rem); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; line-height: 1.6; font-size: 1.0625rem; -webkit-font-smoothing: antialiased; }
p, ul, ol { margin: 0 0 1rem; }
a { color: var(--teal-deep); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--petrol); }
:focus-visible { outline: 3px solid #e9a432; outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0 0 .8rem; line-height: 1.15; color: var(--petrol); letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }
.shell { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.prose > *, .faq > * { max-width: 53rem; }
.shell.prose { margin-inline: auto; }
main.shell.prose { max-width: 53rem; }
.skip { position: fixed; z-index: 8; background: white; padding: .6rem; translate: 0 -120%; }
.skip:focus { translate: 0 0; }

/* Cabecera fija */
.topbar { position: sticky; top: 0; z-index: 4; background: rgb(255 255 255 / .96); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line), 0 6px 18px -14px rgb(13 58 78 / .5); }
.topline { background: var(--petrol); color: white; }
.topline-inner { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .8125rem; min-height: 2.25rem; }
.languages { display: flex; align-items: center; gap: .2rem; }
.languages a { min-width: 2.1rem; display: grid; place-items: center; padding: .2rem .35rem; color: white; text-decoration: none; border-radius: 999px; font-weight: 700; font-size: .8125rem; }
.languages a:hover { background: rgb(255 255 255 / .14); color: white; }
.languages a[aria-current="page"] { color: var(--petrol); background: white; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; padding-block: .65rem; }

/* Botones */
.button { display: inline-flex; min-height: 3.5rem; align-items: center; justify-content: center; gap: .55rem; text-align: center; line-height: 1.2; padding: .65rem 1.2rem; border-radius: 10px; border: 1.5px solid transparent; font-weight: 700; font-size: 1.0625rem; text-decoration: none; overflow-wrap: anywhere; transition: background-color .15s, transform .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 1.35rem; height: 1.35rem; flex: none; }
.button.outline { color: var(--petrol); background: white; border-color: var(--teal); }
.button.outline:hover { background: var(--mist); color: var(--petrol); }
.button.primary { background: var(--teal); color: white; box-shadow: 0 6px 14px -8px rgb(18 123 138 / .8); }
.button.primary:hover { background: var(--teal-deep); color: white; }
.button.danger { background: var(--red); color: white; box-shadow: 0 6px 14px -8px rgb(179 38 30 / .8); }
.button.danger:hover { background: var(--red-dark); color: white; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }
.inline-actions .button { min-height: 3rem; font-size: 1rem; }

/* Hero */
.hero { position: relative; overflow: hidden; color: white; padding-block: 4.5rem 4.75rem;
  background:
    radial-gradient(60rem 30rem at 85% 10%, rgb(36 133 147 / .38), transparent 60%),
    radial-gradient(40rem 26rem at 0% 100%, rgb(18 123 138 / .22), transparent 60%),
    var(--petrol); }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 3rem; }
.hero h1 { color: white; max-width: 15ch; }
.hero-copy > h1 + p { font-size: 1.1875rem; max-width: 52ch; color: #eaf5f7; }
.hero-copy > p:last-child { display: inline-flex; align-items: center; gap: .5rem; margin: .5rem 0 0; padding: .4rem .85rem; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; font-size: .875rem; color: #d9eef1; }
.hero-copy > p:last-child::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: #7fd0da; flex: none; }
.hero-art { justify-self: end; width: min(100%, 22rem); aspect-ratio: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke-linecap='round'%3E%3Cpath d='M100 14a86 86 0 0 1 86 86' stroke='%2337a3b2' stroke-width='9'/%3E%3Cpath d='M100 186a86 86 0 0 1-86-86' stroke='%2337a3b2' stroke-width='9'/%3E%3Cpath d='M30 52a86 86 0 0 1 40-31' stroke='%23ffffff' stroke-opacity='.5' stroke-width='5'/%3E%3Cpath d='M170 148a86 86 0 0 1-40 31' stroke='%23ffffff' stroke-opacity='.5' stroke-width='5'/%3E%3Cpath d='M100 36a64 64 0 0 1 64 64' stroke='%23ffffff' stroke-opacity='.85' stroke-width='6'/%3E%3Cpath d='M100 164a64 64 0 0 1-64-64' stroke='%23ffffff' stroke-opacity='.85' stroke-width='6'/%3E%3Cpath d='M86 70h28v16h16v28h-16v16H86v-16H70V86h16z' stroke='%23ffffff' stroke-width='6' stroke-linejoin='round'/%3E%3Cpath d='M100 113s-11-7-11-14a5.5 5.5 0 0 1 11-1 5.5 5.5 0 0 1 11 1c0 7-11 14-11 14z' fill='%23e5f1f3' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Banda de emergencias */
.emergency-band { background: var(--rose); border-bottom: 1px solid #efc9c6; }
.emergency-inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.4rem; padding-block: 1.4rem; }
.emergency-text { order: 2; }
.emergency-text h2 { font-size: 1.375rem; color: var(--red); margin-bottom: .35rem; }
.emergency-text p { margin: 0; color: var(--ink); max-width: 75ch; }
.badge-112 { order: 1; flex-direction: column; gap: 0; min-width: 8.5rem; min-height: 4.5rem; padding: .5rem 1rem; }
.badge-112 svg { display: none; }
.badge-112 strong { font-size: 1.75rem; line-height: 1; letter-spacing: .02em; }
.badge-112 span { font-size: .8125rem; font-weight: 700; }

.draft { display: inline-block; color: #6a4a00; background: #fff4d6; border: 1px solid #f0dca3; border-radius: 999px; padding: .25rem .8rem; margin: 1.25rem 0 0; font-size: .8125rem; }

/* Secciones */
.band { padding-block: 4rem; }
.band > h2 + p, .band .shell > h2 + p { color: var(--muted); font-size: 1.0625rem; margin-bottom: 1.6rem; }
.tinted { background: var(--mist); }
main > section[id], main > aside[id] { scroll-margin-top: calc(var(--bar) + 1rem); }

/* Opciones */
.options-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; counter-reset: opt; }
.option-card { position: relative; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); counter-increment: opt; }
.option-card::after { content: counter(opt); position: absolute; top: 1.5rem; right: 1.5rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: white; font-weight: 700; font-size: .95rem; }
.option-icon { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 12px; background: var(--mist); color: var(--teal); margin-bottom: 1.1rem; }
.option-icon svg { width: 1.6rem; height: 1.6rem; }
.option-card h3 { padding-right: 2.5rem; }
.option-card ul { padding-left: 1.2rem; }
.option-card > .button { margin-top: .4rem; }
.small { font-size: .875rem; color: var(--muted); margin: .7rem 0 0; }
li { margin-bottom: .45rem; }
li::marker { color: var(--teal); }

/* Cómo funciona */
.steps { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; counter-reset: step; }
.steps li { position: relative; margin: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.35rem 1.25rem; box-shadow: var(--shadow); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .85rem; border-radius: 50%; background: var(--mist); color: var(--petrol); font-weight: 700; font-size: .95rem; }
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 2.35rem; right: -1rem; width: 1rem; height: 2px; background: var(--teal-mid); opacity: .45; }
.steps strong { display: block; color: var(--petrol); margin-bottom: .35rem; line-height: 1.3; }
.steps span { color: var(--ink); font-size: .975rem; }
.how > p { color: var(--muted); }
.how-pair { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.25rem; margin-top: 1.75rem; align-items: start; }
.expect { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.expect ul { padding-left: 1.2rem; }
.emergency.compact { background: var(--rose); border: 1px solid #efc9c6; border-radius: var(--radius); padding: 1.6rem; }
.emergency.compact h3 { color: var(--red); }

/* Receta */
.rx { position: relative; padding-left: 5.25rem; }
.rx::before { content: ""; position: absolute; left: 0; top: 4rem; width: 3.75rem; height: 3.75rem; border-radius: 14px; background: var(--mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23127b8a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2' width='12' height='20' rx='2.5'/%3E%3Cpath d='M9.5 7h3a1.75 1.75 0 0 1 0 3.5h-3V7Zm0 3.5V14m2-3.5 3 3.5'/%3E%3Cpath d='M11 18.5h2'/%3E%3C/svg%3E") center / 1.9rem no-repeat; }
.rx ul { list-style: none; padding: 0; display: grid; gap: .55rem; }
.rx li { margin: 0; padding: .75rem 1rem; border-left: 3px solid var(--teal); background: #f6fbfc; border-radius: 0 10px 10px 0; }

/* Antes de elegir */
.checklist ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.checklist li { display: flex; gap: .85rem; align-items: flex-start; margin: 0; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.check { flex: none; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--teal); color: white; }
.check svg { width: 1rem; height: 1rem; }
.checklist strong { display: block; color: var(--petrol); margin-bottom: .2rem; }
.checklist li span:not(.check) { color: var(--muted); font-size: .95rem; }

/* Cómo acceder */
.access { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.access-copy ol { padding-left: 1.3rem; }
.access-copy ol li::marker { font-weight: 700; }
.access-panel { position: relative; overflow: hidden; background: var(--petrol); border-radius: 18px; padding: 2.25rem 1.75rem; box-shadow: 0 18px 40px -22px rgb(13 58 78 / .7); }
.access-panel::before { content: ""; position: absolute; inset: -40% -30% auto auto; width: 18rem; height: 18rem; border-radius: 50%; border: 22px solid rgb(36 133 147 / .35); }
.access-panel .inline-actions { position: relative; flex-direction: column; margin: 0; }
.access-panel .button { width: 100%; }
.access-panel .button.outline { background: transparent; color: white; border-color: rgb(255 255 255 / .45); }
.access-panel .button.outline:hover { background: rgb(255 255 255 / .1); }

/* FAQ */

.faq-group { margin-top: 2rem; }
.faq-group h3 { font-size: .9375rem; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); margin-bottom: .4rem; }
.faq-group details { border-bottom: 1px solid var(--line); }
.faq-group summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-weight: 700; color: var(--petrol); padding-block: 1rem; }
.faq-group summary::-webkit-details-marker { display: none; }
.faq-group summary::after { content: "+"; flex: none; width: 1.75rem; height: 1.75rem; display: grid; place-items: center; border-radius: 50%; color: var(--teal); font-size: 1.35rem; font-weight: 400; line-height: 1; transition: background-color .15s; }
.faq-group summary:hover::after { background: white; }
.faq-group details[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 1rem; color: var(--muted); }
.faq-answer p:last-child { margin-bottom: 0; }

/* Pie */
.footer { background: var(--petrol); color: #d9eef1; padding-block: 3rem; font-size: .9375rem; }
.footer-inner > * { max-width: 53rem; }
.footer-name { display: flex; align-items: center; gap: .75rem; font-weight: 700; font-size: 1.25rem; color: white; }
.footer-name img { border-radius: 50%; background: white; padding: 2px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 1.25rem; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / .15); }
.legal-links a { color: white; }

/* Páginas legales */
.prose > a[data-language]:first-child { display: flex; width: fit-content; margin-bottom: .25rem; align-items: center; gap: .35rem; font-weight: 700; text-decoration: none; }
.prose > a[data-language]:first-child::before { content: "←"; }
.prose section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Tableta */
@media (max-width: 64rem) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::after { display: none; }
  .checklist ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { width: min(100%, 16rem); }
}

/* Móvil */
@media (max-width: 45rem) {
  :root { --bar: 7.25rem; }
  body { font-size: 1rem; }
  h1 { font-size: 1.875rem; }
  h2 { font-size: 1.5rem; }
  .shell { width: min(100% - 1.5rem, 70rem); }
  .topline-inner { font-size: .75rem; min-height: 2.1rem; }
  .languages a { min-width: 1.75rem; padding: .18rem .3rem; font-size: .75rem; }
  .actions { gap: .35rem; padding-block: .45rem; }
  .actions .button { min-height: 3.75rem; padding: .3rem .2rem; font-size: .78rem; flex-direction: column; gap: .2rem; border-radius: 9px; }
  .actions .button svg { width: 1.15rem; height: 1.15rem; }
  .button:hover { transform: none; }
  .hero { padding-block: 2rem 2.25rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero-copy > h1 + p { font-size: 1.0625rem; }
  .emergency-inner { grid-template-columns: 1fr; gap: .9rem; padding-block: 1.2rem; }
  .emergency-text { order: 1; }
  .badge-112 { order: 2; min-height: 3.5rem; flex-direction: row; gap: .6rem; }
  .badge-112 strong { display: none; }
  .badge-112 svg { display: block; }
  .band { padding-block: 2.5rem; }
  .options-grid, .steps, .checklist ul, .how-pair, .access { grid-template-columns: 1fr; }
  .option-card, .expect, .emergency.compact { padding: 1.3rem; }
  .rx { padding-left: 0; }
  .rx::before { position: static; display: block; margin-bottom: 1rem; width: 3.25rem; height: 3.25rem; }
  .access { gap: 1.5rem; }
  .access-panel { padding: 1.5rem 1.25rem; }
  .inline-actions .button { flex: 1 1 100%; }
}

/* Datos pendientes del titular (se sustituyen antes de publicar) */
.footer-ids { font-size: .875rem; color: #c3dfe4; }
.footer-ids mark { background: #ffe58a; color: #3b2c00; padding: 0 .25em; border-radius: 3px; }

/* Textos web v0.4.4 */
.eyebrow { margin: 0 0 .9rem; font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7fd0da; }
.access-panel .panel-note { position: relative; margin: -.2rem 0 .5rem; font-size: .875rem; color: #c3dfe4; text-align: center; }
.footer-cookies { margin: 1rem 0 0; font-size: .875rem; color: #c3dfe4; }
.footer a { color: white; }
mark { background: #ffe58a; color: #3b2c00; padding: 0 .25em; border-radius: 3px; }

/* Página legal */
.legal-top { position: sticky; top: 0; z-index: 4; background: var(--petrol); }
.legal-top-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; min-height: 3.25rem; padding-block: .4rem; }
.legal-top a { color: white; text-decoration: none; font-weight: 700; font-size: .9375rem; }
.legal-back::before { content: "← "; }
.legal-toc { display: flex; gap: .35rem; }
.legal-toc a { padding: .3rem .75rem; border-radius: 999px; font-weight: 400; }
.legal-toc a:hover { background: rgb(255 255 255 / .14); color: white; }
.legal-page { --bar: 3.25rem; }
.legal-page main h1 { margin-top: 1rem; }
.legal-page .lead { color: var(--muted); font-size: 1.125rem; }
.legal-page section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.legal-page h3 { font-size: 1.0625rem; margin-top: 1.6rem; }
.legal-data { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0 0 1rem; padding: 1.1rem 1.25rem; background: var(--mist); border-radius: var(--radius); }
.legal-data dt { font-weight: 700; color: var(--petrol); }
.legal-data dd { margin: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); }
.legal-page table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.legal-page th { background: var(--petrol); color: white; text-align: left; padding: .65rem .8rem; font-size: .875rem; }
.legal-page td { padding: .7rem .8rem; vertical-align: top; border-top: 1px solid var(--line); }
.legal-page tbody tr:nth-child(even) td { background: #f6fbfc; }
.updated { font-size: .875rem; color: var(--muted); font-style: italic; }
@media (max-width: 45rem) {
  .legal-toc { width: 100%; }
  .legal-data { grid-template-columns: 1fr; gap: .1rem; }
  .legal-data dd { margin-bottom: .5rem; }
  .legal-page table { min-width: 36rem; }
}
