/* ============================================================
   Tarjeta Viva — hoja de estilos principal
   ============================================================ */

:root {
  --paper: #f6f1e9;
  --paper-2: #efe8dc;
  --ink: #191512;
  --muted: #6b6158;
  --line: rgba(25, 21, 18, 0.14);
  --line-soft: rgba(25, 21, 18, 0.08);
  --accent: #7a1f2b;
  --accent-soft: #f3e3e4;
  --green: #2f5136;
  --radius: 18px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --shadow: 0 24px 60px -30px rgba(25, 21, 18, 0.45);
  --max: 1180px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
code { font-family: "Cascadia Mono", Consolas, monospace; font-size: 0.92em; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
p { margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------------------------------------------------------------- nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 15px; letter-spacing: -0.04em;
}
.brand-name { font-family: var(--serif); font-size: 19px; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-demo { color: var(--ink); border-bottom: 1px solid var(--line); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--ink);
  padding: 14px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -16px rgba(25, 21, 18, 0.6); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(25, 21, 18, 0.04); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; box-shadow: none; }

.link { color: var(--muted); font-size: 14.5px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.link:hover { color: var(--ink); }
.link-sm { font-size: 13.5px; color: var(--accent); border-bottom: 1px solid rgba(122, 31, 43, 0.25); }

.eyebrow {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.micro { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 56px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 72px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lede { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 33ch; line-height: 1.5; }
.hero-actions { display: flex; gap: 12px; margin: 32px 0 40px; flex-wrap: wrap; }
.hero-facts {
  display: flex; gap: 40px; list-style: none; margin: 0; padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.hero-facts li { display: flex; flex-direction: column; gap: 2px; }
.hero-facts b { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.hero-facts span { font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }

/* ---------------------------------------------------------------- phone */
.phone {
  position: relative;
  width: 292px; height: 592px;
  margin: 0 auto;
  background: #17130f;
  border-radius: 46px;
  padding: 10px;
  box-shadow: 0 40px 80px -40px rgba(25, 21, 18, 0.55), 0 2px 0 rgba(255, 255, 255, 0.25) inset;
}
.phone::after {
  content: ""; position: absolute; inset: -14px -14px auto -14px; height: 40%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(122, 31, 43, 0.16), transparent 70%);
  z-index: -1; filter: blur(10px);
}
.phone-notch {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 22px; background: #17130f; border-radius: 0 0 14px 14px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%;
  background: #f8f4ec;
  border-radius: 38px;
  overflow: hidden;
  position: relative;
}
.phone-lg { width: 340px; height: 690px; }
.phone-lg .phone-screen { border-radius: 40px; }
.phone-lg iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

.mini-inv {
  height: 100%; padding: 54px 24px 24px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(90, 106, 70, 0.16), transparent 60%),
    linear-gradient(180deg, #f6f1e6, #efe7d8);
  color: #24301e;
}
.mini-kicker { font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: #6a7059; }
.mini-names {
  font-family: var(--serif); font-size: 38px; line-height: 1.02; letter-spacing: -0.04em;
  margin: 14px 0 10px; font-weight: 500;
}
.mini-names em { color: #5a6a46; }
.mini-date { font-size: 10.5px; letter-spacing: 0.2em; color: #6a7059; }
.mini-quiz {
  width: 100%; margin-top: 34px; padding: 18px 16px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(36, 48, 30, 0.12);
  text-align: left;
}
.mini-step { font-size: 8.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #8a8f7a; }
.mini-q { font-family: var(--serif); font-size: 19px; line-height: 1.15; margin: 8px 0 14px; }
.mini-opt {
  font-size: 12px; padding: 9px 12px; border-radius: 9px; margin-bottom: 7px;
  background: #5a6a46; color: #fbf9f1;
}
.mini-opt.is-ghost { background: transparent; border: 1px solid rgba(36, 48, 30, 0.18); color: #24301e; }
.mini-cta {
  margin-top: auto; width: 100%; padding: 13px; border-radius: 999px;
  background: #24301e; color: #fbf9f1; font-size: 12.5px; letter-spacing: 0.02em;
}

/* ---------------------------------------------------------------- strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.marquee {
  display: flex; gap: 18px; align-items: center; justify-content: flex-start;
  padding: 16px 24px; white-space: nowrap; overflow-x: auto; scrollbar-width: none;
  font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.marquee::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .marquee { justify-content: center; overflow: hidden; }
}
.marquee i { color: var(--accent); font-style: normal; }

/* ---------------------------------------------------------------- sections */
.section { max-width: var(--max); margin: 0 auto; padding: 92px 24px; }
.section-alt { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none; background: var(--paper-2); }
.section-alt > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 48px; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head h2 {
  font-family: var(--serif); font-size: clamp(32px, 3.8vw, 48px);
  line-height: 1.04; letter-spacing: -0.03em; max-width: 22ch;
}
.section-head .lede { margin-top: 14px; }
.section-dark {
  max-width: none; background: #17130f; color: #f6f1e9;
  padding: 96px 24px;
}
.section-dark > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-dark .eyebrow, .section-dark .lede, .section-dark .muted { color: rgba(246, 241, 233, 0.6); }
.section-dark code { color: #e8d9b8; }

/* ---------------------------------------------------------------- steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps article { border-top: 1px solid var(--line); padding-top: 22px; }
.step-n { font-family: var(--serif); font-size: 13px; color: var(--accent); letter-spacing: 0.08em; }
.steps h3 { font-family: var(--serif); font-size: 25px; margin: 12px 0 10px; letter-spacing: -0.02em; }
.steps p { color: var(--muted); font-size: 15px; max-width: 32ch; }

/* ---------------------------------------------------------------- features */
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.feature {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; display: flex; flex-direction: column; gap: 10px;
}
.feature-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 40px; }
.feature-copy { flex: 1; }
.feature h3 { font-family: var(--serif); font-size: 26px; line-height: 1.1; letter-spacing: -0.025em; }
.feature p { color: var(--muted); font-size: 15px; max-width: 46ch; }
.tag {
  align-self: flex-start; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 999px;
}
.feature-visual { flex: 0 0 300px; }
.quiz-demo {
  background: linear-gradient(180deg, #fbf7ef, #f1eadc);
  border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; gap: 9px;
  box-shadow: var(--shadow);
}
.quiz-demo p { font-family: var(--serif); font-size: 20px; color: var(--ink); margin: 4px 0 8px; line-height: 1.15; }
.opt-pill { font-size: 13px; padding: 9px 12px; border-radius: 10px; background: var(--green); color: #f6f1e9; }
.opt-pill.is-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }

/* ---------------------------------------------------------------- templates */
.tgrid { display: grid; gap: 22px; }
.tgrid-3 { grid-template-columns: repeat(3, 1fr); }
.tcard { display: flex; flex-direction: column; gap: 12px; }
.tcard-preview {
  position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.tcard:hover .tcard-preview { transform: translateY(-4px); box-shadow: var(--shadow); }
.tcard-inner {
  position: absolute; inset: 0; padding: 26px 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; z-index: 2;
}
.tcard-kicker { font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--soft); }
.tcard-title { font-family: var(--display); font-size: 27px; line-height: 1.05; letter-spacing: -0.03em; }
.tcard-line { width: 40px; height: 1px; background: var(--accent); margin: 6px 0; }
.tcard-meta { font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--soft); }
.tcard-date { font-family: var(--display); font-size: 12px; letter-spacing: 0.2em; color: var(--soft); margin-top: 2px; }
.tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tcard-foot strong { font-family: var(--serif); font-size: 18px; font-weight: 500; display: block; }
.tcard-foot .muted { font-size: 12.5px; }
.tcard-arrow { color: var(--muted); }

/* patrones */
.tcard-preview::before,
.inv::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.9; z-index: 1;
}
[data-pattern="leaves"]::before {
  background:
    radial-gradient(60% 40% at 12% 8%, rgba(90, 106, 70, 0.22), transparent 60%),
    radial-gradient(50% 40% at 92% 100%, rgba(90, 106, 70, 0.18), transparent 60%),
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(90, 106, 70, 0.05) 22px 23px);
}
[data-pattern="rules"]::before {
  background: repeating-linear-gradient(180deg, transparent 0 46px, rgba(23, 21, 20, 0.07) 46px 47px);
}
[data-pattern="stars"]::before {
  background-image:
    radial-gradient(1.2px 1.2px at 20% 24%, rgba(201, 162, 39, 0.9), transparent),
    radial-gradient(1px 1px at 68% 12%, rgba(243, 233, 210, 0.7), transparent),
    radial-gradient(1.6px 1.6px at 82% 46%, rgba(201, 162, 39, 0.8), transparent),
    radial-gradient(1px 1px at 34% 72%, rgba(243, 233, 210, 0.6), transparent),
    radial-gradient(1.2px 1.2px at 58% 88%, rgba(201, 162, 39, 0.7), transparent);
}
[data-pattern="confetti"]::before {
  background-image:
    radial-gradient(2.5px 2.5px at 14% 18%, #e4572e, transparent),
    radial-gradient(2px 2px at 78% 12%, #2e86ab, transparent),
    radial-gradient(2.5px 2.5px at 88% 62%, #f2b134, transparent),
    radial-gradient(2px 2px at 22% 78%, #6a4c93, transparent),
    radial-gradient(2px 2px at 54% 40%, #2f6b4f, transparent);
  opacity: 0.55;
}
[data-pattern="frame"]::before {
  inset: 16px; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: inset 0 0 0 6px var(--bg), inset 0 0 0 7px var(--line);
}
[data-pattern="bars"]::before {
  background: linear-gradient(90deg, var(--accent) 0 8px, transparent 8px);
}

/* ---------------------------------------------------------------- pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan {
  position: relative; border: 1px solid rgba(246, 241, 233, 0.16); border-radius: 20px;
  padding: 30px 26px; display: flex; flex-direction: column; gap: 14px;
  background: rgba(246, 241, 233, 0.03);
}
.plan-featured { background: #f6f1e9; color: var(--ink); border-color: #f6f1e9; }
.plan-flag {
  position: absolute; top: -12px; left: 26px;
  background: var(--accent); color: #fff; font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.plan h3 { font-family: var(--serif); font-size: 25px; }
.plan-price { font-family: var(--serif); font-size: 46px; line-height: 1; letter-spacing: -0.04em; }
.plan-price span { font-family: var(--sans); font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.plan-blurb { font-size: 13.5px; color: var(--muted); min-height: 40px; }
.plan ul { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.plan ul li::before { content: "—"; color: var(--accent); margin-right: 8px; }
.plan .btn { margin-top: auto; }
.plan-featured .btn { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.section-dark .plan .btn-ghost { color: #f6f1e9; border-color: rgba(246, 241, 233, 0.35); }
.section-dark .plan .btn-ghost:hover { background: rgba(246, 241, 233, 0.08); }
.pricing-note { text-align: center; font-size: 12.5px; margin-top: 26px; color: rgba(246, 241, 233, 0.55); }

/* ---------------------------------------------------------------- faq */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px;
  font-family: var(--serif); font-size: 21px; letter-spacing: -0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-family: var(--sans); }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin-top: 12px; max-width: 70ch; }

/* ---------------------------------------------------------------- cta */
.cta-band {
  max-width: var(--max); margin: 0 auto 96px; padding: 64px 40px; text-align: center;
  background: linear-gradient(180deg, #fbf7ef, #efe7d8);
  border: 1px solid var(--line); border-radius: 26px;
}
.cta-band h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; }
.cta-band p { color: var(--muted); margin: 12px 0 28px; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 56px 24px 30px; max-width: var(--max); margin: 0 auto; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot h4 { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.foot a { display: block; font-size: 14.5px; color: var(--muted); padding: 4px 0; }
.foot a:hover { color: var(--ink); }
.foot .brand { margin-bottom: 14px; }
.foot-grid p { font-size: 14px; max-width: 36ch; }
.foot-base {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line); margin-top: 44px; padding-top: 20px; font-size: 12.5px; color: var(--muted);
}

/* ---------------------------------------------------------------- IA */
.ai-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 26px;
  padding: 28px 30px;
  border-radius: 20px;
  border: 1px solid rgba(122, 31, 43, 0.18);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(122, 31, 43, 0.07), transparent 55%),
    linear-gradient(135deg, #fbf5ef, #f3e7e2);
}
.ai-card h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 2.6vw, 31px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 10px 0 8px;
}
.ai-card h2 em { font-style: italic; color: var(--accent); }
.ai-card p { color: var(--muted); font-size: 14.5px; max-width: 54ch; }
.ai-card-actions { display: flex; flex-direction: column; gap: 10px; }
.ai-card-actions .field { margin-bottom: 0; }
.ai-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-buttons .btn { flex: 1 1 auto; }
.ai-card .field-msg { min-height: 16px; margin-top: 2px; }

/* ---------------------------------------------------------------- estilos */
.style-editor { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.style-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.variant-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.variant {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 6px;
  display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center;
  cursor: pointer; min-height: 74px; text-align: center;
}
.variant strong { font-size: 14px; font-weight: 500; line-height: 1.1; }
.variant em { font-style: normal; font-size: 8.5px; letter-spacing: 0.13em; text-transform: uppercase; }
.variant.is-active { outline: 2px solid var(--ink); outline-offset: 2px; }
.style-more { margin-top: 14px; }
/* Los ✨ por cajón */
.ai-mini {
  margin-left: auto; border: 1px solid var(--line); background: #fffdf9; color: var(--ink);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; letter-spacing: 0; text-transform: none; cursor: pointer;
}
.ai-mini:hover { border-color: var(--ink); }
.ai-mini[disabled] { opacity: 0.6; cursor: progress; }
.field > span .count { margin-left: 8px; }

.style-more summary {
  cursor: pointer; font-size: 13.5px; color: var(--ink); list-style: none;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  border: 1px solid rgba(25, 21, 18, 0.18); border-radius: 12px; padding: 12px 14px; background: rgba(25, 21, 18, 0.05); font-weight: 500;
}
.style-more summary::-webkit-details-marker { display: none; }
.style-more summary:hover { background: rgba(25, 21, 18, 0.09); }
.style-more summary small { color: var(--muted); font-size: 12px; font-weight: 400; }
.more-arrow { display: inline-block; transition: transform 0.2s ease; }
.style-more[open] .more-arrow { transform: rotate(90deg); }
.style-more[open] summary { margin-bottom: 4px; }
.style-control { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.swatch-row, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(25, 21, 18, 0.2); cursor: pointer; }
.swatch.is-active { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.style-chip {
  border: 1px solid var(--line); background: #fffdf9; border-radius: 999px;
  padding: 7px 12px; font-size: 13px; cursor: pointer; color: var(--ink);
}
.style-chip.is-active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }

/* ---------------------------------------------------------------- editor */
.editor-wrap { max-width: 1240px; margin: 0 auto; padding: 24px 24px 80px; }
.editor-head { max-width: 640px; margin: 20px 0 44px; }
.editor-head h1 { font-family: var(--serif); font-size: clamp(38px, 4.6vw, 58px); letter-spacing: -0.035em; }
.editor-head .lede { margin-top: 12px; max-width: 46ch; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; }
.editor-form { display: flex; flex-direction: column; gap: 18px; }
.card {
  background: #fbf8f2; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
}
.card legend {
  padding: 0 10px; margin-left: -10px; font-family: var(--serif); font-size: 21px;
  display: flex; align-items: center; gap: 10px;
}
.card legend .step-n { font-family: var(--sans); font-size: 11px; letter-spacing: 0.12em; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > span { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field .count { font-style: normal; font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); opacity: 0.75; }
.field .count.is-near { color: #a3242f; opacity: 1; font-weight: 600; }
.field.has-custom:not(.is-custom) .count { display: none; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 11px;
  background: #fffdf9; color: var(--ink); padding: 12px 13px; font: inherit; font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: rgba(122, 31, 43, 0.45); box-shadow: 0 0 0 3px rgba(122, 31, 43, 0.08);
}
.field select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6158' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.custom-input { margin-top: 8px; }
.field-hint { font-size: 12px; color: var(--muted); margin: -4px 0 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-msg { font-size: 12.5px; color: var(--muted); min-height: 16px; }
.field-msg.is-error { color: #a3242f; }
.field-msg.is-ok { color: var(--green); }

.tpl-picker { display: flex; flex-wrap: wrap; gap: 9px; }
.tpl-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: #fffdf9; border-radius: 999px;
  padding: 8px 14px; font-size: 13.5px; cursor: pointer; color: var(--ink);
}
.tpl-chip em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.tpl-chip.is-active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.tpl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }

.switch { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-track {
  width: 46px; height: 27px; border-radius: 999px; background: #dcd3c6; position: relative;
  transition: background 0.2s ease; flex: 0 0 auto;
}
.switch-track i {
  position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; transition: transform 0.2s ease;
}
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track i { transform: translateX(19px); }
.switch-label b { display: block; font-weight: 500; font-size: 15px; }
.switch-label small { color: var(--muted); font-size: 12.5px; }
.quiz-editor { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.quiz-item { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fffdf9; }
.quiz-item label { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.quiz-item input, .quiz-item textarea {
  width: 100%; border: 0; background: transparent; font: inherit; color: var(--ink); resize: vertical;
}
.quiz-item input:focus, .quiz-item textarea:focus { outline: none; }
.quiz-opts { margin-top: 8px; font-size: 13px; color: var(--muted); }

.slug-row { display: flex; align-items: stretch; }
.slug-row input { border-radius: 11px 0 0 11px; }
.slug-domain {
  display: inline-flex; align-items: center; padding: 0 13px; font-size: 14px; color: var(--muted);
  border: 1px solid var(--line); border-left: 0; border-radius: 0 11px 11px 0; background: #f4eee4;
  white-space: nowrap;
}
/* Modo ruta: el dominio va antes del campo (teinvitahoy.com/i/ + nombre). */
.slug-row.is-path input { border-radius: 0 11px 11px 0; min-width: 0; flex: 1; }
.slug-row.is-path .slug-domain { border-left: 1px solid var(--line); border-right: 0; border-radius: 11px 0 0 11px; }
.pay-steps { margin: 0; padding: 16px 0 16px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; font-size: 14.5px; display: flex; flex-direction: column; gap: 10px; }
.pay-nequi { font-size: 19px; letter-spacing: 0.02em; white-space: nowrap; }
.plan-pick { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.plan-opt {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px;
  border: 1px solid var(--line); border-radius: 13px; padding: 13px 15px; cursor: pointer;
  background: #fffdf9;
}
.plan-opt input { margin: 0; accent-color: var(--green); }
.plan-opt-name { font-weight: 500; font-size: 15px; }
.plan-opt-price { font-family: var(--serif); font-size: 19px; }
.plan-opt small { grid-column: 2 / -1; color: var(--muted); font-size: 12px; }
.plan-opt.is-active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.fineprint { font-size: 11.5px; color: var(--muted); margin-top: 12px; }

.editor-preview { position: sticky; top: 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.preview-head { display: flex; justify-content: space-between; width: 100%; max-width: 340px; }
.preview-note { font-size: 12px; color: var(--muted); }

.edit-form { max-width: 820px; }
.edit-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* ---------------------------------------------------------------- panel */
.panel { max-width: 1080px; margin: 0 auto; padding: 30px 24px 80px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.panel-head h1 { font-family: var(--serif); font-size: clamp(32px, 4vw, 46px); letter-spacing: -0.03em; }
.panel-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.kpi { background: #fbf8f2; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.kpi b { display: block; font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -0.03em; }
.kpi span { font-size: 12px; color: var(--muted); }
.panel-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 18px; }
.panel .card h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 10px; }
.copybox {
  display: block; background: #f4eee4; border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px 14px; margin: 8px 0 12px; font-size: 13.5px; word-break: break-all;
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 12px; }
.table th { text-align: left; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }

/* ---------------------------------------------------------------- pay / simple */
.pay { min-height: 70vh; display: grid; place-items: center; padding: 40px 24px 80px; }
.pay-card {
  width: 100%; max-width: 460px; background: #fbf8f2; border: 1px solid var(--line);
  border-radius: 22px; padding: 38px; text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px; align-items: stretch;
}
.pay-card h1 { font-family: var(--serif); font-size: 34px; letter-spacing: -0.03em; }
.pay-price { font-family: var(--serif); font-size: 52px; letter-spacing: -0.04em; }
.pay-price span { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; }
.pay-list { list-style: none; margin: 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }

/* activación de una invitación existente */
.pay-card-wide { max-width: 780px; text-align: left; align-items: stretch; }
.pay-card-wide h1 { text-align: left; }
.activate-status {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px;
  padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf9;
}
.activate-status code { display: block; font-size: 12px; word-break: break-all; margin-top: 4px; }
.activate-status b { display: block; font-family: var(--serif); font-size: 18px; margin-top: 4px; }
.activate-note {
  font-size: 13.5px; color: var(--green); background: rgba(47, 81, 54, 0.07);
  border-radius: 10px; padding: 10px 13px; margin: 0;
}
.activate-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.activate-plan {
  border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  background: #fffdf9; display: flex; flex-direction: column; gap: 8px; text-align: left;
}
.activate-plan.is-featured { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.activate-plan h3 { font-family: var(--serif); font-size: 22px; }
.activate-price { font-family: var(--serif); font-size: 34px; letter-spacing: -0.03em; }
.activate-price span { font-family: var(--sans); font-size: 11px; color: var(--muted); }
.activate-plan ul { list-style: none; padding: 0; margin: 0 0 10px; font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.activate-plan ul li::before { content: "—"; color: var(--accent); margin-right: 8px; }
.activate-plan .btn { margin-top: auto; }
.badge-current {
  align-self: flex-start; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green); border: 1px solid rgba(47, 81, 54, 0.3); padding: 6px 11px; border-radius: 999px;
}
@media (max-width: 700px) {
  .activate-plans { grid-template-columns: 1fr; }
  .activate-status { grid-template-columns: 1fr; }
}
.seal {
  width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; margin: 0 auto; color: var(--green); font-size: 20px;
  background: rgba(47, 81, 54, 0.06);
}
.legal { max-width: 720px; margin: 0 auto; padding: 40px 24px 90px; }
.legal h1 { font-family: var(--serif); font-size: 44px; letter-spacing: -0.03em; margin-bottom: 22px; }
.legal h2 { font-family: var(--serif); font-size: 24px; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--muted); font-size: 15.5px; }
.legal ul { padding-left: 20px; }

.page-head { padding-bottom: 40px; }
.page-head + .section { padding-top: 10px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(40px, 5vw, 62px); letter-spacing: -0.035em; margin-bottom: 16px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 12px; }
  .ai-card { grid-template-columns: 1fr; align-items: start; }
  .hero .phone { margin-top: 10px; }
  .features { grid-template-columns: 1fr; }
  .feature-wide { flex-direction: column; align-items: flex-start; gap: 24px; }
  .feature-visual { flex: none; width: 100%; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .tgrid-3 { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-preview { position: static; order: -1; }
  .panel-grid, .kpis { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav { padding: 16px; gap: 12px; }
  .nav-links { display: none; }
  .hero { padding: 8px 18px 48px; }
  .hero-facts { gap: 24px; }
  .section { padding: 64px 18px; }
  .section-dark { padding: 64px 18px; }
  .tgrid-3 { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tcard-title { font-size: 21px; }
  .tcard-inner { padding: 16px 12px; }
  .field-row { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .panel-grid { grid-template-columns: 1fr; }
  .cta-band { margin: 0 18px 64px; padding: 44px 22px; }
  .foot { padding: 40px 18px 24px; }
  .foot-grid { grid-template-columns: 1fr; gap: 24px; }
  .phone { width: 270px; height: 560px; }
  .editor-wrap { padding: 8px 16px 60px; }
  .card { padding: 20px; }
  .pay-card { padding: 28px 22px; }
}
.panel .btn-wa { margin: 12px 0 4px; }
.ai-mini { white-space: nowrap; }
.field-row > .field > span { flex-wrap: wrap; row-gap: 6px; }
