/* ============================================================
   PRADO - style.css
   ============================================================ */

:root {
  --black: #000000;
  --white: #F0F0F0;
  --gray:  #888888;

  --bg: var(--white);
  --fg: var(--black);
  --surface: var(--white);
  --surface-hover: #e6e6e6;
  --divider: #d9d9d9;

  --col: 260px;
  --gap: 48px;

  --pad-x: 24px;
  --pad-y: 32px;

  --font-sans: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
}
:root.dark {
  --bg: var(--black);
  --fg: var(--white);
  --surface: var(--black);
  --surface-hover: #0a0a0a;
  --divider: #333333;
}

@media (min-width: 900px) {
  :root {
    --pad-x: 48px;
    --pad-y: 48px;
  }
}

/* reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 240ms ease, color 240ms ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }

::selection { background: var(--fg); color: var(--bg); }

/* force-dark section - used e.g. for /hugo hero with editorial photo */
.force-dark {
  background: var(--black);
  color: var(--white);
  --bg: var(--black);
  --fg: var(--white);
  --surface: var(--black);
  --surface-hover: #0a0a0a;
  --divider: #333333;
}

/* typography ----------------------------------------------- */
.mono { font-family: var(--font-mono); }
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
}

/* wordmark - brackets + PRADO ------------------------------ */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  position: relative;
}
.wordmark::before,
.wordmark::after {
  content: '';
  display: inline-block;
  width: 0.32em;
  height: 1em;
  border: 0.08em solid currentColor;
}
.wordmark::before { border-right: 0; }
.wordmark::after  { border-left: 0; }

/* nav ------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad-x);
  mix-blend-mode: difference;
  color: #ffffff;
}
.nav-logo {
  display: block;
  width: 96px;
  height: auto;
  color: inherit;
}
.nav-logo svg { width: 100%; height: auto; display: block; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a,
.theme-toggle,
.menu-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.theme-toggle::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
:root.dark .theme-toggle::before { background: transparent; border: 1px solid currentColor; }

/* mobile menu trigger -------------------------------------- */
.menu-toggle {
  display: none;
  cursor: pointer;
  padding: 4px 0;
}
@media (max-width: 720px) {
  .nav-right { display: none; }
  .menu-toggle { display: inline-block; }
}

/* desktop: hide theme-toggle label, keep the dot */
@media (min-width: 721px) {
  .nav-right .theme-toggle [data-theme-label] {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .nav-right .theme-toggle { gap: 0; }
}

/* mobile menu overlay -------------------------------------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  color: var(--fg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px var(--pad-x) var(--pad-y);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms;
}
body.menu-open { overflow: hidden; }
body.menu-open .menu-overlay {
  opacity: 1;
  visibility: visible;
}
.menu-overlay-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 37.56px; /* matches .nav-logo rendered height so [ Close ] lands where [ Menu ] was */
}
.menu-overlay-top .nav-logo { width: 96px; }
.menu-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  margin-top: auto;
  margin-bottom: auto;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(20px, 6vw, 32px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: right;
}
.menu-links a {
  display: inline-block;
  color: var(--fg);
}
.menu-links a::before {
  content: '[ ';
  color: var(--gray);
}
.menu-links a::after {
  content: ' ]';
  color: var(--gray);
}
.menu-overlay-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
}
.menu-overlay-bottom .theme-toggle { color: var(--fg); }

/* hero ----------------------------------------------------- */
.hero {
  position: relative;
  height: 100dvh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
}
.hero-wordmark {
  position: absolute;
  bottom: var(--pad-y);
  left: var(--pad-x);
  right: var(--pad-x);
  margin: 0;
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.88;
}
.hero-wordmark:has(svg) { line-height: 0; }
.hero-wordmark svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero-meta {
  position: absolute;
  top: calc(var(--pad-y) + 40px);
  left: var(--pad-x);
  max-width: 560px;
}

/* ASCII globe (home hero) --------------------------------- */
.hero-globe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(78vw, 52vh);
  height: min(78vw, 52vh);
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(6px, 1.4vmin, 12px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--fg);
  white-space: pre;
  overflow: hidden;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: grab;
  z-index: 1;
  text-align: left;
}
.hero-globe:active { cursor: grabbing; }
@media (min-width: 900px) {
  .hero-globe {
    width: min(62vw, 80vh);
    height: min(62vw, 80vh);
    font-size: clamp(8px, 0.95vw, 14px);
  }
  .hero--with-globe .hero-wordmark {
    left: auto;
    right: var(--pad-x);
    width: 38%;
  }
}

/* ASCII digital rain (macros hero) ------------------------- */
.hero-ascii {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.6vmin, 14px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--fg);
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  opacity: 0.42;
  z-index: 0;
}
.hero--ascii .hero-meta { z-index: 2; }
.hero--ascii .hero-wordmark { z-index: 2; }
.hero--ascii::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 55%, var(--bg) 100%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}
@media (min-width: 900px) {
  .hero-ascii { font-size: clamp(11px, 1.15vw, 16px); }
}

