/* ---------------------------------------------------------------------------
   Additions layered on top of the compiled app stylesheet.
   Kept in a separate file so a future rebuild of the SPA cannot overwrite them.

   Contents
     1. accessibility — focus visibility, reduced motion, tap targets
     2. prerender bridge — keeps the first paint visible until React mounts
     3. contact-form honeypot
     4. cookie consent UI
     5. standalone pages (legal + 404) that reuse the site's visual language
   ------------------------------------------------------------------------- */

/* 1. ACCESSIBILITY -------------------------------------------------------- */

/* The compiled stylesheet ships almost no focus styling, so keyboard users had
   no visible focus indicator (WCAG 2.4.7 / 2.4.11). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--blue-light, #1a7fd4);
  outline-offset: 2px;
  border-radius: 3px;
}
.lk-nav :where(a, button):focus-visible,
.lkfoot :where(a, button):focus-visible,
.hp-hero :where(a, button):focus-visible {
  outline-color: var(--gold, #c9a96e);
}

/* Respect the OS "reduce motion" setting. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .lk-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .hp-marquee {
    animation: none !important;
  }
}

/* Controls that were below the 24x24 CSS-pixel minimum (WCAG 2.5.8). Measured
   with tools/probe-mobile.mjs at 320px and 390px. */
.lk-nav-icon,
.hp-dot,
.lk-hamburger,
.lk-modal-close,
.lk-mobile-nav-close {
  min-width: 24px;
  min-height: 24px;
}
.lk-hamburger {
  justify-content: center;
}

/* Stacked footer links were 17px tall; padding lifts them over the minimum
   without changing the visual rhythm noticeably. */
.lkfoot-col ul li a,
.lkfoot-contact a,
.lk-mobile-nav-contact a {
  display: inline-block;
  padding-block: 4px;
}
.lkfoot-col ul li,
.lkfoot-contact {
  line-height: 1.5;
}
.hp-dot {
  position: relative;
}
.hp-dot::after {
  content: '';
  position: absolute;
  inset: -10px;
}

/* 2. PRERENDER BRIDGE ----------------------------------------------------- */

/* Pages are prerendered to static HTML, but `.lk-reveal` starts at opacity 0
   and only becomes visible once the IntersectionObserver runs. Until the app
   has mounted, show that content — otherwise the first paint is blank and the
   page is unreadable without JavaScript. static/boot.js drops `lk-pre`. */
html.lk-pre .lk-reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* 3. CONTACT FORM --------------------------------------------------------- */

.lk-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* 4. COOKIE CONSENT ------------------------------------------------------- */

