@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400&family=Archivo:wdth,wght@75..125,400..700&family=IBM+Plex+Mono:wght@400;500&display=swap");

/* ===== Base ===== */
body { margin: 0; font-family: var(--font-sans); font-size: var(--text-base); line-height: 24px; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
.cc-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cc-icon { flex: none; display: inline-block; vertical-align: middle; }
.cc-overline { margin: 0; font-family: var(--font-sans); font-size: var(--text-2xs); line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
:where(.cc-btn, .cc-iconbtn, .cc-tag, .cc-seg__opt, .cc-tabs__tab, .cc-pages__n, .cc-side__item, .cc-switch__track, .cc-qcard__preview, .cc-combo__toggle, .cc-script__block, .cc-prompt__chip, .cc-audio__play, .cc-audio__speed, .cc-table__sort, .cc-tag__remove, .cc-paper__link, .cc-tg__link):focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Demos de preview */
.cc-demo { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-6); }
.cc-demo--col { flex-direction: column; align-items: stretch; }
.cc-demo--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-6); align-items: start; }
.cc-demo__row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cc-demo__label { width: 100%; margin: 0; font-size: var(--text-2xs); line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

/* ===== Marca ===== */
.cc-wordmark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em; color: var(--ink); white-space: nowrap; }
.cc-wordmark__dot { width: .62em; height: .62em; border-radius: 999px; background: var(--azul); box-shadow: .26em .26em 0 0 var(--ocre); margin-right: .26em; }
.cc-wordmark--xs { font-size: var(--text-xs); gap: 5px; }
.cc-wordmark--sm { font-size: var(--text-lg); }
.cc-wordmark--md { font-size: var(--text-2xl); }
.cc-wordmark--lg { font-size: var(--text-4xl); gap: 12px; }

/* ===== Botones ===== */
.cc-btn { --h: var(--control-md); display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--h); min-width: var(--h); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font: inherit; font-size: var(--text-sm); line-height: 20px; font-weight: 700; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .08s ease; }
.cc-btn:active:not(:disabled) { transform: translateY(1px); }
.cc-btn--sm { --h: var(--control-sm); padding: 0 var(--space-3); font-size: var(--text-sm); border-radius: 8px; }
.cc-btn--lg { --h: var(--control-lg); padding: 0 var(--space-6); font-size: var(--text-base); }
.cc-btn--block { display: flex; width: 100%; }
.cc-btn--primary { background: var(--azul); color: var(--on-azul); }
.cc-btn--primary:hover:not(:disabled) { background: var(--azul-strong); }
.cc-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.cc-btn--secondary:hover:not(:disabled) { background: var(--surface-sunken); border-color: var(--ink-muted); }
.cc-btn--ghost { background: transparent; color: var(--ink); }
.cc-btn--ghost:hover:not(:disabled) { background: var(--surface-sunken); }
.cc-btn--danger { background: var(--danger); color: var(--on-danger); }
.cc-btn--danger:hover:not(:disabled) { filter: brightness(.92); }
.cc-btn--highlight { background: var(--ocre); color: var(--on-ocre); }
.cc-btn--highlight:hover:not(:disabled) { filter: brightness(.95); }
.cc-btn:disabled { cursor: not-allowed; background: var(--surface-sunken); color: var(--ink-subtle); border-color: transparent; filter: none; }
.cc-btn.is-loading { cursor: progress; }
.cc-btn--primary.is-loading { background: var(--azul); color: var(--on-azul); }
.cc-spinner { width: 18px; height: 18px; border-radius: 999px; border: 2px solid currentColor; border-right-color: transparent; animation: cc-spin .7s linear infinite; }
@keyframes cc-spin { to { transform: rotate(360deg); } }
.cc-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: var(--control-md); height: var(--control-md); padding: 0; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; transition: background-color .15s; }
.cc-iconbtn--sm { width: var(--control-sm); height: var(--control-sm); border-radius: 8px; }
.cc-iconbtn.cc-btn--ghost { color: var(--ink-muted); }
.cc-iconbtn.cc-btn--ghost:hover:not(:disabled) { color: var(--ink); }
.cc-iconbtn__badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--vino); color: var(--on-vino); font-size: var(--text-3xs); line-height: 16px; font-weight: 700; box-shadow: 0 0 0 2px var(--surface); }

/* ===== Badges, tags, disciplina, rol ===== */
.cc-badge { display: inline-flex; align-items: center; gap: var(--space-1); height: 24px; padding: 0 var(--space-2); border-radius: var(--radius-xs); font-size: var(--text-xs); line-height: 16px; font-weight: 700; white-space: nowrap; background: var(--surface-sunken); color: var(--ink-muted); }
.cc-badge--azul { background: var(--azul-soft); color: var(--azul); }
.cc-badge--success { background: var(--success-soft); color: var(--success); }
.cc-badge--warning { background: var(--warning-soft); color: var(--warning); }
.cc-badge--danger { background: var(--danger-soft); color: var(--danger); }
.cc-badge--info { background: var(--info-soft); color: var(--info); }
.cc-badge--vino { background: var(--vino-soft); color: var(--vino); }
.cc-badge--credit { background: var(--ocre-soft); color: var(--ocre-ink); }
.cc-badge--solid.cc-badge--vino { background: var(--vino); color: var(--on-vino); }
.cc-badge--solid.cc-badge--azul { background: var(--azul); color: var(--on-azul); }
.cc-badge--solid.cc-badge--credit { background: var(--ocre); color: var(--on-ocre); }

