/* Diario Demo. Flexbox only (no grid, no gap on flex): 2018 televisions
   run Chrome 53. */
:root {
  --ink: #111827;
  --muted: #5b6474;
  --line: #e3e6eb;
  --paper: #ffffff;
  --soft: #f5f6f8;
  --navy: #0b1f3a;
  --accent: #b45309;
  --ok: #047857;
  --ok-soft: #e7f6ef;
  --deportes: #0f766e;
  --viajes: #b45309;
  --motor: #1d4ed8;
  --cocina: #be123c;
}

/* Blocks for one segment stay hidden until the CDP answers (personalize.ts). */
[data-cdp-show]:not([data-cdp-on]),
[data-cdp-hide][data-cdp-off] {
  display: none !important;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
a { color: inherit; }
img, svg { max-width: 100%; }
code { font: 13px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--soft); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
h1, h2, h3, .logo, .card-title { font-family: Georgia, 'Times New Roman', serif; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: #b91c1c; }
.ok { color: var(--ok); }

.c-deportes { color: var(--deportes); }
.c-viajes { color: var(--viajes); }
.c-motor { color: var(--motor); }
.c-cocina { color: var(--cocina); }
.b-deportes { border-color: var(--deportes) !important; }
.b-viajes { border-color: var(--viajes) !important; }
.b-motor { border-color: var(--motor) !important; }
.b-cocina { border-color: var(--cocina) !important; }

.button {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
}
.button.secondary { background: #fff; color: var(--navy); }
.button.small { font-size: 14px; padding: 7px 12px; min-height: 36px; }
.button[disabled] { opacity: 0.6; cursor: wait; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }

/* Bar that says this is a demo. */
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #e5ecf6;
  font-size: 14px;
  padding: 8px 16px;
  text-align: center;
}
.demo-bar > * { margin: 2px 8px; }
.demo-bar-button { font: inherit; font-weight: 600; background: #fbbf24; color: #1f2937; border: 0; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
@media (min-width: 1100px) { .demo-bar-button { display: none; } }

/* Masthead. */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { text-align: center; padding: 20px 16px 8px; }
.date { margin: 0; color: var(--muted); font-size: 13px; }
.logo { display: inline-block; font-size: 44px; font-weight: 700; letter-spacing: -1px; text-decoration: none; margin: 4px 0; }
.tagline { margin: 0; color: var(--muted); font-style: italic; }
.nav { display: flex; flex-wrap: wrap; justify-content: center; border-top: 1px solid var(--line); margin-top: 12px; padding: 4px 8px; }
.nav a { text-decoration: none; padding: 10px 12px; font-weight: 600; font-size: 15px; border-bottom: 3px solid transparent; }
.nav a[aria-current='page'] { border-bottom-color: var(--ink); }
.nav a:hover { color: var(--navy); }

/* Page with the panel at the side on wide screens. */
.layout { display: flex; align-items: flex-start; max-width: 1360px; margin: 0 auto; padding: 0 16px; }
main { flex: 1 1 auto; min-width: 0; padding: 24px 0 48px; }
main:focus { outline: none; }

.block-title { font-size: 22px; border-top: 3px solid var(--ink); padding-top: 8px; margin: 32px 0 12px; }
.kicker { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; text-decoration: none; margin: 8px 0 2px; }

.grid { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.card { width: 100%; padding: 0 10px 20px; }
@media (min-width: 640px) { .card { width: 50%; } }
@media (min-width: 900px) { .card { width: 33.333%; } }
.card-link { display: block; text-decoration: none; }
.card-link:hover .card-title { text-decoration: underline; }
.card-title { font-size: 20px; line-height: 1.25; margin: 2px 0 6px; }
.card-dek { margin: 0; color: var(--muted); font-size: 15px; }
.card-lead .card-title { font-size: 34px; }
.card-lead .card-dek { font-size: 18px; }
.card-lead { padding: 0; width: 100% !important; }
.picture { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--navy); }
.picture-small { aspect-ratio: 16 / 9; }

/* «Para ti»: blocks shown by segment. */
.for-you-row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
.for-you-card { flex: 1 1 260px; margin: 0 8px 16px; border: 1px solid var(--line); border-left: 4px solid var(--navy); border-radius: 6px; padding: 12px 16px; background: var(--soft); }
.for-you-card p { margin: 4px 0; }
.for-you-card ul { margin: 6px 0 0; padding-left: 18px; }
.for-you-card li { margin-bottom: 6px; }
.for-you-card.offer { border-left-color: #f59e0b; background: #fffbeb; }

.newsletter-box { margin-top: 32px; padding: 20px; border-radius: 8px; background: var(--soft); border: 1px solid var(--line); }
.newsletter-box .block-title { border: 0; margin: 0 0 8px; padding: 0; }
.newsletter-box.done { background: var(--ok-soft); border-color: #b7e4cf; }

.section-head { border-left: 6px solid var(--navy); padding: 4px 0 4px 16px; margin: 8px 0 20px; }
.section-head h1 { margin: 0; font-size: 36px; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.story { max-width: 720px; }
.story h1 { font-size: 36px; line-height: 1.15; margin: 6px 0 10px; }
.story .dek { font-size: 20px; color: var(--muted); margin: 0 0 8px; }
.story .byline { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.story .picture { margin-bottom: 20px; }
.story .note { margin-top: 24px; padding: 12px 16px; border-left: 4px solid #f59e0b; background: #fffbeb; font-size: 15px; }

.form-page { max-width: 560px; }
.form label { display: block; font-weight: 600; margin: 16px 0 6px; }
.form input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #9aa3af; border-radius: 8px; min-height: 44px; }
.form input[aria-invalid='true'] { border-color: #b91c1c; }
.form .error { margin: 6px 0 0; font-size: 14px; }
.form .button { margin-top: 16px; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; padding: 24px 16px 96px; }

/* Consent banner. */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid #c9ced6; box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12); }
.consent[hidden] { display: none; }
.consent-inner { max-width: 760px; margin: 0 auto; padding: 16px; }
.consent h2 { margin: 0 0 6px; font-size: 20px; }
.consent p { margin: 6px 0; font-size: 15px; }
.consent-actions { margin-top: 10px; }
.consent-actions .button { margin: 4px 8px 4px 0; }

/* The panel: a column on wide screens, a sheet below. */
.panel { font-size: 14px; }
.panel-inner { padding: 16px 0; }
.panel-head { display: flex; align-items: center; margin-bottom: 12px; }
.panel-head h2 { flex: 1 1 auto; font-size: 20px; margin: 0; }
.live { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; color: var(--ok); text-transform: uppercase; letter-spacing: 0.06em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; margin-right: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
.panel-close { display: none; font-size: 28px; line-height: 1; background: none; border: 0; cursor: pointer; padding: 4px 8px; margin-left: 8px; min-width: 44px; min-height: 44px; }

.panel-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.panel-card h3 { font-family: inherit; font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; }
.panel-card h4 { font-size: 13px; margin: 12px 0 6px; }
.panel-card p { margin: 6px 0; }
.count { margin-left: auto; font-weight: 600; font-size: 12px; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: flex-start; margin: 6px 0; }
.tick { flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c3c9d2; margin-right: 8px; font-size: 12px; line-height: 16px; text-align: center; color: #fff; }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); }
.steps li.done > span:last-child { color: var(--muted); text-decoration: line-through; }

.facts { margin: 0; }
.facts div { display: flex; flex-wrap: wrap; padding: 5px 0; border-bottom: 1px solid var(--soft); }
.facts dt { flex: 0 0 130px; color: var(--muted); }
.facts dd { flex: 1 1 160px; margin: 0; min-width: 0; }

.segments { list-style: none; margin: 0; padding: 0; }
.segment { display: flex; align-items: flex-start; padding: 7px 6px; border-radius: 8px; transition: background-color 0.6s; }
.segment.in { background: var(--ok-soft); }
.segment.fresh { background: #fde68a; }
.segment + .segment { margin-top: 4px; }
.segment-text { flex: 1 1 auto; min-width: 0; }
.pill { flex: 0 0 auto; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; margin: 1px 8px 0 0; text-transform: uppercase; letter-spacing: 0.04em; min-width: 54px; text-align: center; }
.pill-in { background: var(--ok); color: #fff; }
.pill-out { background: #e5e7eb; color: #374151; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; background: #e0e7ff; color: #3730a3; border-radius: 4px; padding: 0 5px; vertical-align: 1px; }
.badge-batch { background: #f3f4f6; color: #4b5563; }

.events { list-style: none; margin: 0; padding: 0; }
.events li { display: flex; padding: 4px 0; border-bottom: 1px solid var(--soft); }
.events time { flex: 0 0 64px; color: var(--muted); font-variant-numeric: tabular-nums; }

.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--soft); }
.kv li > * { margin-right: 8px; }
.kv code { margin-left: auto; }

.platforms { list-style: none; margin: 0; padding: 0; }
.platforms li { padding: 5px 0; border-bottom: 1px solid var(--soft); }
.platforms strong { display: block; }
.platforms span { color: var(--muted); }

.qr { text-align: center; margin-top: 10px; }
.qr svg { width: 180px; height: 180px; }
.panel-card .button { margin-top: 10px; }
.panel-foot { padding: 4px 0 24px; }
.panel-foot > * { margin: 6px 12px 6px 0; }
.panel-foot p { margin: 8px 0; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; font-weight: 600; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3); transition: opacity 0.5s; max-width: calc(100% - 32px); text-align: center; }
.toast-out { opacity: 0; }

@media (min-width: 1100px) {
  .panel { flex: 0 0 380px; width: 380px; margin-left: 32px; position: -webkit-sticky; position: sticky; top: 0; max-height: 100vh; overflow-y: auto; }
  .panel-inner { padding: 24px 4px 24px 0; }
}
@media (max-width: 1099px) {
  .panel { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; max-height: 85vh; overflow-y: auto; background: var(--soft); border-top: 1px solid #c9ced6; box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.25); border-radius: 16px 16px 0 0; transform: translateY(105%); transition: transform 0.25s; visibility: hidden; }
  .panel-inner { padding: 12px 16px 24px; }
  .panel-open .panel { transform: none; visibility: visible; }
  .panel-close { display: block; }
}
@media (max-width: 640px) {
  .logo { font-size: 34px; }
  .card-lead .card-title { font-size: 26px; }
  .story h1 { font-size: 28px; }
}
