/* 바로셈 — kr.laskuri.me
   Identidad heredada de laskuri.me (negro + rojo + cuadrícula de operadores), rehecha:
   rojo más sobrio, papel cálido para leer, resultado como «recibo» oscuro troquelado.
   Reglas del usuario: sin bordes laterales ni superiores (solo fondos, sombras y radios); line-height ≥ 1,8 en prosa; móvil primero. */

:root {
  --ink: #131313;
  --ink-2: #1e1e1e;
  --ink-3: #2a2a2a;
  --ink-text: #f4f1ec;
  --ink-muted: #a39d95;
  --red: #e1262d;
  --red-deep: #b5121a;
  --red-soft: #fdecec;
  --paper: #f5f2ed;
  --card: #ffffff;
  --field: #f1eee9;
  --field-hover: #ebe7e1;
  --line: #e6e1d9;
  --text: #1b1a18;
  --muted: #6c665e;
  --good: #16794e;
  --good-soft: #e5f4ec;
  --warn: #b66a00;
  --warn-soft: #fdf1df;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 1px 2px rgba(20, 16, 10, .05), 0 8px 28px rgba(20, 16, 10, .07);
  --shadow-lift: 0 2px 4px rgba(20, 16, 10, .06), 0 18px 40px rgba(20, 16, 10, .12);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "D2Coding", monospace;
  --wrap: 1120px;
  --prose: 37em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 16px/1.6 var(--font); letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }

