:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 14px 40px rgba(2, 6, 23, 0.10);
  --radius: 16px;

  /* Identidad visual */
  --accent: #1d4ed8;
  --accent-2: #0ea5e9;

  --warn-bg: #fffbeb;
  --warn-border: #fde68a;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;

  --content-max: 1040px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 520px at 20% 0%, rgba(238,242,255,1) 0%, transparent 60%),
    radial-gradient(1200px 520px at 80% 0%, rgba(236,254,255,1) 0%, transparent 60%),
    var(--bg);
  line-height: 1.5;
  font-size: 16px;
}

main{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 34px 18px 72px;
}

/* ===== Header ===== */
header.page-header{
  margin-bottom: 14px;
}

h1{
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 44px);
  letter-spacing: -0.03em;
}

.subtitle{
  margin: 0;
  color: var(--muted);
  max-width: 75ch;
  font-size: 15px;
}

/* ===== Layout: inputs + resultado ===== */
.layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

@media (min-width: 980px){
  .layout{
    grid-template-columns: 1.15fr 0.85fr; /* izquierda domina */
    align-items: start;
  }
}

/* ===== Cards ===== */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

/* Barra superior de acento (da "marca") */
.card::before{
  content:"";
  position:absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.card-body{
  padding: 20px;
  padding-top: 22px;
}

/* ===== Form ===== */
form#form{
  display: grid;
  gap: 14px;
}

.form-row{
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px){
  .form-row{ grid-template-columns: 1fr 1fr; }
}

label{
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
}

input[type="date"]{
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
}

input[type="date"]:focus{
  outline: none;
  border-color: rgba(14,165,233,0.55);
  box-shadow: 0 0 0 4px rgba(14,165,233,0.14);
}

/* Fieldset radios */
fieldset{
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin: 0;
  background: rgba(248,250,252,0.55);
}

legend{
  padding: 0 10px;
  color: rgba(71,85,105,0.9);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.radio-group{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.radio{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.9);
}

.radio:hover{
  background: #fff;
  border-color: rgba(226,232,240,1);
}

.radio input{ transform: translateY(1px); }
.radio span{ color: var(--text); font-size: 15px; font-weight: 700; }

/* Botón */
button[type="submit"]{
  appearance: none;
  border: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(29,78,216,0.25);
  transition: transform 0.04s ease, filter 0.15s ease;
}

button[type="submit"]:hover{ filter: brightness(1.03); }
button[type="submit"]:active{ transform: translateY(1px); }

/* ===== Resultado (columna derecha) ===== */
#result[hidden]{ display: none !important; }

.card-result{
  position: sticky;
  top: 16px;
}

@media (max-width: 979px){
  .card-result{ position: static; }
}

.pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15,23,42,0.75);
  border: 1px solid rgba(14,165,233,0.25);
  background: linear-gradient(180deg, rgba(14,165,233,0.10), rgba(29,78,216,0.06));
}

.result-number{
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 950;
  letter-spacing: -0.05em;
  margin: 8px 0 0;
  line-height: 1;
}

.result-label{
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: rgba(15,23,42,0.75);
}

.result-details{
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(14,165,233,0.20);
  background: linear-gradient(180deg, rgba(14,165,233,0.08), rgba(29,78,216,0.04));
}

.result-meta{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* ===== Notice ===== */
#notice[hidden]{ display: none !important; }

#notice{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--warn-border);
  background: var(--warn-bg);
  color: #7c2d12;
  font-size: 14px;
  font-weight: 700;
}

/* ===== Ads (solo top y bottom, discretos) ===== */
.ad-slot{
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.35);
  color: rgba(71, 85, 105, 0.6);
  display: grid;
  place-items: center;
  padding: 10px;
}

.ad-slot small{
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ad-top{
  min-height: 70px;
  margin-top: 10px;
}

.ad-bottom{
  min-height: 110px;
  margin-top: 18px;
}

/* ===== Mobile polish ===== */
@media (max-width: 480px){
  main{ padding: 26px 14px 56px; }
  .card-body{ padding: 16px; padding-top: 18px; }
  .subtitle{ font-size: 14px; }
  input[type="date"]{ font-size: 14px; }
}