.cc-tag-wrap { display: inline-flex; align-items: center; }
.cc-tag { display: inline-flex; align-items: center; gap: var(--space-2); height: 36px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 700; cursor: pointer; transition: background-color .15s, border-color .15s; }
.cc-tag:hover:not(:disabled) { background: var(--surface-sunken); }
.cc-tag.is-selected { background: var(--azul-soft); border-color: var(--azul); color: var(--ink); }
.cc-tag.is-selected .cc-icon { color: var(--azul); }
.cc-tag--disc.is-selected { border-color: var(--dc); background: var(--surface); box-shadow: inset 0 0 0 1px var(--dc); }
.cc-tag--disc.is-selected .cc-icon { color: var(--dc); }
.cc-tag:disabled { opacity: .5; cursor: not-allowed; }
.cc-tag__dot { width: 10px; height: 10px; border-radius: 999px; background: var(--dc); }
.cc-tag__count { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-muted); }
.cc-tag-wrap .cc-tag { padding-right: 36px; }
.cc-tag__remove { margin-left: -32px; width: 26px; height: 26px; border-radius: 999px; border: 0; background: transparent; color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cc-tag__remove:hover { background: var(--line); color: var(--ink); }

.cc-disc { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 700; color: var(--dc); background: var(--surface); border: 1px solid var(--dc); white-space: nowrap; }
.cc-disc__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--dc); }
.cc-disc--solid { background: var(--dc); color: var(--on-disc); }
.cc-disc--solid .cc-disc__dot { background: var(--on-disc); }
.cc-role { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--radius-xs); font-size: var(--text-xs); font-weight: 700; color: var(--rc); background: var(--surface); border: 1px solid var(--rc); white-space: nowrap; }

/* ===== Campos ===== */
.cc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-field__label { font-size: var(--text-sm); line-height: 20px; font-weight: 700; color: var(--ink); padding: 0; }
.cc-field__req { color: var(--danger); }
.cc-field__opt { font-weight: 400; color: var(--ink-muted); }
.cc-field__foot { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); line-height: 20px; }
.cc-field__hint { color: var(--ink-muted); }
.cc-field__error { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--danger); font-size: var(--text-sm); line-height: 20px; font-weight: 700; }
.cc-field__error .cc-icon { margin-top: 2px; }
.cc-field__counter { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-muted); white-space: nowrap; }
.cc-input { position: relative; display: flex; align-items: center; height: var(--control-md); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.cc-input--lg { height: var(--control-lg); }
.cc-input:hover { border-color: var(--ink-muted); }
.cc-input:focus-within, .cc-input.is-open { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-soft); }
.cc-input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: var(--text-base); padding: 0 var(--space-3); }
.cc-input.has-icon input { padding-left: 40px; }
.cc-input input::placeholder, .cc-textarea::placeholder, .cc-prompt__input::placeholder { color: var(--ink-subtle); }
.cc-input__icon { position: absolute; left: 12px; color: var(--ink-muted); pointer-events: none; }
.cc-input__suffix { padding: 0 var(--space-3); color: var(--ink-muted); font-size: var(--text-sm); border-left: 1px solid var(--line); height: 100%; display: flex; align-items: center; }
.cc-field.is-invalid .cc-input, .cc-field.is-invalid .cc-textarea, .cc-field.is-invalid .cc-select select { border-color: var(--danger); }
.cc-field.is-invalid .cc-input:focus-within { box-shadow: 0 0 0 3px var(--danger-soft); }
.cc-field.is-disabled .cc-input, .cc-field.is-disabled .cc-select select, .cc-field.is-disabled .cc-textarea { background: var(--surface-sunken); border-color: var(--line); color: var(--ink-subtle); cursor: not-allowed; }
.cc-textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 96px; padding: 10px var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-base); line-height: 24px; transition: border-color .15s, box-shadow .15s; }
.cc-textarea:hover { border-color: var(--ink-muted); }
.cc-textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-soft); }
.cc-select { position: relative; }
.cc-select select { width: 100%; height: var(--control-md); appearance: none; -webkit-appearance: none; padding: 0 40px 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-base); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.cc-select select:hover { border-color: var(--ink-muted); }
.cc-select select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-soft); }
.cc-select__chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); pointer-events: none; }

/* Combobox */
.cc-combo { position: relative; }
.cc-combo__toggle { position: absolute; right: 4px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.cc-combo .cc-input input { padding-right: 40px; }
.cc-combo__list { position: absolute; z-index: var(--z-dropdown); left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 264px; overflow: auto; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.cc-combo__opt { display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px; border-radius: 8px; cursor: pointer; color: var(--ink); }
.cc-combo__opt.is-active { background: var(--surface-sunken); }
.cc-combo__opt.is-selected { font-weight: 700; }
.cc-combo__opt.is-selected .cc-icon { color: var(--azul); }
.cc-combo__label { flex: 1; min-width: 0; }
.cc-combo__meta { color: var(--ink-muted); font-size: var(--text-sm); }
.cc-combo__empty { padding: 12px; color: var(--ink-muted); font-size: var(--text-sm); }

/* Checkbox / radio */
.cc-check, .cc-radio { display: flex; gap: var(--space-3); align-items: flex-start; }
.cc-check__ctl, .cc-radio__ctl { position: relative; flex: none; width: 22px; height: 22px; margin-top: 1px; }
.cc-check__ctl input, .cc-radio__ctl input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.cc-check__box { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; box-sizing: border-box; border: 1.5px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface); color: transparent; transition: background-color .15s, border-color .15s; pointer-events: none; }
.cc-check__ctl input:hover + .cc-check__box { border-color: var(--ink-muted); }
.cc-check__ctl input:checked + .cc-check__box, .cc-check__ctl input:indeterminate + .cc-check__box { background: var(--azul); border-color: var(--azul); color: var(--on-azul); }
.cc-check__ctl input:focus-visible + .cc-check__box, .cc-radio__ctl input:focus-visible + .cc-radio__dot { box-shadow: var(--focus-ring); }
.cc-check.is-invalid .cc-check__box { border-color: var(--danger); }
.cc-check__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-check__label { font-size: var(--text-base); line-height: 24px; color: var(--ink); cursor: pointer; }
.cc-check__desc { font-size: var(--text-sm); line-height: 20px; color: var(--ink-muted); }
.cc-check.is-disabled, .cc-radio.is-disabled { opacity: .55; }
.cc-radios { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.cc-radios > legend { margin-bottom: var(--space-2); }
.cc-radios--inline { flex-direction: row; flex-wrap: wrap; gap: var(--space-6); }
.cc-radio__dot { display: block; width: 22px; height: 22px; box-sizing: border-box; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); pointer-events: none; transition: border-color .15s, border-width .15s; }
.cc-radio__ctl input:hover + .cc-radio__dot { border-color: var(--ink-muted); }
.cc-radio__ctl input:checked + .cc-radio__dot { border: 7px solid var(--azul); }

/* Switch */
.cc-switch { display: flex; align-items: flex-start; gap: var(--space-3); }
.cc-switch__track { position: relative; flex: none; width: 44px; height: 26px; padding: 0; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface-sunken); cursor: pointer; transition: background-color .18s, border-color .18s; }
.cc-switch__thumb { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 999px; background: var(--ink-muted); color: var(--azul); display: flex; align-items: center; justify-content: center; transition: transform .18s ease, background-color .18s; }
.cc-switch__track[aria-checked="true"] { background: var(--azul); border-color: var(--azul); }
.cc-switch__track[aria-checked="true"] .cc-switch__thumb { transform: translateX(18px); background: var(--on-azul); }
.cc-switch__label { display: flex; flex-direction: column; font-size: var(--text-base); line-height: 24px; color: var(--ink); cursor: pointer; }
.cc-switch.is-disabled { opacity: .55; }

