/* Herramientas para la comunidad · se carga después de ../styles.css (mismos tokens de la página de inicio). */

:root { --ease: cubic-bezier(.22, .9, .3, 1); --r-md: 18px; --r-sm: 12px; }

/* Entrada suave */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .6s var(--ease) var(--d, 0ms); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Encabezado de cada herramienta */
.t-hero { padding: 28px 0 8px; }
@media (min-width: 960px) { .t-hero { padding: 48px 0 12px; } }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px;
  padding: 7px 14px 7px 10px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); margin-bottom: 22px; transition: transform .2s var(--ease); }
.back:hover { transform: translateX(-3px); }
.back span[aria-hidden] { font-size: 18px; line-height: 1; }
.t-hero-row { display: grid; gap: 18px; align-items: end; }
@media (min-width: 900px) { .t-hero-row { grid-template-columns: 1fr auto; } }
.t-hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
.t-hero .lead { margin-top: 14px; max-width: 60ch; }
.t-hero-icon { width: 88px; height: 88px; justify-self: start; filter: drop-shadow(0 14px 24px rgba(120, 80, 10, .18)); }
@media (min-width: 900px) { .t-hero-icon { width: 150px; height: 150px; justify-self: end; } }

.t-main { padding: 24px 0 40px; }
.t-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .t-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; } .t-grid.even { grid-template-columns: 1fr 1fr; } }
.panel { padding: 22px; }
@media (min-width: 760px) { .panel { padding: 28px; } }
.panel h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink-2); margin: 0 0 4px; line-height: 1.25; }
.panel h2 + .sub { font-size: 15px; margin-bottom: 18px; }
.panel h3 { margin: 18px 0 10px; font-size: 16px; }
.sticky { position: sticky; top: 84px; }
@media (max-width: 979px) { .sticky { position: static; } }

/* Campos */
.field { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .field > .lbl, legend.lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 420px) { .row3 { grid-template-columns: 1fr 1fr; } }
.inp { display: flex; align-items: center; background: #faf9f6; border: 1px solid var(--line); border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.inp:focus-within { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(232, 152, 0, .16); background: #fff; }
.inp input, .inp select { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 500; color: var(--ink); padding: 11px 12px; outline: none; }
.inp select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.inp .u { padding: 0 12px 0 0; color: var(--muted); font-size: 14px; white-space: nowrap; }
textarea.ta { width: 100%; font: inherit; font-size: 16px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; background: #faf9f6; color: var(--ink); resize: vertical; min-height: 88px; }
textarea.ta:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(232, 152, 0, .16); background: #fff; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
fieldset legend { padding: 0; margin-bottom: 8px; }

/* Selector en píldoras (radios/checkbox nativos) */
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 15px; font-weight: 500; color: var(--ink); transition: background .18s, border-color .18s, transform .18s var(--ease), box-shadow .18s; user-select: none; }
.seg label:hover span { border-color: var(--amber-soft); transform: translateY(-1px); }
.seg input:checked + span { background: var(--amber-soft); border-color: var(--amber); box-shadow: 0 6px 16px rgba(232, 152, 0, .18); }
.seg input:focus-visible + span { outline: 3px solid rgba(232, 152, 0, .55); outline-offset: 2px; }
.seg.sm span { padding: 6px 12px; font-size: 14px; }

/* Deslizadores ámbar */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; --p: 50%; }
input[type=range]:focus { outline: none; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--amber) 0 var(--p), #ece6da var(--p) 100%); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 999px; background: #ece6da; }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--amber); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 3px solid var(--amber);
  box-shadow: 0 4px 12px rgba(120, 80, 10, .25); transition: transform .15s var(--ease); }
