/* ============================================================
   Navaja — shared styles
   Palette: wire blue + copper. Light and dark, token-driven.
   ============================================================ */

:root {
  --ground:      #f4f2ee;
  --surface:     #ffffff;
  --surface-alt: #eceae4;
  --line:        #d8d4ca;
  --ink:         #1c2128;
  --ink-soft:    #5c6470;
  --ink-faint:   #8b929c;
  --copper:      #a8571f;
  --copper-soft: #f3e4d6;
  --wire:        #1f4e79;
  --wire-soft:   #dde7f1;
  --ok:          #2f7d55;
  --ok-soft:     #e2f0e8;
  --warn:        #9a6b1a;
  --warn-soft:   #f7ecd6;
  --bad:         #a33232;
  --bad-soft:    #f7e0e0;
  --shadow:      0 1px 2px rgba(28,33,40,.06), 0 8px 24px -12px rgba(28,33,40,.18);
  --radius:      4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #14181d;
    --surface:     #1b2027;
    --surface-alt: #232a33;
    --line:        #303945;
    --ink:         #e8e6e1;
    --ink-soft:    #a3abb6;
    --ink-faint:   #737d8a;
    --copper:      #d98a4e;
    --copper-soft: #3a2a1d;
    --wire:        #7fb2e0;
    --wire-soft:   #1e2b38;
    --ok:          #6cc08d;
    --ok-soft:     #1d2f26;
    --warn:        #d3a24e;
    --warn-soft:   #32281a;
    --bad:         #e07070;
    --bad-soft:    #331d1d;
    --shadow:      0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] {
  --ground:      #14181d;
  --surface:     #1b2027;
  --surface-alt: #232a33;
  --line:        #303945;
  --ink:         #e8e6e1;
  --ink-soft:    #a3abb6;
  --ink-faint:   #737d8a;
  --copper:      #d98a4e;
  --copper-soft: #3a2a1d;
  --wire:        #7fb2e0;
  --wire-soft:   #1e2b38;
  --ok:          #6cc08d;
  --ok-soft:     #1d2f26;
  --warn:        #d3a24e;
  --warn-soft:   #32281a;
  --bad:         #e07070;
  --bad-soft:    #331d1d;
  --shadow:      0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 900px; margin: 0 auto; padding: 0 22px; }

/* ---------- Site header ---------- */
.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand .mark {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--copper);
  border-radius: 2px;
  transform: rotate(45deg);
}
.site-nav { display: flex; gap: 20px; font-size: 14.5px; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--copper); }

/* ---------- Typography ---------- */
h1 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin: 0 0 14px;
  text-wrap: balance;
}
h2 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -.015em;
  margin: 0 0 14px;
  text-wrap: balance;
}
h3 { font-family: "Archivo", system-ui, sans-serif; font-weight: 600; font-size: 1rem; margin: 0 0 6px; }
p { margin: 0 0 14px; max-width: 68ch; }
.lede { font-size: 1.1rem; color: var(--ink-soft); }

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 10px;
}

main { padding: 44px 0 80px; }
section { margin-bottom: 44px; }

/* ---------- Tool UI ---------- */
/* minmax(0,1fr) es obligatorio: con 1fr a secas, una linea larga sin cortes
   dentro del <pre> obliga a su columna a crecer y aplasta la otra. */
.panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 760px) { .panes { grid-template-columns: minmax(0, 1fr); } }

.pane { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pane-label {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

textarea, pre.out {
  font-family: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;
  font-size: 13.5px;
  line-height: 1.6;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-height: 340px;
  width: 100%;
  min-width: 0;
  resize: vertical;
  tab-size: 2;
}
pre.out { margin: 0; overflow: auto; white-space: pre; min-width: 0; max-width: 100%; }
textarea:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
}

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 22px; align-items: center; }

.btn {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--copper);
  background: var(--copper);
  color: #fff;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn.ghost { background: transparent; color: var(--ink-soft); border-color: var(--line); }
.btn.ghost:hover { color: var(--copper); border-color: var(--copper); opacity: 1; }
/* confirmacion visible al copiar: el texto solo no se ve lo suficiente */
.btn.done, .btn.ghost.done {
  background: var(--ok); border-color: var(--ok); color: #fff; opacity: 1;
}

/* ---------- Findings ---------- */
.findings { display: flex; flex-direction: column; gap: 9px; margin-top: 6px; }
.finding {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--radius);
  font-size: 14.5px;
  line-height: 1.5;
  border: 1px solid var(--line);
  background: var(--surface);
}
.finding .tag {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  white-space: nowrap;
  font-weight: 500;
}
.finding.ok    { background: var(--ok-soft);   border-color: var(--ok); }
.finding.ok    .tag { background: var(--ok);   color: #fff; }
.finding.warn  { background: var(--warn-soft); border-color: var(--warn); }
.finding.warn  .tag { background: var(--warn); color: #fff; }
.finding.bad   { background: var(--bad-soft);  border-color: var(--bad); }
.finding.bad   .tag { background: var(--bad);  color: #fff; }
.finding code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .92em;
  background: rgba(128,128,128,.14);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ---------- Cards / notes ---------- */
.note {
  background: var(--wire-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--wire);
  border-radius: 3px;
  padding: 15px 17px;
  font-size: 15px;
}
.note p:last-child { margin-bottom: 0; }
.note.copper { background: var(--copper-soft); border-left-color: var(--copper); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.tool-grid a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
  height: 100%;
}
.tool-grid a:hover { border-color: var(--copper); transform: translateY(-1px); }
.tool-grid .t { font-family: "Archivo", sans-serif; font-weight: 600; font-size: 1rem; }
.tool-grid .d { font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.tool-grid li.soon a { opacity: .55; pointer-events: none; }
.tool-grid .badge {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.faq { display: flex; flex-direction: column; gap: 18px; }
.faq h3 { margin-bottom: 4px; }
.faq p { color: var(--ink-soft); margin-bottom: 0; }

footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  font-size: 13.5px;
  color: var(--ink-faint);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  line-height: 1.7;
}
footer.site-foot a { color: var(--ink-soft); }

a { color: var(--wire); text-underline-offset: 2px; }