/* Slider */
.cc-slider { display: flex; align-items: center; gap: var(--space-4); }
.cc-slider input, .cc-audio__track input { --pct: 50%; flex: 1; appearance: none; -webkit-appearance: none; height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--azul) 0 var(--pct), var(--surface-sunken) var(--pct) 100%); outline: none; cursor: pointer; }
.cc-slider input::-webkit-slider-thumb, .cc-audio__track input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 999px; background: var(--surface); border: 2px solid var(--azul); box-shadow: var(--shadow-sm); }
.cc-slider input::-moz-range-thumb, .cc-audio__track input::-moz-range-thumb { width: 18px; height: 18px; border-radius: 999px; background: var(--surface); border: 2px solid var(--azul); }
.cc-slider input:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }
.cc-slider__out { min-width: 72px; text-align: right; font-family: var(--font-mono); font-size: var(--text-sm); font-weight: 500; color: var(--ink); }

/* Segmentado */
.cc-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-sunken); border: 1px solid var(--line); }
.cc-seg--block { display: flex; }
.cc-seg--block .cc-seg__opt { flex: 1; }
.cc-seg__opt { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); font: inherit; font-size: var(--text-sm); font-weight: 700; cursor: pointer; transition: background-color .15s, color .15s; }
.cc-seg__opt:hover { color: var(--ink); }
.cc-seg__opt.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }

/* FileDrop */
.cc-drop-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.cc-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: var(--space-8) var(--space-6); border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s; }
.cc-drop:hover, .cc-drop.is-over { border-color: var(--azul); background: var(--azul-soft); }
.cc-drop:focus-within { box-shadow: var(--focus-ring); }
.cc-drop.is-invalid { border-color: var(--danger); }
.cc-drop__icon { width: 56px; height: 56px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--azul-soft); color: var(--azul); margin-bottom: 6px; }
.cc-drop__title { font-family: var(--font-display); font-size: var(--text-lg); line-height: 26px; font-weight: 700; color: var(--ink); }
.cc-drop__hint { font-size: var(--text-sm); color: var(--ink-muted); }
.cc-drop__file { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.cc-drop__fileicon { width: 44px; height: 44px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); display: flex; align-items: center; justify-content: center; }
.cc-drop__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-drop__meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-drop__meta span { font-size: var(--text-sm); color: var(--ink-muted); }

/* ===== Navegación ===== */
.cc-tabs__list { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--line); overflow-x: auto; }
.cc-tabs__tab { display: inline-flex; align-items: center; gap: var(--space-2); height: 44px; padding: 0 var(--space-4); margin-bottom: -1px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-muted); font: inherit; font-size: var(--text-sm); font-weight: 700; cursor: pointer; white-space: nowrap; }
.cc-tabs__tab:hover { color: var(--ink); }
.cc-tabs__tab.is-on { color: var(--ink); border-bottom-color: var(--azul); }
.cc-tabs__count { font-family: var(--font-mono); font-size: var(--text-2xs); padding: 0 6px; border-radius: 999px; background: var(--surface-sunken); color: var(--ink-muted); }
.cc-tabs__tab.is-on .cc-tabs__count { background: var(--azul-soft); color: var(--azul); }
.cc-tabs__panel { padding: var(--space-5) 0; outline: none; }
.cc-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); }
.cc-crumbs li { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-muted); }
.cc-crumbs a { color: var(--ink-muted); text-decoration: none; border-radius: 4px; }
.cc-crumbs a:hover { color: var(--azul); text-decoration: underline; text-underline-offset: 3px; }
.cc-crumbs [aria-current] { color: var(--ink); font-weight: 700; }
.cc-pages { display: flex; align-items: center; gap: 4px; }
.cc-pages__n { min-width: 32px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
.cc-pages__n:hover { background: var(--surface-sunken); }
.cc-pages__n.is-on { background: var(--azul); color: var(--on-azul); }
.cc-pages__gap { width: 24px; text-align: center; color: var(--ink-muted); }

/* Wizard */
.cc-steps { position: relative; }
.cc-steps__mobile { display: none; margin: 0 0 var(--space-2); flex-direction: column; gap: 2px; }
.cc-steps__mobile strong { font-family: var(--font-display); font-size: var(--text-lg); line-height: 26px; }
.cc-steps__bar { position: absolute; left: 16px; right: 16px; top: 15px; height: 2px; background: var(--line); }
.cc-steps__bar span { display: block; height: 100%; background: var(--azul); transition: width .3s ease; }
.cc-steps__list { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0; padding: 0; list-style: none; }
.cc-steps__item { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center; min-width: 0; }
.cc-steps__dot { position: relative; z-index: 1; width: 32px; height: 32px; box-sizing: border-box; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; background: var(--surface); border: 2px solid var(--line-strong); color: var(--ink-muted); }
.cc-steps__item.is-done .cc-steps__dot { background: var(--azul); border-color: var(--azul); color: var(--on-azul); }
.cc-steps__item.is-current .cc-steps__dot { border-color: var(--azul); color: var(--azul); box-shadow: 0 0 0 4px var(--azul-soft); font-weight: 700; }
.cc-steps__label { font-size: var(--text-xs); line-height: 16px; color: var(--ink-muted); padding: 0 4px; }
.cc-steps__item.is-current .cc-steps__label { color: var(--ink); font-weight: 700; }
@media (max-width: 720px) {
  .cc-steps__mobile { display: flex; }
  .cc-steps__list { display: none; }
  .cc-steps__bar { position: static; height: 6px; border-radius: 999px; }
  .cc-steps__bar span { border-radius: 999px; }
}

/* TopBar / Sidebar */
.cc-topbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); height: 64px; padding: 0 var(--space-4) 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--line); }
.cc-topbar__l, .cc-topbar__r { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.cc-creditpill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px; border-radius: 999px; background: var(--ocre-soft); color: var(--ocre-ink); font-size: var(--text-sm); white-space: nowrap; }
.cc-creditpill strong { font-family: var(--font-mono); font-size: var(--text-sm); }
.cc-creditpill.is-low { background: var(--ocre); color: var(--on-ocre); }
@media (max-width: 640px) { .cc-topbar .cc-role { display: none; } .cc-topbar { padding-left: var(--space-3); } }
.cc-side { width: var(--sidebar-width); box-sizing: border-box; padding: var(--space-4) var(--space-3); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-5); }
.cc-side ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cc-side__title { padding: 0 var(--space-3) var(--space-2); }
.cc-side__item { display: flex; align-items: center; gap: var(--space-3); height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink-muted); text-decoration: none; font-weight: 700; font-size: var(--text-sm); }
.cc-side__item:hover { background: var(--surface-sunken); color: var(--ink); }
.cc-side__item.is-on { background: var(--azul-soft); color: var(--ink); }
.cc-side__item.is-on .cc-icon { color: var(--azul); }
.cc-side__item span:first-of-type { flex: 1; }
.cc-side__count { font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 500; color: var(--ink-muted); }

