/* "Cuaderno de seguridad": índigo profundo, acento ámbar, monoespaciada para hashes y código. */
:root {
  --bg: #f4f6fb; --surface: #ffffff; --surface-2: #eef1f8;
  --ink: #141c33; --muted: #5a6786; --line: #e0e5f0;
  --accent: #d98a05; --accent-ink: #3a2800; --accent-soft: #fbeccc; --chip-ink: #8a5600;
  --code-bg: #141c33; --code-ink: #e9edf8;
  --ok: #1a7f52; --ok-soft: #d8f0e4;
  --display: "Sora", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0d1222; --surface: #161e33; --surface-2: #1d2740;
  --ink: #e8ecf8; --muted: #94a1c0; --line: #28324e;
  --accent: #f0b23f; --accent-ink: #2a1d00; --accent-soft: #3a2e14; --chip-ink: #f3cf86;
  --code-bg: #0a0f1c; --code-ink: #e4ebfb; --ok: #58c998; --ok-soft: #123524;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0d1222; --surface: #161e33; --surface-2: #1d2740;
  --ink: #e8ecf8; --muted: #94a1c0; --line: #28324e;
  --accent: #f0b23f; --accent-ink: #2a1d00; --accent-soft: #3a2e14; --chip-ink: #f3cf86;
  --code-bg: #0a0f1c; --code-ink: #e4ebfb; --ok: #58c998; --ok-soft: #123524;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); line-height: 1.55; margin: 0; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
code, .mono { font-family: var(--mono); }
button { font: inherit; cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; color: var(--muted); font-weight: 600; }

.appbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px clamp(16px, 4vw, 28px); background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; min-width: 0; }
.brand b { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.brand span { font-size: .76rem; color: var(--muted); }
.appbar .spacer { flex: 1; }
.progress { display: flex; align-items: center; gap: 9px; font-size: .82rem; color: var(--muted); }
.progress .track { width: 76px; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress .track i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.iconbtn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 1.05rem; }
.iconbtn:hover { border-color: var(--muted); }

.layout { display: grid; grid-template-columns: 264px 1fr; max-width: 1180px; margin: 0 auto; }
.sidebar { border-right: 1px solid var(--line); padding: 18px 14px 40px; display: flex; flex-direction: column; gap: 14px; }
.search input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; }
.navlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.navlist .eyebrow { padding: 10px 10px 4px; }
.navbtn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: transparent; color: var(--ink); border-radius: 10px; text-align: left; }
.navbtn:hover { background: var(--surface-2); }
.navbtn[aria-current="true"] { background: var(--accent-soft); color: var(--chip-ink); }
.navbtn .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--m, var(--muted)); }
.navbtn .nm { flex: 1; min-width: 0; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbtn .count { font-family: var(--mono); font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.content { padding: clamp(18px, 3vw, 32px); min-width: 0; }
.modhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.modhead h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.modhead .tag { font-family: var(--mono); font-size: .72rem; color: var(--muted); border: 1px solid var(--line); padding: 2px 7px; border-radius: 99px; }
.modsub { color: var(--muted); margin: 0 0 20px; max-width: 62ch; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 9px; min-width: 0; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .kicker { font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.card h3 { font-size: 1.02rem; line-height: 1.3; }
.card p { margin: 0; font-size: .88rem; color: var(--muted); }
.card .foot { margin-top: auto; }
.pill { font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.pill.done { background: var(--ok-soft); color: var(--ok); }
.empty { border: 1px dashed var(--line); border-radius: 14px; padding: 32px; text-align: center; color: var(--muted); }

.back { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; border-radius: 10px; font-size: .86rem; margin-bottom: 18px; }
.back:hover { border-color: var(--muted); }
.note { max-width: 760px; }
.note > header { margin-bottom: 20px; }
.note .kicker { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.note h1 { font-size: clamp(1.4rem, 3.4vw, 2rem); margin: 6px 0 0; }
.sec { margin-top: 26px; }
.sec > h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .13em; color: var(--chip-ink); background: var(--accent-soft); display: inline-block; padding: 3px 10px; border-radius: 7px; }
.sec > .body { margin-top: 12px; }
.sec p { margin: 0 0 12px; } .sec ul { margin: 0 0 12px; padding-left: 20px; } .sec li { margin-bottom: 7px; }

details.c { border: 1px solid var(--line); border-radius: 11px; background: var(--surface); overflow: hidden; margin-bottom: 8px; }
details.c > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-weight: 600; }
details.c > summary::-webkit-details-marker { display: none; }
details.c > summary::before { content: "+"; font-family: var(--mono); color: var(--accent); font-size: 1.1rem; }
details.c[open] > summary::before { content: "−"; }
details.c > div { padding: 0 14px 14px 30px; }
details.c p { margin: 0 0 8px; } details.c ul { margin: 0; padding-left: 18px; }

pre.code { background: var(--code-bg); color: var(--code-ink); border-radius: 11px; padding: 14px 16px; overflow-x: auto; font-family: var(--mono); font-size: .84rem; line-height: 1.6; }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--chip-ink); padding: 12px 16px; border-radius: 0 10px 10px 0; }
.callout ul { margin: 0; padding-left: 18px; } .callout li { margin-bottom: 6px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .86rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td .mono, td.mono { font-size: .82rem; word-break: break-all; }

.done-row { display: flex; align-items: center; gap: 12px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.btn-done { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 10px 18px; border-radius: 10px; }
.btn-done.on { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.login h1 { font-size: 1.6rem; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; color: var(--muted); }
.field input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.btn-primary { font-weight: 600; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 10px 14px; }
.error { color: #c0392b; margin: 0; font-size: .88rem; }

.menu-toggle { display: none; }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; }
  .sidebar.collapsed .navwrap { display: none; }
  .menu-toggle { display: inline-grid; }
}
