:root {
  --bg: #f7faf9; --card: #ffffff; --ink: #0f172a; --muted: #475569; --line: #dbe4e2;
  --brand: #0f766e; --brand-ink: #ffffff; --accent: #facc15; --soft: #e6f4f1;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1514; --card: #12201e; --ink: #e8f0ee; --muted: #a3b5b1; --line: #23413c; --brand: #2dd4bf; --brand-ink: #062b27; --soft: #143330; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
.top { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; max-width: 1080px; margin: 0 auto; }
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
.lang button { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 14px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
main { max-width: 1080px; margin: 0 auto; padding: 0 16px 48px; }
.hero { padding: 0 0 20px; }
.kicker { display: inline-block; margin: 0 0 8px; padding: 4px 10px; border-radius: 6px; background: var(--accent); color: #1f2937; font-weight: 600; font-size: 14px; }
h1 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.12; margin: 4px 0 8px; letter-spacing: -0.01em; max-width: 30ch; }
.sub { color: var(--muted); max-width: 78ch; margin: 0 0 14px; font-size: 16px; }
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.calc form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; align-content: start; }
.calc form label:first-child { grid-column: 1 / -1; }
label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
input, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-width: 0; width: 100%; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.result { background: var(--soft); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.r-label { margin: 0; font-weight: 600; font-size: 14px; color: var(--muted); }
.r-big { margin: 4px 0; font-size: clamp(40px, 7vw, 60px); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.r-line { margin: 0 0 8px; font-size: 14px; }
.r-src { margin: 0; font-size: 12px; color: var(--muted); }
.ghost { grid-column: 1 / -1; justify-self: start; font: inherit; background: none; border: 2px dashed var(--brand); color: var(--brand); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.answer { margin: 12px 0 10px; padding-left: 12px; border-left: 4px solid var(--brand); font-weight: 600; max-width: 90ch; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn { display: inline-block; padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--ink); background: var(--card); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.small { font-size: 13px; color: var(--muted); }
section { margin-top: 28px; }
h2 { font-size: 24px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 18px 0 8px; }
.note { color: var(--muted); font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.tile span { display: block; font-size: 13px; color: var(--muted); }
.tile b { font-size: 20px; font-variant-numeric: tabular-nums; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.t { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.t td, .t th { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.t td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tr.strong td { font-weight: 700; }
.skills .t td:nth-child(n+2), .skills .t th:nth-child(n+2) { text-align: center; width: 90px; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; }
ol, ul { padding-left: 20px; }
.steps li { margin-bottom: 8px; }
.sources li { font-size: 14px; margin-bottom: 4px; overflow-wrap: anywhere; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
summary { font-weight: 600; cursor: pointer; }
footer { max-width: 1080px; margin: 0 auto; padding: 16px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .calc, .cols, .calc form { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { width: 100%; text-align: center; }
}
.why { margin: 2px 0 8px; font-size: 15px; padding-left: 20px; max-width: 92ch; }
.why li { margin: 4px 0; }
.key { margin-top: 14px; padding: 12px 14px; border: 1px solid #d8e2e0; border-radius: 10px; max-width: 640px; }
.key label { display: block; font-weight: 600; margin-bottom: 6px; }
.keyrow { display: flex; gap: 8px; flex-wrap: wrap; }
.keyrow input { flex: 1 1 240px; font: inherit; padding: 8px 10px; border: 1px solid #c9d6d3; border-radius: 8px; }
.key .ok { color: #0f766e; font-weight: 600; } .key .bad { color: #b42318; font-weight: 600; }
.hero .answer, .hero .why { max-width: none; }
.hero .answer { margin: 10px 0 6px; }
/* the hub injects its own language bar top-right (nav.yj-lang): keep our en/es switch next to the brand, below it on phones */
.top { justify-content: flex-start; gap: 18px; }
@media (max-width: 760px) { .top { padding-top: 46px; flex-wrap: wrap; } }
[hidden] { display: none !important; }
.sumline { font-weight: 600; margin: 10px 0 4px; }