/* ===== Tarjetas y contenido ===== */
.cc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.cc-card--interactive { transition: border-color .15s, box-shadow .15s, transform .15s; cursor: pointer; }
.cc-card--interactive:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.cc-card--sunken { background: var(--surface-sunken); border-color: transparent; }
.cc-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-6) 0; }
.cc-card__title { margin: 2px 0 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 26px; font-weight: 600; }
.cc-card__body { padding: var(--space-4) var(--space-6) var(--space-6); color: var(--ink); }
.cc-card__foot { display: flex; gap: var(--space-3); justify-content: flex-end; padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line); }

.cc-paper { max-width: 360px; }
.cc-paper__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s; }
.cc-paper__link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.cc-paper__cover { position: relative; min-height: 180px; padding: var(--space-8) var(--space-5) var(--space-5); display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-2); background: var(--surface-sunken); color: var(--ink); overflow: hidden; border-block-end: 1px solid var(--line); box-shadow: inset 0 3px 0 0 var(--dc); }

.cc-paper__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cc-paper__link:hover .cc-paper__photo { transform: scale(1.03); }
.cc-paper__veil { position: absolute; inset: 0; background: linear-gradient(to top, var(--veil-strong) 0%, var(--veil) 58%, rgba(12, 16, 22, .2) 100%); }
.cc-paper__dato { position: relative; display: flex; flex-direction: column; gap: 2px; color: var(--dc); }
.cc-paper__cifra { font-family: var(--font-display); font-size: var(--text-5xl); line-height: var(--leading-tight); font-weight: var(--weight-bold); letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; font-stretch: 112%; }
.cc-paper__unidad { font-family: var(--font-sans); font-size: var(--text-base); line-height: var(--leading-snug); font-weight: var(--weight-bold); color: var(--ink); }
.cc-paper__hook { position: relative; font-family: var(--font-sans); font-size: var(--text-sm); line-height: var(--leading-snug); font-weight: var(--weight-regular); color: var(--ink-muted); max-width: var(--measure-narrow); }
.cc-paper__new { position: absolute; left: var(--space-5); top: var(--space-4); display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-sans); font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--ink-muted); }
.cc-paper__new::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--vino); }
.cc-paper__body { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4) var(--space-5) var(--space-5); }
.cc-paper__tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.cc-paper__state { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--ink-muted); font-weight: 700; }
.cc-paper__title { margin: 4px 0 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 24px; font-weight: 700; color: var(--ink); text-wrap: balance; }
.cc-paper__inst { margin: 0; font-size: var(--text-sm); color: var(--ink-muted); }
.cc-paper__meta { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-xs); color: var(--ink-muted); }
.cc-paper__meta span { display: inline-flex; align-items: center; gap: 4px; }

.cc-stat { padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cc-stat__label { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--ink-muted); font-weight: 700; }
.cc-stat__value { margin: 0; font-family: var(--font-display); font-size: var(--text-3xl); line-height: 44px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.cc-stat__unit { font-size: var(--text-base); font-weight: 600; letter-spacing: 0; color: var(--ink-muted); }
.cc-stat__delta { margin: 0; display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); font-weight: 700; }
.cc-stat__delta span { font-weight: 400; color: var(--ink-muted); }
.cc-stat__delta.is-up { color: var(--success); }
.cc-stat__delta.is-down { color: var(--danger); }
.cc-stat__note { margin: 0; font-size: var(--text-xs); color: var(--ink-muted); }

