/* ── Modelos Deterministas — Seúl Apr 24-30 ─────────────────────────────
 * Replica la estética del bloque ModelForecastsBlock de
 * /analisis/seoul-precip-abr-2026/thesis-section. Misma paleta dark/light
 * que el resto de widgets del post-03 (jesus-orderbook, seoul-april-zoom).
 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-page:        #0E1118;
  --bg-panel:       #131820;
  --hairline:       #232A36;
  --hairline-soft:  #1A2029;
  --text:           #B5BAC4;
  --text-strong:    #E8EAEE;
  --text-muted:     #6E7480;
  --text-faint:     #4A5060;
  --accent:         #6B9EBB;
  --good:           #5BAA7C;
  --warn:           #C7555A;
  --motion-ease:    cubic-bezier(0.165, 0.84, 0.44, 1);
}

[data-theme="light"] {
  --bg-page:        #f4e9da;
  --bg-panel:       #ede3d6;
  --hairline:       #c4b598;
  --hairline-soft:  #d4c4b0;
  --text:           #5a4a3d;
  --text-strong:    #2b2218;
  --text-muted:     #8a7060;
  --text-faint:    #a89080;
  --accent:         #2b5d73;
  --good:           #4a8e64;
  --warn:           #9a3f43;
}

html, body {
  width: 100%;
  background: var(--bg-page);
  color: var(--text);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  min-height: 100vh;
}

html.embedded body { padding: 0; min-height: auto; }
html.embedded .panel { padding: 14px 16px 12px; }

.forecast-fig {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 18px 22px 20px;
}

/* ── Block head ──────────────────────────────────────── */
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline-soft);
  margin-bottom: 14px;
}

.block-title {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.block-title em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-strong);
  font-weight: 400;
  margin-left: 6px;
  vertical-align: -0.05em;
}

.block-note {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ── Table ───────────────────────────────────────────── */
.model-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.model-table th {
  text-align: right;
  padding: 4px 6px 8px;
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  font-weight: 500;
}
.model-table th:first-child { text-align: left; padding-left: 0; }
.model-table th.th-total {
  /* Separa visualmente las columnas-resumen del bloque de días */
  padding-left: 14px;
  border-left: 1px solid var(--hairline-soft);
}
.model-table th.th-april {
  padding-right: 0;
  padding-left: 12px;
}
.model-table th.th-april .th-sub {
  display: block;
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  opacity: 0.55;
  font-weight: 400;
  margin-top: 1px;
}

.model-table td {
  text-align: right;
  padding: 7px 6px;
  color: var(--text);
  border-bottom: 1px solid var(--hairline-soft);
  letter-spacing: -0.01em;
}
.model-table td:first-child {
  text-align: left;
  color: var(--text-strong);
  font-weight: 500;
  white-space: nowrap;
  padding-left: 0;
}
.model-table tr:last-child td { border-bottom: none; }

.cell-zero { opacity: 0.32; }

.total-cell {
  font-weight: 500;
  padding-left: 14px;
  border-left: 1px solid var(--hairline-soft);
  opacity: 0.85;
}
.total-cell.is-good { color: var(--good); }
.total-cell.is-warn { color: var(--warn); }

.april-cell {
  font-weight: 600;
  padding-right: 0;
  padding-left: 12px;
}
.april-cell.is-good { color: var(--good); }
.april-cell.is-warn { color: var(--warn); }

.model-note {
  font-size: 8.5px;
  opacity: 0.55;
  letter-spacing: 0.06em;
  margin-left: 6px;
  font-weight: 400;
  text-transform: lowercase;
}

/* ── Figcaption ──────────────────────────────────────── */
.forecast-figcaption {
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-muted);
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
  letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums;
}
.forecast-figcaption strong {
  color: var(--good);
  font-weight: 500;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 560px) {
  body { padding: 16px 8px; }
  .panel { padding: 14px 14px 16px; }
  .block-title em { font-size: 13px; }
  .model-table { font-size: 11px; }
  .model-table th { font-size: 8.5px; padding: 4px 4px 6px; }
  .model-table td { padding: 6px 4px; }
  .model-note { display: none; }
}

@media (max-width: 380px) {
  /* Compact: drop alternate day columns when very narrow */
  .model-table th.th-day:nth-child(odd):not(:first-child),
  .model-table td.td-day:nth-child(odd):not(:first-child) {
    /* no-op placeholder; truly tight responsive handled in JS via abbrev */
  }
}
