/* ==========================================================================
   Replanta Cedro · Panel
   Tema claro por defecto; oscuro con html[data-theme="dark"], el mismo interruptor
   nativo de CyberPanel. Identidad 1.2 (replanta-organismo-theme/assets/brand).
   ========================================================================== */

/* ── Tokens ──────────────────────────────────────────────
   --cp-green es menta de RELLENO (barras, puntos, chips). Para texto de acento
   usa --cp-accent: la menta sobre blanco no llega a 4.5:1. */
.cedro-panel, .cia {
    /* Anillos (docs/DISENO-ANILLOS.md): los materiales de replanta.net. Papel, tinta,
       acción mint con texto en tinta y una familia de color por producto. */
    --cp-bg:          #F1F3ED;
    --cp-bg2:         #F1F3ED;
    --cp-green:       #93F1C9;
    --cp-teal:        #41999F;
    --cp-sun:         #9A6B00;
    --cp-red:         #B3261E;
    --cp-accent:      #1F5A41;
    --cp-teal-text:   #2A6B70;
    --cp-sun-text:    #6B5300;
    --cp-red-text:    #8C1D18;
    --cp-ink:         #111615;
    --cp-sub:         #2C3834;
    --cp-muted:       #46534E;
    --cp-border:      #DDE3DA;
    --cp-border-hi:   #CDD5CA;
    --cp-surface:     #FFFFFF;
    --cp-surface2:    #EEF1EA;
    --cp-well:        #E8ECE4;
    --cp-hover:       rgba(17,22,21,.05);
    --cp-tint-green:  #DDF7EA;
    --cp-tint-teal:   #E2EFEE;
    --cp-tint-sun:    #F7EDC8;
    --cp-tint-red:    #F8E3E1;
    --cp-line-sun:    #E2CF95;
    --cp-line-red:    #E9B4AF;
    --cp-hero-from:   #111615;
    --cp-hero-to:     #111615;
    --cp-btn-bg:      #93F1C9;
    --cp-btn-hover:   #B9F8DC;
    --cp-btn-text:    #111615;
    --cp-focus:       #1F5A41;
    --cp-shadow:      0 1px 0 rgba(17,22,21,.03);
    --cp-r-sm:        10px;
    --cp-r-md:        14px;
    --cp-r-lg:        20px;
    --cp-r-xl:        24px;
    --cp-r-pill:      999px;
    /* Familias de producto: el mismo color en el menú, las etiquetas de cada web y las ofertas.
       Sobre ellas, el texto siempre en --cp-on-fam (tinta). */
    --cp-fam-web:     #93F1C9;
    --cp-fam-care:    #E8CD62;
    --cp-fam-crece:   #CDBDFF;
    --cp-fam-mail:    #FFAB8F;
    --cp-on-fam:      #111615;
    /* Cedro IA: bloque en tinta en los dos temas. */
    --cp-ia-bg:       #111615;
    --cp-ia-ink:      #F1F3ED;
    /* Foco sobre el fondo de Cedro IA (#709): --cp-focus da 2,26:1 sobre la tinta; la menta, 13,6:1. */
    --cp-ia-focus:    #93F1C9;
    --cp-link:        #1F5A41;
    --cp-font-display: 'Inter', system-ui, sans-serif;
    --cp-font-body:   'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    /* Series de datos sin amarillo (identidad 1.2): acción, teal heredado y verde gris. */
    --cp-series-1:    #1F5A41;
    --cp-series-2:    #41999F;
    --cp-series-3:    #A9C4B4;
    --cp-font-mono:   'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

    /* Alias de los nombres antiguos de los tokens. */
    --text-heading:   var(--cp-ink);
    --text-primary:   var(--cp-ink);
    --text-muted:     var(--cp-muted);
    --accent:         var(--cp-accent);
    --border:         var(--cp-border-hi);
    --surface-bg:     var(--cp-bg);
    --surface-alt:    var(--cp-surface2);
    --ok-text:        #1E6B47;
    --warn-text:      var(--cp-sun-text);

    --cedro-green:  var(--cp-green);
    --cedro-teal:   var(--cp-teal);
    --cedro-mint:   var(--cp-green);
    --cedro-sun:    var(--cp-sun);
    --cedro-red:    var(--cp-red);
    --cedro-forest: var(--cp-ink);
    --cedro-ink:    var(--cp-ink);
    --cedro-muted:  var(--cp-muted);
    --cedro-border: var(--cp-border);
    --cedro-surface:var(--cp-surface);
    --cedro-soft:   var(--cp-well);
}

[data-theme="dark"] .cedro-panel, [data-theme="dark"] .cia {
    --cp-bg:          #0E1412;
    --cp-bg2:         #0E1412;
    --cp-red:         #F2A39C;
    --cp-accent:      #93F1C9;
    --cp-teal-text:   #9FD8DC;
    --cp-sun-text:    #E6C46A;
    --cp-red-text:    #F2A39C;
    --cp-ink:         #ECF1EC;
    --cp-sub:         #CED8D1;
    --cp-muted:       #A6B5AE;
    --cp-border:      #26302C;
    --cp-border-hi:   #323E39;
    --cp-surface:     #161F1C;
    --cp-surface2:    #1C2622;
    --cp-well:        #0B100E;
    --cp-hover:       rgba(255,255,255,.04);
    --cp-tint-green:  rgba(147,241,201,.12);
    --cp-tint-teal:   rgba(65,153,159,.18);
    --cp-tint-sun:    rgba(230,196,106,.12);
    --cp-tint-red:    rgba(242,163,156,.12);
    --cp-line-sun:    rgba(230,196,106,.3);
    --cp-line-red:    rgba(242,163,156,.3);
    --cp-hero-from:   #1D2925;
    --cp-hero-to:     #1D2925;
    --cp-btn-bg:      #93F1C9;
    --cp-btn-hover:   #B9F8DC;
    --cp-btn-text:    #0E1412;
    --cp-focus:       #D0FFE9;
    --cp-shadow:      none;
    --cp-fam-web:     #7FD9B3;
    --cp-fam-care:    #CDB456;
    --cp-fam-crece:   #B3A5E0;
    --cp-fam-mail:    #E0967D;
    --cp-on-fam:      #0E1412;
    --cp-ia-bg:       #1D2925;
    --cp-ia-ink:      #ECF1EC;
    --cp-ia-focus:    #D0FFE9;
    --cp-link:        #93F1C9;
    --ok-text:        #93F1C9;
    --cp-sun:         #E6C46A;
    --cp-series-1:    #93F1C9;
    --cp-series-2:    #41999F;
    --cp-series-3:    #4E6B5D;
}

/* Anillos · a todo el ancho (4/11, Luis Javier: «se ve mal encajonado»). La pantalla es el lienzo: sin caja
   alrededor, las tarjetas van directas sobre el papel del shell. Tope solo en monitores muy anchos. */
.cedro-panel {
    max-width: 1760px;
    margin: 0 auto;
    padding: 4px 0 40px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--cp-ink);
    font-family: var(--cp-font-body);
}

.cedro-panel *, .cedro-panel *::before, .cedro-panel *::after { box-sizing: border-box; }
/* `hidden` siempre gana, aunque la clase del elemento defina un display (p. ej. .cedro-button). */
.cedro-panel [hidden] { display: none !important; }
.cedro-panel code { padding: 1px 6px; border-radius: 6px; background: var(--cp-surface2); color: var(--cp-ink); font-family: var(--cp-font-mono); font-size: .92em; }
.cedro-panel h1, .cedro-panel h2, .cedro-panel h3 { font-family: var(--cp-font-display); letter-spacing: -.02em; }