.lk-consent-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lk-cc {
  position: fixed;
  z-index: 12000;
  inset: auto 16px 16px 16px;
  max-width: 560px;
  margin-inline: auto;
  background: var(--white, #fafaf8);
  color: var(--text, #2a2a2a);
  border: 1px solid var(--sand-dark, #e5dfd4);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(8, 13, 20, 0.22);
  padding: 22px;
  font-size: 14px;
  line-height: 1.55;
}
.lk-cc[hidden] {
  display: none !important;
}
.lk-cc h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--blue, #0e2a47);
}
.lk-cc p {
  margin: 0 0 14px;
}
.lk-cc a {
  color: var(--blue-light, #1a7fd4);
}
.lk-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lk-cc-btn {
  flex: 1 1 150px;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  border: 1px solid var(--blue, #0e2a47);
  background: transparent;
  color: var(--blue, #0e2a47);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.lk-cc-btn:hover {
  background: var(--off, #f0ede6);
}
.lk-cc-btn-primary {
  background: var(--blue, #0e2a47);
  color: var(--white, #fafaf8);
}
.lk-cc-btn-primary:hover {
  background: var(--blue-mid, #1570bb);
}
.lk-cc-btn-ghost {
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex-basis: auto;
}
.lk-cc-cats {
  margin: 4px 0 16px;
  display: grid;
  gap: 12px;
}
.lk-cc-cat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
}
.lk-cc-cat input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--blue, #0e2a47);
}
.lk-cc-cat strong {
  display: block;
  font-size: 14px;
}
.lk-cc-cat span {
  color: var(--text-mid, #5a5a5a);
  font-size: 13px;
}
@media (max-width: 480px) {
  .lk-cc {
    inset: auto 8px 8px 8px;
    padding: 18px;
  }
}

/* 5. STANDALONE PAGES ----------------------------------------------------- */

.lkp {
  background: var(--sand, #f4f1ec);
  color: var(--text, #2a2a2a);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.lkp-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
/* The wordmark in logotil.png is white, so this bar carries the brand navy the
   app's own nav uses once scrolled — anything lighter makes the logo vanish. */
.lkp-bar {
  background: var(--blue, #0e2a47);
  border-bottom: 1px solid var(--blue, #0e2a47);
}
.lkp-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.lkp-bar img {
  height: 30px;
  width: auto;
  display: block;
}
.lkp-bar nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.lkp-bar nav a {
  color: rgba(250, 250, 248, 0.82);
  text-decoration: none;
  letter-spacing: 0.04em;
  display: inline-block;
  padding: 6px 2px;
}
.lkp-bar nav a:hover,
.lkp-bar nav a[aria-current='page'] {
  color: var(--white, #fafaf8);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.lkp-bar :where(a, button):focus-visible {
  outline-color: var(--gold, #c9a96e);
}

.lkp-main {
  padding: 56px 0 72px;
}
.lkp-crumbs {
  font-size: 13px;
  color: var(--text-light, #8a8a8a);
  margin-bottom: 24px;
}
.lkp-crumbs a {
  color: var(--text-mid, #5a5a5a);
}
.lkp-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .lkp-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
.lkp-toc {
  position: sticky;
  top: 24px;
  font-size: 14px;
  border-left: 2px solid var(--sand-dark, #e5dfd4);
  padding-left: 16px;
}
.lkp-toc h2 {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light, #8a8a8a);
  margin: 0 0 10px;
}
.lkp-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.lkp-toc a {
  color: var(--text-mid, #5a5a5a);
  text-decoration: none;
}
.lkp-toc a:hover {
  color: var(--blue, #0e2a47);
  text-decoration: underline;
}
@media (max-width: 900px) {
  .lkp-toc {
    position: static;
  }
}

.lkp-article h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.1;
  color: var(--blue, #0e2a47);
  margin: 0 0 16px;
  font-weight: 700;
}
.lkp-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-mid, #5a5a5a);
  margin: 0 0 28px;
  max-width: 68ch;
}
.lkp-article h2 {
  font-size: 22px;
  color: var(--blue, #0e2a47);
  margin: 40px 0 12px;
  scroll-margin-top: 24px;
}
.lkp-article h3 {
  font-size: 17px;
  margin: 24px 0 8px;
  color: var(--text, #2a2a2a);
}
.lkp-article p,
.lkp-article li {
  font-size: 15px;
  line-height: 1.7;
  max-width: 72ch;
}
.lkp-article ul {
  padding-left: 20px;
}
.lkp-article li {
  margin-bottom: 6px;
}
.lkp-article a {
  color: var(--blue-light, #1a7fd4);
}
.lkp-meta {
  font-size: 13px;
  color: var(--text-light, #8a8a8a);
  margin-bottom: 28px;
}
.lkp-note {
  border-left: 3px solid var(--gold, #c9a96e);
  background: var(--off, #f0ede6);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 14px;
}
.lkp-draft {
  border: 1px dashed var(--wood, #b8895a);
  background: #fff8ee;
  color: #6b4a22;
  padding: 14px 18px;
  border-radius: 8px;
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.6;
}
.lkp-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
}
.lkp-article table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 14px;
}
.lkp-article th,
.lkp-article td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sand-dark, #e5dfd4);
  vertical-align: top;
}
.lkp-article th {
  background: var(--off, #f0ede6);
  font-weight: 600;
}
.lkp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 8px;
  border: 1px solid var(--blue, #0e2a47);
  background: var(--blue, #0e2a47);
  color: var(--white, #fafaf8);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.lkp-btn:hover {
  background: var(--blue-mid, #1570bb);
  border-color: var(--blue-mid, #1570bb);
}
.lkp-btn-outline {
  background: transparent;
  color: var(--blue, #0e2a47);
}
.lkp-btn-outline:hover {
  background: var(--off, #f0ede6);
  color: var(--blue, #0e2a47);
}

.lkp-foot {
  border-top: 1px solid var(--sand-dark, #e5dfd4);
  background: var(--white, #fafaf8);
  padding: 28px 0;
  font-size: 13px;
  color: var(--text-light, #8a8a8a);
}
.lkp-foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
.lkp-foot a,
.lkp-foot .lk-consent-link {
  color: var(--text-mid, #5a5a5a);
  display: inline-block;
  padding-block: 4px;
}
.lkp-toc a,
.lkp-crumbs a {
  display: inline-block;
  padding-block: 4px;
}

/* 404 ---------------------------------------------------------------------- */
.lkp-404 {
  min-height: 62vh;
  display: flex;
  align-items: center;
}
.lkp-404 .lkp-eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #c9a96e);
  margin: 0 0 12px;
  font-weight: 700;
}
.lkp-404 ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
  display: grid;
  gap: 10px;
  max-width: 420px;
}
.lkp-404 ul a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--sand-dark, #e5dfd4);
  border-radius: 8px;
  background: var(--white, #fafaf8);
  text-decoration: none;
  color: var(--blue, #0e2a47);
  font-weight: 600;
  font-size: 15px;
}
.lkp-404 ul a:hover {
  border-color: var(--blue, #0e2a47);
}
