/* La biblioteca usa CSS propio para que cada página sea ligera y legible
   aunque el motor Flutter todavía no haya cargado. */
:root {
  color-scheme: light;
  --ink: #082a42;
  --muted: #486174;
  --navy: #063a5b;
  --teal: #08a9a3;
  --teal-dark: #087d7a;
  --orange: #ff8a1f;
  /* El naranja oscuro conserva la identidad sobre papel blanco y supera el
     contraste AA; el naranja vivo queda reservado para bordes decorativos. */
  --orange-ink: #a83e00;
  --cream: #fff8e9;
  --paper: #ffffff;
  --line: #d7e3ea;
  --danger: #9d2f20;
  --danger-bg: #fff0ec;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f5f9fb; font-size: 17px; line-height: 1.65; }
a { color: var(--teal-dark); text-underline-offset: .2em; }
a:hover { color: var(--navy); }
img { max-width: 100%; height: auto; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; background: var(--paper); padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; align-items: center; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 4rem); background: var(--navy); color: white; }
.site-header a { color: white; }
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; font-weight: 800; text-decoration: none; }
.brand img { border-radius: 12px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .65rem; font-size: .85rem; }
.site-header nav a[aria-current="page"] { color: #ffd36a; font-weight: 800; }
.app-link { border: 1px solid #8fded9; border-radius: 999px; padding: .45rem .85rem; text-decoration: none; font-weight: 700; }
.page-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.hero { display: grid; grid-template-columns: 1.25fr .75fr; gap: 2rem; align-items: center; padding: clamp(1.5rem, 4vw, 3rem); border-radius: 28px; background: linear-gradient(135deg, #063a5b, #075a70); color: white; box-shadow: 0 22px 60px rgba(6,58,91,.17); }
.hero img { filter: drop-shadow(0 15px 25px rgba(0,0,0,.18)); }
.eyebrow { color: #ffb43b; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.code-label { color: var(--orange-ink); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, h4 { line-height: 1.18; }
h1 { margin: .15rem 0 .8rem; font-size: clamp(2.1rem, 6vw, 4.5rem); }
h2 { margin-top: 2.2rem; font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { margin-bottom: .2rem; }
.lead, .answer-first { font-size: clamp(1.08rem, 2vw, 1.3rem); }
.search-panel, .method-card, .boundary-card, .safety-card { margin: 2rem 0; padding: 1.4rem; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.search-panel label { display: block; font-weight: 800; margin-bottom: .45rem; }
input, button { min-height: 48px; border-radius: 12px; font: inherit; }
input { width: 100%; border: 2px solid #9fb5c2; padding: .75rem 1rem; color: var(--ink); background: white; }
input:focus { outline: 3px solid rgba(8,169,163,.25); border-color: var(--teal-dark); }
button, .button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .7rem 1rem; border: 0; border-radius: 12px; background: var(--teal-dark); color: white; font-weight: 800; text-decoration: none; cursor: pointer; }
.code-grid, .hypothesis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; }
.code-card, .hypothesis-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 10px 28px rgba(6,58,91,.07); }
.code-card h2 { margin: .2rem 0; font-size: 1.15rem; }
.code-card h2 a { color: var(--ink); text-decoration: none; }
.text-link { font-weight: 800; }
.result-count { color: var(--muted); }
.empty-state { color: var(--danger); font-weight: 800; }
[hidden] { display: none !important; }
.article-shell { max-width: 920px; }
.breadcrumbs { display: flex; gap: .55rem; color: var(--muted); margin-bottom: 1.5rem; }
.article-hero { padding: clamp(1.5rem, 4vw, 3rem); border-radius: 26px; background: var(--paper); border-top: 8px solid var(--orange); }
.article-hero h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.updated { color: var(--muted); font-size: .9rem; }
.safety-card { border-color: #ffc4b7; background: var(--danger-bg); }
.safety-card h2, .stop-note { color: var(--danger); }
.boundary-card { border-left: 6px solid var(--orange); background: var(--cream); }
.step-number { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--teal-dark); color: white; font-weight: 900; }
.stop-note { border-top: 1px solid #f0c2ba; padding-top: .75rem; font-weight: 700; }
.check-list li, .related-list li { margin-bottom: .55rem; }
.source-list { padding: 0; list-style: none; }
.source-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.source-list a { font-weight: 800; }
.source-list span { display: block; color: var(--muted); font-size: .9rem; }
.method-card { background: #eaf8f7; }
.disclaimer { font-weight: 800; }
.faq-list details { margin: .75rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.faq-list summary { cursor: pointer; font-weight: 800; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2rem clamp(1rem, 4vw, 4rem); color: white; background: #03273d; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer a { color: white; }
.not-found { min-height: 80vh; display: grid; align-content: center; max-width: 680px; }
.error-number { margin: 0; font-size: clamp(4rem, 15vw, 9rem); color: var(--teal); font-weight: 900; line-height: 1; }
.not-found form { display: grid; gap: .5rem; }
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-header { flex-wrap: wrap; }
  .site-header nav { order: 3; width: 100%; }
  .app-link { font-size: .85rem; }
  .hero { grid-template-columns: 1fr; }
  .hero img { max-height: 240px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