/* ── Page header ─────────────────────────────────────── */
.cedro-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--cp-border);
}
.cedro-eyebrow {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 8px;
    color: var(--cp-accent);
    font-family: var(--cp-font-body);
    font-size: 12.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.cedro-page-header h1 {
    margin: 0;
    color: var(--cp-ink);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.05;
    text-wrap: balance;
}
.cedro-subtitle { margin: 6px 0 0; color: var(--cp-muted); font-size: 13.5px; }

.cedro-toolbar { display: flex; align-items: flex-end; gap: 10px; }
.cedro-field {
    display: grid;
    gap: 5px;
    color: var(--cp-muted);
    font-family: var(--cp-font-body);
    font-size: 12.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
.cedro-field select {
    min-width: 130px;
    height: 40px;
    padding: 0 32px 0 12px;
    border: 1px solid var(--cp-border-hi);
    border-radius: var(--cp-r-sm);
    background: var(--cp-surface2);
    color: var(--cp-ink);
    font-family: var(--cp-font-body);
    font-size: 13.5px;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
}
.cedro-field select:focus { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
.cedro-icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--cp-border-hi);
    border-radius: var(--cp-r-sm);
    background: var(--cp-surface2);
    color: var(--cp-accent);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.cedro-icon-button:hover { border-color: var(--cp-teal); background: var(--cp-tint-green); }
.cedro-icon-button:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
.cedro-icon-button.is-spinning i { animation: cedro-spin .8s linear infinite; }

/* ── Tabs ─────────────────────────────────────────────── */
.cedro-tabs {
    display: flex;
    gap: 4px;
    margin: 12px 0 20px;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid var(--cp-border);
    border-radius: var(--cp-r-sm);
    background: var(--cp-well);
}
.cedro-tab {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 1 0 140px;
    padding: 7px 13px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--cp-muted);
    font-family: var(--cp-font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
/* Si las pestañas no caben, se desplaza la barra (nunca la página) y un degradado en el borde dice que hay más
   (anillos.js pone is-more-start / is-more-end y trae a la vista la pestaña elegida) (#240). */
.cedro-tabs { overscroll-behavior-x: contain; scroll-behavior: smooth; }
.cedro-tabs.is-more-end {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
}
.cedro-tabs.is-more-start {
    -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to left, #000 calc(100% - 44px), transparent);
}
.cedro-tabs.is-more-start.is-more-end {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 44px, #000 calc(100% - 44px), transparent);
}
@media (prefers-reduced-motion: reduce) { .cedro-tabs { scroll-behavior: auto; } }
.cedro-tab:hover { color: var(--cp-sub); background: var(--cp-hover); }
.cedro-tab:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 1px; }
.cedro-tab.is-active {
    background: var(--cp-bg);
    color: var(--cp-accent);
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    border-color: var(--cp-border);
}

/* ── Error (Inicio, Copias, Crece y Presupuestos) ── */
.cedro-error[hidden] { display: none; }
.cedro-error {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--cp-line-red);
    border-radius: var(--cp-r-sm);
    background: var(--cp-tint-red);
    color: var(--cp-red-text);
}
.cedro-error p { margin: 3px 0 0; font-size: 12.5px; }
.cedro-error button {
    margin-left: auto;
    min-height: 40px;
    border: 1px solid var(--cp-line-red);
    border-radius: 9px;
    background: transparent;
    padding: 7px 14px;
    color: var(--cp-red-text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}
.cedro-error button:hover { background: var(--cp-hover); }

/* ── Etiqueta de dato: Medido, Calculado, Estimado (Inicio e Impacto; P13 pendiente de catálogo) ── */
.cedro-data-tag {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--cp-font-body);
    font-size: 12.5px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}
.cedro-data-tag--measured  { background: var(--cp-tint-green); color: var(--cp-accent); }
.cedro-data-tag--calculated{ background: var(--cp-tint-teal);  color: var(--cp-teal-text); }
.cedro-data-tag--estimated { background: var(--cp-tint-sun);   color: var(--cp-sun-text); }

.cedro-text-link { color: var(--cp-accent); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.cedro-text-link:hover { text-decoration: underline; }

/* ── Lista de datos (Crece) y texto corto (Presupuestos) ── */
.cedro-details { margin: 0; }
.cedro-details div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid var(--cp-border);
}
.cedro-details div:last-child { border-bottom: 0; }
.cedro-details dt { color: var(--cp-muted); font-size: 12.5px; }
.cedro-details dd { margin: 0; color: var(--cp-ink); font-size: 12.5px; font-weight: 600; text-align: right; }
.cedro-copy { margin: 16px 0 0; color: var(--cp-muted); font-size: 12.5px; line-height: 1.6; }
.cedro-notice {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding: 15px;
    border: 1px solid var(--cp-line-sun);
    border-radius: var(--cp-r-sm);
    background: var(--cp-tint-sun);
    color: var(--cp-sun-text);
}
.cedro-notice p { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; }
/* Lo que acaba de pasar (Crece, #181): verde si salió bien, sol si falta algo. */
.cedro-notice--ok { border-color: color-mix(in srgb, var(--cp-fam-web) 40%, transparent); background: var(--cp-tint-green); color: var(--cp-ink); }
.cedro-notice--ok i { color: var(--cp-teal-text); }
.cedro-notice--ok p, .cedro-notice--warn p { font-size: 13.5px; }

/* ── Botón (base; Anillos lo sube a 44 px más abajo) ── */
.cedro-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--cp-r-pill);
    font-family: var(--cp-font-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
    white-space: nowrap;
}
.cedro-button--secondary {
    border: 1px solid var(--cp-border-hi);
    background: var(--cp-surface2);
    color: var(--cp-sub);
}
.cedro-button--secondary:hover { border-color: var(--cp-teal); color: var(--cp-accent); }
.cedro-button--primary {
    border: 1px solid var(--cp-btn-bg);
    background: var(--cp-btn-bg);
    color: var(--cp-btn-text) !important;
    font-weight: 600;
}
.cedro-button--primary:hover { background: var(--cp-btn-hover); border-color: var(--cp-btn-hover); }
.cedro-button:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 2px; }

/* ── Animations ───────────────────────────────────────── */
@keyframes cedro-spin    { to { transform: rotate(360deg); } }
@keyframes cedro-live    { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(1.35)} }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 780px) {
    .cedro-panel { padding: 16px; border-radius: var(--cp-r-sm); }
    .cedro-page-header { align-items: flex-start; flex-direction: column; }
    .cedro-toolbar { width: 100%; }
    .cedro-field { flex: 1; }
    .cedro-field select { width: 100%; min-width: 0; }
}
@media (max-width: 520px) {
    .cedro-page-header h1 { font-size: 24px; }
    .cedro-button { flex: 1; }
    /* Pestañas a la medida de su texto (#180): tres caben en 390 px; si hay más, la barra se desplaza como siempre. */
    .cedro-tab { flex: 1 0 auto; padding: 7px 10px; }
    /* Pestañas de página en móvil (#240): sin el icono (es adorno; el texto ya lo dice) y sin la coletilla
       .cedro-tab-extra («Frases de tu web» → «Frases»), para que quepan enteras con su contador. */
    .cedro-tabs--page .cedro-tab > i, .cedro-tab-extra { display: none; }
    /* Las acciones con candado (preguntas de Cedro IA del escaparate), una por fila y a todo el ancho (#180). */
    .cedro-card-actions .cedro-button--locked { flex: 1 1 100%; justify-content: flex-start; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    .cedro-icon-button.is-spinning i { animation: none; }
}

/* ==========================================================================
   Anillos · componentes compartidos (docs/DISENO-ANILLOS.md, docs/anillos/COMPONENTES.md)
   Los usa todo el panel: Inicio, ficha de web, Care y Crece (contrato crece-pantalla-v1 §7).
   Solo tokens --cp-*. Objetivos táctiles de 44 px como mínimo.
   ========================================================================== */

/* Botones: 44 px y el grande de «Aprobar todo». */
.cedro-panel .cedro-button { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.cedro-button--xl { min-height: 52px; padding: 12px 26px; font-size: 16px; }
.cedro-button--ghost { border: 0; background: transparent; color: var(--cp-link); padding-inline: 8px; }
.cedro-button--ghost:hover { color: var(--cp-ink); text-decoration: underline; }

/* Pestañas en píldora, con contador opcional (.cedro-count). */
.cedro-panel .cedro-tabs { border-radius: var(--cp-r-pill); padding: 5px; }
.cedro-panel .cedro-tab { min-height: 44px; border-radius: var(--cp-r-pill); font-size: 14px; }
.cedro-panel .cedro-tab.is-active { background: var(--cp-surface); color: var(--cp-ink); box-shadow: 0 1px 2px rgba(17,22,21,.08); }
.cedro-count {
    display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px;
    border-radius: var(--cp-r-pill); background: var(--cp-fam-crece); color: var(--cp-on-fam);
    font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
}

/* Chip de estado o de producto. */
.cedro-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 11px;
    border-radius: var(--cp-r-pill); background: var(--cp-surface2); color: var(--cp-sub);
    font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.cedro-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.cedro-chip--plain::before { display: none; }
.cedro-chip--ok { background: var(--cp-tint-green); color: var(--cp-accent); }
.cedro-chip--warn { background: var(--cp-tint-sun); color: var(--cp-sun-text); }
.cedro-chip--crit { background: var(--cp-tint-red); color: var(--cp-red-text); }
.cedro-chip--off { background: var(--cp-surface2); color: var(--cp-muted); }
.cedro-chip--web, .cedro-chip--care, .cedro-chip--crece, .cedro-chip--mail { color: var(--cp-on-fam); }
.cedro-chip--web { background: var(--cp-fam-web); }
.cedro-chip--care { background: var(--cp-fam-care); }
.cedro-chip--crece { background: var(--cp-fam-crece); }
.cedro-chip--mail { background: var(--cp-fam-mail); }
.cedro-chip--web::before, .cedro-chip--care::before, .cedro-chip--crece::before, .cedro-chip--mail::before { display: none; }

/* Tarjeta de cifra con su cambio. */
.cedro-stat {
    display: grid; gap: 6px; align-content: start; padding: 18px 20px; min-width: 0;
    border: 1px solid var(--cp-border); border-radius: var(--cp-r-lg); background: var(--cp-surface);
}
.cedro-stat-label { color: var(--cp-muted); font-size: 13px; font-weight: 600; }
.cedro-stat-value {
    color: var(--cp-ink); font-family: var(--cp-font-display); font-size: 34px; font-weight: 800;
    line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums;
}
.cedro-stat-value small { margin-left: 4px; color: var(--cp-muted); font-size: 15px; font-weight: 600; letter-spacing: 0; }
.cedro-stat-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--cp-muted); }
.cedro-stat-delta--up { color: var(--cp-accent); }
.cedro-stat-delta--down { color: var(--cp-red-text); }
.cedro-stat-note { margin: 0; color: var(--cp-muted); font-size: 13px; }
.cedro-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