/* hero with photo (parallax) -------------------------------- */
.hero-photo { background: var(--black); }
.hero-photo-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
}
.hero-photo-img img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  filter: brightness(0.85);
}
.hero-photo .hero-meta,
.hero-photo .hero-wordmark { z-index: 2; }
.hero-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
  pointer-events: none;
}

/* sections ------------------------------------------------- */
.section {
  padding: 120px var(--pad-x);
  position: relative;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 64px;
}
.section-title {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  max-width: 18ch;
}

/* manifesto ------------------------------------------------ */
.manifesto {
  font-size: clamp(24px, 3.2vw, 42px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

/* seasonal CTAs carousel (home) ---------------------------- */
.section--tight { padding-top: 80px; padding-bottom: 80px; }
.ctas {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.ctas::-webkit-scrollbar { display: none; }
.cta-card {
  flex: 0 0 auto;
  width: 80%;
  max-width: 380px;
  min-height: 240px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px;
  border: 1px solid var(--divider);
  text-decoration: none;
  color: inherit;
  background: var(--bg);
  transition: background 180ms ease;
}
.cta-card:hover { background: var(--surface-hover); text-decoration: none; }
.cta-card .label { color: var(--gray); }
.cta-card h3 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.cta-card p {
  font-size: 15px;
  line-height: 1.4;
  color: var(--gray);
  margin: 0;
  max-width: 32ch;
}
.cta-card .arrow {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}
@media (min-width: 720px) {
  .cta-card { width: 42%; max-width: 420px; }
}
@media (min-width: 1100px) {
  .cta-card { width: 30%; max-width: 420px; }
}

/* closing CTA (end of hugo / consulting / macros) --------- */
.closing-cta {
  border-top: 1px solid var(--divider);
  padding-top: 80px;
  padding-bottom: 120px;
  display: grid;
  gap: 32px;
}
.closing-cta .label { color: var(--gray); }
.closing-cta h2 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin: 0;
  max-width: 18ch;
}
.closing-cta p {
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.5;
  color: var(--gray);
  max-width: 52ch;
  margin: 0;
}
.closing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.closing-cta-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 20px;
  border: 1px solid var(--fg);
  color: var(--fg);
  text-decoration: none;
  background: var(--bg);
  transition: background 160ms ease, color 160ms ease;
}
.closing-cta-btn:hover {
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
}
.closing-cta-btn--ghost {
  border-color: var(--divider);
  color: var(--gray);
}
.closing-cta-btn--ghost:hover {
  background: var(--surface-hover);
  color: var(--fg);
  border-color: var(--fg);
}

/* lines grid ----------------------------------------------- */
.lines {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--divider);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
@media (min-width: 720px) { .lines { grid-template-columns: 1fr 1fr; } }
/* 3-col re-activar cuando haya >= 5 lineas visibles (ver comentario "HIDDEN UNTIL LAUNCH" en index.html) */
/* @media (min-width: 1100px) { .lines { grid-template-columns: repeat(3, 1fr); } } */

.line-card {
  background: var(--surface);
  padding: 48px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
  position: relative;
  transition: background 160ms ease;
}
.line-card a { display: contents; }
a.line-card { text-decoration: none; color: inherit; }
a.line-card:hover { text-decoration: none; }
.line-card[data-status="active"]:hover { background: var(--surface-hover); }
.line-card[data-status="soon"] { color: var(--gray); }

.line-card .label { margin-bottom: 24px; }
.line-card h3 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.line-card p {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray);
  max-width: 32ch;
}
.line-card .arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 48px;
}

/* brackets hover on active cards (desktop) */
@media (hover: hover) {
  .line-card[data-status="active"]::before,
  .line-card[data-status="active"]::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1px solid var(--fg);
    opacity: 0;
    transition: opacity 200ms ease;
    pointer-events: none;
  }
  .line-card[data-status="active"]::before {
    top: 16px; left: 16px;
    border-right: 0; border-bottom: 0;
  }
  .line-card[data-status="active"]::after {
    bottom: 16px; right: 16px;
    border-left: 0; border-top: 0;
  }
  .line-card[data-status="active"]:hover::before,
  .line-card[data-status="active"]:hover::after { opacity: 1; }
}

/* footer --------------------------------------------------- */
.footer {
  padding: 80px var(--pad-x) 32px;
  border-top: 1px solid var(--divider);
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
@media (min-width: 640px) {
  .footer { grid-template-columns: 1fr 1fr; gap: 48px; }
}
@media (min-width: 900px) {
  .footer { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 400;
  margin-bottom: 16px;
}
.footer a:hover { color: var(--gray); }
.footer-bottom {
  grid-column: 1 / -1;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--gray);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-internal {
  font-family: var(--font-mono);
  color: var(--gray);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 160ms ease, color 160ms ease;
}
.footer-internal:hover { opacity: 1; color: var(--fg); }

/* brands grid ---------------------------------------------- */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  background: transparent;
  border-top: 1px solid var(--divider);
  border-left: 1px solid var(--divider);
}
@media (min-width: 900px) { .brands-grid { grid-template-columns: repeat(5, 1fr); } }
.brands-grid span {
  background: transparent;
  padding: 40px 24px;
  border-right: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-align: center;
  color: var(--fg);
}

/* credentials list ----------------------------------------- */
.credentials {
  border-top: 1px solid var(--divider);
}
.credentials li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--divider);
  align-items: baseline;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* process list (consulting "cómo trabajamos") -------------- */
