/*
 * HT Calculadora de ROI. Every rule is scoped to .htroi so the theme and the calculator
 * do not affect each other. Brand colors and fonts: change the tokens below.
 */
.htroi {
  --bg: #F2F4F6;
  --surface: #FFFFFF;
  --surface-2: #E9EDF1;
  --ink: #121A22;
  --ink-2: #44515E;
  --muted: #6E7B88;
  --line: #D7DEE5;
  --accent: #0070A8;
  --accent-ink: #FFFFFF;
  --old: #C0561C;
  --new: #0070A8;
  --good: #1D7A42;
  --good-bg: #E3F2E8;
  --focus: #0070A8;
  --font-display: inherit;
  --font-body: inherit;
  --radius: 10px;

  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 0 48px;
  display: grid;
  gap: 28px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}
.htroi *, .htroi *::before, .htroi *::after { box-sizing: border-box; }
.htroi [hidden] { display: none !important; }
.htroi h2, .htroi h3, .htroi h4 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.15; color: inherit; letter-spacing: normal; text-transform: none; }
.htroi p { margin: 0; }
.htroi ul, .htroi ol { margin: 0; }
.htroi button, .htroi input, .htroi select, .htroi textarea { font: inherit; color: inherit; margin: 0; }
.htroi button { text-transform: none; letter-spacing: normal; box-shadow: none; line-height: 1.3; }
.htroi :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.htroi .num { font-variant-numeric: tabular-nums; }

.htroi .intro { display: grid; gap: 10px; max-width: 760px; }
.htroi .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.htroi .intro-title { font-size: clamp(28px, 4.4vw, 42px); font-weight: 750; }
.htroi .intro p { color: var(--ink-2); font-size: 17px; max-width: 62ch; }

.htroi .grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .htroi .grid { grid-template-columns: minmax(0, 1fr); } }

.htroi .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; gap: 22px; min-width: 0; }
@media (max-width: 480px) { .htroi .panel { padding: 18px; } }

.htroi .steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.htroi .steps li { display: grid; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; }
.htroi .steps li::before { content: ""; height: 4px; border-radius: 2px; background: var(--surface-2); }
.htroi .steps li[data-state="done"]::before, .htroi .steps li[data-state="current"]::before { background: var(--accent); }
.htroi .steps li[data-state="current"] { color: var(--ink); font-weight: 600; }

.htroi fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 20px; min-width: 0; }
.htroi legend { padding: 0; margin-bottom: 4px; }
.htroi legend h2 { font-size: 22px; font-weight: 700; }
.htroi .hint { font-size: 13px; color: var(--muted); }
.htroi .q { display: grid; gap: 10px; min-width: 0; }
.htroi .q-title { font-weight: 600; font-size: 15px; }

.htroi .pick { position: relative; }
.htroi .pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.htroi .pick label { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 8px; cursor: pointer; height: 100%; margin: 0; background: var(--surface); transition: border-color .15s, background-color .15s; }
.htroi .pick label svg { grid-row: span 2; width: 30px; height: 30px; color: var(--muted); }
.htroi .pick strong { font-weight: 600; font-size: 15px; }
.htroi .pick small { color: var(--ink-2); font-size: 13px; line-height: 1.4; grid-column: 2; }
.htroi .pick label.nosvg { grid-template-columns: 1fr; }
.htroi .pick label.nosvg small { grid-column: 1; }
.htroi .pick input:checked + label { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.htroi .pick input:checked + label svg { color: var(--accent); }
.htroi .pick input:focus-visible + label { outline: 2px solid var(--focus); outline-offset: 2px; }
.htroi .stack { display: grid; gap: 8px; }
.htroi .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.htroi .chips .pick label { padding: 8px 16px; border-radius: 999px; grid-template-columns: 1fr; }

.htroi .vsec { display: grid; gap: 18px; }
.htroi .vsec:not([hidden]) ~ .vsec { padding-top: 20px; border-top: 1px solid var(--line); }
.htroi .vsec-head { display: flex; align-items: center; gap: 10px; }
.htroi .vsec-head svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.htroi .vsec-head h3 { font-size: 19px; font-weight: 700; }

.htroi .range-row { display: flex; align-items: center; gap: 14px; }
.htroi .range-row input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent); height: 28px; padding: 0; border: 0; background: none; }
.htroi .range-row input[type="number"] { width: 96px; padding: 8px 6px; border: 1.5px solid var(--line); border-radius: 8px; text-align: center; font-family: var(--font-display); font-size: 20px; font-weight: 700; background: var(--surface); }
.htroi .scale { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }

.htroi .field { display: grid; gap: 6px; min-width: 0; }
.htroi .field > label { font-weight: 600; font-size: 14px; margin: 0; }
.htroi .field input[type="text"], .htroi .field input[type="email"], .htroi .field input[type="tel"], .htroi .field select {
  width: 100%; height: auto; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: none;
}
.htroi .field input:focus, .htroi .field select:focus, .htroi .range-row input[type="number"]:focus { border-color: var(--accent); outline: none; }
.htroi .fields-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 520px) { .htroi .fields-2 { grid-template-columns: minmax(0, 1fr); } }

.htroi .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); margin: 0; font-weight: 400; }
.htroi .check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