/* Créditos */
.cc-credits { padding: var(--space-5); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--space-3); }
.cc-credits__top { display: flex; align-items: flex-start; gap: var(--space-3); }
.cc-credits__top > div { flex: 1; min-width: 0; }
.cc-credits__coin { width: 44px; height: 44px; flex: none; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--ocre); color: var(--on-ocre); }
.cc-credits__label { margin: 0; font-size: var(--text-sm); font-weight: 700; color: var(--ink-muted); }
.cc-credits__num { margin: 0; font-family: var(--font-display); font-size: var(--text-3xl); line-height: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cc-credits__num span { font-size: var(--text-base); font-weight: 600; letter-spacing: 0; color: var(--ink-muted); }
.cc-credits__mxn { margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted); }
.cc-credits__bar { height: 10px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.cc-credits__bar span { display: block; height: 100%; border-radius: 999px; background: var(--ocre); }
.cc-credits.is-low { border-color: var(--warning); background: var(--ocre-soft); }
.cc-credits.is-low .cc-credits__bar { background: var(--surface); }
.cc-credits__warn { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); font-weight: 700; color: var(--warning); }

/* Progreso */
.cc-progress { display: flex; flex-direction: column; gap: 6px; }
.cc-progress__top { display: flex; justify-content: space-between; font-size: var(--text-sm); font-weight: 700; }
.cc-progress__pct { font-family: var(--font-mono); font-weight: 500; color: var(--ink-muted); }
.cc-progress__track { height: 8px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.cc-progress__track span { display: block; height: 100%; border-radius: 999px; background: var(--azul); transition: width .3s ease; }
.cc-progress--credit .cc-progress__track span { background: var(--ocre); }
.cc-progress--danger .cc-progress__track span { background: var(--danger); }
.cc-progress__track span.is-indeterminate { width: 35%; animation: cc-indet 1.3s ease-in-out infinite; }
@keyframes cc-indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
.cc-progress__hint { margin: 0; font-size: var(--text-xs); color: var(--ink-muted); }

/* Tabla */
.cc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.cc-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.cc-table th { text-align: left; font-size: var(--text-xs); font-weight: 700; color: var(--ink-muted); background: var(--surface-sunken); padding: 10px var(--space-4); white-space: nowrap; border-bottom: 1px solid var(--line); }
.cc-table td { padding: 14px var(--space-4); border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.cc-table tbody tr:last-child td { border-bottom: 0; }
.cc-table tbody tr:hover td { background: var(--bg); }
.cc-table--dense td { padding: 8px var(--space-4); font-size: var(--text-sm); }
.cc-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.cc-table .is-mono { font-family: var(--font-mono); font-size: var(--text-xs); }
.cc-table__sort { display: inline-flex; align-items: center; gap: 4px; border: 0; padding: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 4px; }
.cc-table__sort .is-idle { opacity: .35; }
.cc-table__empty { text-align: center; color: var(--ink-muted); padding: var(--space-8) !important; }

/* Avatar */
.cc-avatar { --rc: var(--azul); display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 999px; background: var(--surface-sunken); color: var(--rc); box-shadow: inset 0 0 0 2px var(--rc); font-family: var(--font-display); font-weight: 700; overflow: hidden; }
.cc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cc-avatar--sm { width: 32px; height: 32px; font-size: var(--text-xs); }
.cc-avatar--md { width: 40px; height: 40px; font-size: var(--text-sm); }
.cc-avatar--lg { width: 56px; height: 56px; font-size: var(--text-lg); }

/* Tooltip */
.cc-tip { position: relative; display: inline-flex; }
.cc-tip__bubble { position: absolute; z-index: var(--z-dropdown); left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); width: max-content; max-width: 240px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); font-size: var(--text-xs); line-height: 18px; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.cc-tip__bubble--bottom { bottom: auto; top: calc(100% + 8px); transform: translate(-50%, -4px); }
.cc-tip__bubble.is-open { opacity: 1; transform: translate(-50%, 0); }

/* ===== Retroalimentación ===== */
.cc-alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: 14px var(--space-4); border-radius: var(--radius-md); border: 1px solid; }
.cc-alert--info { background: var(--info-soft); border-color: var(--info); }
.cc-alert--success { background: var(--success-soft); border-color: var(--success); }
.cc-alert--warning { background: var(--warning-soft); border-color: var(--warning); }
.cc-alert--danger { background: var(--danger-soft); border-color: var(--danger); }
.cc-alert--credit { background: var(--ocre-soft); border-color: var(--ocre-ink); }
.cc-alert--info .cc-alert__icon { color: var(--info); }
.cc-alert--success .cc-alert__icon { color: var(--success); }
.cc-alert--warning .cc-alert__icon { color: var(--warning); }
.cc-alert--danger .cc-alert__icon { color: var(--danger); }
.cc-alert--credit .cc-alert__icon { color: var(--ocre-ink); }
.cc-alert__icon { margin-top: 2px; }
.cc-alert__body { flex: 1; min-width: 0; }
.cc-alert__title { margin: 0; font-weight: 700; color: var(--ink); }
.cc-alert__text { color: var(--ink); font-size: var(--text-sm); }
.cc-alert__action { margin-top: var(--space-3); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.cc-toast { display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; max-width: 420px; box-sizing: border-box; padding: 14px 10px 14px var(--space-4); border-radius: var(--radius-lg); background: var(--surface-raised); border: 1px solid var(--line); box-shadow: var(--shadow-md); }
.cc-toast__icon { margin-top: 2px; }
.cc-toast--success .cc-toast__icon { color: var(--success); }
.cc-toast--danger .cc-toast__icon { color: var(--danger); }
.cc-toast--warning .cc-toast__icon { color: var(--warning); }
.cc-toast--info .cc-toast__icon { color: var(--info); }
.cc-toast--credit .cc-toast__icon { color: var(--ocre-ink); }
.cc-toast__body { flex: 1; min-width: 0; }
.cc-toast__title { margin: 0; font-weight: 700; }
.cc-toast__text { margin: 2px 0 0; font-size: var(--text-sm); color: var(--ink-muted); }

.cc-modal { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.cc-modal--inline { position: relative; inset: auto; min-height: 100%; }
.cc-modal__scrim { position: absolute; inset: 0; background: var(--scrim); }
.cc-modal__box { position: relative; width: 100%; max-height: calc(100% - 32px); overflow: auto; background: var(--surface-raised); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.cc-modal__box--sm { max-width: 420px; }
.cc-modal__box--md { max-width: 560px; }
.cc-modal__box--lg { max-width: 800px; }
.cc-modal__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-5) var(--space-4) var(--space-2) var(--space-6); }
.cc-modal__icon { width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--danger-soft); color: var(--danger); flex: none; }
.cc-modal__title { flex: 1; margin: 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 28px; font-weight: 700; }
.cc-modal__body { padding: var(--space-2) var(--space-6) var(--space-5); color: var(--ink); }
.cc-modal__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-3); padding: var(--space-4) var(--space-6); border-top: 1px solid var(--line); }