.process {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--divider);
}
.process li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 32px 0;
  border-bottom: 1px solid var(--divider);
}
.process li .label { color: var(--gray); }
.process li p {
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.01em;
  line-height: 1.4;
  max-width: 52ch;
  margin: 0;
}
@media (min-width: 720px) {
  .process li {
    grid-template-columns: 160px 1fr;
    gap: 32px;
    align-items: baseline;
  }
}

/* who-card (consulting "con quién") ------------------------ */
.who {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--divider);
  border-left: 1px solid var(--divider);
}
@media (min-width: 720px) {
  .who { grid-template-columns: 1fr 1fr; }
}
.who-card {
  padding: 32px 24px;
  border-right: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.who-card .label {
  display: block;
  color: var(--gray);
  margin-bottom: 16px;
}
.who-card p {
  font-size: clamp(18px, 2vw, 22px);
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin: 0;
}

/* macros calculator ---------------------------------------- */
.macros-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  border-top: 1px solid var(--divider);
  padding-top: 32px;
}
@media (min-width: 720px) {
  .macros-form { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.macros-form .field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.macros-form .label { color: var(--gray); }
.macros-form input[type="number"],
.macros-form select {
  font: inherit;
  font-family: var(--font-mono);
  font-size: 18px;
  padding: 14px 16px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--divider);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}
.macros-form input[type="number"]:focus,
.macros-form select:focus {
  outline: none;
  border-color: var(--fg);
}
.macros-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--fg) 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.macros-form .segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--divider);
}
.macros-form .segmented label {
  position: relative;
  cursor: pointer;
}
.macros-form .segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.macros-form .segmented span {
  display: block;
  padding: 14px 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  border-right: 1px solid var(--divider);
  transition: background 120ms ease, color 120ms ease;
}
.macros-form .segmented label:last-child span { border-right: 0; }
.macros-form .segmented input:checked + span {
  background: var(--fg);
  color: var(--bg);
}

.macros-result { margin-top: 40px; }
.macros-card {
  border: 1px solid var(--divider);
  padding: 32px 24px;
}
.macros-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
}
.macros-card-head .label { color: var(--gray); }
.macros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  padding: 28px 0;
  border-bottom: 1px solid var(--divider);
}
.macros-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.macros-grid .label { color: var(--gray); }
.macros-grid strong {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1;
}
.macros-footnote {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  color: var(--gray);
  flex-wrap: wrap;
}

.macros-share {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.macros-share-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 20px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 140ms ease, color 140ms ease;
}
.macros-share-btn:hover {
  background: var(--fg);
  color: var(--bg);
  text-decoration: none;
}
.macros-disclaimer {
  margin-top: 32px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray);
  max-width: 62ch;
}

/* FAQ accordion (macros) ----------------------------------- */
.faq {
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.faq-toggle {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--gray);
  flex-shrink: 0;
  transition: color 160ms ease;
  font-size: 0;
}
.faq-toggle::before {
  content: "[ + ]";
  font-size: 13px;
}
.faq-item[open] .faq-toggle { color: var(--fg); }
.faq-item[open] .faq-toggle::before { content: "[ − ]"; }
.faq-a {
  padding: 0 0 32px 0;
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
}
.faq-item:hover .faq-toggle { color: var(--fg); }

/* legal disclaimer (macros) -------------------------------- */
.legal {
  max-width: 72ch;
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray);
}
.legal p + p { margin-top: 14px; }
.legal strong {
  color: var(--fg);
  font-weight: 400;
}

/* SMAE (Sistema Mexicano de Equivalentes) ----------------- */
.smae-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  border-top: 1px solid var(--divider);
  padding-top: 32px;
}
.smae-form .field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.smae-form .field--wide { grid-column: 1 / -1; }
.smae-form .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .smae-form .field-row { grid-template-columns: repeat(4, 1fr); }
}
.smae-form input[type="number"],
.smae-form input[type="text"] {
  font: inherit;
  font-family: var(--font-mono);
  font-size: 18px;
  padding: 14px 16px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--divider);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}
.smae-form input:focus { outline: none; border-color: var(--fg); }
.smae-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.smae-plan {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 32px;
}
@media (min-width: 960px) {
  .smae-plan { grid-template-columns: 2fr 1fr; align-items: start; }
}