/* Bloque principal en tinta con barras (el mes en una frase). */
.cedro-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 280px); gap: 20px 28px; align-items: end;
    padding: 24px 26px; border-radius: var(--cp-r-xl);
    background: var(--cp-hero-from); color: var(--cp-ia-ink);
}
.cedro-hero-kicker { margin: 0 0 8px; color: color-mix(in srgb, var(--cp-ia-ink) 70%, transparent); font-size: 13px; font-weight: 600; }
.cedro-hero-text { margin: 0; font-family: var(--cp-font-display); font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; text-wrap: balance; }
.cedro-hero-text strong { color: var(--cp-green); font-weight: 800; }
/* Enlace bajo la frase del mes («Ver el informe de octubre», #547): Mint sobre tinta, 44 px táctiles. */
.cedro-hero-link { margin: 10px 0 0; }
.cedro-hero-link a {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
    color: var(--cp-green); font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.cedro-hero-link a:hover { text-decoration-thickness: 2px; }
.cedro-hero-link a:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 2px; border-radius: 4px; }
.cedro-bars { display: flex; align-items: flex-end; gap: 4px; height: 96px; }
.cedro-bars span { flex: 1; min-height: 3px; border-radius: 4px 4px 1px 1px; background: color-mix(in srgb, var(--cp-ia-ink) 26%, transparent); }
.cedro-bars span:last-child { background: var(--cp-green); }
.cedro-bars-legend { display: flex; justify-content: space-between; margin-top: 6px; color: color-mix(in srgb, var(--cp-ia-ink) 62%, transparent); font-size: 12px; }

/* Aviso por nivel con su botón. */
.cedro-alert {
    display: grid; gap: 8px; padding: 18px 20px; border-radius: var(--cp-r-lg);
    background: var(--cp-tint-green); color: var(--cp-ink);
}
.cedro-alert--alto { background: var(--cp-tint-sun); box-shadow: inset 0 0 0 1px var(--cp-line-sun); }
.cedro-alert--medio { background: var(--cp-tint-green); }
.cedro-alert-title { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.cedro-alert-detail { margin: 0; color: var(--cp-sub); font-size: 14px; line-height: 1.55; }
.cedro-alert-actions, .cedro-task-actions, .cedro-offer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cedro-alerts { display: grid; gap: 12px; }

/* Lista con punto de estado: lleno = sí, aro = a medias, gris = no aplica. */
.cedro-dotlist { list-style: none; margin: 0; padding: 0; }
.cedro-dotlist li {
    display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center;
    padding: 12px 0; border-top: 1px solid var(--cp-border); font-size: 14px;
}
.cedro-dotlist li:first-child { border-top: 0; }
.cedro-dotlist small { color: var(--cp-muted); font-size: 12.5px; text-align: right; overflow-wrap: anywhere; }
/* En móvil, el dato de la derecha baja debajo del texto: si no, lo estrecha hasta dejar una palabra por línea (#240). */
@media (max-width: 520px) {
    .cedro-dotlist li { grid-template-columns: 14px minmax(0, 1fr); align-items: start; row-gap: 2px; }
    .cedro-dotlist li > .cedro-dot { margin-top: 4px; }
    .cedro-dotlist li > small { grid-column: 2; text-align: left; }
}
/* El dato largo (las URL de ejemplo del vigía de indexación, #696) va siempre debajo, como en móvil. */
.cedro-dotlist--debajo li { grid-template-columns: 14px minmax(0, 1fr); align-items: start; row-gap: 2px; }
.cedro-dotlist--debajo li > .cedro-dot { margin-top: 4px; }
.cedro-dotlist--debajo li > small { grid-column: 2; text-align: left; }
.cedro-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cp-border-hi); }
.cedro-dot--ok { background: var(--cp-accent); }
.cedro-dot--ring { background: transparent; box-shadow: inset 0 0 0 2.5px var(--cp-sun); }
.cedro-dot--off { background: var(--cp-border-hi); }
.cedro-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--cp-muted); font-size: 12.5px; }
.cedro-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Antes y después. */
.cedro-diff { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--cp-r-md); background: var(--cp-surface2); font-size: 14px; }
.cedro-diff-label { color: var(--cp-muted); font-size: 12.5px; font-weight: 600; }
.cedro-diff del { color: var(--cp-muted); text-decoration-color: var(--cp-red); overflow-wrap: anywhere; }
.cedro-diff ins { color: var(--cp-ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }

/* Tarjeta de tarea (Cedro IA, «proponer_tarea») y ficha de cambio: un botón, el clic lo da el cliente. */
.cedro-task {
    display: grid; gap: 8px; padding: 16px 18px; border-radius: var(--cp-r-lg);
    background: var(--cp-surface); box-shadow: inset 0 0 0 1.5px var(--cp-ink); color: var(--cp-ink);
}
.cedro-task-kicker { margin: 0; color: var(--cp-muted); font-size: 12.5px; font-weight: 600; }
.cedro-task-title { margin: 0; font-size: 15.5px; font-weight: 700; line-height: 1.35; }
.cedro-task-detail { margin: 0; color: var(--cp-sub); font-size: 14px; line-height: 1.5; }
.cedro-task dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13.5px; }
.cedro-task dt { color: var(--cp-muted); }
.cedro-task dd { margin: 0; overflow-wrap: anywhere; }

/* Oferta y tarjeta gratis: color de la familia del producto, texto en tinta. */
.cedro-offer {
    display: grid; gap: 10px; align-content: start; padding: 20px 22px; border-radius: var(--cp-r-lg);
    background: var(--cp-fam-care); color: var(--cp-on-fam);
}
.cedro-offer--crece { background: var(--cp-fam-crece); }
.cedro-offer--web { background: var(--cp-fam-web); }
.cedro-offer--mail { background: var(--cp-fam-mail); }
.cedro-offer-kicker { margin: 0; font-size: 12.5px; font-weight: 600; opacity: .78; }
.cedro-offer-title { margin: 0; font-family: var(--cp-font-display); font-size: 18px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em; }
.cedro-offer-text { margin: 0; font-size: 14px; line-height: 1.55; opacity: .88; }
.cedro-offer .cedro-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.cedro-offer .cedro-stat { border: 0; background: color-mix(in srgb, var(--cp-on-fam) 8%, transparent); padding: 12px 14px; }
.cedro-offer .cedro-stat-value { font-size: 26px; color: var(--cp-on-fam); }
.cedro-offer .cedro-stat-label { color: var(--cp-on-fam); opacity: .78; }
.cedro-offer .cedro-button--primary { background: var(--cp-on-fam); border-color: var(--cp-on-fam); color: var(--cp-ia-ink) !important; }
.cedro-offer .cedro-button--secondary { background: transparent; border-color: color-mix(in srgb, var(--cp-on-fam) 35%, transparent); color: var(--cp-on-fam); }