input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--amber); box-shadow: 0 4px 12px rgba(120, 80, 10, .25); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(232, 152, 0, .3); }
input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 6px rgba(232, 152, 0, .3); }
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.range-head output { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--amber-ink); }
.range-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* Cifras grandes */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stats.s3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { background: #faf9f6; border-radius: var(--r-md); padding: 14px 16px; min-width: 0; }
.stat.hl { background: var(--amber-tint); }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 500; display: block; }
.stat .v { font-size: clamp(26px, 4vw, 34px); font-weight: 400; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--ink); display: block; overflow-wrap: anywhere; }
.stat .v small { font-size: 15px; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.stat .s { font-size: 13px; color: var(--ink); display: block; margin-top: 2px; }

/* Barra de molienda */
.grindbar { position: relative; margin: 10px 0 4px; }
.gb-track { display: grid; grid-template-columns: var(--cols); height: 18px; border-radius: 999px; overflow: hidden; }
.gb-track i { display: block; }
.gb-track i:nth-child(1) { background: #f6e7cf; } .gb-track i:nth-child(2) { background: #f1dcb9; } .gb-track i:nth-child(3) { background: #ebcf9f; }
.gb-track i:nth-child(4) { background: #e2bf85; } .gb-track i:nth-child(5) { background: #d6ad6c; } .gb-track i:nth-child(6) { background: #c99a57; }
.gb-range { position: absolute; top: -5px; height: 28px; border-radius: 999px; border: 3px solid var(--amber); background: rgba(255, 255, 255, .35);
  box-shadow: 0 6px 18px rgba(232, 152, 0, .35); transition: left .6s var(--ease), width .6s var(--ease); }
.gb-labels { display: grid; grid-template-columns: var(--cols); font-size: 12px; color: var(--muted); margin-top: 8px; }
.gb-labels span { text-align: center; padding: 0 2px; line-height: 1.2; }
.gb-labels span.on { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .gb-labels span { font-size: 10.5px; } }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; border-radius: var(--r-md); background: #faf9f6; }
.steps li::before { content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--amber-tint); color: var(--amber-ink); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.steps b { display: block; font-weight: 600; }
.steps p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.steps .when { font-variant-numeric: tabular-nums; font-size: 14px; text-align: right; color: var(--ink); white-space: nowrap; }
.steps .when em { display: block; font-style: normal; color: var(--amber-ink); font-weight: 600; }

/* Acciones */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn { cursor: pointer; transition: box-shadow .15s, background .15s, transform .15s var(--ease); }
.btn:active { transform: scale(.97); }
.btn-amber:hover { background: #f0a412; }
.note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.callout { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); background: var(--amber-tint); border: 1px solid var(--amber-soft); font-size: 15px; }
.callout img { width: 44px; height: 44px; flex: none; }

/* Indicador lineal con rangos */
.gauges { display: grid; gap: 16px; }
.gauge-row { display: grid; gap: 6px; }
.gauge-row .gh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.gauge-row .gh b { font-weight: 600; }
.gauge-row .gh .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.gauge { position: relative; height: 14px; border-radius: 999px; background: #efeae1; }
.gauge .g-ok, .gauge .g-ideal { position: absolute; top: 0; bottom: 0; border-radius: 999px; transition: left .5s var(--ease), width .5s var(--ease); }
.gauge .g-ok { background: #f8e2b4; }
.gauge .g-ideal { background: #b9dfc8; }
.gauge .g-needle { position: absolute; top: -6px; width: 6px; height: 26px; margin-left: -3px; border-radius: 4px; background: var(--ink); box-shadow: 0 0 0 3px #fff, 0 4px 10px rgba(0, 0, 0, .2); transition: left .6s var(--ease); }
.gauge-row .gf { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.b-ideal { background: var(--green-soft); color: #1f6b43; }
.b-ok { background: var(--amber-tint); color: var(--amber-ink); }
.b-bajo, .b-alto { background: var(--red-soft); color: #9b2c21; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 6px; }

/* Desplegable "cómo se calcula" */
details.how { margin-top: 16px; border-radius: var(--r-md); background: #faf9f6; padding: 0 16px; }
details.how summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.how summary::-webkit-details-marker { display: none; }
details.how summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--amber-ink); transition: transform .25s var(--ease); }
details.how[open] summary::after { transform: rotate(45deg); }
details.how .body { padding-bottom: 16px; font-size: 15px; color: var(--ink); display: grid; gap: 10px; }
details.how code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; }
details.how .formula { display: block; padding: 10px 12px; white-space: normal; overflow-wrap: anywhere; }

/* Tabla simple */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 13px; color: var(--muted); font-weight: 600; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.tbl tr.warn td { background: var(--red-soft); }

/* Aviso flotante */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff;
  padding: 12px 20px; border-radius: 999px; font-weight: 500; font-size: 15px; box-shadow: var(--shadow-lg); transition: opacity .25s, transform .25s var(--ease); z-index: 50; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Tarjetas del índice */
.tools-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tools-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.tool-card { position: relative; display: grid; gap: 8px; align-content: start; padding: 24px; text-decoration: none; color: var(--ink);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); overflow: hidden; isolation: isolate; min-height: 250px; }
.tool-card::before { content: ''; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--amber-tint) 0%, rgba(255, 244, 220, 0) 70%);
  z-index: -1; transition: transform .5s var(--ease); }
.tool-card:hover, .tool-card:focus-visible { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tool-card:hover::before { transform: scale(1.5); }
.tool-card img { width: 64px; height: 64px; margin-bottom: 8px; transition: transform .4s var(--ease); }
.tool-card:hover img { transform: scale(1.08) rotate(-4deg); }
.tool-card h3 { font-size: 19px; }
.tool-card p { color: var(--muted); font-size: 15px; margin: 0; }
.tool-card .go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--amber-ink); }
.tool-card .go span { transition: transform .25s var(--ease); }
.tool-card:hover .go span { transform: translateX(4px); }
.tool-card .num { position: absolute; top: 18px; right: 18px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* Índice: franja con la tostaduría */
.hub-hero { padding: 36px 0 16px; }
@media (min-width: 960px) { .hub-hero { padding: 64px 0 24px; } }
.hub-hero .hero-row { align-items: end; }
.hub-band { margin-top: 32px; display: grid; gap: 16px; }
@media (min-width: 900px) { .hub-band { grid-template-columns: 1.3fr 1fr; align-items: stretch; } }
.hub-band .stage { margin: 0; }
.hub-band .stage-media { aspect-ratio: 16 / 9; height: auto; }
.hub-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.hub-facts { padding: 26px; display: grid; gap: 14px; align-content: center; }
.hub-facts ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.hub-facts li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--muted); }
.hub-facts li b { color: var(--ink); font-weight: 600; display: block; }
.hub-facts li::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px var(--amber-tint); }

/* Utilidades */
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.center { text-align: center; }
.hidden { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a[aria-current="page"] { background: var(--amber-soft); }

/* ---------- Piezas compartidas de las herramientas nuevas ---------- */
@media (min-width: 960px) and (max-width: 1240px) { .pills a { padding: 8px 12px; font-size: 14.5px; } .topbar-in { gap: 10px; } }

/* Siguiente paso: tarjeta al final de cada herramienta */
.next-step { padding: 8px 0 48px; }
.ns-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .ns-grid { grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); } }
.ns-card { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; text-decoration: none; color: var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.ns-card:hover, .ns-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ns-card img { width: 56px; height: 56px; }
.ns-card b { display: block; font-weight: 600; font-size: 17px; }
.ns-card span.s { display: block; color: var(--muted); font-size: 14px; }
.ns-card .arw { font-size: 20px; color: var(--amber-ink); transition: transform .25s var(--ease); }
.ns-card:hover .arw { transform: translateX(4px); }
.ns-k { font-size: 13px; font-weight: 600; color: var(--amber-ink); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; display: block; }

/* Diálogos */
dialog.dlg { border: 0; padding: 0; border-radius: 24px; box-shadow: var(--shadow-lg); width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: #fff; color: var(--ink); }
dialog.dlg::backdrop { background: rgba(46, 46, 46, .35); backdrop-filter: blur(2px); }
dialog.dlg[open] { animation: dlg-in .3s var(--ease); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.dlg-in { padding: 22px; overflow: auto; max-height: calc(100dvh - 24px); }
@media (min-width: 760px) { .dlg-in { padding: 30px; } }
.dlg-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.dlg-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-2); margin: 0; line-height: 1.2; }
.x { border: 0; background: #faf9f6; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); flex: none; }
.x:hover { background: var(--amber-tint); }

/* Barra de herramientas de filtros */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.toolbar .field { margin: 0; flex: 1 1 160px; }
.toolbar .grow { flex: 2 1 220px; }
.units { display: flex; gap: 8px; flex-wrap: wrap; }
.privacy { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); background: #faf9f6; border-radius: var(--r-md); padding: 10px 14px; }
.privacy b { color: var(--ink); font-weight: 600; }
.btn-danger { background: #fff; color: #9b2c21; border-color: #f2c7c1; }
.btn-danger:hover { background: var(--red-soft); }
.empty-state { text-align: center; padding: 34px 18px; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.empty-state img { width: 88px; height: 88px; }

/* Tarjetas de café y receta en grilla */
.cards { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.icard { position: relative; display: grid; gap: 10px; align-content: start; padding: 22px; text-align: left; font: inherit; color: var(--ink); border: 0; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); animation: card-in .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); min-width: 0; }
.icard:hover, .icard:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.icard h3 { font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.icard .meta { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.icard .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.score { display: inline-flex; align-items: baseline; gap: 2px; padding: 4px 12px; border-radius: 999px; background: var(--amber-tint); color: var(--amber-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.score small { font-weight: 500; font-size: 12px; }
.nchips { display: flex; flex-wrap: wrap; gap: 6px; }
.nchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #faf9f6; border: 1px solid var(--line); font-size: 13px; }
.nchip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Barra de frescura y de stock */
.fresh { display: grid; gap: 6px; }
.fresh-bar { position: relative; height: 12px; border-radius: 999px; background: linear-gradient(90deg, #efe7d6 0 var(--rest), #b9dfc8 var(--rest) var(--best), #f8e2b4 var(--best) 100%); }
.fresh-bar em { position: absolute; top: -5px; width: 6px; height: 22px; margin-left: -3px; border-radius: 4px; background: var(--ink); box-shadow: 0 0 0 3px #fff; left: var(--pos); transition: left .6s var(--ease); }
.fresh-f { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); gap: 6px; }
.stock-bar { height: 10px; border-radius: 999px; background: #efeae1; overflow: hidden; }
.stock-bar i { display: block; height: 100%; width: var(--p, 0%); background: linear-gradient(90deg, #f6c35c, var(--amber)); border-radius: 999px; transition: width .6s var(--ease); }

/* Indicador semicircular animado */
.dial { position: relative; width: 100%; max-width: 260px; margin: 0 auto; }
.dial svg { width: 100%; height: auto; display: block; overflow: visible; }
.dial .d-track { fill: none; stroke: #f1ece3; stroke-width: 18; stroke-linecap: round; }
.dial .d-val { fill: none; stroke-width: 18; stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease), stroke .4s; }
.dial .d-needle { transition: transform .9s var(--ease); transform-origin: 120px 120px; }
.dial .d-num { font-size: 36px; font-weight: 500; fill: var(--ink); text-anchor: middle; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.dial .d-lbl { font-size: 14px; fill: var(--muted); text-anchor: middle; }
.dial-cap { text-align: center; display: grid; gap: 2px; margin-top: 4px; }
.dial-cap b { font-size: 18px; }

/* Selector compacto de notas */
.picker { display: grid; gap: 10px; }
.fam-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fam-chip, .note-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; transition: background .18s, border-color .18s, transform .18s var(--ease); }
.fam-chip:hover, .note-chip:hover { transform: translateY(-1px); border-color: var(--amber-soft); }
.fam-chip i, .note-chip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fam-chip[aria-expanded="true"] { border-color: var(--amber); background: var(--amber-tint); }
.note-chip[aria-pressed="true"] { background: var(--amber-soft); border-color: var(--amber); }
.note-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: var(--r-md); background: #faf9f6; }
.note-list:empty { display: none; }

/* Gráfico de familias (radar) */
.radar { width: 100%; max-width: 420px; margin: 0 auto; display: block; overflow: visible; }
.radar .grid { fill: none; stroke: #ece6da; }
.radar .axis { stroke: #ece6da; }
.radar .lbl { font-size: 11px; fill: #5f5f5f; }
.radar .pa, .radar .pb { stroke-width: 2.5; stroke-linejoin: round; transition: d .6s var(--ease); }
.radar .pa { fill: rgba(232, 152, 0, .22); stroke: var(--amber); }
.radar .pb { fill: rgba(47, 143, 91, .16); stroke: #2f8f5b; stroke-dasharray: 6 4; }
.radar .grow { transform-origin: 0 0; animation: radar-in .7s var(--ease) both; }
@keyframes radar-in { from { transform: scale(.2); opacity: 0; } to { transform: none; opacity: 1; } }

/* Búsqueda del índice */
.hub-search { margin-bottom: 22px; position: relative; max-width: 640px; }
.hub-search .inp { background: #fff; box-shadow: var(--shadow); border-color: transparent; }
.hub-search kbd { font: inherit; font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; margin-right: 10px; }
.search-res { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.search-res:empty { display: none; }
.search-res a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 16px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); font-weight: 500; }
.search-res a:hover, .search-res a:focus-visible { background: var(--amber-tint); }
.search-res small { color: var(--muted); font-weight: 400; }

/* Impresión: solo la tarjeta marcada para imprimir */
@media print {
  body { background: #fff !important; }
  body.printing > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; position: static; padding: 0; }
  .print-area .card { box-shadow: none; border: 1px solid #ddd; }
  .print-area .no-print { display: none !important; }
  .print-area .steps li { break-inside: avoid; }
}
.print-area { display: none; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 28px 0 14px; }
.h-sm { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; }
@media (min-width: 960px) and (max-width: 1180px) { .pills a.opt { display: none; } }

/* Listas de sugerencias (compartidas) */
ul.tips { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
ul.tips li { padding: 12px 14px; border-radius: var(--r-md); background: #faf9f6; font-size: 15px; animation: card-in .45s var(--ease) both; }
ul.tips li a { font-weight: 600; }
