@font-face { font-family: "Bitter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/assets/fonts/bitter-var.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/poppins-600.woff2) format("woff2"); }


/* Habily · web pública. Marca: verde bosque, crema, dorado. Titulares Bitter, texto Poppins.
   Concepto: columna a la izquierda, la comparación de ejemplo es lo único llamativo; el resto, sobrio. */
:root {
  --forest: #0A3428;
  --cream: #F5F1EA;
  --gold: #C9A45C;
  --bg: #F5F1EA;
  --surface: #FFFDF9;
  --fg: #1C1A16;
  --muted: #5B574E;
  --line: #DDD5C7;
  --hero-bg: #F5F1EA;
  --hero-fg: #1C1A16;
  --hero-muted: #5B574E;
  --gold-ink: #C9A45C;
  --title: #0A3428;
  --card-bg: #FFFDF9;
  --card-fg: #1C1A16;
  --ok: #1F6B4E;
  --warn: #6B4A10;
  --warn-bg: #FBEFD9;
  --focus: #0A3428;
  --off-bg: #FBEFD9;
  --off-fg: #6B4A10;
  --font-display: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1512;
    --surface: #13211B;
    --fg: #ECE7DB;
    --muted: #A5B2AA;
    --line: #27382F;
    --hero-bg: #12261E;
    --hero-fg: #ECE7DB;
    --hero-muted: #A9BBB1;
    --gold-ink: #C9A45C;
    --title: #ECE7DB;
    --card-bg: #F5F1EA;
    --card-fg: #14211C;
    --ok: #0A3428;
    --warn: #E4C47E;
    --warn-bg: #3A2F14;
    --focus: #E4C47E;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1512;
  --surface: #13211B;
  --fg: #ECE7DB;
  --muted: #A5B2AA;
  --line: #27382F;
  --hero-bg: #12261E;
  --hero-fg: #ECE7DB;
  --hero-muted: #A9BBB1;
  --gold-ink: #C9A45C;
  --title: #ECE7DB;
  --card-bg: #F5F1EA;
  --card-fg: #14211C;
  --ok: #0A3428;
  --warn: #E4C47E;
  --warn-bg: #3A2F14;
  --focus: #E4C47E;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Cabecera y hero */
.hero { background: var(--hero-bg); color: var(--hero-fg); border-bottom: 1px solid var(--line); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { color: var(--title); font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; text-decoration: none; letter-spacing: -0.01em; }
.brand i { font-style: normal; color: var(--gold-ink); }
.top nav { display: flex; gap: 1.25rem; font-size: 0.9rem; }
.top nav a { text-decoration: none; color: var(--hero-muted); }
.top nav a:hover { color: var(--hero-fg); text-decoration: underline; }

.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; padding-block: 2rem 3.5rem; align-items: center; }
.hero h1 { color: var(--title); font-size: clamp(2rem, 5.2vw, 3.1rem); max-width: 18ch; }
.hero .lead { margin-top: 1.25rem; font-size: 1.1rem; color: var(--hero-muted); max-width: 34rem; }
.cta-row { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
.btn {
  display: inline-block; padding: 0.85rem 1.5rem; border-radius: 6px;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; text-decoration: none;
  background: var(--off-bg); color: var(--off-fg);
}
.btn--off { opacity: 0.9; cursor: default; }
.btn--off::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--off-fg); margin-right: 0.6rem; vertical-align: 0.05em; opacity: 0.55; }
.fine { font-size: 0.875rem; color: var(--hero-muted); }

/* Comparación de ejemplo */
.sample { background: var(--card-bg); color: var(--card-fg); border: 1px solid var(--line); border-radius: 8px; padding: 1.25rem 1.25rem 1rem; min-width: 0; }
.sample h2 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; }
.sample .tag { font-size: 0.8125rem; color: #5B574E; margin-top: 0.15rem; }
.scroll-x { overflow-x: auto; margin-top: 0.9rem; }
.sample table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; table-layout: fixed; }
.sample th:first-child, .sample td:first-child { width: 38%; }
.sample th, .sample td { text-align: left; padding: 0.55rem 0.35rem; border-bottom: 1px solid #DDD5C7; vertical-align: top; }
@media (min-width: 52rem) { .sample table { font-size: 0.875rem; } .sample th, .sample td { padding: 0.55rem 0.5rem; } }
.sample thead th { font-weight: 600; font-size: 0.8125rem; color: #5B574E; }
.sample tbody th { font-weight: 400; }
.yes { color: var(--ok); font-weight: 600; }
.no { color: #6B4A10; background: #FBEFD9; padding: 0.1rem 0.4rem; border-radius: 4px; font-weight: 600; white-space: nowrap; display: inline-block; }
.sample tr.both th, .sample tr.both td { border-bottom: 0; padding-top: 0.75rem; }
.sample .both-note { font-size: 0.8125rem; color: #5B574E; margin-top: 0.75rem; border-top: 2px solid var(--gold); padding-top: 0.6rem; }

/* Secciones */
section.block { padding-block: 3.5rem; }
section.block + section.block { border-top: 1px solid var(--line); }
.block h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); max-width: 26ch; }
.block .sub { margin-top: 0.75rem; color: var(--muted); max-width: 40rem; }

.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.5rem; counter-reset: paso; }
.steps li { counter-increment: paso; padding-top: 1rem; border-top: 3px solid var(--forest); min-width: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .steps li { border-top-color: var(--gold); } }
:root[data-theme="dark"] .steps li { border-top-color: var(--gold); }
.steps li::before { content: "Paso " counter(paso); display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.35rem; }
.steps h3 { font-size: 1.2rem; }
.steps p { margin-top: 0.5rem; color: var(--muted); }

.two { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; }
.two > div { min-width: 0; }
.two h3 { font-size: 1.15rem; }
.two ul { margin: 0.9rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.5rem; }
.two li::marker { color: var(--gold); }

.note { margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--surface); border-left: 4px solid var(--gold); border-radius: 0 6px 6px 0; max-width: 44rem; }
.note strong { font-family: var(--font-display); font-size: 1.1rem; display: block; margin-bottom: 0.4rem; }

details { border-bottom: 1px solid var(--line); padding-block: 1rem; max-width: 44rem; }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 1.5rem; }
summary { cursor: pointer; font-weight: 600; list-style-position: outside; }
details p { margin-top: 0.6rem; color: var(--muted); }

/* Portada */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 2.5rem; }
.card { display: block; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-top: 4px solid var(--forest); border-radius: 8px; padding: 1.5rem; text-decoration: none; min-width: 0; }
.card h2 { font-size: 1.35rem; }
.card p { margin-top: 0.6rem; color: var(--muted); }
.card .state { display: inline-block; margin-top: 1rem; font-size: 0.8125rem; font-weight: 600; color: var(--warn); background: var(--warn-bg); padding: 0.15rem 0.55rem; border-radius: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card { border-top-color: var(--gold); } }
:root[data-theme="dark"] .card { border-top-color: var(--gold); }
.card:hover h2 { text-decoration: underline; text-underline-offset: 4px; }

footer { background: var(--bg); color: var(--muted); padding-block: 2rem; font-size: 0.875rem; border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
footer p { max-width: 38rem; }
footer nav { display: flex; gap: 1.25rem; }
footer a { color: var(--fg); }

@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; padding-block: 3rem 4.5rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .two { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cta-row { flex-direction: row; align-items: center; gap: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