/* Anillos: estado en anillos concéntricos (los pinta js/anillos.js) con su leyenda en texto. */
.cedro-rings { display: flex; align-items: center; gap: 18px; }
.cedro-rings svg { flex: none; }
.cedro-rings-track { stroke: var(--cp-well); }
.cedro-rings-arc { transition: stroke-dashoffset .9s cubic-bezier(.22,1,.36,1); }
.cedro-rings-arc--ok { stroke: var(--cp-fam-web); }
.cedro-rings-arc--warn { stroke: var(--cp-fam-care); }
.cedro-rings-arc--crit { stroke: var(--cp-red); }
.cedro-rings-arc--off { stroke: var(--cp-border-hi); }
.cedro-rings ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--cp-muted); }
.cedro-rings li { display: grid; grid-template-columns: 9px minmax(0, 1fr); column-gap: 8px; align-items: center; }
.cedro-rings li span { grid-column: 2; font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.cedro-rings li b { color: var(--cp-ink); font-weight: 600; }
.cedro-rings li i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
@media (prefers-reduced-motion: reduce) { .cedro-rings-arc { transition: none; } }

/* Pantalla con Cedro IA al lado (Crece, ficha de web); en móvil, debajo. */
.cedro-dock { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 20px; align-items: start; }
.cedro-dock-aside { position: sticky; top: 16px; display: grid; gap: 12px; padding: 18px; border-radius: var(--cp-r-xl); background: var(--cp-ia-bg); color: var(--cp-ia-ink); }
.cedro-dock-aside .cedro-task { background: var(--cp-surface); color: var(--cp-ink); box-shadow: none; }
.cedro-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.cedro-suggest button {
    min-height: 40px; padding: 8px 14px; border: 1px solid color-mix(in srgb, var(--cp-ia-ink) 20%, transparent);
    border-radius: var(--cp-r-pill); background: color-mix(in srgb, var(--cp-ia-ink) 8%, transparent);
    color: var(--cp-ia-ink); font: 500 13.5px var(--cp-font-body); text-align: left; cursor: pointer;
}
.cedro-suggest button:hover { background: color-mix(in srgb, var(--cp-ia-ink) 14%, transparent); }
/* Las sugerencias van siempre sobre el fondo de Cedro IA: su foco, en --cp-ia-focus (#709). */
.cedro-suggest button:focus-visible { outline: 2px solid var(--cp-ia-focus); outline-offset: 2px; }
@media (max-width: 1100px) {
    .cedro-dock { grid-template-columns: minmax(0, 1fr); }
    .cedro-dock-aside { position: static; }
}
@media (max-width: 720px) {
    .cedro-hero { grid-template-columns: minmax(0, 1fr); }
    .cedro-bars { height: 64px; }
}

/* Tarjeta de contenido (radio 20): una cosa que decidir o leer, con su título y sus botones (Crece «Para aprobar»). */
.cedro-card {
    display: grid; gap: 10px; align-content: start; padding: 18px 20px; min-width: 0;
    border: 1px solid var(--cp-border); border-radius: var(--cp-r-lg); background: var(--cp-surface); color: var(--cp-ink);
}
.cedro-card-kicker { margin: 0; color: var(--cp-muted); font-size: 12.5px; font-weight: 600; }
.cedro-card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.cedro-card-text { margin: 0; color: var(--cp-sub); font-size: 14px; line-height: 1.55; }
.cedro-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.cedro-cards { display: grid; gap: 12px; }
.cedro-block-title { margin: 6px 0 0; color: var(--cp-ink); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }

/* Chips que se eligen: el propuesto lleva borde discontinuo y dos botones (aceptar y quitar). */
.cedro-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
/* Un chip con texto largo (un tema de hasta 120 caracteres) no pasa del ancho: parte por palabras (E2.4, #260). */
.cedro-chips > .cedro-chip { max-width: 100%; white-space: normal; overflow-wrap: break-word; }
.cedro-chip--pick { min-height: 44px; padding: 6px 6px 6px 14px; gap: 4px; white-space: normal; font-size: 13.5px; }
.cedro-chip--pick::before { display: none; }
.cedro-chip-when { display: block; margin-top: 1px; color: var(--cp-sub); font-size: 12px; font-weight: 500; }
/* «Próximo artículo» (Crece, #181): cuándo y qué pasa al aprobarlo. */
.cedro-next { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--cp-r-md); background: var(--cp-surface2); }
.cedro-next-title { margin: 0; color: var(--cp-ink); font-size: 14.5px; line-height: 1.5; }
.cedro-next .cedro-stat-note { margin: 0; }
/* Historial: lo ya hecho, más callado que lo que espera tu OK. */
.cedro-card--quiet { background: transparent; border-style: dashed; }
.cedro-chip--dashed { background: transparent; color: var(--cp-ink); border: 1.5px dashed var(--cp-border-hi); }
.cedro-chip-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; padding: 0; border: 0;
    border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.cedro-chip-btn:hover { background: var(--cp-hover); }
.cedro-chip-btn:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 1px; }

/* «Ver más»: lo secundario, plegado. */
.cedro-more { border-top: 1px solid var(--cp-border); padding-top: 4px; }
.cedro-more > summary {
    display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--cp-link);
    font-size: 14px; font-weight: 600; cursor: pointer; list-style: none;
}
.cedro-more > summary::-webkit-details-marker { display: none; }
.cedro-more > summary::after { content: "\f107"; font-family: "Font Awesome 6 Free", "Font Awesome 5 Free"; font-weight: 900; }
.cedro-more[open] > summary::after { content: "\f106"; }
.cedro-more > summary:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
.cedro-more-body { display: grid; gap: 14px; padding: 6px 0 4px; }

