/* Guia Workshop Quick Suite x Auna :: paleta Tuxpas (azul, celeste, blanco, negro) */
:root {
  --negro: #0b1018;
  --azul-profundo: #072353;
  --azul: #0a3d91;
  --azul-claro: #1b5fc4;
  --celeste: #00a8e8;
  --celeste-claro: #5dd3f3;
  --blanco: #ffffff;

  --paper: #f5f9fd;
  --card: var(--blanco);
  --text: #16202e;
  --muted: #5b6b80;
  --line: #d9e4f0;
  --code-bg: #08111f;
  --code-text: #e8f2fb;
  --sidebar-w: 300px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1018; --card: #141e2c; --text: #e6eef8; --muted: #93a6bd;
    --line: #24344a; --code-bg: #060d18;
  }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif;
  background: var(--paper); color: var(--text);
  font-size: 17px; line-height: 1.65;
}

/* Sidebar */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: linear-gradient(170deg, var(--azul-profundo) 0%, var(--negro) 100%);
  color: #c3d4e8; padding: 2rem 0 1rem; overflow-y: auto;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(0, 168, 232, .18);
}
.sidebar h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: 1.15rem; padding: 0 1.5rem 1.25rem; letter-spacing: .01em; }
.sidebar h2 a { color: var(--blanco); text-decoration: none; }
.brand-q { color: var(--celeste); }
.sidebar ol { list-style: none; counter-reset: mod; flex: 1; }
.sidebar li { counter-increment: mod; }
.sidebar li a {
  display: flex; align-items: baseline; gap: .65rem;
  padding: .5rem 1.5rem; color: #a8bdd6; text-decoration: none;
  font-size: .88rem; line-height: 1.35; border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.sidebar li a::before {
  content: counter(mod, decimal-leading-zero);
  font-family: "JetBrains Mono", monospace; font-size: .7rem;
  color: #5b7a99; min-width: 1.6em;
}
.sidebar li a:hover { background: rgba(0, 168, 232, .1); color: var(--blanco); }
.sidebar li.active a {
  border-left-color: var(--celeste); background: rgba(0, 168, 232, .16); color: var(--blanco);
}
.sidebar li.active a::before { color: var(--celeste-claro); }
.sidebar-foot { padding: 1.25rem 1.5rem 0; font-size: .72rem; color: #55708f;
  font-family: "JetBrains Mono", monospace; }
.burger { display: none; }

/* Contenido */
main { margin-left: var(--sidebar-w); padding: 3.5rem 3rem 4rem; }
article { max-width: 860px; margin: 0 auto; }
article h1 {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.12; letter-spacing: -.015em;
  margin-bottom: 1.5rem; position: relative; padding-bottom: 1rem;
  color: var(--azul);
}
article h1::after { content: ""; position: absolute; left: 0; bottom: 0;
  width: 72px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--azul) 0%, var(--celeste) 100%); }
article h2 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: 1.45rem; margin: 2.5rem 0 .9rem; }
article h3 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700;
  font-size: 1.12rem; margin: 1.8rem 0 .6rem; color: var(--azul-claro); }
article p, article li { margin-bottom: .8rem; }
article ul, article ol { padding-left: 1.4rem; margin-bottom: 1rem; }
article a { color: var(--azul); text-decoration-thickness: 1px; text-underline-offset: 3px; }
article a:hover { color: var(--celeste); }
article img { max-width: 100%; border-radius: 8px; border: 1px solid var(--line); }
article hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }

article blockquote {
  margin: 1.4rem 0; padding: 1rem 1.25rem; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--celeste); font-size: .95rem;
}
article blockquote p:last-child { margin-bottom: 0; }

/* Codigo */
pre, code { font-family: "JetBrains Mono", monospace; }
article code {
  background: color-mix(in srgb, var(--celeste) 10%, var(--card));
  border: 1px solid var(--line);
  padding: .1em .4em; border-radius: 5px; font-size: .82em;
}
article pre {
  position: relative; background: var(--code-bg); color: var(--code-text);
  padding: 1.1rem 1.25rem; border-radius: 12px; overflow-x: auto;
  margin: 1.2rem 0; font-size: .84rem; line-height: 1.55;
  box-shadow: 0 6px 24px rgba(7, 35, 83, .22);
  border: 1px solid rgba(0, 168, 232, .16);
}
article pre code { background: none; border: none; padding: 0; font-size: inherit; color: inherit; }
.codehilite .k, .codehilite .kd { color: var(--celeste-claro); }
.codehilite .s, .codehilite .s1, .codehilite .s2 { color: #9fe8c8; }
.codehilite .c, .codehilite .c1 { color: #6b8199; font-style: italic; }
.codehilite .nf, .codehilite .nb { color: var(--celeste); }
.codehilite .mi, .codehilite .mf { color: #b8d4ff; }
pre .copy {
  position: absolute; top: .6rem; right: .6rem;
  font-family: "Atkinson Hyperlegible", sans-serif; font-size: .72rem;
  background: rgba(255, 255, 255, .08); color: #cfe1f2;
  border: 1px solid rgba(0, 168, 232, .35); border-radius: 6px;
  padding: .25rem .6rem; cursor: pointer; transition: all .15s;
}
pre .copy:hover { background: var(--celeste); border-color: var(--celeste); color: var(--negro); }

/* Tablas */
article table {
  width: 100%; border-collapse: collapse; margin: 1.3rem 0; font-size: .9rem;
  display: block; overflow-x: auto;
}
article th {
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; text-align: left;
  background: var(--azul); color: var(--blanco); padding: .6rem .8rem; white-space: nowrap;
}
article td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
article tr:nth-child(even) td { background: color-mix(in srgb, var(--celeste) 5%, var(--card)); }

/* Pager */
.pager {
  max-width: 860px; margin: 3rem auto 0; display: flex; gap: 1rem;
  justify-content: space-between; border-top: 1px solid var(--line); padding-top: 1.5rem;
}
.pager a {
  display: flex; flex-direction: column; gap: .15rem; max-width: 46%;
  text-decoration: none; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1.1rem;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: .95rem;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.pager a:hover { border-color: var(--celeste); transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 168, 232, .18); }
.pager a small { font-family: "Atkinson Hyperlegible", sans-serif; font-weight: 400;
  color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.pager .next { text-align: right; margin-left: auto; }

/* Responsive */
@media (max-width: 900px) {
  .burger {
    display: block; position: fixed; top: .9rem; left: .9rem; z-index: 30;
    background: var(--azul); color: var(--blanco); border-radius: 8px;
    padding: .35rem .7rem; font-size: 1.1rem; cursor: pointer;
  }
  .sidebar { transform: translateX(-100%); transition: transform .25s; z-index: 20; }
  #menu:checked ~ .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .45); }
  main { margin-left: 0; padding: 4.5rem 1.25rem 3rem; }
}
