:root {
  --bg: #fffbf3;
  --bg-soft: #fff5e6;
  --card: #ffffff;
  --fg: #2a2d2c;
  --muted-fg: #6f7270;
  --hairline: rgba(42, 45, 44, 0.08);
  --border: rgba(42, 45, 44, 0.14);

  --yellow: #ffe9a6;
  --yellow-edge: #f4cf66;
  --yellow-fg: #7a5800;

  --green: #d4ebc6;
  --green-edge: #9fd18f;
  --green-fg: #3a6c2a;
  --green-deep: #2f7a45;

  --red: #ffd6cc;
  --red-edge: #f2a98e;
  --red-fg: #9a3c25;

  --blue: #cfe8f5;
  --blue-edge: #88c0e0;
  --blue-fg: #1f5c82;

  --violet: #e7ddf5;
  --violet-edge: #b9a6dc;
  --violet-fg: #5b3aa3;

  --radius: 18px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 0 rgba(42, 45, 44, 0.04), 0 4px 14px rgba(42, 45, 44, 0.04);
  --shadow-lift: 0 2px 0 rgba(42, 45, 44, 0.04), 0 10px 26px rgba(42, 45, 44, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 251, 243, 0.9);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.brand:hover { text-decoration: none; }
.brand img {
  height: 20px;
  width: auto;
  flex-shrink: 0;
  filter: brightness(0);
}
.brand-sep { color: var(--muted-fg); opacity: 0.55; }
.brand-product { color: var(--fg); font-weight: 500; }

.nav-right { display: flex; align-items: center; gap: 4px; }
.nav-right > a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--muted-fg);
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.nav-right > a:hover {
  background: var(--bg-soft);
  color: var(--fg);
  text-decoration: none;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hairline);
  background: var(--card);
  border-radius: var(--radius-pill);
  padding: 2px;
  margin-left: 4px;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--muted-fg);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s;
}
.lang-toggle button:hover { color: var(--fg); }
.lang-toggle button.active {
  background: var(--green-deep);
  color: #fff;
}

main { padding: 96px 0 96px; }
#upload-view {
  min-height: calc(100vh - 60px - 100px - 192px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
#upload-view .verified { margin-left: auto; margin-right: auto; }
#upload-view #upload-form { align-items: stretch; }
#upload-view button[type="submit"] { align-self: center; }
#upload-view .how-mini { text-align: left; }
.how-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 56px;
}
.how-step {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-card);
}
.how-num {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--yellow-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--yellow-edge);
}
.how-step:nth-child(2) .how-num { background: var(--blue); color: var(--blue-fg); border-color: var(--blue-edge); }
.how-step:nth-child(3) .how-num { background: var(--green); color: var(--green-fg); border-color: var(--green-edge); }
.how-text { color: var(--fg); font-size: 13.5px; line-height: 1.45; font-weight: 500; }
@media (max-width: 600px) {
  .how-mini { grid-template-columns: 1fr; gap: 8px; margin-top: 36px; }
  #upload-view { min-height: auto; padding: 16px 0; }
}

h1 {
  font-size: 38px;
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: balance;
  color: var(--fg);
}
h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted-fg);
}

.verified {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  border: 1px solid var(--green-edge);
  border-radius: var(--radius-pill);
  padding: 5px 14px 5px 6px;
  margin: 0 0 32px;
  text-decoration: none;
  color: var(--green-fg);
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.15s;
}
.verified.verified-link { cursor: pointer; }
.verified.verified-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58, 108, 42, 0.18);
  text-decoration: none;
}
.verified.compact { margin: 20px 0 16px; }
.verified-cta { font-weight: 700; }
.verified-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--green-deep);
  color: white;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

#upload-form { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }

.drop {
  display: block;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  padding: 22px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop:hover { border-color: var(--green-edge); background: var(--bg-soft); }
.drop.dragover { border-color: var(--green-deep); background: var(--green); }
.drop-title { font-weight: 600; font-size: 14px; }
.drop-sub { color: var(--muted-fg); font-size: 12.5px; margin-top: 2px; }
.file-name {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--green-deep);
  font-weight: 600;
}

button[type="submit"] {
  background: var(--green-deep);
  color: white;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 14px 30px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--muted-fg);
}
button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(47, 122, 69, 0.28);
}