.smae-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
}
@media (min-width: 540px) { .smae-groups { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .smae-groups { grid-template-columns: 1fr 1fr; } }
.smae-group {
  background: var(--bg);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 16px;
  align-items: center;
}
.smae-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.smae-group-abbr {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray);
  text-transform: uppercase;
}
.smae-group-label {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg);
}
.smae-group-stepper {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--divider);
  height: 36px;
  grid-row: 1 / span 2;
  grid-column: 2;
}
.smae-step {
  width: 36px;
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg);
  cursor: pointer;
  padding: 0;
}
.smae-step:hover { background: var(--surface-hover); }
.smae-input {
  width: 56px;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--divider);
  border-right: 1px solid var(--divider);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg);
  -moz-appearance: textfield;
}
.smae-input::-webkit-outer-spin-button,
.smae-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.smae-input:focus { outline: none; background: var(--surface-hover); }
.smae-group-meta {
  font-size: 11px;
  color: var(--gray);
  grid-column: 1;
  grid-row: 2;
}

.smae-totals {
  position: sticky;
  top: 88px;
  border: 1px solid var(--divider);
  padding: 24px;
  background: var(--bg);
  transition: border-color 200ms ease;
}
.smae-totals.is-on-target { border-color: var(--fg); }
.smae-totals.is-off-target { border-color: var(--gray); }
.smae-totals-head { margin-bottom: 16px; color: var(--gray); }
.smae-totals-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.smae-totals-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: baseline;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}
.smae-totals-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.smae-totals-list strong {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.smae-target {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
}
.smae-totals-hint {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  color: var(--gray);
}

.smae-meals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  margin-top: 24px;
}
@media (min-width: 720px) { .smae-meals { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .smae-meals { grid-template-columns: repeat(5, 1fr); } }
.smae-meal {
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 160px;
}
.smae-meal-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.smae-meal-pct { color: var(--gray); }
.smae-meal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.smae-meal-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: baseline;
  font-size: 13px;
}
.smae-meal-list .label { color: var(--gray); }
.smae-meal-name {
  font-family: var(--font-sans);
  color: var(--fg);
}
.smae-meal-list strong {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  color: var(--fg);
}
.smae-empty {
  color: var(--gray);
  font-style: normal;
}

.smae-patients {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) { .smae-patients { grid-template-columns: 1fr 1fr; } }
.smae-patient {
  border: 1px solid var(--divider);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.smae-patient-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.smae-patient-head h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0;
}
.smae-patient-head .label { color: var(--gray); }
.smae-patient-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.smae-patient-actions .closing-cta-btn {
  padding: 10px 14px;
  font-size: 11px;
}
.smae-danger { border-color: var(--divider); }
.smae-danger:hover { background: var(--gray); color: var(--bg); border-color: var(--gray); }

.smae-form textarea {
  font: inherit;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px 16px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--divider);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  resize: vertical;
  min-height: 80px;
}
.smae-form textarea:focus { outline: none; border-color: var(--fg); }
.smae-form select {
  font: inherit;
  font-family: var(--font-mono);
  font-size: 18px;
  padding: 14px 16px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--divider);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--fg) 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.smae-form .segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--divider);
  height: 50px;
}
.smae-form .segmented label {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.smae-form .segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.smae-form .segmented span {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  border-right: 1px solid var(--divider);
  padding: 14px 8px;
  transition: background 120ms ease, color 120ms ease;
}
.smae-form .segmented label:last-child span { border-right: 0; }
.smae-form .segmented input:checked + span {
  background: var(--fg);
  color: var(--bg);
}

/* Examples picker */
.smae-group-examples { grid-column: 1 / -1; margin-top: 8px; }
.smae-examples-toggle { font-size: 12px; }
.smae-examples-toggle summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 0;
  color: var(--gray);
  font-family: var(--font-mono);
}
.smae-examples-toggle summary::-webkit-details-marker { display: none; }
.smae-examples-toggle summary:hover { color: var(--fg); }
.smae-examples-toggle[open] summary { color: var(--fg); }
.smae-examples-list {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
@media (min-width: 720px) { .smae-examples-list { grid-template-columns: 1fr 1fr; } }
.smae-examples-list label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: baseline;
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  border: 1px solid transparent;
  transition: border-color 120ms ease, background 120ms ease;
}
.smae-examples-list label:hover { border-color: var(--divider); }
.smae-examples-list input[type="checkbox"] {
  margin: 0;
  accent-color: var(--fg);
}
.smae-examples-list input[type="checkbox"]:checked + span { color: var(--fg); }
.smae-examples-list .label { color: var(--gray); font-size: 11px; }

/* Kcal delta buttons */
.smae-kcal-deltas {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.smae-kcal-deltas .label { color: var(--gray); }
.smae-kcal-deltas-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.smae-kcal-deltas-row button {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 10px 6px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.smae-kcal-deltas-row button:hover { background: var(--fg); color: var(--bg); }

/* Sparkline */
.smae-sparkline {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
  border: 1px solid var(--divider);
  padding: 16px;
  color: var(--fg);
  background: var(--surface);
}

/* Gate (password) */
.smae-gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.smae-gate-card {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--divider);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.smae-gate-brand .label { color: var(--gray); }
.smae-gate-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 56px;
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin: 0;
}
.smae-gate-sub {
  color: var(--gray);
  font-size: 14px;
  margin: 0 0 16px;
}
.smae-gate-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.smae-gate-form input[type="password"] {
  font-family: var(--font-mono);
  font-size: 24px;
  letter-spacing: 0.4em;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--fg);
  appearance: none;
  -webkit-appearance: none;
}
.smae-gate-form input[type="password"]:focus {
  outline: none;
  border-color: var(--fg);
}
.smae-gate-error { color: var(--gray); }

