/* Calculadora de notas: experiencia tipo app con Ed, el chigüiro de Edtools.
   Se apoya en los tokens de guia-mkt.css (claro por defecto). */
:root { --ed-ya:#22C27A; --ed-tranqui:#8FD14F; --ed-meterle:#FFC83D; --ed-pila:#FF9A3C; --ed-ayuda:#FF6F61; --ed:var(--ed-tranqui); --nt-ink:#14181D; }
.nt-app[data-estado="ya"] { --ed:var(--ed-ya); }
.nt-app[data-estado="tranqui"] { --ed:var(--ed-tranqui); }
.nt-app[data-estado="meterle"] { --ed:var(--ed-meterle); }
.nt-app[data-estado="pila"] { --ed:var(--ed-pila); }
.nt-app[data-estado="ayuda"] { --ed:var(--ed-ayuda); }
.sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* Encabezado mínimo */
.nt-header { position:sticky; top:0; z-index:30; height:64px; display:flex; align-items:center; gap:12px; padding:0 20px; background:var(--header-bg); border-bottom:1px solid var(--border-subtle); backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px); }
.nt-header .mkt-brand-logo { width:104px; }
.nt-header-tag { font-size:13px; font-weight:600; color:var(--text-secondary); padding-left:12px; border-left:1px solid var(--border-solid); }
.nt-header .sp { flex:1; }
.nt-header a.nt-b2b { font-size:13px; font-weight:500; color:var(--text-secondary); }
.nt-header a.nt-b2b:hover { color:var(--text-primary); }

/* Hero compacto */
.nt-hero { padding:36px 20px 8px; max-width:1120px; margin:0 auto; }
.nt-hero h1 { margin:0; font-size:40px; line-height:46px; letter-spacing:-1px; font-weight:700; }
.nt-hero h1 span { color:var(--brand-ink); }
.nt-hero .lead { margin:12px 0 0; max-width:720px; font-size:16.5px; line-height:26px; color:var(--text-secondary); }
.nt-chips { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0 0; padding:0; list-style:none; }
.nt-chips li { font-size:12.5px; font-weight:600; padding:6px 12px; border-radius:var(--radius-pill); background:var(--surface-raised); color:var(--text-secondary); border:1px solid var(--border-subtle); }

/* Contenedor de la app */
.nt-wrap { max-width:1120px; margin:0 auto; padding:24px 20px 64px; }
.nt-app { background:var(--card-surface); border:1px solid var(--border-subtle); border-radius:28px; padding:20px; box-shadow:0 30px 60px -40px rgba(8,9,10,.25); }
.nt-compartido { margin:0 0 16px; padding:12px 16px; border-radius:16px; background:var(--calc-brand-tint); border:1px solid var(--calc-brand-line); font-size:14px; line-height:21px; }
.nt-compartido[hidden] { display:none; }

/* Pestañas tipo segmento */
.nt-tabs { display:grid; grid-template-columns:repeat(3,1fr); gap:4px; padding:4px; border-radius:18px; background:var(--surface-raised); border:1px solid var(--border-subtle); }
.nt-tabs button { font-family:var(--font-roboto); font-size:14px; font-weight:600; color:var(--text-secondary); background:none; border:0; border-radius:14px; padding:12px 8px; cursor:pointer; transition:background 150ms ease,color 150ms ease; }
.nt-tabs button[aria-selected="true"] { background:var(--card-surface); color:var(--text-primary); box-shadow:0 1px 2px rgba(8,9,10,.08),0 0 0 1px var(--border-subtle); }
.nt-tabs button:focus-visible { outline:2px solid var(--green); outline-offset:2px; }

.nt-grid { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:20px; margin-top:20px; align-items:start; }
.nt-inputs [data-panel][hidden] { display:none; }
.nt-blk + .nt-blk { margin-top:20px; }
.nt-lbl { display:block; font-size:12.5px; font-weight:700; letter-spacing:.02em; text-transform:uppercase; color:var(--text-tertiary); margin:0 0 10px; }

/* Selector de escala: tarjetas grandes */
.nt-escalas { display:grid; grid-template-columns:1fr 1fr; gap:10px; border:0; margin:0; padding:0; }
.nt-escalas label { position:relative; cursor:pointer; }
.nt-escalas input { position:absolute; opacity:0; }
.nt-escalas span { display:block; padding:14px 16px; border-radius:18px; border:2px solid var(--border-solid); box-shadow:0 3px 0 var(--border-solid); transition:border-color 120ms ease,background 120ms ease,transform 80ms ease; }
.nt-escalas strong { display:block; font-size:16px; color:var(--text-primary); }
.nt-escalas small { display:block; margin-top:2px; font-size:13px; color:var(--text-secondary); }
.nt-escalas input:checked + span { border-color:var(--green); background:var(--calc-brand-tint); box-shadow:0 3px 0 var(--green-dark); }
.nt-escalas input:focus-visible + span { outline:2px solid var(--green); outline-offset:2px; }
.nt-escalas label:active span { transform:translateY(2px); box-shadow:0 1px 0 var(--border-solid); }