.cc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-2); padding: var(--space-10) var(--space-6); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); }
.cc-empty__icon { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--azul-soft); color: var(--azul); margin-bottom: var(--space-2); transform: rotate(-4deg); }
.cc-empty__title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 28px; font-weight: 700; }
.cc-empty__text { margin: 0; max-width: 46ch; color: var(--ink-muted); }
.cc-empty__action { margin-top: var(--space-3); display: flex; gap: var(--space-2); }

.cc-skel-group { display: flex; flex-direction: column; gap: 10px; }
.cc-skel { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-sunken) 0%, var(--line) 50%, var(--surface-sunken) 100%); background-size: 200% 100%; animation: cc-shimmer 1.4s ease infinite; }
.cc-skel--media { height: 160px; border-radius: var(--radius-lg); margin-bottom: 6px; }
@keyframes cc-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ===== Dominio: calidad y costo ===== */
.cc-quality { border: 0; margin: 0; padding: 0; min-width: 0; }
.cc-quality__legend { display: flex; align-items: center; gap: var(--space-2); padding: 0; margin-bottom: var(--space-3); font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; color: var(--ink); }
.cc-quality__legend .cc-icon { color: var(--azul); }
.cc-quality__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-4); }
.cc-qcard { position: relative; display: flex; flex-direction: column; border: 1.5px solid var(--line); border-radius: var(--radius-xl); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.cc-qcard:hover { border-color: var(--line-strong); }
.cc-qcard.is-on { border-color: var(--azul); box-shadow: 0 0 0 3px var(--azul-soft); }
.cc-qcard__input { position: absolute; opacity: 0; pointer-events: none; }
.cc-qcard__input:focus-visible + .cc-qcard__label { box-shadow: var(--focus-ring); border-radius: var(--radius-xl); }
.cc-qcard__label { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5) var(--space-5) var(--space-3); cursor: pointer; }
.cc-qcard__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 24px; }
.cc-qcard__name { font-family: var(--font-display); font-size: var(--text-md); font-weight: 700; color: var(--ink); }
.cc-qcard__price { display: flex; align-items: baseline; gap: 6px; color: var(--ink-muted); font-weight: 700; }
.cc-qcard__price .cc-icon { color: var(--ocre-ink); align-self: center; }
.cc-qcard__price strong { font-family: var(--font-display); font-size: var(--text-3xl); line-height: 44px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.cc-qcard__mxn { font-family: var(--font-mono); font-size: var(--text-2xs); line-height: 16px; color: var(--ink-muted); }
.cc-qcard__feats { list-style: none; margin: var(--space-2) 0 0; padding: var(--space-3) 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: var(--text-sm); color: var(--ink); }
.cc-qcard__feats li { display: flex; gap: var(--space-2); align-items: flex-start; }
.cc-qcard__feats .cc-icon { color: var(--azul); margin-top: 3px; }
.cc-qcard__preview { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 var(--space-3) var(--space-3); height: 36px; border: 0; border-radius: 10px; background: var(--surface-sunken); color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 700; cursor: pointer; }
.cc-qcard__preview:hover { background: var(--line); }
.cc-qcard__free { font-size: var(--text-3xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--success); }

.cc-cost { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); max-width: 380px; box-sizing: border-box; }
.cc-cost__lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.cc-cost__lines li, .cc-cost__bal, .cc-cost__total { display: flex; justify-content: space-between; gap: var(--space-3); font-size: var(--text-sm); }
.cc-cost__detail { display: block; font-size: var(--text-xs); color: var(--ink-muted); }
.cc-cost__n, .cc-cost__bal span:last-child { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.cc-cost__total { padding-top: var(--space-3); border-top: 1px solid var(--line); align-items: baseline; font-weight: 700; }
.cc-cost__total strong { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; }
.cc-cost__mxn { display: block; text-align: right; font-family: var(--font-mono); font-size: var(--text-2xs); font-weight: 400; color: var(--ink-muted); }
.cc-cost__bal { color: var(--ink-muted); }
.cc-cost__bal.is-pos span:last-child { color: var(--success); font-weight: 500; }
.cc-cost__bal.is-neg span:last-child { color: var(--danger); font-weight: 500; }
.cc-cost__note { margin: 0; display: flex; gap: 6px; align-items: flex-start; font-size: var(--text-xs); color: var(--ink-muted); }
.cc-cost__note .cc-icon { color: var(--success); margin-top: 1px; }

/* ===== Dominio: podcast ===== */
.cc-audio { position: relative; overflow: hidden; padding: var(--space-5); border-radius: var(--radius-xl); background: var(--grafito); color: var(--on-grafito); display: flex; flex-direction: column; gap: var(--space-3); max-width: 520px; box-sizing: border-box; }
.cc-audio__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cc-audio__veil { position: absolute; inset: 0; background: linear-gradient(90deg, var(--veil-strong) 0%, var(--veil-strong) 40%, var(--veil) 100%); }
.cc-audio.has-photo > :not(.cc-audio__photo):not(.cc-audio__veil) { position: relative; z-index: 1; }
.cc-audio__head { display: flex; align-items: center; gap: var(--space-4); }
.cc-audio__play { flex: none; width: 56px; height: 56px; border-radius: 999px; border: 0; background: var(--ocre); color: var(--on-ocre); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .12s; }
.cc-audio__play:hover { transform: scale(1.05); }
.cc-audio__info { flex: 1; min-width: 0; }
.cc-audio__eyebrow { margin: 0; display: flex; align-items: center; gap: 6px; font-size: var(--text-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.cc-audio__title { margin: 2px 0 0; font-family: var(--font-display); font-size: var(--text-lg); line-height: 24px; font-weight: 700; }
.cc-audio__chapter { margin: 2px 0 0; font-size: var(--text-sm); opacity: .85; }
.cc-audio__speed { flex: none; height: 32px; min-width: 48px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font-family: var(--font-mono); font-size: var(--text-xs); cursor: pointer; }
.cc-audio__track { position: relative; }
.cc-audio__track input { width: 100%; background: linear-gradient(to right, var(--ocre) 0 var(--pct), rgba(255, 255, 255, .22) var(--pct) 100%); }
.cc-audio__track input::-webkit-slider-thumb { border-color: var(--ocre); }
.cc-audio__marks { position: absolute; left: 0; right: 0; top: -2px; height: 10px; pointer-events: none; }
.cc-audio__marks span { position: absolute; top: 0; width: 2px; height: 10px; background: var(--on-grafito); opacity: .55; }
.cc-audio__time { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--text-2xs); opacity: .85; }

/* ===== Dominio: infografía ===== */
.cc-info { --ground: var(--grafito); --fg: var(--on-grafito); --pop: var(--ocre); --dc: var(--azul); position: relative; margin: 0; width: 100%; max-width: 360px; aspect-ratio: 4 / 5; box-sizing: border-box; padding: 28px; border-radius: var(--radius-xl); background: var(--ground); color: var(--fg); display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; overflow: hidden; }
.cc-info--azul { --ground: var(--azul); --fg: var(--on-azul); --pop: var(--ocre-soft); }
.cc-info--vino { --ground: var(--vino); --fg: var(--on-vino); --pop: var(--ocre-soft); }
.cc-info--ocre { --ground: var(--ocre); --fg: var(--on-ocre); --pop: var(--grafito); }
.cc-info__part { position: relative; z-index: 1; border-radius: 10px; }
.cc-info__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cc-info__veil { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--ground) 90%, transparent) 0%, color-mix(in srgb, var(--ground) 80%, transparent) 50%, color-mix(in srgb, var(--ground) 94%, transparent) 100%); }
.cc-info--grafito.has-photo { --pop: var(--ocre-claro); }
.cc-info--grafito.has-photo .cc-info__veil { background: linear-gradient(180deg, var(--veil-strong) 0%, var(--veil) 45%, var(--veil) 60%, var(--veil-strong) 100%); }
.cc-info--ocre.has-photo .cc-info__veil { background: color-mix(in srgb, var(--ground) 92%, transparent); }
.cc-info.has-photo .cc-info__art { min-height: 48px; }
.cc-info.is-selectable .cc-info__part { cursor: pointer; outline: 1.5px dashed transparent; outline-offset: 4px; }
.cc-info.is-selectable .cc-info__part:hover { outline-color: currentColor; }
.cc-info__part.is-selected { outline: 2.5px solid var(--pop) !important; outline-offset: 4px; }
.cc-info__part.is-selected::after { content: "Seleccionado"; position: absolute; right: -4px; top: -16px; padding: 2px 8px; border-radius: 6px; background: var(--pop); color: var(--ground); font-family: var(--font-sans); font-size: var(--text-3xs); font-weight: 700; letter-spacing: .04em; }
.cc-info__disc { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--fg); color: var(--ground); font-size: var(--text-2xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cc-info__hook { margin: 12px 0 0; font-family: var(--font-display); font-size: var(--text-xl); line-height: 30px; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.cc-info__dato { display: flex; align-items: baseline; gap: 10px; }
.cc-info__num { font-family: var(--font-display); font-size: var(--text-6xl); line-height: 80px; font-weight: 700; letter-spacing: -.04em; color: var(--pop); }
.cc-info__numlabel { font-family: var(--font-sans); font-size: var(--text-base); line-height: 20px; font-weight: 700; max-width: 12ch; }
.cc-info__art { min-height: 0; }
.cc-info__svg { width: 100%; height: 100%; display: block; }
.cc-info__svg .a { fill: var(--pop); }
.cc-info__svg .r1, .cc-info__svg .r2, .cc-info__svg .r3 { fill: none; stroke: var(--fg); stroke-width: 4; opacity: .35; }
.cc-info__svg .r2 { opacity: .22; }
.cc-info__svg .r3 { opacity: .12; }
.cc-info__svg .b { fill: var(--dc); }
.cc-info__svg .c { fill: var(--fg); opacity: .9; }
.cc-info__text { margin: 0; font-family: var(--font-sans); font-size: var(--text-md); line-height: 22px; font-weight: 700; }
.cc-info__credit { margin: 10px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--text-2xs); opacity: .9; }
.cc-info .cc-wordmark { color: var(--fg); }

/* ===== Dominio: vibecoding ===== */
.cc-prompt { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--surface); border: 1.5px solid var(--azul); box-shadow: 0 0 0 4px var(--azul-soft); }
.cc-prompt__target { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--ink-muted); padding: 2px 4px; }
.cc-prompt__target .cc-icon { color: var(--azul); }
.cc-prompt__target strong { color: var(--ink); }
.cc-prompt__lock { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-2xs); color: var(--success); font-weight: 700; }
.cc-prompt__row { display: flex; gap: var(--space-3); align-items: flex-end; }
.cc-prompt__input { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: var(--text-base); line-height: 24px; padding: 4px; }
.cc-prompt__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cc-prompt__cost { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ocre-ink); white-space: nowrap; }
.cc-prompt__sugg { display: flex; flex-wrap: wrap; gap: 6px; padding-top: var(--space-2); border-top: 1px solid var(--line); }
.cc-prompt__chip { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-xs); cursor: pointer; }
.cc-prompt__chip:hover { background: var(--azul-soft); border-color: var(--azul); }

