:root {
  --ink: #16243a;
  --muted: #5b6b80;
  --paper: #fffdf8;
  --canvas: #f3f6fb;
  --line: #d9e1ec;
  --blue: #1957d2;
  --blue-dark: #0f3e9f;
  --red: #db2f3c;
  --yellow: #ffc83d;
  --green: #087d5b;
  --orange: #a14d00;
  --radius: 20px;
  --shadow: 0 18px 48px rgba(22, 36, 58, .09);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--blue); }
img, svg { max-width: 100%; }
button, input, select { font: inherit; }
button, .button { cursor: pointer; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .75rem 1rem; background: #fff; border-radius: 10px; }
.skip-link:focus { top: 1rem; }
.shell { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,253,248,.94); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(217,225,236,.9); }
.header-row { min-height: 72px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 850; letter-spacing: -.03em; font-size: 1.13rem; white-space: nowrap; }
.brand-mark { width: 34px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; color: white; background: conic-gradient(from 45deg, var(--red) 0 25%, var(--yellow) 0 50%, var(--red) 0 75%, var(--yellow) 0); box-shadow: inset 0 0 0 5px #fff, 0 0 0 1px var(--line); }
.brand-mark::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--blue-dark); }
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a { color: var(--ink); text-decoration: none; padding: .56rem .72rem; border-radius: 10px; font-size: .93rem; font-weight: 690; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: #eaf0fd; color: var(--blue-dark); }
.header-actions { display: flex; gap: 8px; }
.icon-button { border: 1px solid var(--line); background: white; color: var(--ink); padding: .55rem .72rem; border-radius: 12px; min-width: 42px; }
.menu-button { display: none; }

.notice-bar { background: #fff4c5; border-bottom: 1px solid #f0da7c; color: #604a00; }
.notice-bar .shell { padding-block: .55rem; font-size: .9rem; display: flex; justify-content: space-between; gap: 16px; }
.notice-bar button { background: transparent; border: 0; color: inherit; text-decoration: underline; }

main { min-height: 65vh; }
.hero { padding: 66px 0 46px; background: radial-gradient(circle at 85% 15%, rgba(255,200,61,.28), transparent 26rem), linear-gradient(180deg, #fffdf8, var(--canvas)); }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 48px; }
.eyebrow { margin: 0 0 .65rem; color: var(--red); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 850; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2.5rem, 6vw, 5.4rem); letter-spacing: -.06em; }
h2 { margin: 0 0 1rem; font-size: clamp(1.75rem, 3vw, 2.65rem); letter-spacing: -.045em; }
h3 { margin: 0 0 .65rem; font-size: 1.15rem; letter-spacing: -.02em; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 66ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 46px; padding: .72rem 1rem; border-radius: 13px; border: 1px solid var(--blue); text-decoration: none; font-weight: 780; background: var(--blue); color: white; }
.button:hover { color: white; background: var(--blue-dark); }
.button.secondary { color: var(--ink); background: white; border-color: var(--line); }
.button.secondary:hover { color: var(--blue-dark); border-color: #aebbd0; }
.button.small { min-height: 38px; padding: .48rem .72rem; font-size: .9rem; }

.clock-panel { background: #101d33; color: white; border-radius: 28px; padding: 28px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.clock-panel::before { content: ""; position: absolute; width: 200px; height: 200px; right: -85px; top: -85px; border: 28px solid rgba(255,200,61,.95); border-radius: 50%; }
.clock-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.16); position: relative; }
.clock-row:last-child { border-bottom: 0; }
.clock-label { color: #bdc9dd; font-size: .9rem; }
.clock-value { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1; font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: -.045em; }
.clock-date { color: #e1e7f0; font-size: .88rem; }
.zone-badge { align-self: start; color: #0e1b30; background: var(--yellow); padding: .25rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 850; }

.section { padding: 56px 0; }
.section.white { background: var(--paper); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.section-head p { max-width: 58ch; margin: 0; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 7px 22px rgba(22,36,58,.04); }
.card p { color: var(--muted); }
.card p:last-child { margin-bottom: 0; }
.card-link { color: inherit; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #eaf0fd; margin-bottom: 18px; font-size: 1.4rem; }
.mini-label { color: var(--muted); font-size: .8rem; font-weight: 760; text-transform: uppercase; letter-spacing: .06em; }
.big-number { font-size: 2rem; letter-spacing: -.04em; font-weight: 850; font-variant-numeric: tabular-nums; }
.comparison-lead { color: var(--ink) !important; font-size: 1.08rem; font-weight: 780; }
.time-summary { margin-top: 18px; }
.metric-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.metric-row:last-child { border-bottom: 0; }

.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: .28rem .55rem; font-size: .75rem; font-weight: 830; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.official { color: #086749; background: #e4f6ef; }
.status.provisional { color: #875100; background: #fff0cc; }
.status.pending { color: #665f72; background: #efedf3; }
.source-box { border-left: 4px solid var(--green); background: #effaf6; padding: 16px 18px; border-radius: 0 14px 14px 0; color: #284c42; }
.source-box p { margin: .3rem 0; }
.updated { color: var(--muted); font-size: .86rem; }

.page-hero { padding: 46px 0 34px; background: var(--paper); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem,5vw,4rem); max-width: 20ch; }
.breadcrumbs { width: min(calc(100% - 32px), var(--max)); margin: 16px auto 0; display: flex; gap: .5rem; flex-wrap: wrap; color: var(--muted); font-size: .86rem; }
.breadcrumbs a { color: inherit; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 38px; align-items: start; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.3rem; }
.prose h3 { margin-top: 1.7rem; }
.prose p, .prose li { color: #35445a; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; background: white; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.prose th, .prose td { padding: .78rem .9rem; text-align: left; border-bottom: 1px solid var(--line); }
.prose th { background: #eef3fb; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.prose tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 520px; }
.aside { position: sticky; top: 96px; }
.aside .card + .card { margin-top: 16px; }
.toc a { display: block; padding: .46rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .92rem; }
.toc a:last-child { border-bottom: 0; }

.tool { background: white; border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label { font-size: .88rem; font-weight: 760; }
.field input, .field select { width: 100%; min-height: 48px; border: 1px solid #b8c4d5; border-radius: 12px; background: white; color: var(--ink); padding: .7rem .8rem; }
.field input:focus, .field select:focus { outline: 3px solid rgba(25,87,210,.18); border-color: var(--blue); }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span { display: inline-block; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: white; }
.check-pill input:checked + span { background: #e9effd; border-color: var(--blue); color: var(--blue-dark); }
.tool-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.result { margin-top: 22px; padding: 20px; border-radius: 16px; background: #eef4ff; border: 1px solid #c9d8fa; }
.result:empty { display: none; }
.result strong { font-size: 1.15rem; }
.bridge-card { border-left: 5px solid var(--blue); margin-top: 12px; padding: 16px; background: white; border-radius: 10px; }
.warning { background: #fff5e8; border: 1px solid #f0c790; color: #6d3e00; border-radius: 14px; padding: 14px 16px; }
.success { background: #e8f8f1; border: 1px solid #a9ddca; color: #155844; border-radius: 14px; padding: 14px 16px; }

.calendar-list { list-style: none; margin: 0; padding: 0; }
.calendar-list li { display: grid; grid-template-columns: 86px 1fr auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.date-chip { display: grid; place-items: center; min-height: 58px; padding: .35rem; color: var(--blue-dark); background: #eaf0fd; border-radius: 12px; font-weight: 850; font-variant-numeric: tabular-nums; text-align: center; }
.calendar-list .scope { color: var(--muted); font-size: .84rem; }
.link-list { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--line); }
.link-list a { display: flex; justify-content: space-between; gap: 16px; background: white; color: var(--ink); text-decoration: none; padding: 14px 16px; }
.link-list a:hover { background: #f6f8fc; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; border: 1px solid var(--line); background: white; border-radius: 999px; padding: .36rem .65rem; color: var(--ink); text-decoration: none; font-size: .86rem; }

.search-dialog, .profile-dialog { width: min(640px, calc(100% - 24px)); border: 0; border-radius: 22px; padding: 0; box-shadow: 0 28px 90px rgba(10,20,40,.3); }
dialog::backdrop { background: rgba(10,18,32,.58); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.25rem; margin: 0; }
.dialog-body { padding: 20px; }
.dialog-close { border: 0; background: #edf1f7; width: 38px; height: 38px; border-radius: 50%; }
.search-results { margin-top: 12px; max-height: 360px; overflow: auto; }
.search-results a { display: block; padding: 11px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }

.ad-slot { min-height: 0; overflow: hidden; text-align: center; color: #77859a; font-size: .75rem; }
.ad-slot[data-enabled="true"] { min-height: 120px; margin: 28px 0; padding: 14px; border: 1px dashed #b9c4d3; background: #f8fafc; }
.ad-slot[data-enabled="true"]::before { content: "PUBLICIDAD"; }

.site-footer { background: #101d33; color: #e7edf7; padding: 46px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr repeat(3,1fr); gap: 36px; }
.site-footer h2, .site-footer h3 { color: white; font-size: 1rem; }
.site-footer p { color: #b9c5d7; }
.site-footer a { color: #dbe7ff; display: block; margin: .45rem 0; text-decoration: none; }
.footer-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.15); color: #a9b7cb; font-size: .85rem; display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 950px) {
  .menu-button { display: inline-block; }
  .main-nav { display: none; position: absolute; inset: 72px 16px auto; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); }
  .main-nav.open { display: grid; }
  .hero-grid, .content-layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .grid.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .shell { width: min(calc(100% - 22px), var(--max)); }
  .header-row { min-height: 64px; }
  .brand span:last-child { display: none; }
  .main-nav { inset-block-start: 64px; }
  .hero { padding-top: 38px; }
  .hero-grid { gap: 28px; }
  .grid.two, .grid.three, .grid.four, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .section-head { align-items: start; flex-direction: column; }
  .calendar-list li { grid-template-columns: 72px 1fr; }
  .calendar-list li > :last-child { grid-column: 2; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; }
}

@media print {
  .site-header, .notice-bar, .site-footer, .ad-slot, .hero-actions, .aside { display: none !important; }
  body { background: white; color: black; }
  .section, .page-hero { padding: 16px 0; }
  .card, .tool { box-shadow: none; }
}
