/* The calculators (landing/tools/calc.mjs, `cx-*`) and «¿Cuántas calorías tiene…?» (landing/tools/calories.mjs, `kc-*`):
   pages of «Aprende con Yema» (learn.css) with a form, its answer and tables. DS tokens, light only. Inputs are 17 px so
   iOS does not zoom in, and every target is 44 px or more. The answer box keeps its height, so filling it moves nothing. */

/* ===== A calculator ===== */
.cx{margin:32px 0 0;padding:24px;border-radius:var(--radius-xl);background:var(--surface-raised);box-shadow:var(--shadow-sm),inset 0 0 0 1px var(--line)}
.cx h2{margin:0 0 16px;font-size:24px;line-height:30px;font-weight:700;scroll-margin-top:calc(var(--head) + 12px)}
.cx-form{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));gap:14px 16px;margin:0;font-size:16px;line-height:22px}
.cx-field{display:flex;flex-direction:column;gap:6px}
.cx-label{font-weight:700;font-size:15px;line-height:20px}
.cx-in{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 14px;border-radius:var(--radius-lg);background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--line-strong)}
.cx-in:focus-within{box-shadow:inset 0 0 0 2px var(--berry),var(--focus-ring)}
.cx-in input{flex:1;min-width:0;width:100%;border:0;outline:0;background:transparent;color:var(--ink);font:600 17px/24px var(--font-sans);padding:10px 0}
.cx-unit{flex:none;color:var(--ink-muted);font-weight:600;font-size:15px}
.cx-group{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;border:0;min-width:0}
.cx-group legend{width:100%;margin:0 0 8px;padding:0;font-weight:700;font-size:15px;line-height:20px}
.cx-opt{position:relative;display:inline-flex}
.cx-opt input{position:absolute;opacity:0;width:1px;height:1px}
.cx-opt span{display:inline-flex;align-items:center;min-height:44px;padding:8px 16px;box-sizing:border-box;border-radius:var(--radius-lg);background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--line-strong);font-weight:600;font-size:15px;line-height:20px;cursor:pointer}
.cx-opt input:checked + span{background:var(--berry-soft);box-shadow:inset 0 0 0 2px var(--berry);color:var(--ink)}
.cx-opt input:focus-visible + span{box-shadow:inset 0 0 0 2px var(--berry),var(--focus-ring)}
.cx-group-list{flex-direction:column}
.cx-group-list .cx-opt span{width:100%}
.cx-check{grid-column:1 / -1;display:flex;align-items:center;gap:12px;min-height:44px;font-weight:600;font-size:15px;line-height:20px;cursor:pointer}
.cx-check input{flex:none;width:22px;height:22px;margin:0;accent-color:var(--berry)}
.cx-out{min-height:112px;margin:20px 0 0;padding:18px 20px;box-sizing:border-box;border-radius:var(--radius-lg);background:var(--berry-soft);font-size:17px;line-height:26px}
.cx-out p{margin:0 0 8px}
.cx-out p:last-child{margin-bottom:0}
.cx-out strong{font-family:var(--font-display);font-weight:400;font-size:30px;line-height:36px;color:var(--berry)}
.cx-out[data-status="minor"],.cx-out[data-status="consult"],.cx-out[data-status="invalid"]{background:var(--surface-sunken)}
.cx-wait{color:var(--ink-muted)}
.cx-warn{font-size:15px;line-height:22px;color:var(--ink-muted)}
/* A goal's split (macros) and «Así sale cada meta» (the app's steps, one line each), inside the answer. */
.cx-macros{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:4px 0 12px;padding:0;list-style:none}
.cx-macros li{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border-radius:var(--radius-lg);background:var(--surface-raised)}
.cx-macro-v{font-family:var(--font-display);font-size:24px;line-height:30px;color:var(--berry);font-variant-numeric:tabular-nums}
.cx-macro-t{font-size:14px;line-height:18px;font-weight:600;color:var(--ink-muted)}
.cx-steps{margin:16px 0 0;padding:14px 16px;border-radius:var(--radius-lg);background:var(--surface-raised);font-size:15px;line-height:22px}
.cx-out .cx-steps-t{margin:0 0 4px;font-weight:700}
.cx-out .cx-ring{margin:12px 0 2px;font-weight:700}
.cx-out .cx-step{margin:0 0 2px;color:var(--ink-muted);font-variant-numeric:tabular-nums}
.cx-out .cx-step:last-child{margin:0}
/* The calculators that follow from this one. */
.cx-next{margin:20px 0 0}
.cx-next p{margin:0 0 8px;font-weight:700;font-size:15px;line-height:20px}
.cx-next ul{display:flex;flex-wrap:wrap;gap:8px;margin:0;padding:0;list-style:none}
.cx-next a{display:inline-flex;align-items:center;min-height:44px;padding:8px 16px;box-sizing:border-box;border-radius:var(--radius-lg);background:var(--surface);box-shadow:inset 0 0 0 1.5px var(--line-strong);color:var(--ink);font-weight:600;font-size:15px;line-height:20px;text-decoration:none}
.cx-next a:hover{box-shadow:inset 0 0 0 2px var(--berry)}
.cx-next a:focus-visible{outline:0;box-shadow:inset 0 0 0 2px var(--berry),var(--focus-ring)}

/* Tables of examples and of figures: one column of text on a phone, scrolling sideways only inside the table. */
.cx-scroll{overflow-x:auto;margin:0 0 8px;border-radius:var(--radius-lg);box-shadow:inset 0 0 0 1px var(--line)}
.cx-table{width:100%;border-collapse:collapse;font-size:16px;line-height:22px;background:var(--surface-raised)}
.cx-table th,.cx-table td{padding:10px 14px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
.cx-table thead th{font-size:14px;line-height:18px;color:var(--ink-muted);font-weight:700;background:var(--surface-sunken)}
.cx-table tbody th{font-weight:600}
.cx-table td{font-variant-numeric:tabular-nums}
.cx-table tr:last-child > *{border-bottom:0}

/* The short version inside a guide (build.mjs puts it after the summary). */
.cx-mini{margin:28px 0 0;padding:22px 24px;border-radius:var(--radius-xl);background:var(--surface-raised);box-shadow:var(--shadow-sm),inset 0 0 0 1px var(--line)}
.cx-mini h2{display:flex;align-items:center;gap:10px;margin:0 0 8px;font-size:22px;line-height:28px;font-weight:700}
.cx-mini h2 svg{color:var(--berry)}
.cx-mini p{margin:0 0 12px;font-size:17px;line-height:26px}
.cx-mini .rc-small{margin:8px 0 14px}
.cx-mini p:last-child{margin:0}

/* ===== «¿Cuántas calorías tiene…?» ===== */
.kc-answer{margin:0 0 14px;font-size:20px;line-height:30px}
.kc-answer strong{font-weight:700}
.kc-also{margin:0 0 12px;font-size:15px;line-height:22px;color:var(--ink-muted)}
.kc-also b{color:var(--ink)}
.kc-art .ln-sec .cx-scroll{margin-top:4px}
.kc-art .ln-sec .rc-small + p{margin-top:16px}

@media (max-width:719px){
.cx{padding:18px}
.cx-out strong{font-size:26px;line-height:32px}
.cx-macros{grid-template-columns:repeat(2,minmax(0,1fr))}
.cx-steps{padding:12px 14px}
.cx-table th,.cx-table td{padding:9px 10px}
.cx-mini{padding:18px}
.kc-answer{font-size:18px;line-height:27px}
}