/* Antropométricos collapsible inside form */
.smae-extra-section {
  grid-column: 1 / -1;
  margin-top: 8px;
  border-top: 1px solid var(--divider);
  padding-top: 16px;
}
.smae-extra-section summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 0;
  color: var(--gray);
}
.smae-extra-section summary::-webkit-details-marker { display: none; }
.smae-extra-section[open] summary { color: var(--fg); }
.smae-extra-section .field-row { margin-top: 16px; }

/* Meal options textarea (3 platillos por tiempo) */
.smae-meal-options { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--divider); }
.smae-meal-options-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.smae-meal-options-head .label { color: var(--gray); }
.smae-meal-autofill {
  background: transparent;
  border: 0;
  color: var(--gray);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0;
  text-transform: none;
}
.smae-meal-autofill:hover { color: var(--fg); }
.smae-meal-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.smae-meal-options-grid textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 10px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--fg);
  resize: vertical;
  min-height: 60px;
}
.smae-meal-options-grid textarea:focus { outline: none; border-color: var(--fg); }

/* PRADO Admin / app layout ---------------------------------- */
.admin-body { background: var(--bg); }
.admin-body.admin-panel-active { overflow: hidden; }

/* Home view (hero + KPIs + CTA) */
.admin-home { min-height: 100vh; }
.admin-nav { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.admin-hero { min-height: 70vh; }
.admin-home-quick {
  padding-top: 24px;
  padding-bottom: 80px;
}
.admin-home-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  margin-bottom: 48px;
}
@media (min-width: 720px) { .admin-home-kpis { grid-template-columns: repeat(4, 1fr); } }
.admin-home-cta { text-align: center; }
.admin-enter-btn {
  font-size: 18px;
  padding: 24px 48px;
  letter-spacing: 0.04em;
}

/* Shortcuts grid en landing */
.admin-shortcuts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
}
@media (min-width: 720px) { .admin-shortcuts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .admin-shortcuts { grid-template-columns: 1fr 1fr 1fr; } }
.admin-shortcut {
  background: var(--bg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-height: 200px;
  transition: background 160ms ease;
}
.admin-shortcut:hover {
  background: var(--surface-hover);
  text-decoration: none;
}
.admin-shortcut .label { color: var(--gray); }
.admin-shortcut h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 4px 0 0;
}
.admin-shortcut p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray);
  margin: 0;
  max-width: 32ch;
}
.admin-shortcut .arrow {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}
.admin-shortcut--warn { border-left: 3px solid var(--fg); }
.admin-shortcut--warn h2 strong { font-weight: 700; }

/* Panel app layout (sidebar + main) */
.admin-panel {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--bg);
  z-index: 40;
}
@media (max-width: 720px) {
  .admin-panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
}

.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--divider);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}
@media (max-width: 720px) {
  .admin-sidebar {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px;
    gap: 8px;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }
}

.admin-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}
@media (max-width: 720px) {
  .admin-sidebar-brand { padding: 0; flex-shrink: 0; }
}
.admin-sidebar-logo {
  display: block;
  width: 80px;
  color: var(--fg);
}
.admin-sidebar-logo svg { width: 100%; height: auto; }
.admin-sidebar-brand .label { color: var(--gray); }
@media (max-width: 720px) { .admin-sidebar-brand .label { display: none; } }

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}
@media (max-width: 720px) {
  .admin-sidebar-nav { flex-direction: row; gap: 4px; }
}
.admin-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--fg);
  cursor: pointer;
  transition: background 120ms ease;
  border-left: 3px solid transparent;
}
@media (max-width: 720px) {
  .admin-tab {
    padding: 10px 14px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    flex-shrink: 0;
    font-size: 13px;
  }
  .admin-tab .label { display: none; }
}
.admin-tab .label { color: var(--gray); font-size: 11px; }
.admin-tab:hover { background: var(--surface-hover); }
.admin-tab.is-active {
  background: var(--bg);
  border-left-color: var(--fg);
  font-weight: 700;
}
@media (max-width: 720px) {
  .admin-tab.is-active { border-bottom-color: var(--fg); }
}
.admin-tab-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  background: var(--bg);
  border: 1px solid var(--divider);
  padding: 2px 8px;
  min-width: 24px;
  text-align: center;
}
.admin-tab-count--warn { color: var(--fg); border-color: var(--fg); }
.admin-tab.is-active .admin-tab-count { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.admin-sidebar-footer {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
@media (max-width: 720px) { .admin-sidebar-footer { display: none; } }
.admin-sidebar-back {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 10px 14px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  text-align: left;
}
.admin-sidebar-back:hover { color: var(--fg); border-color: var(--fg); }

/* Main content */
.admin-main {
  overflow-y: auto;
  padding: 32px 40px 80px;
}
@media (max-width: 720px) { .admin-main { padding: 24px 20px 80px; } }
.admin-content-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--divider);
  flex-wrap: wrap;
}
.admin-content-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0 0 8px;
}
.admin-content-sub { color: var(--gray); margin: 0; max-width: 60ch; }

