/* Group summaries (Mercados, Economía, Utilidades): home components with a page heading. */
.overview-page { padding-top: 24px; }
.overview-header { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px; padding-bottom: 24px; }
.overview-header h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); line-height: 1.1; }
.overview-header p { max-width: 640px; margin: 8px 0 0; color: var(--color-text-secondary); font-size: 16px; }
.overview-header .indicator-index-search { flex: 0 1 420px; }
.overview-page .hp-quotes + .hp-section { margin-top: 24px; }

/* Economía: the explorer keeps the reader on the page while switching themes. */
.economy-explorer { grid-template-columns: 250px minmax(0, 1fr); }
.economy-explorer .edition-tabs { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.economy-explorer .edition-tabs [role="tab"] { padding-top: 10px; padding-bottom: 10px; }
.overview-panel-heading { margin-bottom: 20px; }
.overview-panel-heading h2 { margin: 0; font: 600 24px/1.2 var(--font-interface); letter-spacing: -.02em; }
.overview-panel-heading p { margin: 6px 0 0; color: var(--color-text-secondary); font-size: 14px; }
.economy-explorer .indicator-ledger-scroll { margin-top: 28px; }
/* Indicator names in a quiet steel blue, distinct from link colors. */
.economy-explorer { --indicator-name: #34597e; }
.economy-explorer:where([data-theme="dark"] *) { --indicator-name: #8fb4d8; }
.economy-explorer .indicator-ledger-name,
.economy-explorer .edition-chart-title { color: var(--indicator-name); text-decoration: none; }
.overview-subheading { margin: 28px 0 12px; font: 600 16px/1.3 var(--font-interface); }
.overview-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.overview-reports .edition-report h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 17px; }
.overview-reports .edition-report > p { flex: 1; margin: 0 0 14px; color: var(--color-text-secondary); font-size: 14px; line-height: 1.45; }
/* The whole card opens the monitor; its figures keep their own links. */
.overview-reports .edition-report { position: relative; transition: border-color .15s ease, box-shadow .15s ease; }
.overview-reports .edition-report h3 a::after { content: ""; position: absolute; inset: 0; }
.overview-reports .edition-report dt a { position: relative; z-index: 1; }
.overview-reports .edition-report:hover { border-color: var(--color-accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.overview-reports .edition-report:hover h3 a { color: var(--color-accent); }
.overview-reports .edition-report > .edition-action { display: none; }

/* Calculadoras: two per row, each example open as a panel, the action aligned at the bottom. */
.calculators-page .hp-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.calculators-page .hp-tool { padding: 22px 24px; }
/* Investing tools on the first row (carry trade, bond arbitrage), household ones on the second. */
.calculators-page .hp-tool:nth-child(2) { order: 3; }
.calculators-page .hp-tool:nth-child(3) { order: 2; }
.calculators-page .hp-tool:nth-child(4) { order: 4; }
.calculators-page .hp-tool h3 { font-size: 19px; }
.calculators-page .hp-tool-foot { flex: 1; flex-direction: column; align-items: stretch; gap: 0; margin-top: 16px; padding-top: 0; }
.calculators-page .hp-tool-foot > .edition-action { display: none; }
.calculators-page .hp-example { display: flex; flex: 1; flex-direction: column; }
.calculators-page .hp-example-body {
    position: static;
    display: flex;
    flex: 1;
    flex-direction: column;
    margin: 0;
    padding: 16px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--color-surface-warm);
    box-shadow: none;
}
.calculators-page .hp-example-body p { font-size: 14px; line-height: 1.45; }
.calculators-page .hp-example-figure strong { font-size: 30px; }
.calculators-page .hp-example-body > a { margin-top: auto; padding-top: 12px; font-size: 14px; }
.calculators-page [data-arbitrage-example] { flex: 1; }
@media (max-width: 900px) {
    .calculators-page .hp-tools { grid-template-columns: minmax(0, 1fr); }
}

/* The home's agenda, one column per day. */
.overview-agenda { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; overflow: visible; }
.overview-agenda .edition-day + .edition-day { margin-top: 0; }
.overview-agenda .edition-day-event { color: var(--color-text); text-decoration: none; }
.overview-agenda .edition-day-event:hover .edition-day-title { color: var(--color-accent); }

/* Mercados: every listing of the group, as the dollar summary links its pages. */
.overview-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--color-border); }
.overview-links a { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); color: var(--color-text); text-decoration: none; }
.overview-links a:nth-child(4n) { border-right: 0; }
.overview-links strong { color: var(--color-accent); font-size: 15px; }
.overview-links span { color: var(--color-text-secondary); font-size: 13px; line-height: 1.4; }
.overview-links a:hover strong { text-decoration: underline; }

@media (max-width: 900px) {
    .economy-explorer { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    /* On narrow screens the themes scroll sideways above the panel. */
    .economy-explorer .edition-tabs { position: static; flex-direction: row; max-height: none; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--color-border); }
    .economy-explorer .edition-tabs [role="tab"] { flex: none; margin: 0 0 -1px; border-left: 0; border-bottom: 3px solid transparent; }
    .economy-explorer .edition-tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--color-accent); }
    .overview-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .overview-links a:nth-child(4n) { border-right: 1px solid var(--color-border); }
    .overview-links a:nth-child(2n) { border-right: 0; }
}
@media (max-width: 620px) {
    .edition-chart-grid { grid-template-columns: minmax(0, 1fr); }
}
