:root {
    --navy-deep: #0A1526;
    --navy: #12233F;
    --navy-mid: #1B3357;
    --steel: #7E93B0;
    --steel-soft: #B9C6D9;
    --paper: #F2F5FA;
    --paper-dim: #E4E9F2;
    --ink: #0E1C31;
    --line-on-paper: #D7DEEA;
    --line-on-navy: rgba(242, 245, 250, 0.14);
    --shadow: 0 18px 40px -22px rgba(10, 21, 38, 0.35);
    --font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;
    --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #0A1526;
      --paper-dim: #0E1C31;
      --ink: #F2F5FA;
      --line-on-paper: rgba(185, 198, 217, 0.18);
      --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
    }
  }

  :root[data-theme="dark"] {
    --paper: #0A1526;
    --paper-dim: #0E1C31;
    --ink: #F2F5FA;
    --line-on-paper: rgba(185, 198, 217, 0.18);
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  }

  * { box-sizing: border-box; }

  html, body {
    margin: 0;
    padding: 0;
  }

  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  a { color: inherit; text-decoration: none; }

  .mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
  }

  /* ---------- Skip link ---------- */
  .skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--steel);
    color: var(--navy-deep);
    padding: 10px 16px;
    z-index: 1000;
    font-weight: 600;
  }
  .skip-link:focus {
    left: 12px;
    top: 12px;
  }

  :focus-visible {
    outline: 2px solid var(--steel);
    outline-offset: 3px;
  }

  /* ---------- Masthead accent ---------- */
  .masthead-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--steel) 0%, var(--steel-soft) 50%, var(--steel) 100%);
  }

  /* ---------- Header ---------- */
  .site-header {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--paper, #F2F5FA);
  }

  .masthead {
    position: sticky;
    top: 0;
    z-index: 40;
    background:
      repeating-linear-gradient(135deg, rgba(242,245,250,0.025) 0px, rgba(242,245,250,0.025) 1px, transparent 1px, transparent 7px),
      linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
    transition: box-shadow .3s ease;
  }
  .masthead.is-scrolled {
    box-shadow: 0 16px 32px -20px rgba(0, 0, 0, 0.55);
  }
  .masthead.is-scrolled .header-inner {
    padding-top: 13px;
    padding-bottom: 11px;
  }
  .masthead.is-scrolled .brand-mark {
    width: 30px;
    height: 30px;
  }

  .header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 28px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    transition: padding .25s ease;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    transition: width .25s ease, height .25s ease;
  }

  .brand-word {
    line-height: 1;
  }
  .brand-word .info {
    display: block;
    font-weight: 800;
    font-size: 19px;
    letter-spacing: 0.14em;
    color: #F2F5FA;
  }
  .brand-word .imob {
    display: block;
    font-weight: 500;
    font-size: 10.5px;
    letter-spacing: 0.22em;
    color: var(--steel-soft);
    margin-top: 3px;
  }

  .primary-nav {
    display: flex;
    align-items: center;
    gap: 28px;
  }
  .primary-nav ul {
    list-style: none;
    display: flex;
    gap: 22px;
    margin: 0;
    padding: 0;
  }
  .primary-nav a {
    position: relative;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--steel-soft);
    letter-spacing: 0.01em;
    padding-bottom: 4px;
    transition: color .15s ease;
  }
  .primary-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--steel);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
  }
  .primary-nav a:hover,
  .primary-nav a:focus-visible {
    color: #F2F5FA;
  }
  .primary-nav a:hover::after,
  .primary-nav a:focus-visible::after {
    transform: scaleX(1);
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .btn-newsletter {
    background: var(--steel);
    color: var(--navy-deep);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 0.03em;
    padding: 10px 18px;
    border-radius: 999px;
    white-space: nowrap;
    transition: filter .15s ease;
  }
  .btn-newsletter:hover, .btn-newsletter:focus-visible {
    filter: brightness(1.08);
  }

  .nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line-on-navy);
    border-radius: 8px;
    padding: 8px 10px;
    color: #F2F5FA;
  }

  /* ---------- Indicators strip ---------- */
  .indicators {
    background: var(--navy-deep);
    border-top: 1px solid var(--line-on-navy);
    border-bottom: 1px solid var(--line-on-navy);
    overflow: hidden;
  }
  .indicators-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: stretch;
  }
  .indicators-label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px 9px 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--steel-soft);
    border-right: 1px solid var(--line-on-navy);
    margin-right: 18px;
    white-space: nowrap;
  }
  .indicators-label .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #8FD6A8;
    box-shadow: 0 0 0 3px rgba(143, 214, 168, 0.18);
  }
  @media (prefers-reduced-motion: no-preference) {
    .indicators-label .dot {
      animation: dot-pulse 2.2s ease-in-out infinite;
    }
  }
  @keyframes dot-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(143, 214, 168, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(143, 214, 168, 0); }
  }
  .indicators-track {
    flex: 1;
    overflow: hidden;
    padding: 9px 0;
  }
  .indicators-track-inner {
    display: flex;
    width: max-content;
  }
  .indicators-set {
    display: flex;
    gap: 32px;
    padding-right: 32px;
    flex-shrink: 0;
  }
  @media (prefers-reduced-motion: no-preference) {
    .indicators-track-inner {
      animation: ticker-scroll 34s linear infinite;
    }
    .indicators:hover .indicators-track-inner,
    .indicators-track-inner:focus-within {
      animation-play-state: paused;
    }
  }
  @keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }
  @media (prefers-reduced-motion: reduce) {
    .indicators-track { overflow-x: auto; scrollbar-width: none; }
    .indicators-track::-webkit-scrollbar { display: none; }
    .indicators-set[aria-hidden="true"] { display: none; }
  }
  .indicators-live {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 9px 0 9px 18px;
    margin-left: 18px;
    border-left: 1px solid var(--line-on-navy);
    font-size: 11px;
    color: var(--steel-soft);
    white-space: nowrap;
  }
  @media (max-width: 860px) {
    .indicators-live { display: none; }
  }
  .indicator {
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
    font-size: 12.5px;
  }
  .indicator .name {
    color: var(--steel-soft);
    font-weight: 500;
  }
  .indicator .value {
    font-weight: 600;
    color: #F2F5FA;
  }
  .indicator .delta {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 5px;
  }
  .delta.up { color: #FF9E9E; background: rgba(255, 120, 120, 0.12); }
  .delta.down { color: #8FD6A8; background: rgba(143, 214, 168, 0.12); }
  .delta.flat { color: var(--steel-soft); background: rgba(185, 198, 217, 0.1); }

  /* ---------- Hero ---------- */
  .hero {
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    padding: 40px 28px 56px;
  }
  .hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 44px;
    align-items: center;
  }
  .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--steel-soft);
    margin-bottom: 18px;
  }
  .eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--steel);
    display: inline-block;
  }
  .hero-category {
    display: inline-block;
    background: var(--steel);
    color: var(--navy-deep);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
  }
  .hero h1 {
    font-family: var(--font-display);
    font-size: 45px;
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #F9FBFE;
    margin: 0 0 18px;
    text-wrap: balance;
  }
  .hero-dek {
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--steel-soft);
    font-weight: 400;
    max-width: 46ch;
    margin: 0 0 22px;
  }
  .hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12.5px;
    color: var(--steel-soft);
  }
  .hero-meta .sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--steel-soft);
    opacity: .7;
  }
  .hero-figure {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 1 / 1;
  }
  .hero-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s ease;
  }
  .hero-figure:hover img {
    transform: scale(1.03);
  }

  @media (prefers-reduced-motion: no-preference) {
    @keyframes hero-in {
      from { opacity: 0; transform: translateY(14px); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes hero-figure-in {
      from { opacity: 0; transform: scale(1.04); }
      to { opacity: 1; transform: scale(1); }
    }
    .hero .eyebrow { animation: hero-in .7s ease .05s both; }
    .hero .hero-category { animation: hero-in .7s ease .12s both; }
    .hero h1 { animation: hero-in .7s ease .18s both; }
    .hero .hero-dek { animation: hero-in .7s ease .28s both; }
    .hero .hero-meta { animation: hero-in .7s ease .36s both; }
    .hero-figure { animation: hero-figure-in .8s ease .15s both; }
  }

  /* ---------- Main layout ---------- */
  .main-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 52px 28px 0;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 52px;
  }

  .section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-on-paper);
  }
  .section-head h2 {
    font-size: 21px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
  }
  .section-head a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--steel);
  }
  .section-head a:hover { text-decoration: underline; }
  .section-head a .arrow {
    display: inline-block;
    transition: transform .2s ease;
  }
  .section-head a:hover .arrow {
    transform: translateX(3px);
  }

  .article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px 24px;
  }

  .card {
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
  }
  .card:hover {
    transform: translateY(-4px);
  }
  .card-figure {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    margin-bottom: 14px;
    background: var(--paper-dim);
    box-shadow: 0 0 0 0 rgba(10, 21, 38, 0);
    transition: box-shadow .3s ease;
  }
  .card:hover .card-figure {
    box-shadow: var(--shadow);
  }
  .card-figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
  }
  .card:hover .card-figure img { transform: scale(1.06); }

  .card-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--steel);
    color: var(--navy-deep);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    transition: transform .25s ease;
  }
  .card:hover .card-tag {
    transform: translateY(-2px);
  }
  .card h3 {
    font-size: 18px;
    line-height: 1.32;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.005em;
  }
  .card h3 a { transition: color .15s ease; }
  .card h3 a:hover { color: var(--steel); }
  .card p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
    opacity: .72;
    margin: 0 0 10px;
  }
  .card-meta {
    font-size: 12px;
    color: var(--ink);
    opacity: .55;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .card-meta .sep { opacity: .5; }

  .card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 26px;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-on-paper);
    margin-bottom: 6px;
  }
  .card.featured .card-figure {
    aspect-ratio: 5 / 4;
    margin-bottom: 0;
  }
  .card.featured h3 { font-size: 23px; }

  /* ---------- Sidebar ---------- */
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .side-block h2 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin: 0 0 16px;
    color: var(--ink);
    opacity: .85;
  }

  .topic-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .topic-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13.5px;
    font-weight: 500;
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--paper-dim);
    transition: background .15s ease, transform .15s ease;
  }
  .topic-list a:hover { background: var(--line-on-paper); transform: translateX(3px); }
  .topic-list .count {
    font-size: 11.5px;
    color: var(--steel);
    font-weight: 700;
  }

  .rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: rank;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .rank-list li {
    counter-increment: rank;
    display: flex;
    gap: 14px;
  }
  .rank-list li::before {
    content: counter(rank);
    font-family: "JetBrains Mono", monospace;
    font-weight: 600;
    font-size: 15px;
    color: var(--steel);
    opacity: .55;
    flex-shrink: 0;
    width: 20px;
  }
  .rank-list h4 {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 5px;
  }
  .rank-list .card-meta { font-size: 11.5px; }

  .newsletter-box {
    background: var(--navy);
    color: #F2F5FA;
    border-radius: 16px;
    padding: 26px 24px;
  }
  .newsletter-box h2 {
    color: #F2F5FA;
    opacity: 1;
  }
  .newsletter-box p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--steel-soft);
    margin: 0 0 16px;
  }
  .newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .newsletter-form input[type="email"] {
    background: rgba(242,245,250,0.08);
    border: 1px solid var(--line-on-navy);
    border-radius: 9px;
    padding: 11px 13px;
    color: #F2F5FA;
    font-family: inherit;
    font-size: 13.5px;
  }
  .newsletter-form input::placeholder { color: var(--steel-soft); }
  .newsletter-form button {
    background: var(--steel);
    color: var(--navy-deep);
    border: none;
    border-radius: 9px;
    padding: 11px 13px;
    font-weight: 700;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: filter .15s ease;
  }
  .newsletter-form button:hover { filter: brightness(1.08); }
  .newsletter-fine {
    font-size: 10.5px;
    color: var(--steel-soft);
    opacity: .7;
    margin: 10px 0 0;
  }

  /* ---------- Segment modules (por segmento, estilo CNN) ---------- */
  .segments {
    max-width: 1180px;
    margin: 56px auto 0;
    padding: 0 28px;
  }
  .segments-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--line-on-paper);
  }
  .segment-module {
    padding: 22px 22px 4px;
    border-right: 1px solid var(--line-on-paper);
    display: flex;
    flex-direction: column;
    transition: background .25s ease;
  }
  .segment-module:last-child { border-right: none; }
  .segment-module:hover { background: var(--paper-dim); }
  .segment-tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--steel);
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--steel);
    align-self: flex-start;
  }
  .segment-lead {
    font-size: 16.5px;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: -0.005em;
  }
  .segment-lead a { transition: color .15s ease; }
  .segment-lead a:hover { color: var(--steel); }
  .segment-lead-meta { margin-bottom: 16px; }
  .segment-list {
    list-style: none;
    margin: 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line-on-paper);
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .segment-list li a {
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
    transition: color .15s ease;
  }
  .segment-list li a:hover { color: var(--steel); }
  .segment-empty {
    font-size: 12px;
    color: var(--ink);
    opacity: .5;
    font-style: italic;
    padding: 12px 0 0;
    border-top: 1px solid var(--line-on-paper);
    margin: 12px 0 0;
  }

  @media (max-width: 980px) {
    .segments-grid { grid-template-columns: repeat(2, 1fr); }
    .segment-module:nth-child(2) { border-right: none; }
    .segment-module:nth-child(3), .segment-module:nth-child(4) { border-top: 1px solid var(--line-on-paper); }
  }
  @media (max-width: 560px) {
    .segments-grid { grid-template-columns: 1fr; }
    .segment-module { border-right: none !important; border-top: 1px solid var(--line-on-paper); }
    .segment-module:first-child { border-top: none; }
  }

  /* ---------- Scroll reveal ---------- */
  .reveal {
    opacity: 0;
    transform: translateY(18px);
  }
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      transition: opacity .6s ease, transform .6s ease;
    }
    .reveal.is-visible {
      opacity: 1;
      transform: translateY(0);
    }
    .article-grid > .reveal:nth-child(2) { transition-delay: .08s; }
    .article-grid > .reveal:nth-child(3) { transition-delay: .16s; }
    .article-grid > .reveal:nth-child(4) { transition-delay: .24s; }
    .segments-grid > .reveal:nth-child(2) { transition-delay: .08s; }
    .segments-grid > .reveal:nth-child(3) { transition-delay: .16s; }
    .segments-grid > .reveal:nth-child(4) { transition-delay: .24s; }
    .sidebar > .reveal:nth-child(2) { transition-delay: .1s; }
    .sidebar > .reveal:nth-child(3) { transition-delay: .2s; }
  }
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
  }

  /* ---------- Footer ---------- */
  .site-footer {
    margin-top: 68px;
    background: var(--navy-deep);
    color: var(--steel-soft);
  }
  .footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 44px 28px 30px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 36px;
  }
  .footer-brand .brand-word .info { color: #F2F5FA; }
  .footer-about {
    font-size: 12.5px;
    line-height: 1.6;
    max-width: 32ch;
    margin: 14px 0 0;
    opacity: .85;
  }
  .footer-col h4 {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #F2F5FA;
    margin: 0 0 14px;
    opacity: .9;
  }
  .footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
  }
  .footer-col a {
    font-size: 12.5px;
    opacity: .82;
    transition: opacity .15s ease;
  }
  .footer-col a:hover { opacity: 1; color: #F2F5FA; }
  .footer-bottom {
    border-top: 1px solid var(--line-on-navy);
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 28px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    opacity: .65;
  }
  .footer-bottom .socials {
    display: flex;
    gap: 14px;
  }
  .footer-bottom .socials a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--line-on-navy);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-figure { max-width: 420px; }
    .main-wrap { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; }
  }
  @media (max-width: 720px) {
    .primary-nav ul { display: none; }
    .nav-toggle { display: inline-flex; }
    .hero h1 { font-size: 32px; }
    .article-grid { grid-template-columns: 1fr; }
    .card.featured { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .indicators-label { display: none; }
  }

  @media (prefers-reduced-motion: reduce) {
    .card-figure img { transition: none; }
  }