.error {
  color: var(--red-fg);
  font-size: 13.5px;
  background: var(--red);
  border: 1px solid var(--red-edge);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
}

.steps {
  list-style: none;
  padding: 20px 22px;
  margin: 24px 0;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.steps li {
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--muted-fg);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.steps li::before {
  content: "○";
  font-size: 13px;
  width: 18px;
  text-align: center;
}
.steps li.active { color: var(--fg); font-weight: 500; }
.steps li.active::before { content: "●"; color: var(--yellow-edge); }
.steps li.done { color: var(--green-fg); }
.steps li.done::before { content: "✓"; color: var(--green-deep); font-weight: 700; }
.steps li:last-child { border-bottom: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-card);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px 18px;
}
.profile-grid .row { display: flex; flex-direction: column; gap: 4px; }
.profile-grid .key {
  font-size: 10.5px;
  color: var(--muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.profile-grid .val {
  font-size: 14px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.defaulted-note {
  color: var(--muted-fg);
  font-size: 12.5px;
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--hairline);
}

.constraints-card label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 22px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.constraints-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--green-deep);
  margin: 0;
}

.recommendation {
  background: linear-gradient(180deg, var(--yellow) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--yellow-edge);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 0 0 18px;
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-card);
}
.rec-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--yellow-fg);
}
.rec-brand { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
.rec-oferta { color: var(--muted-fg); font-size: 13.5px; }
.rec-savings {
  font-size: 14.5px;
  margin-top: 8px;
  font-weight: 600;
  color: var(--green-fg);
}
.rec-savings.neg { color: var(--muted-fg); }
.rec-calc { margin-top: 6px; }
.rec-calc-btn {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted-fg);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.rec-calc-btn:hover { border-color: var(--green-deep); color: var(--fg); }
.rec-calc-panel {
  margin-top: 10px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.rec-calc-group { margin-top: 12px; }
.rec-calc-group:first-child { margin-top: 0; }
.rec-calc-group-title { font-size: 11.5px; font-weight: 600; color: var(--muted-fg); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.rec-calc-line { display: grid; grid-template-columns: 110px 80px 1fr; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--fg); align-items: baseline; }
.rec-calc-line-label { color: var(--muted-fg); }
.rec-calc-line-value { font-variant-numeric: tabular-nums; text-align: right; }
.rec-calc-line-note { font-size: 11.5px; color: var(--muted-fg); }
.rec-calc-total { border-top: 1px solid var(--hairline); margin-top: 4px; padding-top: 6px; font-weight: 600; }
.rec-calc-total .rec-calc-line-label { color: var(--fg); }
.rec-calc-save { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 10px 12px; }
.rec-calc-save-body { font-size: 13px; color: var(--fg); white-space: pre-line; font-variant-numeric: tabular-nums; }
.rec-calc-foot { font-size: 11.5px; color: var(--muted-fg); margin: 12px 0 0; line-height: 1.45; }
.rec-reason { color: var(--muted-fg); font-size: 13px; margin-top: 4px; }
.rec-cta {
  align-self: start;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  background: var(--fg);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}
.rec-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(42, 45, 44, 0.22);
  text-decoration: none;
  color: white;
}

.hosted-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: var(--yellow);
  border: 1px solid var(--yellow-edge);
  color: var(--yellow-fg);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 0 0 18px;
  font-size: 13px;
}
.hosted-banner[hidden] { display: none; }
.hosted-banner-text { flex: 1 1 240px; }
.hosted-banner-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--fg);
  color: white;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap;
}
.hosted-banner-link:hover { color: white; text-decoration: none; opacity: 0.92; }
.disclaimer {
  background: var(--blue);
  border: 1px solid var(--blue-edge);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 18px;
  color: var(--blue-fg);
}
.disclaimer-title { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.disclaimer-body { font-size: 13px; line-height: 1.5; }
.disclaimer-snap { font-size: 11.5px; margin-top: 6px; opacity: 0.75; }
.disclaimer.warning { background: var(--red); border-color: var(--red-edge); color: var(--red-fg); }

.bug-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--yellow-fg);
  border: 1px solid var(--yellow-edge);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 50;
  box-shadow: var(--shadow-lift);
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bug-fab[hidden] { display: none; }
.bug-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(122, 88, 0, 0.25); }
.bug-fab:active { transform: translateY(0); }

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(42, 45, 44, 0.45); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow-lift);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--hairline);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.modal-close {
  background: none;
  border: 0;
  font-size: 22px;
  color: var(--muted-fg);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 999px;
}
.modal-close:hover { background: var(--bg-soft); color: var(--fg); }
.modal-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; }
.modal-label { font-size: 12px; font-weight: 600; color: var(--muted-fg); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 8px; }
.modal-body textarea,
.modal-body input {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--fg);
  outline: none;
  transition: border-color 0.15s;
}
.modal-body textarea:focus,
.modal-body input:focus { border-color: var(--green-deep); }
.modal-body textarea { resize: vertical; min-height: 80px; }
.modal-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.modal-submit {
  background: var(--green-deep);
  color: white;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.modal-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(47, 122, 69, 0.25); }