.cc-script { display: flex; flex-direction: column; gap: var(--space-3); max-width: 640px; }
.cc-script__head { display: flex; justify-content: space-between; align-items: center; }
.cc-script__total { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--ink-muted); }
.cc-script__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.cc-script__block { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 4px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background-color .15s; }
.cc-script__block:hover { border-color: var(--line-strong); }
.cc-script__block.is-on { border-color: var(--azul); background: var(--azul-soft); }
.cc-script__meta { display: flex; align-items: center; gap: var(--space-2); }
.cc-script__kind { font-size: var(--text-2xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--azul); }
.cc-script__sec { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-muted); }
.cc-script__meta .cc-badge { margin-left: auto; height: 22px; font-size: var(--text-2xs); }
.cc-script__text { font-size: var(--text-base); line-height: 24px; }

/* ===== Dominio: Telegram ===== */
.cc-tg { max-width: 380px; padding: var(--space-3); border-radius: var(--radius-xl); background: var(--surface-sunken); }
.cc-tg__head { display: flex; align-items: center; gap: var(--space-3); padding: 4px 6px 10px; }
.cc-tg__avatar { width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--azul); color: var(--on-azul); font-family: var(--font-display); font-weight: 700; font-size: var(--text-sm); }
.cc-tg__channel { margin: 0; font-weight: 700; }
.cc-tg__subs { margin: 0; font-size: var(--text-xs); color: var(--ink-muted); }
.cc-tg__bubble { background: var(--surface); border-radius: 16px 16px 16px 4px; overflow: hidden; box-shadow: var(--shadow-sm); }
.cc-tg__bubble > .cc-info { max-width: none; border-radius: 0; }
.cc-tg__text { margin: 0; padding: var(--space-3) var(--space-4) 0; font-size: var(--text-sm); line-height: 21px; white-space: pre-line; }
.cc-tg__link { display: flex; gap: 10px; margin: var(--space-3) var(--space-4) 0; text-decoration: none; color: inherit; border-radius: 6px; }
.cc-tg__linkbar { width: 3px; border-radius: 3px; background: var(--azul); flex: none; }
.cc-tg__link span:last-child { display: flex; flex-direction: column; font-size: var(--text-sm); }
.cc-tg__link strong { color: var(--azul); }
.cc-tg__link span span { color: var(--ink-muted); font-size: var(--text-xs); }
.cc-tg__meta { margin: 0; padding: 6px var(--space-4) 10px; display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: var(--text-2xs); color: var(--ink-muted); }
.cc-tg__meta span { margin-left: 8px; }