.admin-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
@media (min-width: 720px) {
  .admin-toolbar { flex-direction: row; align-items: center; }
}

/* Cards grid de pacientes */
.admin-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) { .admin-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .admin-cards { grid-template-columns: 1fr 1fr 1fr; } }

.patient-card {
  border: 1px solid var(--divider);
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.patient-card:hover { background: var(--surface-hover); border-color: var(--fg); }
.patient-card:focus { outline: 2px solid var(--fg); outline-offset: 2px; }
.patient-card.is-warn { border-left: 3px solid var(--fg); }

.patient-card-head { display: flex; gap: 14px; align-items: flex-start; }
.patient-avatar {
  width: 48px;
  height: 48px;
  border: 1px solid var(--divider);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.patient-card-id h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  line-height: 1.2;
}
.patient-card-id .label { margin: 0; line-height: 1.4; }
.patient-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
}
.patient-card-meta > div { display: flex; flex-direction: column; gap: 2px; }
.patient-card-meta .label { color: var(--gray); }
.patient-card-meta strong {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.patient-card-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.patient-card-contact .label { color: var(--gray); }
.patient-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.patient-card-actions .closing-cta-btn { padding: 8px 12px; font-size: 11px; }
.patient-card-actions a { text-decoration: none; }

/* Card variant para agenda (con fecha grande arriba) */
.patient-card--agenda { border-top: 3px solid var(--fg); }
.patient-card-when {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider);
}
.patient-card-when .label { color: var(--fg); }
.patient-card-when strong {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

/* Drawer (paciente detalle) */
.patient-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.patient-drawer:not([hidden]) { pointer-events: auto; }
.patient-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 240ms ease;
}
.dark .patient-drawer-backdrop { background: rgba(0, 0, 0, 0.7); }
.patient-drawer.is-open .patient-drawer-backdrop { opacity: 1; }
.patient-drawer-panel {
  position: relative;
  background: var(--bg);
  width: 100%;
  max-width: 880px;
  height: 100%;
  overflow-y: auto;
  border-left: 1px solid var(--divider);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}
.patient-drawer.is-open .patient-drawer-panel { transform: translateX(0); }

.patient-drawer-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 24px 32px;
  border-bottom: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.patient-drawer-head .label { color: var(--gray); }
.patient-drawer-head h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 6px 0 0;
}
.patient-drawer-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--divider);
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: var(--fg);
  flex-shrink: 0;
}
.patient-drawer-close:hover { background: var(--fg); color: var(--bg); }

.patient-drawer-body { padding: 24px 32px 80px; flex: 1; }
@media (max-width: 720px) { .patient-drawer-body { padding: 20px; } }

.drawer-section {
  border: 1px solid var(--divider);
  margin-bottom: 16px;
}
.drawer-section summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-section summary::-webkit-details-marker { display: none; }
.drawer-section summary .label { color: var(--gray); }
.drawer-section[open] summary .label { color: var(--fg); }
.drawer-toggle { font-family: var(--font-mono); color: var(--gray); }
.drawer-section[open] .drawer-toggle::before { content: '−'; }
.drawer-section:not([open]) .drawer-toggle::before { content: '+'; }
.drawer-toggle { font-size: 0; }
.drawer-toggle::before { font-size: 16px; }
.drawer-section > .smae-form,
.drawer-section > .field-row,
.drawer-section > div:not(summary) {
  padding: 0 20px 20px;
}

.patient-drawer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  margin-top: 24px;
}

.drawer-historial-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-historial-list li {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  font-size: 13px;
  align-items: baseline;
}
.drawer-historial-list .label { color: var(--gray); }