.modal-status { font-size: 13px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); }
.modal-status.ok { background: var(--green); border: 1px solid var(--green-edge); color: var(--green-fg); }
.modal-status.err { background: var(--red); border: 1px solid var(--red-edge); color: var(--red-fg); }
.file-input-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.file-pick {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--muted-fg);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.file-pick:hover { border-color: var(--green-deep); color: var(--fg); }
.bug-screenshot-name { font-size: 12px; color: var(--muted-fg); margin: 4px 0 0; }

.ranking-title { margin: 36px 0 4px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.ranking-title .dim { color: var(--muted-fg); font-weight: 400; font-size: 14px; margin-left: 6px; }
.ranking-note { color: var(--muted-fg); font-size: 12.5px; margin: 0 0 20px; }

.offers-list { display: flex; flex-direction: column; gap: 10px; }
.offer {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 18px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.offer:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}
.offer .rank {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted-fg);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.offer .body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.offer .comer { font-weight: 600; font-size: 15px; letter-spacing: -0.005em; }
.offer .oferta { color: var(--muted-fg); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer .commitment {
  color: var(--muted-fg);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.offer .badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline);
  background: var(--bg-soft);
  color: var(--muted-fg);
}
.badge.verde { background: var(--green); color: var(--green-fg); border-color: var(--green-edge); }
.badge.pen { background: var(--red); color: var(--red-fg); border-color: var(--red-edge); }
.badge.fijo { background: var(--blue); color: var(--blue-fg); border-color: var(--blue-edge); }
.badge.flex { background: var(--violet); color: var(--violet-fg); border-color: var(--violet-edge); }
.badge.pvpc { background: var(--yellow); color: var(--yellow-fg); border-color: var(--yellow-edge); }
.badge.promo { background: var(--yellow); color: var(--yellow-fg); border-color: var(--yellow-edge); }

.offer .money { text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.offer .importe { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: var(--fg); }
.offer .savings { font-size: 12.5px; color: var(--muted-fg); font-weight: 500; }
.offer .savings.pos { color: var(--green-deep); font-weight: 600; }
.offer .savings.neg { color: var(--muted-fg); }
.offer .visit {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--fg);
  background: var(--bg-soft);
  border: 1px solid var(--hairline);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  font-weight: 600;
}
.offer .visit:hover {
  background: var(--green-deep);
  color: white;
  border-color: var(--green-deep);
  text-decoration: none;
}

.actions { text-align: center; margin: 40px 0 0; }
.actions a {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  color: var(--fg);
  font-size: 13px;
  background: var(--card);
  border: 1px solid var(--hairline);
  font-weight: 500;
}
.actions a:hover { background: var(--bg-soft); text-decoration: none; }

.foot {
  border-top: 1px solid var(--hairline);
  padding: 24px 0;
  font-size: 12.5px;
  color: var(--muted-fg);
  background: var(--bg-soft);
}
.foot .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { color: var(--muted-fg); font-weight: 500; }
.foot a:hover { color: var(--fg); }

@media (max-width: 600px) {
  h1 { font-size: 30px; }
  .offer { grid-template-columns: 24px 1fr auto; padding: 14px 16px; gap: 12px; }
  .offer .importe { font-size: 16px; }
  .nav-right > a { padding: 0 10px; font-size: 12.5px; }
  .brand img { height: 18px; }
  main { padding: 40px 0 64px; }
}
