/* IronQx — Tu semana: volumen por músculo y 1RM por ejercicio (js/48-training-insights.js).
   Mismo diseño que IronBase; el color sale del acento del tema del plan (--rn-acc) o del dorado. */
.ti, .ti-chart-slot { --ti-acc: var(--rn-acc, var(--gold)); --muted: var(--txt2); }
.ti { margin: 0 0 22px; padding: 18px 16px 16px; border-radius: 24px; border: 1px solid rgba(255,255,255,.08);
  background: radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--ti-acc) 12%, transparent), transparent 60%), linear-gradient(160deg, rgba(255,255,255,.055), rgba(255,255,255,.015)); }
.ti-loading { padding: 30px 0; text-align: center; color: var(--muted); font-size: 13px; }
.ti-head h2 { margin: 4px 0 4px; font-size: 22px; font-weight: 850; letter-spacing: -.035em; line-height: 1.15; }
.ti-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.ti-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 14px 0 4px; padding: 4px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.07); }
.ti-seg button { min-height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ti-seg button[aria-selected="true"] { background: rgba(255,255,255,.1); color: var(--txt); }
.ti-body .m3d { margin: 12px 0 0; }
.ti-body .m3d-stage { height: 340px; }
.ti-tip { margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.78);
  background: color-mix(in srgb, #f59e0b 9%, transparent); border: 1px solid color-mix(in srgb, #f59e0b 28%, transparent); }
.ti-tip b { color: var(--txt); }
.ti-tip.is-ok { background: color-mix(in srgb, #34d399 9%, transparent); border-color: color-mix(in srgb, #34d399 28%, transparent); }
.ti-tip.is-warn { background: color-mix(in srgb, #fb7185 9%, transparent); border-color: color-mix(in srgb, #fb7185 30%, transparent); }
.ti-empty { display: grid; gap: 4px; margin: 14px 0 0; padding: 18px 16px; border-radius: 16px; text-align: center; background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.12); }
.ti-empty b { font-size: 14px; }
.ti-empty span { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.ti-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ti-head > div:first-child { min-width: 0; }
.ti-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 14px 0 0; }
.ti-days span { height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: var(--muted); background: rgba(255,255,255,.05); }
.ti-days span.is-on { background: var(--ti-acc); color: var(--rn-acc-ink, #0b0c0f); box-shadow: 0 4px 12px color-mix(in srgb, var(--ti-acc) 30%, transparent); }
.ti-days span.is-today:not(.is-on) { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ti-acc) 60%, transparent); color: var(--txt); }
.ti-days span.is-future { opacity: .45; }
.ti-score { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; padding: 12px 14px; border-radius: 16px; background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.07); }
.ti-score b { display: block; font-size: 24px; font-weight: 850; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ti-score b i { font-style: normal; font-size: 13px; font-weight: 700; color: var(--muted); }
.ti-score span { display: block; margin-top: 3px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.ti-score-bar { flex: 1; display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.ti-score-bar i { height: 22px; border-radius: 5px; background: rgba(255,255,255,.07); }
.ti-score-bar i.is-ok { background: #34d399; }
.ti-score-bar i.is-near { background: #f59e0b; }
.ti-score-bar i.is-high { background: #fb7185; }
.ti-sub { margin: 20px 0 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ti-rows { display: grid; gap: 9px; }
.ti-row { --tc: #94a3b8; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main num" "bar status"; column-gap: 12px; row-gap: 9px; align-items: center;
  padding: 12px 13px; border-radius: 15px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }
.ti-row.is-ok { --tc: #34d399; }
.ti-row.is-near { --tc: #f59e0b; }
.ti-row.is-low { --tc: #8b98ad; }
.ti-row.is-high { --tc: #fb7185; }
.ti-row-main { grid-area: main; min-width: 0; }
.ti-row-main b { display: block; font-size: 14.5px; font-weight: 750; }
.ti-parts { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-row-num { grid-area: num; display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.ti-row-num em { font-style: normal; font-size: 20px; font-weight: 850; letter-spacing: -.02em; color: var(--txt); }
.ti-row-num span { font-size: 11px; color: var(--muted); }
.ti-delta { font-size: 10.5px; font-weight: 800; margin-right: 2px; }
.ti-delta.is-up { color: #34d399; }
.ti-delta.is-down { color: #f59e0b; }
.ti-bar { grid-area: bar; position: relative; height: 7px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.ti-band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, #34d399 16%, transparent); }
.ti-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--tc); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.ti-status { grid-area: status; justify-self: end; padding: 3px 8px; border-radius: 999px; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--tc); background: color-mix(in srgb, var(--tc) 13%, transparent); white-space: nowrap; }
.ti-idle { display: flex; flex-wrap: wrap; gap: 7px; }
.ti-idle span { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 11px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: var(--txt); background: rgba(255,255,255,.035); border: 1px dashed rgba(255,255,255,.13); }
.ti-idle i { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.ti-note { margin: 14px 0 0; font-size: 10.5px; line-height: 1.5; color: var(--muted); }

/* Gráfica de 1RM en el historial de cada ejercicio */
.ti-chart-slot { margin: 0 0 14px; }
.ti-chart { padding: 14px 14px 12px; border-radius: 18px; border: 1px solid rgba(255,255,255,.09); background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.ti-chart.is-empty { display: grid; gap: 4px; text-align: center; padding: 20px 14px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.ti-chart.is-empty b { color: var(--txt); font-size: 14px; }
.ti-chart-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ti-chart-head small { display: block; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ti-chart-head b { display: block; margin-top: 2px; font-size: 24px; font-weight: 850; letter-spacing: -.03em; color: var(--txt); }
.ti-chart-gain { padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: var(--muted); background: rgba(255,255,255,.06); white-space: nowrap; }
.ti-chart-gain.is-up { color: #34d399; background: color-mix(in srgb, #34d399 12%, transparent); }
.ti-chart-gain.is-down { color: #f59e0b; background: color-mix(in srgb, #f59e0b 12%, transparent); }
.ti-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.ti-line { fill: none; stroke: var(--ti-acc); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ti-peak { stroke: rgba(255,255,255,.14); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.ti-chart circle { fill: var(--bg, #0b0c0f); stroke: var(--ti-acc); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ti-chart circle.is-pr { fill: var(--ti-acc); }
.ti-chart-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.ti-chart-foot { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 8px 0 0; font-size: 11.5px; color: var(--muted); }
.ti-dot-pr { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ti-acc); }
/* Tipografía de IronQx: titulares condensados en mayúsculas */
.ti-head h2 { margin: 8px 0 4px; font: 900 24px/1 "Barlow Condensed", sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--txt); }
.ti-head p, .ti-row-main b, .ti-score, .ti-seg button, .ti-tip, .ti-empty, .ti-chart { font-family: "Inter", sans-serif; }
.ti-score b, .ti-row-num em, .ti-chart-head b { font-family: "Barlow Condensed", "Inter", sans-serif; letter-spacing: .2px; }
.ti-score b { font-size: 28px; }
.ti-row-num em { font-size: 22px; }
.ti-chart-head b { font-size: 28px; }
.ti { border-color: rgba(var(--rn-acc-rgb, 201,168,76), .16); }
/* En la bitácora va arriba de las sesiones; en la ficha del coach, arriba de los builders */
#training-content > .ti { margin: 4px 0 20px; }
.ti.is-coach { margin: 16px 0 18px; }
.ti-chart-slot { margin: 10px 0 12px; }