.htroi .actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.htroi .btn { display: inline-block; border: 1.5px solid transparent; border-radius: 8px; padding: 12px 20px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; }
.htroi .btn-primary { background: var(--accent); color: var(--accent-ink); }
.htroi .btn-primary:hover { filter: brightness(1.08); background: var(--accent); color: var(--accent-ink); }
.htroi .btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.htroi .btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.htroi .error { color: var(--old); font-size: 13px; font-weight: 600; }

.htroi .teaser { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 16px; position: sticky; top: 24px; }
@media (max-width: 860px) { .htroi .teaser { position: static; } }
.htroi .teaser h3 { font-size: 16px; font-weight: 700; }
.htroi .t-big { display: grid; gap: 2px; }
.htroi .t-big b { font-family: var(--font-display); font-size: 36px; font-weight: 800; line-height: 1.05; }
.htroi .t-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.htroi .t-tags span { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.htroi .locked { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.htroi .locked li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; margin: 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.htroi .mask { font-family: var(--font-display); font-weight: 700; color: var(--muted); letter-spacing: .12em; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.htroi .mask svg { width: 13px; height: 13px; }

.htroi .results { display: grid; gap: 22px; }
.htroi .res-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.htroi .res-head > div { display: grid; gap: 8px; max-width: 760px; min-width: 0; }
.htroi .res-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 750; }
.htroi .res-head p { color: var(--ink-2); }
.htroi .chip { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.htroi .chip svg { width: 14px; height: 14px; }
.htroi .chip.good { background: var(--good-bg); color: var(--good); }

.htroi .section-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.htroi .kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .htroi .kpis { grid-template-columns: minmax(0, 1fr); } }
.htroi .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 4px; align-content: start; min-width: 0; }
.htroi .kpi .k-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.htroi .kpi .k-val { font-family: var(--font-display); font-size: clamp(28px, 3.2vw, 38px); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.htroi .kpi .k-sub { font-size: 13px; color: var(--muted); }
.htroi .kpi.hero { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.htroi .kpi.hero .k-label { color: inherit; opacity: .8; }
.htroi .kpi.hero .k-sub { color: inherit; opacity: .7; }

.htroi .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.htroi .card h3 { font-size: 18px; font-weight: 700; }
.htroi .card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.htroi .card-head svg { width: 26px; height: 26px; color: var(--accent); flex: none; }

.htroi .legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.htroi .legend span { display: inline-flex; align-items: center; gap: 6px; }
.htroi .legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.htroi .bars { display: grid; gap: 14px; }
.htroi .bars .grp { display: grid; gap: 4px; }
.htroi .bars .grp-name { font-size: 14px; font-weight: 600; }
.htroi .bars .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.htroi .bars .track { height: 12px; display: flex; }
.htroi .bars .fill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.htroi .bars .val { font-size: 13px; color: var(--ink-2); min-width: 92px; text-align: right; }

.htroi .vcards { display: grid; gap: 16px; }
.htroi .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .htroi .facts { grid-template-columns: minmax(0, 1fr); } }
.htroi .fact { background: var(--surface-2); border-radius: 8px; padding: 14px 16px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.htroi .fact .f-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.htroi .fact .f-val { font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1.15; }
.htroi .fact .f-sub { font-size: 13px; color: var(--ink-2); }
.htroi .callout { font-size: 16px; line-height: 1.5; border-left: 3px solid var(--old); padding: 2px 0 2px 14px; max-width: 70ch; }
.htroi .callout b { font-family: var(--font-display); }

.htroi .product { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; border: 1.5px solid var(--accent); border-radius: 8px; padding: 14px 16px; }
.htroi .product > div { display: grid; gap: 2px; min-width: 0; flex: 1 1 280px; }
.htroi .product .p-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.htroi .product .p-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.htroi .product .p-desc { font-size: 13px; color: var(--ink-2); }
.htroi .product .btn { padding: 9px 16px; }
.htroi .product .done { font-size: 13px; font-weight: 600; color: var(--good); }

.htroi .tbl-wrap { overflow-x: auto; }
.htroi table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0; border: 0; }
.htroi th, .htroi td { padding: 9px 8px; text-align: right; border: 0; border-bottom: 1px solid var(--line); white-space: nowrap; background: none; }
.htroi th:first-child, .htroi td:first-child { text-align: left; white-space: normal; padding-left: 0; }
.htroi thead th { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.htroi thead th .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.htroi tbody tr:last-child td { border-bottom: 0; font-weight: 700; }
.htroi td.delta { color: var(--good); font-weight: 600; }

.htroi details.assump { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; }
.htroi details.assump summary { cursor: pointer; font-weight: 600; }
.htroi details.assump ul { margin: 12px 0 4px; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-2); font-size: 14px; }

.htroi .cta { background: var(--ink); color: var(--surface); border-radius: var(--radius); padding: 24px; display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.htroi .cta h3 { font-size: 22px; color: inherit; }
.htroi .cta p { opacity: .8; font-size: 14px; margin-top: 4px; }
.htroi .cta .btn-primary, .htroi .cta .btn-primary:hover { background: var(--surface); color: var(--ink); }
.htroi .cta-done { font-size: 14px; font-weight: 600; }
.htroi .foot { font-size: 12px; color: var(--muted); max-width: 90ch; }

@media (prefers-reduced-motion: reduce) { .htroi * { transition: none !important; } }