/* ===== Bitácora ===== */
.cc-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cc-log__item { position: relative; display: flex; gap: var(--space-3); padding-bottom: var(--space-5); }
.cc-log__item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); }
.cc-log__rail { flex: none; width: 32px; height: 32px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--rc); box-shadow: inset 0 0 0 2px var(--rc); }
.cc-log__body { flex: 1; min-width: 0; padding-top: 4px; }
.cc-log__line { margin: 0; font-size: var(--text-sm); line-height: 22px; }
.cc-log__target { font-family: var(--font-mono); font-size: var(--text-xs); padding: 1px 6px; border-radius: 4px; background: var(--surface-sunken); }
.cc-log__meta { margin: 6px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-muted); }
.cc-log__detail { margin: 6px 0 0; font-size: var(--text-sm); color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  .cc-btn, .cc-card--interactive, .cc-paper__link, .cc-switch__thumb, .cc-steps__bar span, .cc-progress__track span, .cc-tip__bubble { transition: none !important; }
  .cc-spinner, .cc-skel, .cc-progress__track span.is-indeterminate { animation-duration: 3s; }
}

/* ===== PhotoHero: fotografía real con velo y texto encima ===== */
.cc-hero { container-type: inline-size; position: relative; overflow: hidden; display: flex; align-items: flex-end; min-height: 440px; border-radius: var(--radius-xl); background: var(--grafito); color: var(--on-grafito); }
.cc-hero--sm { min-height: 280px; }
.cc-hero--bleed { border-radius: 0; }
.cc-hero__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cc-hero__veil { position: absolute; inset: 0; background: linear-gradient(90deg, var(--veil-strong) 0%, var(--veil) 55%, rgba(12, 16, 22, .3) 100%); }
.cc-hero__inner { position: relative; z-index: 1; max-width: 640px; padding: var(--space-12) var(--space-10) var(--space-10); display: flex; flex-direction: column; gap: var(--space-4); box-sizing: border-box; }
.cc-hero__eyebrow { margin: 0; font-size: var(--text-2xs); line-height: 16px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ocre-claro); }
.cc-hero__title { margin: 0; font-family: var(--font-display); font-size: var(--text-4xl); line-height: 56px; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.cc-hero__title em { font-style: normal; color: var(--ocre-claro); }
.cc-hero__text { margin: 0; font-size: var(--text-md); line-height: 28px; max-width: 52ch; opacity: .94; }
.cc-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.cc-hero__actions .cc-btn--secondary { background: transparent; color: var(--on-grafito); border-color: rgba(255, 255, 255, .7); }
.cc-hero__actions .cc-btn--secondary:hover { background: rgba(255, 255, 255, .12); }
.cc-hero__credit { position: absolute; z-index: 1; right: var(--space-4); bottom: var(--space-3); margin: 0; display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-3xs); line-height: 14px; color: var(--on-grafito); opacity: .8; max-width: 60%; text-align: right; }
@container (max-width: 640px) {
  .cc-hero__veil { background: linear-gradient(0deg, var(--veil-strong) 0%, var(--veil) 70%, var(--veil) 100%); }
  .cc-hero__inner { padding: var(--space-16) var(--space-5) var(--space-10); }
  .cc-hero__title { font-size: var(--text-3xl); line-height: 40px; }
  .cc-hero__text { font-size: var(--text-base); line-height: 24px; }
  .cc-hero__credit { left: var(--space-5); right: auto; max-width: none; text-align: left; }
}
@media (prefers-reduced-motion: reduce) { .cc-paper__photo { transition: none; } }