/* PRADO Admin / CRM ---------------------------------------- */
.admin-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
}
@media (min-width: 720px) { .admin-kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi {
  background: var(--bg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kpi .label { color: var(--gray); }
.kpi strong {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.kpi-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Atención cards */
.admin-atencion {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) { .admin-atencion { grid-template-columns: 1fr 1fr; } }
.admin-atencion-card {
  border: 1px solid var(--divider);
  border-left: 3px solid var(--fg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-atencion-info h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.admin-atencion-info .label { color: var(--gray); margin: 0; line-height: 1.5; }
.admin-atencion-info strong { color: var(--fg); font-weight: 400; }
.admin-atencion-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-atencion-actions .closing-cta-btn { padding: 10px 14px; font-size: 11px; }

/* Agenda cards */
.admin-agenda {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.admin-agenda-card {
  border: 1px solid var(--divider);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
@media (max-width: 720px) {
  .admin-agenda-card { grid-template-columns: 1fr; gap: 12px; }
}
.admin-agenda-when {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.admin-agenda-when .label { color: var(--gray); }
.admin-agenda-days {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.admin-agenda-info h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.admin-agenda-info .label { color: var(--gray); margin: 0; line-height: 1.5; }
.admin-agenda-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-agenda-actions .closing-cta-btn { padding: 10px 14px; font-size: 11px; }

/* Filters & search */
.admin-filters {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 720px) {
  .admin-filters { flex-direction: row; align-items: center; }
}
.admin-search {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 16px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--divider);
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  flex: 1;
  min-width: 200px;
}
.admin-search:focus { outline: none; border-color: var(--fg); }
.admin-filter-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.admin-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid var(--divider);
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.admin-pill:hover { color: var(--fg); }
.admin-pill.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Patients table */
.admin-patients-table-wrap {
  border: 1px solid var(--divider);
  overflow-x: auto;
}
.admin-patients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-patients-table thead th {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  font-weight: 400;
  white-space: nowrap;
}
.admin-patients-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
.admin-patients-table tbody tr:hover { background: var(--surface-hover); }
.admin-patients-table tbody tr:last-child td { border-bottom: 0; }
.admin-cell-sub {
  font-size: 11px;
  color: var(--gray);
  margin-top: 2px;
}
.admin-cell-warn { color: var(--fg); }
.admin-cell-warn .admin-cell-sub { color: var(--fg); font-weight: 700; }
.admin-cell-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-cell-actions a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border: 1px solid var(--divider);
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease;
}
.admin-cell-actions a:hover { background: var(--fg); color: var(--bg); }

/* Tier badges */
.admin-tier-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--divider);
  white-space: nowrap;
}
.tier-bronce { color: var(--gray); }
.tier-plata { color: var(--gray); border-color: var(--gray); }
.tier-oro { color: var(--fg); border-color: var(--fg); }
.tier-platino { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Templates */
.admin-templates {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) { .admin-templates { grid-template-columns: 1fr 1fr; } }
.admin-template {
  border: 1px solid var(--divider);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-template-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.admin-template textarea {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 12px 14px;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--divider);
  resize: vertical;
  min-height: 80px;
}
.admin-template textarea:focus { outline: none; border-color: var(--fg); }
.admin-template-head .closing-cta-btn { padding: 8px 12px; font-size: 10px; }

/* Tier system display */
.admin-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
}
@media (min-width: 720px) { .admin-tiers { grid-template-columns: repeat(4, 1fr); } }
.admin-tier {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-tier .label { color: var(--gray); }
.admin-tier strong {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.admin-tier--top {
  background: var(--fg);
  color: var(--bg);
}
.admin-tier--top .label,
.admin-tier--top .kpi-meta {
  color: var(--bg);
  opacity: 0.7;
}

/* Print only */
.print-only { display: none; }

/* Print stylesheet (PDF entregable al paciente, estilo template Hugo) */
@media print {
  @page {
    size: letter landscape;
    margin: 14mm;
  }
  html, body {
    background: #fff !important;
    color: #000 !important;
  }
  body { font-family: 'Geist', system-ui, sans-serif; font-size: 10pt; line-height: 1.4; }
  .nav, .hero, .section, .footer, .smae-gate, [data-smae-main] > section, .menu-overlay { display: none !important; }
  .print-only { display: block !important; }
  [data-smae-print-area] { color: #000; }

  .print-page {
    page-break-after: always;
    page-break-inside: avoid;
    min-height: 100vh;
    padding-top: 8mm;
  }
  .print-page:last-child { page-break-after: auto; }

  /* Portada */
  .print-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80vh;
    gap: 18pt;
  }
  .print-cover-mark {
    display: inline-flex;
    align-items: center;
    gap: 6pt;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
  }
  .print-bracket {
    font-family: 'Geist Mono', monospace;
    font-weight: 700;
    font-size: 36pt;
  }
  .print-prado {
    font-size: 36pt;
    letter-spacing: -0.04em;
  }
  .print-cover-x {
    font-size: 16pt;
    color: #333;
  }
  .print-cover-name {
    font-size: 28pt;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    max-width: 24ch;
  }
  .print-cover-cita {
    font-family: 'Geist Mono', monospace;
    font-size: 12pt;
    color: #555;
    letter-spacing: 0.04em;
  }

  /* H2 con corchetes */
  .print-h2 {
    font-family: 'Geist Mono', monospace;
    font-weight: 700;
    font-size: 14pt;
    letter-spacing: 0.02em;
    margin: 0 0 14pt;
    padding-bottom: 6pt;
    border-bottom: 2px solid #000;
    text-transform: none;
  }

  /* Tabla macros */
  .print-macros-tbl {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24pt;
    font-size: 11pt;
  }
  .print-macros-tbl thead th {
    background: #f0f0f0;
    border: 1px solid #000;
    padding: 8pt;
    font-family: 'Geist Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 9pt;
  }
  .print-macros-tbl tbody th {
    background: #f0f0f0;
    border: 1px solid #000;
    padding: 8pt;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    text-align: center;
    width: 12%;
  }
  .print-macros-tbl tbody td {
    border: 1px solid #000;
    padding: 8pt;
    text-align: center;
  }
  .print-macros-tbl tr.print-total th,
  .print-macros-tbl tr.print-total td {
    background: #e8e8e8;
    font-weight: 700;
  }

  /* Tabla antropométricos */
  .print-antro {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    margin-bottom: 16pt;
  }
  .print-antro thead th {
    background: #f0f0f0;
    border: 1px solid #000;
    padding: 8pt;
    font-family: 'Geist Mono', monospace;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    font-size: 9pt;
  }
  .print-antro thead th:first-child { text-align: left; }
  .print-antro .print-fecha {
    display: block;
    font-size: 8pt;
    font-weight: 400;
    color: #555;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2pt;
  }
  .print-antro tbody th {
    border: 1px solid #000;
    padding: 6pt 10pt;
    text-align: left;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    background: #fafafa;
    width: 22%;
    text-transform: uppercase;
    font-size: 9pt;
  }
  .print-antro tbody td {
    border: 1px solid #000;
    padding: 6pt 10pt;
    text-align: center;
  }

  /* Listas (recomendaciones, libres, evitar, errores) */
  .print-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .print-list li {
    padding: 6pt 0 6pt 16pt;
    border-bottom: 1px solid #eee;
    font-size: 10pt;
    line-height: 1.45;
    position: relative;
  }
  .print-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #555;
  }
  .print-list strong { font-weight: 700; }

  /* Menú semanal: 4 columnas (tiempo + 3 opciones) */
  .print-menu-page { padding-top: 4mm; }
  .print-menu {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
    margin-bottom: 12pt;
  }
  .print-menu thead th {
    background: #f0f0f0;
    border: 1px solid #000;
    padding: 8pt;
    font-family: 'Geist Mono', monospace;
    font-weight: 700;
    text-align: left;
    font-size: 9pt;
    text-transform: uppercase;
  }
  .print-menu thead th:first-child { width: 16%; }
  .print-menu thead th:not(:first-child) { width: 28%; }
  .print-menu tbody td {
    border: 1px solid #000;
    padding: 8pt;
    vertical-align: top;
    line-height: 1.45;
    white-space: pre-wrap;
  }
  .print-meal-name strong {
    display: block;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    font-size: 10pt;
    margin-bottom: 4pt;
    letter-spacing: -0.01em;
  }
  .print-meal-eqs {
    font-family: 'Geist Mono', monospace;
    font-size: 8pt;
    color: #555;
    line-height: 1.3;
  }
  .print-empty { color: #ccc; }
  .print-leyenda {
    font-family: 'Geist Mono', monospace;
    font-size: 8pt;
    color: #555;
    margin: 0 0 8pt;
  }
  .print-leyenda-foot { margin-top: 8pt; }

  /* Cierre */
  .print-close {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80vh;
    gap: 24pt;
  }
  .print-close-msg {
    font-size: 13pt;
    line-height: 1.5;
    max-width: 56ch;
    margin: 0;
  }
  .print-close-pillars {
    display: flex;
    flex-direction: column;
    gap: 4pt;
    font-family: 'Geist', sans-serif;
    font-weight: 700;
    font-size: 18pt;
    letter-spacing: 0.05em;
  }
  .print-close-wish {
    font-size: 12pt;
    margin: 0;
  }
  .print-close-mark { margin-top: 12pt; }

  .label {
    font-family: 'Geist Mono', monospace;
    color: #555 !important;
    font-size: 8pt;
  }
}

/* scroll-reveal -------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 720ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
/* stagger for carousel + grid children */
.ctas [data-reveal]:nth-child(2) { --reveal-delay: 80ms; }
.ctas [data-reveal]:nth-child(3) { --reveal-delay: 160ms; }
.ctas [data-reveal]:nth-child(4) { --reveal-delay: 240ms; }
.ctas [data-reveal]:nth-child(5) { --reveal-delay: 320ms; }
.ctas [data-reveal]:nth-child(6) { --reveal-delay: 400ms; }
.lines [data-reveal]:nth-child(2) { --reveal-delay: 120ms; }
.lines [data-reveal]:nth-child(3) { --reveal-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* cursor preview (desktop only) ---------------------------- */
.cursor-preview {
  position: fixed;
  top: 0; left: 0;
  width: 48px; height: 48px;
  pointer-events: none;
  opacity: 0;
  z-index: 1000;
  transform: translate(-50%, -50%);
  transition: opacity 200ms ease;
  mix-blend-mode: difference;
}
.cursor-preview::before,
.cursor-preview::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid #ffffff;
}
.cursor-preview::before {
  top: 0; left: 0;
  border-right: 0; border-bottom: 0;
}
.cursor-preview::after {
  bottom: 0; right: 0;
  border-left: 0; border-top: 0;
}
@media (hover: hover) {
  body.cursor-active .cursor-preview { opacity: 1; }
}
@media (hover: none) {
  .cursor-preview { display: none; }
}