/* ---------- cabecera ---------- */
.top { background: var(--ink); color: var(--ink-text); position: sticky; top: 0; z-index: 30; }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: -0.04em; }
.brand-name b { color: var(--red); font-weight: 800; }
.brand-tag { font-size: 12px; color: var(--ink-muted); margin-left: 2px; display: none; }
.top-link { color: var(--ink-muted); text-decoration: none; font-size: 14px; padding: 8px 10px; border-radius: 10px; display: none; }
.top-link:hover { color: #fff; background: var(--ink-3); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-text); border-radius: 12px; cursor: pointer; }
.icon-btn:hover { background: var(--ink-3); }
@media (min-width: 860px) { .brand-tag, .top-link { display: inline-block; } }

/* ---------- banda oscura del título ---------- */
.band { background: var(--ink); color: var(--ink-text); padding: 18px 0 88px; position: relative; overflow: hidden; }
.band::after { /* cuadrícula de operadores muy tenue: el elemento gráfico de la marca */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' fill='none' stroke='%23fff' stroke-width='1.6'%3E%3Cpath d='M10 14h8M14 10v8M38 14h8M10 42l8-8M18 42l-8-8M38 40h8M38 44h8'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 90%); mask-image: linear-gradient(100deg, transparent 35%, #000 90%);
}
.crumbs { font-size: 13px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.band h1 { font-size: clamp(28px, 7.4vw, 44px); line-height: 1.18; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 10px; max-width: 18em; }
.band h1 em { font-style: normal; color: var(--red); }
.band .lead { color: #cfc9c1; font-size: 16px; line-height: 1.7; margin: 0; max-width: 34em; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; line-height: 1; padding: 7px 10px; border-radius: 99px; background: var(--ink-3); color: #ddd6cd; }
.pill svg { width: 14px; height: 14px; }
.pill.red { background: rgba(225, 38, 45, .16); color: #ff9a9e; }

/* ---------- herramienta ---------- */
.tool-grid { display: grid; gap: 16px; margin-top: -68px; position: relative; z-index: 2; }
@media (min-width: 960px) { .tool-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: start; gap: 22px; } }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
@media (min-width: 640px) { .card { padding: 26px; } }
.card-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card-title .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--red); }

.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.field > label, .field > .label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14.5px; font-weight: 650; margin-bottom: 8px; }
.field .hint { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.input { position: relative; display: flex; align-items: center; background: var(--field); border-radius: var(--radius-s); transition: background .15s, box-shadow .15s; }
.input:hover { background: var(--field-hover); }
.input:focus-within { background: #fff; box-shadow: 0 0 0 2px var(--red); }
.input input, .input select { width: 100%; min-width: 0; border: 0; background: transparent; outline: 0; height: 54px; padding: 0 14px; font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; appearance: none; -webkit-appearance: none; }
.input select { font-size: 16.5px; cursor: pointer; padding-right: 38px; }
.input .unit { flex: none; padding-right: 14px; color: var(--muted); font-size: 15px; font-weight: 600; }
.input .chev { position: absolute; right: 14px; pointer-events: none; color: var(--muted); }
.input input[type="date"] { font-size: 17px; }
.reading { min-height: 18px; margin-top: 6px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.reading b { color: var(--text); font-weight: 650; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { border: 0; background: var(--field); border-radius: 99px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; color: #3b3732; transition: background .12s, color .12s; }
.chip:hover { background: var(--field-hover); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--field); border-radius: var(--radius-s); padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 11px 6px; font-size: 14px; font-weight: 650; color: #4a453f; cursor: pointer; line-height: 1.25; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg.wrap3 { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--field); border-radius: var(--radius-s); cursor: pointer; font-size: 14.5px; font-weight: 600; }
.toggle input { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: #cfc8be; position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.toggle input:checked { background: var(--red); }
.toggle input:checked::after { transform: translateX(18px); }
.more { margin-top: 6px; }
.more > summary { list-style: none; cursor: pointer; font-size: 14px; font-weight: 650; color: var(--muted); padding: 10px 0; display: flex; align-items: center; gap: 6px; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary svg { transition: transform .15s; }
.more[open] > summary svg { transform: rotate(180deg); }

/* ---------- recibo (resultado) ---------- */
.receipt-wrap { position: relative; }
@media (min-width: 960px) { .receipt-wrap { position: sticky; top: 76px; } }
.receipt {
  background: var(--ink); color: var(--ink-text); border-radius: var(--radius) var(--radius) 0 0; padding: 22px 20px 26px; box-shadow: var(--shadow-lift);
  --perf: radial-gradient(circle at 9px 100%, transparent 8px, #000 8.5px);
  -webkit-mask: var(--perf) bottom/18px 100% repeat-x; mask: var(--perf) bottom/18px 100% repeat-x;
  padding-bottom: 34px;
}
@media (min-width: 640px) { .receipt { padding: 26px 26px 38px; } }
.r-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.r-head .live { display: inline-flex; align-items: center; gap: 6px; }
.r-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(225, 38, 45, .25); }
.r-label { margin: 18px 0 4px; font-size: 14.5px; color: #d8d1c7; font-weight: 600; }
.r-big { font-size: clamp(38px, 11vw, 54px); line-height: 1.05; font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; margin: 0; }
.r-big small { font-size: .42em; font-weight: 700; margin-left: 4px; letter-spacing: -0.02em; color: #d8d1c7; }
.r-sub { margin: 8px 0 0; font-size: 14px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.r-sub b { color: var(--ink-text); font-weight: 650; }
.r-lines { margin: 20px 0 0; padding: 14px 0 0; list-style: none; font-size: 14px; background: linear-gradient(90deg, #444 50%, transparent 0) top/8px 1px repeat-x; }
.r-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; color: #cdc6bc; }
.r-lines li span:last-child { color: var(--ink-text); font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.r-lines li.minus span:last-child { color: #ff8f94; }
.r-lines li.total { margin-top: 8px; padding-top: 12px; background: linear-gradient(90deg, #444 50%, transparent 0) top/8px 1px repeat-x; color: #fff; font-weight: 700; }
.r-lines li.total span:last-child { color: #fff; }
.r-verdict { margin-top: 16px; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.6; background: var(--ink-3); color: #e9e3da; }
.r-verdict.ok { background: rgba(22, 121, 78, .22); color: #a8e6c6; }
.r-verdict.no { background: rgba(225, 38, 45, .2); color: #ffb3b6; }
.r-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; background: #fff; color: var(--text); box-shadow: var(--shadow); }
.btn:hover { background: #faf8f5; }
.btn svg { width: 16px; height: 16px; }
.btn.flat { box-shadow: none; background: var(--field); }
.btn.red { background: var(--red); color: #fff; box-shadow: none; }
.btn.red:hover { background: var(--red-deep); }
.r-actions .btn { flex: 1; }
.r-note { font-size: 12.5px; color: var(--muted); margin: 10px 2px 0; line-height: 1.6; }

/* barra fija del resultado en móvil */
.dock { position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); transform: translateY(140%); transition: transform .25s ease; }
.dock.on { transform: none; }
.dock .d-label { font-size: 12px; color: var(--ink-muted); }
.dock .d-val { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dock .btn { margin-left: auto; padding: 10px 12px; }
@media (min-width: 960px) { .dock { display: none; } }

/* ---------- visual ---------- */
.section { margin-top: 18px; }
.viz-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 0 14px; font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.viz-title small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.stack { display: flex; height: 18px; border-radius: 99px; overflow: hidden; background: var(--field); }
.stack span { height: 100%; }
.stairs { display: grid; gap: 6px; }
.stair { display: grid; grid-template-columns: 96px 1fr 40px 76px; align-items: center; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.stair .bar { height: 26px; border-radius: 7px; background: var(--field); position: relative; overflow: hidden; }
.stair .fill { position: absolute; inset: 0 auto 0 0; background: #cfc8be; border-radius: 7px; }
.stair.on .fill { background: var(--red); }
.stair.on { font-weight: 700; }
.stair .rate { text-align: right; color: var(--muted); }
.stair.on .rate { color: var(--red); }
.stair .amt { text-align: right; font-weight: 650; }
@media (max-width: 639px) { .stair { grid-template-columns: 70px 1fr 34px 66px; gap: 7px; font-size: 12.5px; } }

.gauge { position: relative; height: 22px; border-radius: 99px; background: linear-gradient(90deg, #d7efe2 0, #d7efe2 var(--lim), #f9dcdd var(--lim)); }
.gauge.rev { background: linear-gradient(90deg, #f9dcdd 0, #f9dcdd var(--lim), #d7efe2 var(--lim)); }
.gauge-ticks { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.gauge .needle { position: absolute; top: -6px; bottom: -6px; width: 4px; border-radius: 3px; background: var(--ink); left: var(--pos); transform: translateX(-2px); transition: left .3s; }
.gauge .limit { position: absolute; top: 100%; left: var(--lim); transform: translateX(-50%); font-size: 12px; color: var(--muted); padding-top: 8px; white-space: nowrap; }

/* tablas */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.tbl tr.hl td { background: var(--red-soft); font-weight: 700; }
.tbl tr.best td { background: var(--good-soft); }
.tbl a { color: var(--text); text-decoration-color: #cfc8be; text-underline-offset: 3px; }
.tbl a:hover { text-decoration-color: var(--red); }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: var(--good-soft); color: var(--good); vertical-align: 1px; }
.tag.red { background: var(--red-soft); color: var(--red-deep); }

/* calendario */
.cal-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .cal-grid { grid-template-columns: repeat(3, 1fr); } }
.cal h4 { margin: 0 0 8px; font-size: 14px; font-weight: 750; }
.cal .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.cal .days .dow { color: var(--muted); font-size: 11px; padding-bottom: 2px; }
.cal .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; }
.cal .d.period { background: #f6d5d6; color: #8c1016; }
.cal .d.fertile { background: #d9efe4; color: #0f5b3a; }
.cal .d.ovul { background: var(--good); color: #fff; font-weight: 800; }
.cal .d.work { background: #ebe7e1; }
.cal .d.off { background: #f6d5d6; color: #8c1016; }
.cal .d.today { box-shadow: inset 0 0 0 2px var(--ink); }

/* línea de tiempo */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.timeline li { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-variant-numeric: tabular-nums; }
.timeline li:nth-child(odd) { background: #faf8f5; }
.timeline li.now { background: var(--red-soft); font-weight: 700; }
.timeline .tdays { font-weight: 750; }

/* modo frase (conversión rápida) */
.sentences { display: grid; gap: 10px; margin-top: -64px; position: relative; z-index: 2; }
@media (min-width: 760px) { .sentences { grid-template-columns: 1fr 1fr; } }
.sentence { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 14px; }
.sentence .q { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.sentence .q input { width: 5.9em; height: 44px; border: 0; border-radius: 10px; background: var(--field); padding: 0 10px; font-size: 18px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; outline: 0; }
.sentence .q input:focus { background: #fff; box-shadow: 0 0 0 2px var(--red); }
.sentence .ans { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: #fff; }
.sentence .ans output { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.sentence .ans .how { font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.copy { border: 0; background: var(--ink-3); color: #fff; border-radius: 9px; height: 34px; padding: 0 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; flex: none; }
.copy:hover { background: #3a3a3a; }

/* ---------- prosa ---------- */
.content { display: grid; gap: 18px; margin-top: 18px; }
@media (min-width: 960px) { .content { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 28px; } }
.prose { font-size: 16.5px; line-height: 1.85; }
.prose > * { max-width: var(--prose); }
.prose h2 { font-size: 22px; line-height: 1.35; letter-spacing: -0.03em; margin: 34px 0 10px; font-weight: 800; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17.5px; margin: 24px 0 6px; font-weight: 750; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 14px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--red-deep); text-underline-offset: 3px; }
.prose strong { font-weight: 750; }
.prose .tbl-wrap, .prose table { max-width: none; }
.formula { font-family: var(--mono); font-size: 14px; background: #fff; border-radius: 12px; padding: 12px 14px; line-height: 1.7; overflow-x: auto; box-shadow: var(--shadow); }
.callout { background: var(--warn-soft); border-radius: 14px; padding: 14px 16px; font-size: 15px; line-height: 1.75; }
.faq { display: grid; gap: 8px; margin: 8px 0 16px; }
.faq details { background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 15px 44px 15px 16px; font-weight: 700; font-size: 16px; line-height: 1.5; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 16px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: linear-gradient(var(--red), var(--red)) center/12px 2px no-repeat, linear-gradient(var(--red), var(--red)) center/2px 12px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 16px 16px; font-size: 15.5px; line-height: 1.85; color: #34302b; }

.side { display: grid; gap: 14px; }
@media (min-width: 960px) { .side { position: sticky; top: 76px; } }
.side h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 700; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.links a { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; text-decoration: none; font-size: 15px; font-weight: 600; }
.links a:hover { background: var(--field); }
.links a .op { width: 26px; height: 26px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 14px; font-weight: 700; }
.links a small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.src { font-size: 13px; line-height: 1.7; color: var(--muted); }
.src a { color: var(--muted); }


/* ---------- portada ---------- */
.hero { background: var(--ink); color: var(--ink-text); padding: 34px 0 40px; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(32px, 9vw, 60px); line-height: 1.08; letter-spacing: -0.05em; font-weight: 850; margin: 0 0 12px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero p { color: #cfc9c1; font-size: 16.5px; line-height: 1.7; margin: 0 0 22px; max-width: 30em; }
.search { position: relative; max-width: 640px; }
.search .input { background: #fff; height: 62px; border-radius: 16px; }
.search .input input { height: 62px; font-size: 18px; font-weight: 600; padding-left: 50px; color: var(--text); }
.search .lens { position: absolute; left: 16px; color: var(--muted); }
.search .results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; color: var(--text); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 6px; display: none; z-index: 20; max-height: 60vh; overflow: auto; }
.search .results.on { display: block; }
.search .results a, .search .results span { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 10px; text-decoration: none; font-weight: 650; }
.search .results a:hover, .search .results a.sel { background: var(--field); }
.search .results small { color: var(--muted); font-weight: 400; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.quick a { text-decoration: none; font-size: 14px; font-weight: 650; padding: 9px 13px; border-radius: 99px; background: var(--ink-3); color: #e8e2d9; }
.quick a:hover { background: var(--red); color: #fff; }
.keypad { display: none; }
@media (min-width: 900px) {
  .hero .wrap { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: center; }
  .keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; transform: rotate(-4deg); }
  .keypad span { aspect-ratio: 1; border-radius: 16px; background: var(--ink-3); display: grid; place-items: center; font: 700 24px var(--mono); color: #8a847c; }
  .keypad span.r { background: var(--red); color: #fff; }
}
.topics { display: grid; gap: 14px; margin: 26px 0 0; }
@media (min-width: 720px) { .topics { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1060px) { .topics { grid-template-columns: 1fr 1fr 1fr; } }
.topic { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 10px; }
.topic h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: -0.03em; margin: 0 0 6px; }
.topic h2 .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; flex: none; }
.topic h2 .ic svg { width: 18px; height: 18px; }
.topic h2 small { margin-left: auto; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.topic ul { list-style: none; margin: 0; padding: 0; }
.topic li a, .topic li span { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 2px; font-size: 15px; font-weight: 600; text-decoration: none; border-bottom: 1px solid #f0ece6; }
.topic li:last-child a, .topic li:last-child span { border-bottom: 0; }
.topic li a:hover { color: var(--red-deep); }
.topic li span { color: #aaa298; font-weight: 500; }
.topic li span small { font-size: 11.5px; background: var(--field); border-radius: 6px; padding: 2px 6px; }
.topic li a svg { width: 16px; height: 16px; color: #c0b8ad; flex: none; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--card); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.fact b { display: block; font-size: 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fact span { font-size: 12.5px; color: var(--muted); line-height: 1.5; display: block; margin-top: 2px; }
.h2-home { font-size: 22px; letter-spacing: -0.03em; margin: 40px 0 0; }

/* ---------- pie ---------- */
.foot { background: var(--ink); color: var(--ink-muted); margin-top: 56px; padding: 30px 0 90px; font-size: 13.5px; line-height: 1.8; }
.foot a { color: #d8d1c7; text-decoration: none; }
.foot a:hover { color: #fff; }
.foot .cols { display: grid; gap: 18px; }
@media (min-width: 760px) { .foot .cols { grid-template-columns: 1.4fr 1fr 1fr; } .foot { padding-bottom: 36px; } }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot h4 { color: #fff; margin: 0 0 6px; font-size: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .receipt .r-big { transition: color .2s; }
  .fade-in { animation: fade .45s ease both; }
  @keyframes fade { from { opacity: 0; transform: translateY(6px); } }
}

/* móvil: cabecera compacta para llegar antes al formulario y al resultado */
@media (max-width: 639px) {
  .band { padding: 14px 0 80px; }
  .crumbs { margin-bottom: 8px; font-size: 12.5px; }
  .band h1 { margin-bottom: 6px; }
  .band .lead { font-size: 15px; line-height: 1.65; }
  .meta-row { margin-top: 12px; }
  .meta-row .pill + .pill { display: none; }
  .card { padding: 18px 16px; }
  .field { margin-bottom: 16px; }
}
@media (max-width: 639px) {
  .tbl { font-size: 13.5px; }
  .tbl th, .tbl td { padding-left: 7px; padding-right: 7px; }
  .tbl td.wrapc { white-space: normal; }
  .tbl .tag { display: table; margin-top: 3px; }
  .card svg text { font-size: 21px; }
}

.seg.wrap4 { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 400px) { .seg.wrap4 { grid-template-columns: repeat(2, 1fr); } }

[hidden] { display: none !important; }

/* campos de fecha y filas de dos columnas: nunca más anchos que la pantalla */
.row2 > * { min-width: 0; }
.input input[type="date"] { min-width: 0; width: 100%; }
.field > label, .field > .label { flex-wrap: wrap; }
@media (max-width: 480px) { .row2:has(input[type="date"]) { grid-template-columns: 1fr; } }
