/* AIFlasher.com V4.5 — hardening layer
   Loaded last on every page. Fixes shipped without touching the 29 existing
   stylesheets, so a later component-CSS consolidation can absorb it cleanly. */

/* ---------------------------------------------------------------- P2-03
   Keyboard focus. V4.4 set outline:none on inputs across several sheets and
   replaced it in only one. A technician tabbing a nine-field bench form had
   no visible caret position. This is a WCAG 2.1 AA (2.4.7) failure.
   :focus-visible so pointer users never see a ring.                        */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--gold, #ffb000);
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link:focus-visible { outline-offset: 0; }

/* ---------------------------------------------------------------- P0-04
   Honeypot. Hidden from sight and from assistive tech, still fillable by
   the naive bots that walk the DOM. Never use display:none — some bots skip
   those; this stays in the layout but off-screen and untabbable.           */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------- P0-03
   Bench search results. V4.4 rendered a single line of placeholder text
   here; this styles the real result list.                                  */
.search-msg { margin: 0; color: var(--muted, #9a9a9f); font-size: .86rem; line-height: 1.6; }
.search-msg b { color: var(--text, #f5f5f5); font-weight: 600; }
.search-msg a { color: var(--gold2, #ffd45a); }

.search-eg {
  background: #141414;
  border: 1px solid var(--line, #2a2a2d);
  color: var(--gold2, #ffd45a);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: .78rem;
  font-family: inherit;
  cursor: pointer;
  min-height: 0;
}
.search-eg:hover { border-color: var(--gold, #ffb000); }

.search-hits { list-style: none; margin: 11px 0 0; padding: 0; display: grid; gap: 6px; }
.search-hits a {
  display: grid; gap: 2px;
  text-decoration: none;
  padding: 10px 12px;
  border: 1px solid var(--line, #2a2a2d);
  border-radius: 9px;
  background: #0c0c0c;
  min-height: 48px;
  align-content: center;
}
.search-hits a:hover { border-color: var(--gold-dim, #7d5600); background: #101010; }
.search-hits b    { color: var(--gold2, #ffd45a); font-size: .88rem; font-weight: 700; }
.search-hits span { color: var(--muted, #9a9a9f); font-size: .78rem; line-height: 1.45; }

/* ---------------------------------------------------------------- P0-02
   The 720x720 logo is gone. The header/footer mark is a 96px asset drawn at
   48px; the hero lockup is a separate 560px asset used only on the homepage.
   Explicit intrinsic sizing here backs up the width/height attributes so
   there is no layout shift even before the image decodes.                   */
.brand img, .footer-brand img { width: 48px; height: 48px; object-fit: contain; }
.hero-logo { max-width: 100%; height: auto; }

/* ---------------------------------------------------------------- P1-03
   Legal pages reuse the About/Contact shell with a readable measure.        */
.legal-body { padding: 40px 0 64px; }
.legal-body .container > * + * { margin-top: 18px; }
.legal-body h2 { font-size: 1.35rem; margin-top: 34px; }
.legal-body h3 { font-size: 1.02rem; margin-top: 22px; color: var(--gold2, #ffd45a); }
.legal-body p, .legal-body li { max-width: 74ch; color: #c9c9cd; line-height: 1.7; font-size: .95rem; }
.legal-body ul { padding-left: 20px; display: grid; gap: 7px; }
.legal-body .updated {
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted, #9a9a9f);
}
.legal-body table { border-collapse: collapse; width: 100%; margin-top: 8px; font-size: .88rem; }
.legal-body th, .legal-body td {
  text-align: left; padding: 9px 11px; border: 1px solid var(--line, #2a2a2d); vertical-align: top;
}
.legal-body th { background: #101010; color: var(--gold2, #ffd45a); font-size: .74rem;
                 letter-spacing: .08em; text-transform: uppercase; }
.legal-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- P2-05
   Inline validation instead of alert(). Announced, not modal.              */
[aria-invalid="true"] { border-color: var(--danger, #ff5b4d) !important; }
.form-error {
  color: var(--danger, #ff5b4d);
  font-size: .8rem;
  margin-top: 8px;
  min-height: 1em;
}

/* footer legal row */
.footer-legal {
  max-width: 1180px; margin: 0 auto; padding: 0 24px 22px;
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: .74rem; color: #777;
}
.footer-legal a { color: #999; text-decoration: none; }
.footer-legal a:hover { color: var(--gold2, #ffd45a); }
@media (max-width: 760px) { .footer-legal { padding: 0 18px 20px; } }

/* -------------------------------------------------- restored RF explorer
   android-network.js shipped an eight-symptom module with no markup on the
   page; the script threw and took the rail database, line evaluator and
   triage router down with it. This styles the restored section — it does not
   reuse .samsung-forensics, which is a four-column grid and left two empty
   columns when given two children. */
.rf-symptom-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 18px 0 16px; }
.rf-symptom-controls label { display: block; }
.rf-symptom-controls select {
  flex: 1 1 320px; min-height: 48px;
  background: #060606; color: #f0f0f0;
  border: 1px solid var(--line, #2a2a2d); border-radius: 10px; padding: 12px 13px;
}
.rf-symptom-controls select:focus-visible { border-color: var(--gold, #ffb000); }

.rf-symptom-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.rf-symptom-chart,
.rf-symptom-out {
  border: 1px solid var(--line, #2a2a2d); border-radius: 16px;
  background: #0a0a0a; padding: 18px 20px;
}
.rf-symptom-chart svg { width: 100%; height: auto; display: block; }
.rf-symptom-chart .chart-note { color: var(--muted, #9a9a9f); font-size: .74rem; margin: 6px 0 0; }
.rf-symptom-out h3 { margin: 10px 0 8px; font-size: 1.15rem; color: var(--gold2, #ffd45a); }
.rf-symptom-out h4 { margin: 16px 0 7px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9a9a9f); }
.rf-symptom-out p  { color: #c4c4c8; font-size: .9rem; line-height: 1.65; margin: 0; }
.rf-symptom-out ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: #c4c4c8; font-size: .88rem; line-height: 1.6; }
.rf-symptom-out .output-label { font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; color: var(--gold, #ffb000); font-weight: 800; }
@media (max-width: 900px) { .rf-symptom-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------- mobile overflow
   Measured at 390 px: contact.html overflowed by 10 px (.info-hero-grid never
   collapses — about-contact.css has no small-screen rule for it) and
   iphone.html by 132 px (classic grid blowout: grid items default to
   min-width:auto, so the wide flow diagram pushed its own column past the
   viewport). Both pre-date V4.5. A technician reading this one-handed at the
   bench should never have to scroll sideways. */
@media (max-width: 900px) {
  .info-hero-grid,
  .about-cta { grid-template-columns: 1fr !important; gap: 28px; }
}

/* Grid and flex children may shrink below their content width. */
.info-hero-grid > *,
.iphone-hero-grid > *,
.hero-grid > *,
.rf-symptom-grid > *,
.master-hero-grid > * { min-width: 0; }

/* Long rail names and part numbers must wrap rather than widen the page. */
h1, h2, h3, .viz-title, .gold-kicker { overflow-wrap: anywhere; }

/* Flow diagrams and wide tables scroll inside their own box, not the page. */
.iphone-hero-map, .np-hero-map, .table-wrap, .rail-table, .legal-wrap,
.iphone-tags, .tags { max-width: 100%; overflow-x: auto; }

html, body { overflow-x: hidden; }
