/* ==========================================================================
   Looking Glass Development — site stylesheet
   Restored & modernized from the 2001 static site (Wayback capture 2006).
   Brand palette derived from the original design:
   navy #000080 -> --navy | orange #fd9a01 -> --accent | maroon #800000 -> --maroon
   ========================================================================== */

:root {
  --navy: #16335b;
  --navy-dark: #0e2340;
  --navy-soft: #27497a;
  --ink: #1f2a37;
  --muted: #5b6b7f;
  --accent: #f5a623;
  --accent-dark: #c87f00;
  --maroon: #8a2e1f;
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #e2e9f2;
  --ok: #2e7d32;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 35, 64, 0.06), 0 6px 18px rgba(15, 35, 64, 0.07);
  --shadow-lift: 0 2px 4px rgba(15, 35, 64, 0.08), 0 12px 28px rgba(15, 35, 64, 0.12);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; }

a { color: var(--navy-soft); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 4px;
}

.brand { display: inline-block; line-height: 0; }
.brand img { width: 100%; max-width: 620px; }

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--navy);
  font: 600 14px/1 var(--font);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); }

/* Pill navigation, centered and aligned with the page container */
.site-nav { padding: 12px 0 2px; }
.site-nav ul {
  list-style: none;
  margin: 0 auto;
  padding: 4px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.site-nav a {
  display: block;
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--navy); background: var(--bg); }
.site-nav a[aria-current="page"] { color: #fff; background: var(--navy); }
.site-nav a[aria-current="page"]:hover { color: #fff; background: var(--navy-soft); }

/* Sub navigation used on training-related pages */
.subnav { padding: 8px 0 4px; }
.subnav ul {
  list-style: none;
  margin: 0 auto;
  padding: 3px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  background: #eef4fc;
  border: 1px solid #dde8f4;
  border-radius: 999px;
}
.subnav a {
  display: block;
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--navy-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.subnav a:hover { color: var(--navy); background: #dfeaf7; }
.subnav a[aria-current="page"] { color: #262005; background: var(--accent); }

/* --------------------------------------------------------------------------
   Page intro (breadcrumbs + H1 + lead)
   -------------------------------------------------------------------------- */

.page-head { padding: 34px 0 8px; }

.breadcrumbs {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumbs li + li::before { content: "\203A"; margin: 0 7px; color: #aab7c8; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent-dark); text-decoration: underline; }

h1 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  margin: 0 0 10px;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.lead {
  font-size: clamp(16px, 2vw, 18.5px);
  color: var(--muted);
  max-width: 70ch;
  margin: 0 0 8px;
}

.kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 6px;
}

/* --------------------------------------------------------------------------
   Sections, cards, grids
   -------------------------------------------------------------------------- */

.section { padding: 34px 0 10px; }
.section:last-child { padding-bottom: 40px; }

.section > h2 {
  font-size: clamp(22px, 3vw, 28px);
  color: var(--navy);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.section > .section-sub { color: var(--muted); margin-top: -6px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 18px; color: var(--navy); }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.card .more { font-weight: 600; font-size: 14.5px; text-decoration: none; }
.card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fdf3df, #fdeecb);
  color: var(--accent-dark);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { box-shadow: var(--shadow-lift); border-color: #cfdcea; }

.check-list { list-style: none; margin: 0 0 12px; padding: 0; }
.check-list li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8f3ec;
  color: #2f7d4f;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.dot-list { margin: 0 0 12px; padding-left: 20px; }
.dot-list li { margin-bottom: 7px; }

.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.meta-chips li {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-soft);
  background: #e9f0fa;
  border: 1px solid #d7e3f4;
  border-radius: 999px;
  padding: 3px 11px;
}

/* --------------------------------------------------------------------------
   Hero (home page)
   -------------------------------------------------------------------------- */

.hero {
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(245, 166, 35, 0.18), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, rgba(39, 73, 122, 0.5), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 64px 0 58px;
}
.hero h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); margin: 0 0 14px; max-width: 21ch; }
.hero .lead { color: #c9d7ec; font-size: clamp(16px, 2.2vw, 19px); max-width: 62ch; }
.hero .tagline {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #262005; }
.btn-primary:hover { background: #ffb63d; color: #262005; box-shadow: var(--shadow-lift); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); color: #fff; box-shadow: var(--shadow-lift); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.trustbar { background: #fff; border-bottom: 1px solid var(--line); }
.trustbar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.trustbar img { display: block; }
.trustbar .trust-note {
  flex-basis: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 2px 0 0;
}

/* --------------------------------------------------------------------------
   Callout / CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow);
}
.cta-band h2 { color: #fff; margin: 0 0 4px; font-size: 22px; }
.cta-band p { margin: 0; color: #d5e1f2; }
.cta-band .btn-primary { flex-shrink: 0; }

.callout {
  background: #fdf7ec;
  border: 1px solid #f3ddae;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 0 18px;
}
.callout strong { color: var(--accent-dark); }

.note { color: var(--muted); font-size: 14px; }

/* --------------------------------------------------------------------------
   Figures
   -------------------------------------------------------------------------- */

figure { margin: 0 0 18px; }
figure img {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
  box-shadow: var(--shadow);
}
figcaption { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

.media-split { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 640px;
}
table.data caption {
  text-align: left;
  font-size: 13.5px;
  color: var(--muted);
  padding: 12px 16px 0;
}
table.data th {
  background: var(--navy);
  color: #fff;
  text-align: left;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 11px 14px;
  white-space: nowrap;
}
table.data td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
table.data tbody tr:nth-child(even) { background: #f8fafd; }
table.data tbody tr:hover { background: #eef4fc; }
table.data .num { text-align: right; white-space: nowrap; }
table.data td .course-id { font-weight: 700; color: var(--navy); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Articles (news / tips / did-you-know)
   -------------------------------------------------------------------------- */

.article-body { max-width: 76ch; }
.article-body p { margin: 0 0 16px; }
.article-meta { font-size: 13.5px; color: var(--muted); margin: 0 0 18px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 0; }
.stat {
  flex: 1 1 160px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat .stat-num { display: block; font-size: 30px; font-weight: 700; color: var(--accent-dark); }
.stat .stat-label { font-size: 13.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   FAQ (native details/summary)
   -------------------------------------------------------------------------- */

.faq-list { max-width: 820px; }
.faq-list details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  padding: 14px 18px;
  list-style-position: inside;
}
.faq-list details[open] summary { border-bottom: 1px solid var(--line); }
.faq-list .faq-answer { padding: 6px 18px 16px; }
.faq-list .faq-answer p { margin: 0 0 8px; }

/* --------------------------------------------------------------------------
   Assessment quiz
   -------------------------------------------------------------------------- */

.quiz { max-width: 820px; }
.quiz-question {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.quiz-question p { margin: 0 0 10px; font-weight: 600; color: var(--navy); }
.quiz-options { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.quiz-options label {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  font-size: 15px;
  cursor: pointer;
}
.quiz-result {
  display: none;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}
.quiz-result.visible { display: block; }
.quiz-result h3 { margin: 0 0 8px; color: var(--accent); font-size: 20px; }
.quiz-result p { margin: 0 0 10px; color: #d5e1f2; }
.quiz-result .score {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: inline-block;
  padding: 4px 14px;
  margin-bottom: 10px;
}
.quiz-result a { color: var(--accent); }

/* --------------------------------------------------------------------------
   Forms (mailto helper on contact page)
   -------------------------------------------------------------------------- */

.form-card { max-width: 620px; }
.form-card .field { margin-bottom: 14px; }
.form-card label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 5px; color: var(--navy); }
.form-card input[type="text"],
.form-card input[type="email"],
.form-card textarea,
.form-card select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c9d5e4;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.form-card textarea { min-height: 120px; resize: vertical; }

/* --------------------------------------------------------------------------
   Flash intro section (lazy-loaded Ruffle player)
   -------------------------------------------------------------------------- */

.flash-frame {
  background: var(--navy-dark);
  border-radius: var(--radius);
  padding: 10px;
  max-width: 460px;
  box-shadow: var(--shadow);
}
.flash-frame ruffle-embed, .flash-frame ruffle-player { display: block; width: 445px; max-width: 100%; aspect-ratio: 425 / 305; }
.flash-poster {
  width: 100%;
  aspect-ratio: 425 / 305;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #dbe6f5;
  background:
    radial-gradient(500px 220px at 70% 20%, rgba(245, 166, 35, 0.25), transparent 65%),
    linear-gradient(150deg, #14305a, #0b1c36);
  border: 0;
  border-radius: 8px;
  font: 600 15px var(--font);
  cursor: pointer;
}
.flash-poster .play-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: #262005;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.flash-poster:hover .play-icon { transform: scale(1.06); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--navy-dark);
  color: #b9c8dd;
  margin-top: 46px;
  font-size: 14.5px;
}
.site-footer a { color: #d7e3f4; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 30px;
  padding: 38px 0 26px;
}
.footer-grid h2 { color: #fff; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand img { background: #fff; border-radius: 6px; padding: 6px; max-width: 280px; margin-bottom: 12px; }
.footer-contact p { margin: 0 0 8px; }
.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  padding: 6px 0 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.footer-logos img { background: #fff; border-radius: 5px; padding: 4px; display: block; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 0 26px;
  font-size: 13px;
  color: #8ea3c0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .media-split { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .header-top { flex-wrap: wrap; padding-left: 14px; padding-right: 78px; }
  .brand img { max-width: 100%; }

  /* Mobile navigation */
  .site-nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    border-radius: 14px;
    padding: 6px;
  }
  .site-nav.open ul { display: flex; }
  .site-nav a { border-radius: 9px; text-align: center; white-space: normal; }
  .nav-toggle { display: inline-block; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); }
  .subnav ul { border-radius: 14px; }
  .subnav a { white-space: normal; }
}

@media print {
  .site-nav, .subnav, .nav-toggle, .cta-band, .btn { display: none !important; }
}