.nt-texto { width:100%; font-family:var(--font-roboto); font-size:16px; color:var(--text-primary); background:var(--surface-raised); border:1px solid var(--border-solid); border-radius:14px; padding:13px 14px; }
.nt-texto:focus-visible, .nt-in input:focus-visible, .nt-sel:focus-visible { outline:2px solid var(--green); outline-offset:1px; border-color:transparent; }

/* Filas de notas */
.nt-cab { display:grid; grid-template-columns:minmax(0,1fr) 86px 86px 40px; gap:8px; font-size:12px; font-weight:600; color:var(--text-tertiary); padding:0 2px 6px; }
.nt-cab-m { grid-template-columns:minmax(0,1fr) 86px 86px 40px; }
.nt-fila { display:grid; grid-template-columns:minmax(0,1fr) 86px 86px 40px; gap:8px; align-items:center; padding:6px 0; }
.nt-fila-n { font-size:15px; font-weight:600; color:var(--text-primary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nt-in { position:relative; display:block; }
.nt-in input { width:100%; height:52px; font-family:var(--font-roboto); font-size:20px; font-weight:700; text-align:center; font-variant-numeric:tabular-nums; color:var(--text-primary); background:var(--surface-raised); border:2px solid var(--border-solid); border-radius:14px; padding:0 8px; -moz-appearance:textfield; }
.nt-in input::placeholder { color:var(--text-tertiary); font-weight:600; }
.nt-in-pct input { padding-right:24px; font-size:17px; }
.nt-in-pct i { position:absolute; right:10px; top:50%; transform:translateY(-50%); font-style:normal; font-size:13px; font-weight:600; color:var(--text-tertiary); pointer-events:none; }
.nt-in-nombre input { text-align:left; font-size:15px; font-weight:600; padding:0 12px; }
.nt-quitar { width:40px; height:40px; border-radius:12px; border:0; background:none; color:var(--text-tertiary); cursor:pointer; display:flex; align-items:center; justify-content:center; }
.nt-quitar:hover { background:var(--surface-raised); color:var(--text-primary); }
.nt-quitar:disabled { opacity:.3; cursor:default; }
.nt-acciones { display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.nt-hint { margin:10px 0 0; font-size:13px; line-height:20px; color:var(--text-tertiary); }

/* Botones con volumen (táctiles) */
.btn-nt { display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family:var(--font-roboto); font-weight:700; font-size:15px; border-radius:16px; padding:0 18px; height:48px; cursor:pointer; border:2px solid var(--border-solid); background:var(--card-surface); color:var(--text-primary); box-shadow:0 3px 0 var(--border-solid); transition:transform 80ms ease,box-shadow 80ms ease; text-decoration:none; }
.btn-nt:active { transform:translateY(2px); box-shadow:0 1px 0 var(--border-solid); }
.btn-nt.sm { height:40px; font-size:13.5px; border-radius:13px; padding:0 14px; }
.btn-nt.brand { background:var(--green); border-color:var(--green); color:#08090a; box-shadow:0 4px 0 var(--green-dark); }
.btn-nt.brand:active { box-shadow:0 1px 0 var(--green-dark); }
.btn-nt.full { width:100%; height:56px; font-size:16.5px; }
.btn-nt:disabled { opacity:.6; cursor:default; }
.btn-nt:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.btn-nt[hidden] { display:none; }

/* Ajustes plegables */
.nt-ajustes { margin-top:20px; border-radius:18px; border:1px solid var(--border-subtle); background:var(--surface-raised); }
.nt-ajustes summary { list-style:none; cursor:pointer; padding:14px 16px; font-size:14px; font-weight:600; color:var(--text-primary); display:flex; justify-content:space-between; align-items:center; }
.nt-ajustes summary::-webkit-details-marker { display:none; }
.nt-ajustes summary::after { content:"+"; font-size:20px; color:var(--text-tertiary); }
.nt-ajustes[open] summary::after { content:"–"; }
.nt-ajustes-in { padding:0 16px 16px; }
.nt-dos { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.nt-dos label, .nt-cv label { display:block; font-size:12.5px; font-weight:600; color:var(--text-tertiary); }
.nt-dos .nt-in input, .nt-cv .nt-in input { margin-top:6px; height:46px; font-size:17px; }
.nt-radios { display:flex; flex-wrap:wrap; gap:8px; border:0; padding:0; margin:14px 0 0; }
.nt-radios legend { font-size:12.5px; font-weight:600; color:var(--text-tertiary); margin-bottom:8px; padding:0; }
.nt-radios label { position:relative; cursor:pointer; }
.nt-radios input { position:absolute; opacity:0; }
.nt-radios span { display:inline-block; font-size:13px; font-weight:600; color:var(--text-secondary); border:1px solid var(--border-solid); border-radius:var(--radius-pill); padding:8px 12px; background:var(--card-surface); }
.nt-radios input:checked + span { color:var(--brand-ink); border-color:var(--calc-brand-line); background:var(--calc-brand-tint); }
.nt-radios input:focus-visible + span { outline:2px solid var(--green); outline-offset:2px; }
.nt-niveles[hidden] { display:none; }
.nt-sel { width:100%; height:46px; margin-top:6px; font-family:var(--font-roboto); font-size:16px; font-weight:600; color:var(--text-primary); background:var(--surface-raised); border:2px solid var(--border-solid); border-radius:14px; padding:0 12px; }
.nt-cv { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

/* Resultado */
.nt-result { position:sticky; top:84px; overflow:hidden; border-radius:24px; padding:24px 22px 22px; text-align:center; background:var(--calc-brand-tint); background:color-mix(in srgb, var(--ed) 18%, var(--card-surface)); border:2px solid color-mix(in srgb, var(--ed) 55%, transparent); transition:background 250ms ease,border-color 250ms ease; }
.nt-ed { width:150px; height:150px; margin:0 auto; }
.nt-ed svg { display:block; width:100%; height:100%; }
.nt-pop { animation:ntPop 520ms cubic-bezier(.34,1.56,.64,1); }
@keyframes ntPop { 0% { transform:scale(.7) rotate(-6deg); } 60% { transform:scale(1.08) rotate(3deg); } 100% { transform:scale(1) rotate(0); } }
.nt-estado { display:inline-block; margin:14px 0 0; padding:6px 14px; border-radius:var(--radius-pill); background:var(--ed); color:var(--nt-ink); font-size:14px; font-weight:700; }
.nt-big { margin:10px 0 0; font-size:76px; line-height:80px; font-weight:800; letter-spacing:-2px; font-variant-numeric:tabular-nums; color:var(--text-primary); }
.nt-big-lbl { margin:2px 0 0; font-size:14px; font-weight:600; color:var(--text-secondary); }
.nt-msg { margin:14px auto 0; max-width:360px; font-size:15.5px; line-height:24px; color:var(--text-primary); }
.nt-aviso { margin:14px 0 0; padding:10px 12px; border-radius:12px; background:var(--calc-alert-tint); border:1px solid var(--calc-alert-line); font-size:13px; line-height:20px; color:var(--text-primary); text-align:left; }
.nt-aviso[hidden] { display:none; }
.nt-datos { list-style:none; margin:18px 0 0; padding:0; text-align:left; border-top:1px solid color-mix(in srgb, var(--ed) 40%, transparent); }
.nt-datos li { display:flex; justify-content:space-between; gap:12px; padding:10px 2px; border-bottom:1px solid var(--soft-line); font-size:14px; color:var(--text-secondary); font-variant-numeric:tabular-nums; }
.nt-datos strong { color:var(--text-primary); font-weight:700; text-align:right; }
.nt-share { margin-top:18px; }
.nt-share[hidden] { display:none; }
.nt-share-row { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:10px; }
.nt-formato { display:flex; justify-content:center; gap:6px; margin:0 0 10px; border:0; padding:0; }
.nt-formato label { position:relative; cursor:pointer; }
.nt-formato input { position:absolute; opacity:0; }
.nt-formato span { display:inline-block; font-size:12.5px; font-weight:600; padding:6px 12px; border-radius:var(--radius-pill); color:var(--text-secondary); border:1px solid var(--border-solid); background:var(--card-surface); }
.nt-formato input:checked + span { color:var(--nt-ink); background:var(--ed); border-color:transparent; }
.nt-formato input:focus-visible + span { outline:2px solid var(--green); outline-offset:2px; }
.nt-share-tip { margin:10px 0 0; font-size:12.5px; line-height:19px; color:var(--text-secondary); }
.nt-share-tip[hidden] { display:none; }
.nt-confeti { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.nt-puente { margin-top:18px; padding:14px 16px; border-radius:16px; background:var(--card-surface); border:1px solid var(--border-subtle); text-align:left; font-size:13.5px; line-height:21px; color:var(--text-secondary); }
.nt-puente strong { color:var(--text-primary); }
.nt-puente a { color:var(--brand-ink); font-weight:600; }

/* Tabla de conversión */
.nt-cv-tbl { width:100%; border-collapse:collapse; margin-top:16px; font-size:14px; font-variant-numeric:tabular-nums; }
.nt-cv-tbl th { text-align:left; font-size:12px; font-weight:600; color:var(--text-tertiary); padding:0 0 8px; border-bottom:1px solid var(--border-solid); }
.nt-cv-tbl td { padding:8px 0; border-bottom:1px solid var(--border-subtle); color:var(--text-primary); }
.nt-cv-tbl .num, .nt-cv-tbl th:not(:first-child) { text-align:right; }

/* Barra mini (móvil) */
.nt-mini { position:fixed; left:12px; right:12px; bottom:calc(12px + env(safe-area-inset-bottom)); z-index:40; display:flex; align-items:center; gap:10px; padding:8px 16px 8px 8px; border-radius:var(--radius-pill); background:var(--card-surface); border:2px solid var(--ed-tranqui); box-shadow:0 12px 30px -10px rgba(8,9,10,.35); font-size:15px; font-weight:700; color:var(--text-primary); transform:translateY(140%); transition:transform 220ms ease; }
.nt-mini.on { transform:none; }
.nt-mini-ed { width:40px; height:40px; flex:0 0 40px; }
.nt-mini-ed svg { display:block; width:100%; height:100%; }
.nt-mini-go { margin-left:auto; font-size:13px; color:var(--brand-ink); }
@media (min-width:1041px) { .nt-mini { display:none; } }

/* Contenido debajo de la app */
.nt-scroll-hint { text-align:center; margin:28px 0 0; font-size:13px; font-weight:600; color:var(--text-tertiary); }
.formula { margin:18px 0 22px; padding:18px 20px; border-radius:14px; background:var(--surface-raised); border:1px solid var(--border-subtle); font-size:17px; line-height:28px; color:var(--text-primary); font-weight:600; text-align:center; }
.formula small { display:block; font-size:13px; font-weight:500; color:var(--text-tertiary); }

@media (max-width:1040px) {
    .nt-grid { grid-template-columns:minmax(0,1fr); }
    .nt-result { position:relative; top:0; }
}
@media (max-width:760px) {
    .nt-header-tag { display:none; }
    .nt-hero { padding:22px 16px 0; }
    .nt-hero h1 { font-size:24px; line-height:30px; letter-spacing:-.5px; }
    .nt-hero .lead { font-size:14.5px; line-height:22px; margin-top:8px; }
    .nt-chips { display:none; }
    .nt-wrap { padding:16px 12px 40px; }
    .nt-app { padding:14px; border-radius:24px; }
    .nt-tabs button { font-size:12.5px; padding:11px 4px; }
    .nt-cab, .nt-fila, .nt-cab-m { grid-template-columns:minmax(0,1fr) 72px 72px 34px; gap:6px; }
    .nt-fila-m { grid-template-columns:minmax(0,1fr) 64px 64px 34px; }
    .nt-cab-m { grid-template-columns:minmax(0,1fr) 64px 64px 34px; }
    .nt-quitar { width:34px; }
    .nt-big { font-size:64px; line-height:68px; }
    .nt-ed { width:130px; height:130px; }
}
@media (prefers-reduced-motion: reduce) {
    .nt-pop { animation:none; }
    .nt-mini, .nt-result { transition:none; }
}
/* Instalada como app: minimalista */
.nt-app-title, .nt-credito { display:none; }
html.nt-standalone body { min-height:100dvh; padding-bottom:env(safe-area-inset-bottom); }
html.nt-standalone .nt-header { height:56px; padding-top:env(safe-area-inset-top); height:calc(56px + env(safe-area-inset-top)); }
html.nt-standalone .nt-header .mkt-logo, html.nt-standalone .nt-header-tag, html.nt-standalone .nt-b2b, html.nt-standalone #nt-instalar { display:none !important; }
html.nt-standalone .nt-app-title { display:block; font-size:17px; font-weight:700; color:var(--text-primary); }
html.nt-standalone .nt-hero, html.nt-standalone .nt-scroll-hint, html.nt-standalone main:not(.ed-wrap) > section, html.nt-standalone .mkt-footer, html.nt-standalone .nt-puente, html.nt-standalone .nt-compartido { display:none !important; }
html.nt-standalone .nt-wrap { padding-top:12px; padding-bottom:24px; }
html.nt-standalone .nt-app { border:0; box-shadow:none; padding:0; background:transparent; }
html.nt-standalone .nt-credito { display:block; margin:0 0 calc(24px + env(safe-area-inset-bottom)); text-align:center; font-size:12px; color:var(--text-tertiary); }
html.nt-standalone .nt-credito a { color:var(--text-secondary); font-weight:600; }

@media print { .nt-mini, .nt-header { display:none !important; } }