/* Tabla de datos: cifras alineadas, en móvil se desplaza. */
.cedro-table-wrap { overflow-x: auto; }
.cedro-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cedro-table th { padding: 8px 10px; border-bottom: 1px solid var(--cp-border-hi); color: var(--cp-muted); font-size: 12.5px; font-weight: 600; text-align: left; }
/* break-word y no anywhere: la columna no se estrecha partiendo palabras; si no cabe, se desplaza la tabla (#240). */
.cedro-table td { padding: 10px; border-bottom: 1px solid var(--cp-border); color: var(--cp-ink); overflow-wrap: break-word; }
.cedro-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Texto largo para leer (el borrador de un artículo): ya viene limpio del servidor. */
.cedro-prose { color: var(--cp-ink); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.cedro-prose h2 { margin: 18px 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.cedro-prose h3, .cedro-prose h4 { margin: 14px 0 6px; font-size: 16px; font-weight: 700; }
.cedro-prose p, .cedro-prose ul, .cedro-prose ol, .cedro-prose blockquote, .cedro-prose figure { margin: 0 0 12px; }
.cedro-prose img { max-width: 100%; height: auto; border-radius: var(--cp-r-md); }
.cedro-prose figcaption { color: var(--cp-muted); font-size: 12.5px; }
.cedro-prose a { color: var(--cp-link); }
.cedro-prose details { padding: 8px 0; border-top: 1px solid var(--cp-border); }
.cedro-prose summary { font-weight: 600; cursor: pointer; }

/* Formulario: campos de texto con la medida de los controles (44 px, radio 14). */
.cedro-form { display: grid; gap: 14px; }
.cedro-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cedro-form .cedro-field input:not([type="checkbox"]), .cedro-form .cedro-field textarea {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--cp-border-hi); border-radius: var(--cp-r-md);
    background: var(--cp-surface2); color: var(--cp-ink); font: 400 14px/1.45 var(--cp-font-body); resize: vertical;
}
.cedro-form .cedro-field input:focus, .cedro-form .cedro-field textarea:focus { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
.cedro-form .cedro-field small { color: var(--cp-muted); font-size: 12px; }
.cedro-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.cedro-form-row > .cedro-field { flex: 1 1 260px; }
.cedro-check { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--cp-ink); font-size: 14px; }
@media (max-width: 720px) { .cedro-form-grid { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================================
   Anillos · F4: piezas de pantalla (Correo y las que siguen; la ficha de web las tiene como ws-*)
   Fichas de producto en rejilla, pestañas de página y tarjeta con título e icono.
   ========================================================================== */
.cedro-panel .cedro-products { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cedro-tabs--page { margin: 4px 0 0; }
.cedro-tabpanel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cedro-tabpanel[hidden] { display: none; }
.cedro-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cedro-card-title--icon { display: flex; align-items: center; gap: 10px; font: 700 17px var(--cp-font-display); letter-spacing: -.015em; }
.cedro-card-icon {
    display: inline-grid; flex: none; width: 30px; height: 30px; place-items: center; border-radius: var(--cp-r-sm);
    background: var(--cp-surface2); color: var(--cp-sub); font-size: 13px;
}
@media (max-width: 680px) {
    .cedro-panel .cedro-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cedro-products .home-prod { padding: 14px; }
    /* Dos fichas por fila: el icono va encima del título para que «Actualizaciones» quepa entera (#240). Sin guiones
       automáticos: una palabra solo se parte si no cabe ni a todo el ancho de la ficha. */
    .cedro-products .home-prod-head { flex-direction: column; align-items: flex-start; gap: 8px; }
    .cedro-products .home-prod-title { flex: none; width: 100%; font-size: 14px; overflow-wrap: break-word; hyphens: manual; }
    .cedro-products .home-prod-action { flex: none; align-self: flex-start; max-width: 100%; white-space: normal; text-align: left; }
    .cedro-products .home-prod-value { font-size: 14.5px; }
    .cedro-products .home-prod-detail { display: none; }
    .cedro-tabs--page { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .cedro-tabs--page .cedro-tab { flex: 0 0 auto; }
}
/* A 390 px, un poco menos de aire entre pestañas para que tres cortas quepan sin desplazar (Crece, #240). */
@media (max-width: 420px) {
    .cedro-panel .cedro-tabs { gap: 2px; padding: 4px; }
    .cedro-panel .cedro-tab { padding-inline: 7px; }
}

/* ==========================================================================
   Anillos · escaparate (ADR 0032; docs/anillos/ESCAPARATE.md)
   Una superficie sin contratar: lo real arriba y entero, el relleno desenfocado sin
   texto (lo genera js/escaparate.js) y, encima del relleno, la capa con «Activar».
   ========================================================================== */
.cedro-showcase { position: relative; display: grid; gap: 14px; min-width: 0; }
.cedro-showcase-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cedro-showcase-head > :last-child { margin-left: auto; }
.cedro-showcase .cedro-chip-btn.is-locked { opacity: .7; }
.cedro-showcase input:disabled, .cedro-showcase textarea:disabled { opacity: .6; cursor: not-allowed; }
.cedro-showcase-real { position: relative; z-index: 1; min-width: 0; }
/* Relleno y capa en la misma celda: el velo crece con la tarjeta y nunca la corta (a 390 px, el botón «Activar» y el
   enlace se quedaban fuera en la ficha, #282). */
.cedro-showcase-veil {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-height: 190px; overflow: hidden;
    border-radius: var(--cp-r-md);
}
.cedro-showcase-veil > .cedro-showcase-filler, .cedro-showcase-veil > .cedro-showcase-cta { grid-area: 1 / 1; min-width: 0; }
.cedro-showcase-filler {
    display: grid; align-content: start; gap: 12px; padding: 8px 4px; filter: blur(5px); opacity: .75;
    pointer-events: none; user-select: none;
}
.cedro-showcase-filler .is-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px 44px; gap: 14px; align-items: center; }
.cedro-showcase-filler .is-diff { display: grid; gap: 8px; padding: 12px; border-radius: var(--cp-r-md); background: var(--cp-surface2); }
.cedro-showcase-filler .is-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.cedro-showcase-filler i { display: block; height: 12px; border-radius: 99px; background: var(--cp-border-hi); }
.cedro-showcase-filler .is-bars i { flex: 1; height: auto; border-radius: 4px 4px 1px 1px; }
.cedro-showcase-cta { position: relative; z-index: 2; display: grid; place-items: center; padding: 14px; }
.cedro-showcase-veil:has(.is-bars) { min-height: 250px; }
.cedro-showcase-veil:has(.is-bars) .cedro-showcase-cta { place-items: end center; }
.cedro-showcase-card {
    display: grid; gap: 10px; justify-items: start; max-width: 440px; padding: 18px 20px; border-radius: var(--cp-r-lg);
    background: var(--cp-surface); color: var(--cp-ink);
    box-shadow: inset 0 0 0 1px var(--cp-border), 0 22px 44px -26px rgba(0, 0, 0, .45);
}
.cedro-showcase-card p { margin: 0; }
.cedro-showcase-title { font-family: var(--cp-font-display); font-size: 16.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
.cedro-showcase-text { color: var(--cp-sub); font-size: 14px; line-height: 1.5; }
.cedro-showcase-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.cedro-showcase-note { color: var(--cp-muted); font-size: 12.5px; }

/* «Ejemplo»: siempre visible cuando la parte no es real (ADR 0032 §2). */
.cedro-tag-ejemplo {
    display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 2px 10px; border-radius: var(--cp-r-pill);
    background: var(--cp-ink); color: var(--cp-bg); font-size: 12px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.cedro-tag-ejemplo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cp-fam-care); }
.cedro-is-example { opacity: .55; }

/* «Activar»: el botón del producto, en su color. */
.cedro-button--activate { border: 0; background: var(--cp-fam-web); color: var(--cp-on-fam) !important; font-weight: 700; }
.cedro-button--activate.is-care { background: var(--cp-fam-care); }
.cedro-button--activate.is-crece { background: var(--cp-fam-crece); }
.cedro-button--activate.is-mail { background: var(--cp-fam-mail); }
.cedro-button--activate:hover { filter: brightness(1.05); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--cp-on-fam) 18%, transparent); }

/* Acciones dentro de una superficie sin contratar: mismo verbo, candado y «con Crece/Care». Abren la hoja «Activar». */
.cedro-button--locked { gap: 7px; }
.cedro-button--locked::before {
    content: ""; width: 12px; height: 12px; flex: none; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h.5A1.5 1.5 0 0 1 14 8.5v5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5v-5A1.5 1.5 0 0 1 3.5 7H4Zm2 0h4V5a2 2 0 1 0-4 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 7V5a4 4 0 1 1 8 0v2h.5A1.5 1.5 0 0 1 14 8.5v5a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 13.5v-5A1.5 1.5 0 0 1 3.5 7H4Zm2 0h4V5a2 2 0 1 0-4 0v2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cedro-button--locked small { font-weight: 500; opacity: .75; white-space: nowrap; }
/* Un botón nunca más ancho que su tarjeta (#180): un texto largo, como las preguntas de Cedro IA en el escaparate, baja
   de línea en vez de ensanchar la página en el móvil. */
.cedro-card-actions .cedro-button, .cedro-button--locked { max-width: 100%; white-space: normal; overflow-wrap: break-word; }

/* Hoja «Activar»: qué pasaría con esa acción y el botón a la página de alta (el precio está allí). */
.cedro-sheet {
    width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--cp-r-xl);
    background: var(--cp-surface); color: var(--cp-ink); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .6);
}
.cedro-sheet::backdrop { background: rgba(14, 20, 18, .45); }
.cedro-sheet-body { display: grid; gap: 12px; padding: 22px 24px 20px; font-family: var(--cp-font-body); }
.cedro-sheet-kicker { margin: 0; color: var(--cp-muted); font-size: 13px; font-weight: 600; }
.cedro-sheet-title { margin: 0; font-family: var(--cp-font-display); font-size: 21px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.cedro-sheet-text { margin: 0; color: var(--cp-sub); font-size: 14.5px; line-height: 1.55; }
.cedro-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cedro-sheet-note { margin: 0; color: var(--cp-muted); font-size: 12.5px; }
/* Precio en la hoja: el de PLANES/Upmind (data-precio) o, hasta que exista, el hueco «Pendiente de publicar» (LR-05). */
.cedro-sheet-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 14px; border-radius: var(--cp-r-md); background: var(--cp-surface2); }
.cedro-sheet-price span { color: var(--cp-muted); font-size: 13px; font-weight: 600; }
.cedro-sheet-price strong { color: var(--cp-ink); font: 700 18px var(--cp-font-display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cedro-sheet-price.is-pending { background: transparent; box-shadow: inset 0 0 0 1px var(--cp-border-hi); }
.cedro-sheet-price.is-pending strong { color: var(--cp-muted); font: 600 13.5px var(--cp-font-body); }
@media (prefers-reduced-transparency: reduce) { .cedro-showcase-filler { filter: none; opacity: .35; } }

/* ==========================================================================
   Anillos · E4.2: las piezas que faltaban (docs/anillos/pantallas/README.md, P1 a P11 y P16)
   Una clase por pieza. JS en anillos.js: CedroAnillos.confirm, .toast y [data-copy].
   ========================================================================== */

/* P1 · Cabecera de pantalla. Título, frase de estado que lleva a lo que pide atención, línea de datos y herramientas
   (selector, «Pregúntale a Cedro», «Actualizar» y como mucho un primario). Un desplegable va a la altura de los botones:
   su nombre queda para los lectores de pantalla (el valor ya dice qué es) y la forma es la misma píldora (LJ, 5/11). */
.cedro-hello { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.cedro-hello-main { min-width: 0; flex: 1 1 520px; }
.cedro-hello h1 { margin: 0; color: var(--cp-ink); font-family: var(--cp-font-display); font-size: clamp(30px, 3.2vw, 40px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; text-wrap: balance; }
.cedro-hello-status { margin: 10px 0 0; color: var(--cp-ink); font-size: 17px; font-weight: 600; line-height: 1.4; }
.cedro-hello-status a { color: var(--cp-link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.cedro-hello-status a:hover { color: var(--cp-ink); }
.cedro-hello-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; color: var(--cp-muted); font-size: 13.5px; }
.cedro-hello-meta > span:empty { display: none; }
/* Chips de estado bajo la línea de datos (Crece: Google, SEO y blog, #289). */
.cedro-hello-main > .cedro-chips { margin-top: 12px; }
.cedro-hello-main > .cedro-chips:empty { display: none; }
.cedro-hello-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cedro-hello-tools .cedro-field { display: flex; min-width: 0; margin: 0; }
.cedro-hello-tools .cedro-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cedro-hello-tools .cedro-field select { height: 44px; min-height: 44px; padding: 0 38px 0 16px; border-radius: var(--cp-r-pill); font-size: 14px; font-weight: 600; }
.cedro-hello-tools .cedro-button { min-height: 44px; }
/* Las herramientas, a la derecha en todas las pantallas (regla común, #290): en pantalla ancha, dos columnas; si no caben
   en una fila, bajan dentro de la suya, alineadas a la derecha, y el título conserva su sitio. Con Cedro IA abierto al
   lado (html.cia-docked le quita 440 px desde 1280 px), igual que en una pantalla más estrecha. */
@media (min-width: 1200px) {
    .cedro-hello { display: grid; grid-template-columns: minmax(0, 1fr) fit-content(62%); align-items: start; }
    .cedro-hello-tools { justify-content: flex-end; }
}
@media (min-width: 1280px) and (max-width: 1639px) {
    html.cia-docked .cedro-hello { display: flex; }
    html.cia-docked .cedro-hello-tools { justify-content: flex-start; }
}
/* En el móvil, compactas (#625): sin una fila por herramienta antes del primer dato. Un selector solo va en su fila;
   dos seguidos (qué web y el periodo) la comparten: el primero se estira y el segundo va a su medida. Los botones, de
   dos en dos y a partes iguales. A 420 px o menos, sin el icono (es adorno; el texto ya lo dice), para que quepan. */
@media (max-width: 620px) {
    .cedro-hello-tools { width: 100%; }
    .cedro-hello-tools .cedro-field { flex: 1 1 100%; }
    .cedro-hello-tools .cedro-field:has(+ .cedro-field) { flex: 1 1 9rem; }
    .cedro-hello-tools .cedro-field + .cedro-field { flex: 0 0 auto; }
    .cedro-hello-tools .cedro-field select { width: 100%; padding: 0 32px 0 14px; text-overflow: ellipsis; }
    .cedro-hello-tools .cedro-button { flex: 1 1 auto; padding-inline: 12px; }
}
@media (max-width: 420px) {
    .cedro-hello-tools .cedro-button > i { display: none; }
}

/* P2 · Esqueleto: la forma de lo que va a llegar. Quieto con prefers-reduced-motion. */
.cedro-skeleton {
    display: block; height: 14px; border-radius: var(--cp-r-pill);
    background: linear-gradient(90deg, var(--cp-surface2) 0%, var(--cp-border) 50%, var(--cp-surface2) 100%);
    background-size: 200% 100%; animation: cedro-skeleton 1.4s ease-in-out infinite;
}
.cedro-skeleton--line { width: 70%; }
.cedro-skeleton--stat { width: 100%; height: 96px; border-radius: var(--cp-r-lg); }
.cedro-skeleton--card { width: 100%; height: 140px; border-radius: var(--cp-r-lg); }
@keyframes cedro-skeleton { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .cedro-skeleton { animation: none; } }

/* P3 · Aviso de error: qué no se ha podido leer, que lo demás sigue bien, y «Reintentar». Dentro del bloque que falla. */
.cedro-alert--error { background: var(--cp-tint-red); box-shadow: inset 0 0 0 1px var(--cp-line-red); }
.cedro-alert--error .cedro-alert-title { color: var(--cp-red-text); }

/* P4 · Estado vacío: qué pasa, por qué y una sola acción. */
.cedro-empty {
    display: grid; justify-items: start; gap: 8px; padding: 22px 24px; border: 1px dashed var(--cp-border-hi);
    border-radius: var(--cp-r-lg); background: transparent; color: var(--cp-ink);
}
.cedro-empty-icon { display: inline-grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--cp-surface2); color: var(--cp-sub); }
.cedro-empty-title { margin: 0; font: 700 16px/1.35 var(--cp-font-display); letter-spacing: -.01em; }
.cedro-empty-text { margin: 0; max-width: 62ch; color: var(--cp-sub); font-size: 14px; line-height: 1.55; }
.cedro-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* P5 · Botón de peligro y hoja de confirmación (CedroAnillos.confirm): lo que no se deshace. */
.cedro-button--danger { border: 1px solid var(--cp-red); background: var(--cp-red); color: var(--cp-bg) !important; }
.cedro-button--danger:hover { filter: brightness(.92); }
.cedro-button--danger-ghost { border: 1px solid var(--cp-line-red); background: transparent; color: var(--cp-red-text) !important; }
.cedro-button--danger-ghost:hover { background: var(--cp-tint-red); }
.cedro-sheet:modal { position: fixed; inset: 0; margin: auto; max-height: calc(100vh - 32px); }
.cedro-sheet--confirm .cedro-sheet-kicker.is-danger { color: var(--cp-red-text); }
.cedro-sheet-where { margin: 0; padding: 10px 14px; border-radius: var(--cp-r-md); background: var(--cp-surface2); color: var(--cp-ink); font-size: 14px; overflow-wrap: anywhere; }
/* P5 con consentimiento (E3.3, restaurar una copia): más ancha y con desplazamiento, la casilla que hay que marcar y el
   campo donde se escribe el nombre de la web. El verbo sigue apagado hasta que las dos cosas están hechas. */
.cedro-sheet--consent { width: min(600px, calc(100vw - 24px)); }
.cedro-sheet--consent .cedro-sheet-body { max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.cedro-sheet-consent { align-items: flex-start; padding: 12px 14px; border-radius: var(--cp-r-md); box-shadow: inset 0 0 0 1px var(--cp-border-hi); font-weight: 600; line-height: 1.45; cursor: pointer; }
.cedro-sheet-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--cp-red); }
.cedro-sheet-type { color: var(--cp-sub); font-size: 13.5px; }
.cedro-sheet-type strong { color: var(--cp-ink); font-family: var(--cp-font-mono); font-weight: 600; overflow-wrap: anywhere; }
.cedro-sheet-type input {
    width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--cp-border-hi); border-radius: var(--cp-r-md);
    background: var(--cp-surface2); color: var(--cp-ink); font: 400 15px/1.45 var(--cp-font-body);
}
.cedro-sheet-type input:focus { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
.cedro-sheet-actions .cedro-button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
@media (max-width: 620px) { .cedro-sheet--consent .cedro-sheet-actions .cedro-button { flex: 1 1 100%; } }

/* P6 · Aviso con Deshacer (CedroAnillos.toast): abajo, unos segundos; rojo con «Reintentar» si falla. */
.cedro-toasts { position: fixed; z-index: 1200; left: 50%; bottom: 20px; display: grid; gap: 8px; width: min(520px, calc(100vw - 32px)); transform: translateX(-50%); pointer-events: none; }
.cedro-toast {
    display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: var(--cp-r-md);
    background: var(--cp-ink); color: var(--cp-bg); font: 500 14px/1.4 var(--cp-font-body);
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55); pointer-events: auto; animation: cedro-toast-in .18s ease-out;
}
.cedro-toast-text { flex: 1; min-width: 0; }
.cedro-toast-action { flex: none; min-height: 36px; padding: 4px 12px; border: 0; border-radius: var(--cp-r-pill); background: transparent; color: var(--cp-btn-bg); font: 700 14px var(--cp-font-body); cursor: pointer; }
.cedro-toast-action:hover { background: color-mix(in srgb, var(--cp-bg) 12%, transparent); }
.cedro-toast-action:focus-visible { outline: 2px solid var(--cp-btn-bg); outline-offset: 1px; }
.cedro-toast.is-error { background: var(--cp-red); color: var(--cp-bg); }
.cedro-toast.is-error .cedro-toast-action { color: var(--cp-bg); text-decoration: underline; }
@keyframes cedro-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cedro-toast { animation: none; } }

/* P7 · Interruptor: encendido o apagado con su etiqueta en frase; 44 px táctiles. */
.cedro-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; color: var(--cp-ink); font-size: 14px; cursor: pointer; }
.cedro-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cedro-switch-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: var(--cp-r-pill); background: var(--cp-border-hi); transition: background .15s; }
.cedro-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--cp-surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.cedro-switch input:checked + .cedro-switch-track { background: var(--cp-accent); }
.cedro-switch input:checked + .cedro-switch-track::after { transform: translateX(18px); }
.cedro-switch input:focus-visible + .cedro-switch-track { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
.cedro-switch input:disabled + .cedro-switch-track { opacity: .5; }
.cedro-switch-label { display: grid; gap: 2px; }
.cedro-switch { font-weight: 400; }
.cedro-switch-label small { color: var(--cp-muted); font-size: 12.5px; font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .cedro-switch-track, .cedro-switch-track::after { transition: none; } }

/* P8 · Valor que se copia: en mono (es lo único en mono) y «Copiar» con su «Copiado». */
.cedro-copyfield { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 14px; border: 1px solid var(--cp-border); border-radius: var(--cp-r-md); background: var(--cp-surface2); }
.cedro-copyfield code { flex: 1; min-width: 0; padding: 0; background: none; color: var(--cp-ink); font: 13px/1.5 var(--cp-font-mono); overflow-wrap: anywhere; }
.cedro-copyfield button { flex: none; min-height: 36px; padding: 4px 12px; border: 1px solid var(--cp-border-hi); border-radius: var(--cp-r-pill); background: var(--cp-surface); color: var(--cp-ink); font: 600 13px var(--cp-font-body); cursor: pointer; }
.cedro-copyfield button.is-done { border-color: var(--cp-accent); color: var(--cp-accent); }

/* P9 · Medidor: lo usado frente a lo incluido, con cifra y barra; en sol al 80 %, en rojo lleno. */
.cedro-meter { display: grid; gap: 6px; min-width: 0; }
.cedro-meter-head { display: flex; justify-content: space-between; gap: 10px; color: var(--cp-sub); font-size: 13.5px; }
.cedro-meter-head strong { color: var(--cp-ink); font-variant-numeric: tabular-nums; }
.cedro-meter-bar { height: 8px; overflow: hidden; border-radius: var(--cp-r-pill); background: var(--cp-surface2); }
.cedro-meter-bar i { display: block; height: 100%; border-radius: inherit; background: var(--cp-accent); }
.cedro-meter.is-high .cedro-meter-bar i { background: var(--cp-sun-text); }
.cedro-meter.is-full .cedro-meter-bar i { background: var(--cp-red); }
.cedro-meter.is-high .cedro-meter-head strong { color: var(--cp-sun-text); }
.cedro-meter.is-full .cedro-meter-head strong { color: var(--cp-red-text); }
.cedro-meter.is-empty .cedro-meter-bar { opacity: .5; }
.cedro-meter-bar i { transition: width .6s ease; }
@media (prefers-reduced-motion: reduce) { .cedro-meter-bar i { transition: none; } }

/* P10 · Pasos: «Paso 2 de 3» con su nombre; en móvil solo el actual lleva nombre. */
.cedro-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: cedro-step; }
.cedro-steps li { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 14px 4px 6px; border-radius: var(--cp-r-pill); background: var(--cp-surface2); color: var(--cp-muted); font-size: 13px; font-weight: 600; counter-increment: cedro-step; }
.cedro-steps li::before { content: counter(cedro-step); display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: var(--cp-surface); color: var(--cp-muted); font-size: 12px; }
.cedro-steps li.is-done { color: var(--cp-accent); }
.cedro-steps li.is-done::before { content: "✓"; background: var(--cp-tint-green); color: var(--cp-accent); }
.cedro-steps li.is-current { background: var(--cp-btn-bg); color: var(--cp-btn-text); }
.cedro-steps li.is-current::before { background: var(--cp-btn-text); color: var(--cp-btn-bg); }
/* Un paso que no salió (E3.3: la restauración no pasó las pruebas y volvió atrás). */
.cedro-steps li.is-failed { background: var(--cp-tint-red); color: var(--cp-red-text); }
.cedro-steps li.is-failed::before { content: "!"; background: var(--cp-surface); color: var(--cp-red-text); }
@media (max-width: 620px) {
    .cedro-steps li:not(.is-current) { padding: 4px; }
    .cedro-steps li:not(.is-current) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* P11 · Línea de tiempo (#290): qué pasó, cuándo y quién, lo último arriba, con «Deshacer» si se puede. Un punto por
   cambio (.cedro-dot) unido al siguiente por una línea; en móvil, la fecha baja debajo de la frase. */
.cedro-timeline { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.cedro-timeline > li { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 9px 0; color: var(--cp-ink); font-size: 14px; line-height: 1.5; }
.cedro-timeline > li::before { position: absolute; top: 0; bottom: 0; left: 5px; width: 2px; background: var(--cp-border); content: ""; }
.cedro-timeline > li:first-child::before { top: 20px; }
.cedro-timeline > li:last-child::before { bottom: calc(100% - 20px); }
.cedro-timeline > li > .cedro-dot { position: relative; align-self: start; margin-top: 5px; box-shadow: 0 0 0 3px var(--cp-surface); }
.cedro-timeline-text { min-width: 0; overflow-wrap: break-word; }
.cedro-timeline-who { display: block; color: var(--cp-muted); font-size: 12.5px; }
.cedro-timeline time { color: var(--cp-muted); font-size: 12.5px; white-space: nowrap; }
.cedro-timeline-actions { display: flex; flex-wrap: wrap; grid-column: 2 / -1; gap: 8px; margin-top: 4px; }
@media (max-width: 620px) {
    .cedro-timeline > li { grid-template-columns: 12px minmax(0, 1fr); }
    .cedro-timeline time, .cedro-timeline-actions { grid-column: 2; }
}

/* P16 · Registro para copiar (#271): lo que el cliente pega en su DNS, numerado y en orden. Tipo, nombre y valor con
   «Copiar» (P8). Si hay que cambiar uno que ya existe, el valor de ahora se enseña entero (para volver atrás) y en el
   nuevo se marca solo lo que se suma: nada tachado ni en rojo, porque no se quita nada. */
.cedro-records { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: cedro-record; }
.cedro-record { display: grid; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--cp-border); border-radius: var(--cp-r-lg); background: var(--cp-surface); counter-increment: cedro-record; }
.cedro-record-head { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.cedro-records .cedro-record-head::before {
    content: counter(cedro-record); flex: none; display: inline-grid; width: 26px; height: 26px; place-items: center;
    border-radius: 50%; background: var(--cp-btn-bg); color: var(--cp-btn-text); font: 700 13px var(--cp-font-body);
}
.cedro-record-title { margin: 0; color: var(--cp-ink); font: 700 15.5px/1.35 var(--cp-font-display); letter-spacing: -.01em; }
.cedro-record-for { display: block; margin-top: 2px; color: var(--cp-muted); font: 600 13px/1.4 var(--cp-font-body); letter-spacing: 0; }
.cedro-record-fields { display: grid; gap: 10px; margin: 0; }
.cedro-record-fields > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.cedro-record-fields dt { padding-top: 10px; color: var(--cp-sub); font-size: 13px; font-weight: 600; }
.cedro-record-fields dd { display: grid; gap: 4px; min-width: 0; margin: 0; }
.cedro-record-type { display: inline-flex; align-items: center; width: fit-content; min-height: 36px; padding: 0 12px; border-radius: var(--cp-r-pill); background: var(--cp-surface2); color: var(--cp-ink); font: 600 13px var(--cp-font-mono); }
.cedro-record small, .cedro-record-hint { margin: 0; color: var(--cp-muted); font-size: 12.5px; line-height: 1.5; }
.cedro-record small code, .cedro-record-hint code { padding: 0; background: none; color: var(--cp-ink); font: 12px var(--cp-font-mono); overflow-wrap: anywhere; }
.cedro-record-hint { padding: 10px 12px; border-radius: var(--cp-r-md); background: var(--cp-tint-green); color: var(--cp-ink); font-size: 13px; }
.cedro-copyfield mark { padding: 1px 3px; border-radius: 4px; background: var(--cp-tint-green); color: var(--cp-accent); font-weight: 700; box-shadow: inset 0 -2px 0 var(--cp-accent); }
.cedro-copyfield--before code { color: var(--cp-sub); }
.cedro-record .cedro-more-body { gap: 8px; }
@media (max-width: 620px) {
    .cedro-record { padding: 14px 12px; }
    .cedro-record-fields > div { grid-template-columns: minmax(0, 1fr); }
    .cedro-record-fields dt { padding-top: 0; }
}

/* P26 · Subtítulo del producto (#427, LJ 16/11): lo que es en dos o tres palabras, debajo del nombre de marca
   («Care Semilla» / «Mantenimiento web», «VPS Cedro» / «Servidor propio»). Siempre del catálogo (`subtitulo` de
   productos-v1), nunca a mano; sin subtítulo no se pinta nada. En una etiqueta pequeña (chip), solo el nombre. */
.cedro-producto-sub {
    display: block; margin: 2px 0 0; color: var(--cp-muted);
    font: 600 12.5px/1.35 var(--cp-font-body); letter-spacing: 0; text-transform: none;
}
.cedro-producto-sub[hidden] { display: none; }
.cedro-sheet-sub { margin-top: -10px; }

/* ── «Cedro IA te hace la web» (#444 diseño, #445 F1): P31, P32 y P33 del prototipo docs/anillos/maqueta-ia-hace-web.html,
   con la clase propuesta en docs/anillos/pantallas/ia-hace-web.md. Van dentro del cajón de Cedro IA: una columna. ── */
/* P31 · Caja para empezar */
.cedro-prompt { display: grid; gap: 12px; padding: 18px 16px; border-radius: var(--cp-r-xl); background: var(--cp-ia-bg); color: var(--cp-ia-ink); }
.cedro-prompt p.cedro-prompt-title { margin: 0; color: var(--cp-ia-ink); font: 800 22px/1.15 var(--cp-font-display); letter-spacing: -.035em; }
.cedro-prompt p.cedro-prompt-text { margin: 0; color: color-mix(in srgb, var(--cp-ia-ink) 78%, transparent); font-size: 14px; line-height: 1.55; }
.cedro-prompt-box { display: grid; border-radius: var(--cp-r-lg); background: var(--cp-surface); color: var(--cp-ink); box-shadow: 0 0 0 1px var(--cp-border); }
.cedro-prompt-box:focus-within { box-shadow: 0 0 0 2px var(--cp-btn-bg); }
.cedro-prompt-box textarea { min-height: 150px; padding: 14px 16px 6px; border: 0; border-radius: var(--cp-r-lg) var(--cp-r-lg) 0 0; background: transparent; color: var(--cp-ink); font: 400 16px/1.55 var(--cp-font-body); resize: vertical; }
.cedro-prompt-box textarea:focus { outline: none; }
.cedro-prompt-box textarea::placeholder { color: var(--cp-muted); }
.cedro-prompt-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px 10px; border-top: 1px solid var(--cp-border); }
.cedro-prompt-tools .cedro-button--primary { flex: 1 1 100%; }
.cedro-prompt .cedro-suggest button { min-height: 44px; }
.cedro-prompt-switch { justify-self: start; color: var(--cp-ia-ink) !important; text-decoration: underline; text-underline-offset: 3px; }
/* Foco de lo que va directo sobre el fondo de la caja (#709). Lo que va en una isla clara (la caja del texto y
   .cedro-seg) se queda con --cp-focus, que sobre su papel sí llega. */
.cedro-prompt > button:focus-visible, .cedro-prompt > a:focus-visible { outline: 2px solid var(--cp-ia-focus); outline-offset: 2px; }
.cedro-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--cp-r-pill); background: var(--cp-surface2); }
.cedro-seg button { min-height: 40px; min-width: 44px; padding: 6px 14px; border: 0; border-radius: var(--cp-r-pill); background: transparent; color: var(--cp-sub); font: 600 13.5px var(--cp-font-body); cursor: pointer; }
.cedro-seg button[aria-pressed="true"] { background: var(--cp-surface); color: var(--cp-ink); box-shadow: 0 1px 2px rgba(17, 22, 21, .12); }
.cedro-seg button:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
/* P32 · Estimación en créditos */
.cedro-estimate { display: grid; gap: 0; padding: 4px 16px 16px; border-radius: var(--cp-r-lg); background: var(--cp-surface); box-shadow: inset 0 0 0 1px var(--cp-border); }
.cedro-estimate-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 0 10px; }
.cedro-estimate-head h3 { margin: 0; font: 750 17px/1.2 var(--cp-font-display); letter-spacing: -.02em; color: var(--cp-ink); }
.cedro-estimate-lines { margin: 0; padding: 0; list-style: none; }
.cedro-estimate-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--cp-border); }
.cedro-estimate-what { color: var(--cp-ink); font-size: 14.5px; font-weight: 600; }
.cedro-estimate-qty, .cedro-estimate-line .cedro-stepper { grid-column: 1; grid-row: 2; }
.cedro-estimate-qty { color: var(--cp-muted); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cedro-estimate-cr { grid-row: 1 / 3; grid-column: 2; min-width: 64px; text-align: right; color: var(--cp-ink); font: 700 16px var(--cp-font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cedro-estimate-cr small { color: var(--cp-muted); font: 600 12px var(--cp-font-body); }
.cedro-stepper { display: none; align-items: center; gap: 4px; }
.cedro-estimate.is-adjusting .cedro-stepper { display: inline-flex; }
.cedro-estimate.is-adjusting .cedro-estimate-qty { display: none; }
.cedro-stepper button { width: 44px; height: 44px; border: 1px solid var(--cp-border-hi); border-radius: 50%; background: var(--cp-surface); color: var(--cp-ink); font: 700 18px var(--cp-font-body); cursor: pointer; }
.cedro-stepper button:hover { border-color: var(--cp-teal); }
.cedro-stepper button:focus-visible { outline: 2px solid var(--cp-focus); outline-offset: 2px; }
.cedro-stepper output { min-width: 30px; text-align: center; font: 700 15px var(--cp-font-body); font-variant-numeric: tabular-nums; color: var(--cp-ink); }
.cedro-estimate-total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 14px 0 4px; border-top: 2px solid var(--cp-ink); }
.cedro-estimate-total > span { color: var(--cp-ink); font-size: 15px; font-weight: 700; }
.cedro-estimate-total strong { color: var(--cp-ink); font: 800 34px/1 var(--cp-font-display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.cedro-estimate-total strong small { margin-left: 6px; color: var(--cp-muted); font: 600 14px var(--cp-font-body); letter-spacing: 0; }
.cedro-estimate-cap { margin: 6px 0 0; color: var(--cp-sub); font-size: 13.5px; line-height: 1.5; }
.cedro-estimate-ref { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; margin: 12px 0 0; font-size: 14px; }
.cedro-estimate-ref dt { color: var(--cp-sub); }
.cedro-estimate-ref dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cp-ink); }
.cedro-estimate-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cedro-estimate-actions .cedro-button { flex: 1 1 auto; }
/* P33 · Propuesta */
.cedro-proposal { display: grid; border: 1.5px solid var(--cp-ink); border-radius: var(--cp-r-xl); background: var(--cp-surface); overflow: hidden; }
.cedro-proposal-main { display: grid; gap: 14px; align-content: start; padding: 18px; }
.cedro-proposal-kicker { margin: 0; color: var(--cp-muted); font-size: 13px; font-weight: 600; }
.cedro-proposal-title { margin: 0; font: 800 21px/1.15 var(--cp-font-display); letter-spacing: -.035em; color: var(--cp-ink); }
.cedro-proposal-sec { display: grid; gap: 8px; }
.cedro-proposal-sec h4 { margin: 0; color: var(--cp-muted); font-size: 13px; font-weight: 700; }
.cedro-proposal-sec p { margin: 0; color: var(--cp-ink); font-size: 14px; line-height: 1.5; }
.cedro-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cedro-pages li { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 12px; border-radius: var(--cp-r-pill); background: var(--cp-surface2); color: var(--cp-ink); font-size: 13.5px; font-weight: 600; }
.cedro-pages li.is-draft { background: transparent; box-shadow: inset 0 0 0 1px var(--cp-border-hi); color: var(--cp-sub); font-weight: 500; }
.cedro-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cedro-swatches li { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cedro-tree { margin: 0; padding: 0 0 0 2px; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--cp-ink); }
.cedro-tree ul { margin: 4px 0 0 18px; padding: 0; list-style: none; display: grid; gap: 4px; color: var(--cp-sub); }
.cedro-tree ul li::before { content: "└ "; color: var(--cp-border-hi); }
.cedro-proposal-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--cp-border); background: var(--cp-surface2); }
.cedro-proposal-actions .cedro-button { flex: 1 1 100%; }
.cedro-button:disabled { opacity: .45; cursor: not-allowed; }
