:root {
  /* Dark-first: paleta real de la app (appColorsDark en app_colors.dart) */
  --bg-darker: #130C2E;
  --bg-dark: #1B1140;
  --card: #2A1D63;
  --card-2: #241757;
  --primary: #FF3D81;
  --primary-dim: #B32E60;
  --gold: #FFC93C;
  --mint: #00E0B8;
  --coral: #FF5C72;
  --cream: #FFF8F0;
  --muted: #B8AEDC;
  --muted-2: #7C71A8;

  --bg: var(--bg-dark);
  --surface: var(--card);
  --surface-2: var(--card-2);
  --text: var(--cream);
  --text-muted: var(--muted);
  --text-muted-2: var(--muted-2);
  --border: color-mix(in srgb, var(--muted-2) 35%, transparent);
  --accent: var(--gold);

  color-scheme: dark;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #FFFFFF;
    --surface: #F5F2FF;
    --surface-2: #EAE4FF;
    --text: #1B1140;
    --text-muted: #6B6394;
    --text-muted-2: #9B93C4;
    --border: color-mix(in srgb, #9B93C4 40%, transparent);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F5F2FF;
  --surface-2: #EAE4FF;
  --text: #1B1140;
  --text-muted: #6B6394;
  --text-muted-2: #9B93C4;
  --border: color-mix(in srgb, #9B93C4 40%, transparent);
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; }
h1, h2, h3 { text-wrap: balance; }

a { color: var(--mint); }
a:focus-visible, button:focus-visible, .navlink:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

header.top {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.top-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand .mic {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--gold), var(--coral));
  font-size: 16px;
  flex: none;
}

nav.tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
nav.tabs::-webkit-scrollbar { display: none; }

.navlink {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
}
.navlink:hover { color: var(--text); background: var(--surface); }
.navlink[aria-current="page"] { color: var(--bg-darker); background: var(--gold); }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 20px 80px;
}

.meta {
  margin: 28px 0 8px;
  font-size: 13px;
  color: var(--text-muted-2);
}

section {
  scroll-margin-top: 76px;
  padding: 28px 0 8px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

section h1 {
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 600;
  margin: 0 0 6px;
}

section > .lede {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 28px;
  max-width: 60ch;
}

h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 28px 0 8px;
  color: var(--text);
}

p { margin: 0 0 14px; max-width: 68ch; }
ul { margin: 0 0 14px; padding-left: 1.2em; max-width: 64ch; }
li { margin-bottom: 6px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 18px 0;
}

.card.deletion {
  border-color: color-mix(in srgb, var(--coral) 45%, var(--border));
}

.contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--cream);
  background: linear-gradient(120deg, var(--primary), var(--primary-dim));
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  margin-top: 4px;
}
.contact:hover { filter: brightness(1.08); }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 14px;
}
table caption { text-align: left; caption-side: top; color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th { color: var(--text-muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }

.pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mint) 18%, transparent);
  color: var(--mint);
}

.hub-grid {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.hub-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  text-decoration: none;
  color: var(--text);
}
.hub-card:hover { border-color: var(--mint); }
.hub-card .eyebrow { margin-bottom: 8px; }
.hub-card h2 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.hub-card p { margin: 0; color: var(--text-muted); font-size: 14px; max-width: 56ch; }

footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  color: var(--text-muted-2);
  font-size: 12.5px;
}

@media (max-width: 480px) {
  .top-inner { padding: 14px 16px; }
  main { padding: 4px 16px 64px; }
  .brand span.label { display: none; }
}
