/* Rayhack Osteotomy Systems — shared styles
   Every rule is scoped to the .static-html-content wrapper output by
   page-static-html.php so it cannot leak into the WordPress theme. */

.static-html-content {
  --bg: #000;
  --surface: #1a1a1a;
  --surface-2: #2a2a2a;
  --border: #3a3a3a;
  --text: #f2f2f2;
  --text-muted: #b5b5b5;
  --blue: #2a9fd8;
  --blue-strong: #0088cc;
  --crimson: #e0245e;
  --crimson-strong: #cc0044;
  --radius: 10px;
  --max-width: 1180px;
  --sidebar: 260px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Tahoma, Geneva, sans-serif;
}

.static-html-content *, .static-html-content *::before, .static-html-content *::after { box-sizing: border-box; }
.static-html-content {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

.static-html-content img { max-width: 100%; height: auto; display: block; }

.static-html-content a { color: var(--blue); text-decoration: none; }
.static-html-content a:hover { color: var(--crimson); text-decoration: underline; }
.static-html-content a:focus-visible, .static-html-content button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 3px;
}

/* The theme's .default-style headings set their own font, colour and case; reset them */
.static-html-content h1, .static-html-content h2, .static-html-content h3 { line-height: 1.25; margin: 0 0 .6em; font-family: var(--font); text-transform: none; color: var(--text); }
.static-html-content h1 { font-size: clamp(24px, 17.6px + 1.6vw, 33.6px); font-weight: 600; letter-spacing: .02em; }
.static-html-content h2 { font-size: 20.8px; font-weight: 500; font-style: italic; color: var(--crimson); }
.static-html-content h3 { font-size: 16.8px; font-weight: 600; }
.static-html-content p { margin: 0 0 1em; }

.static-html-content .skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue-strong);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
}
.static-html-content .skip-link:focus { left: 16px; top: 16px; }

.static-html-content .accent { color: var(--blue); font-weight: 700; }

/* ---------- Header ---------- */

.static-html-content .site-header {
  border-bottom: 4px solid var(--surface-2);
  background: linear-gradient(180deg, #111 0%, #000 100%);
}
.static-html-content .site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.static-html-content .brand { color: var(--text); font-size: clamp(17.6px, 14.4px + 1vw, 25.6px); font-weight: 700; line-height: 1.2; }
.static-html-content .brand:hover { color: var(--text); text-decoration: none; }
.static-html-content .brand span { color: var(--blue); }
.static-html-content .brand small { display: block; font-size: .7em; font-weight: 400; color: var(--text-muted); }

.static-html-content .nav-toggle {
  display: none;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12.8px;
  font: inherit;
  font-size: 14.4px;
  cursor: pointer;
}

/* ---------- Layout ---------- */

.static-html-content .layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 32px;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* ---------- Sidebar navigation ---------- */

.static-html-content .site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.static-html-content .site-nav a {
  display: block;
  padding: 12px 16px;
  background: var(--surface-2);
  border-left: 4px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font-size: 12.8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.35;
}
.static-html-content .site-nav a:hover { background: #333; color: #fff; text-decoration: none; border-left-color: var(--crimson); }
.static-html-content .site-nav a[aria-current="page"] { border-left-color: var(--blue); color: var(--blue); }
.static-html-content .site-nav img { margin-top: 9.6px; border-radius: 4px; width: 100%; }
.static-html-content .site-nav .nav-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-muted); }

/* ---------- Main content ---------- */

.static-html-content .content { min-width: 0; }

.static-html-content .page-title {
  border-bottom: 6px solid var(--surface-2);
  padding-bottom: 9.6px;
  margin-bottom: 24px;
  color: var(--crimson);
  font-weight: 400;
  text-transform: uppercase;
}
.static-html-content .page-title--with-logo { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.static-html-content .page-title--with-logo h1 { margin: 0; }
.static-html-content .page-title--with-logo img { width: 200px; }

.static-html-content .split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: start;
}

.static-html-content .divider { border: 0; height: 6px; background: var(--surface-2); margin: 32px 0; }

/* Resource lists (PDFs / videos) */
.static-html-content .resources { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 6.4px; }
.static-html-content .resources a {
  display: flex;
  align-items: center;
  gap: 9.6px;
  padding: 9.6px 12.8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13.6px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.static-html-content .resources a:hover { border-color: var(--crimson); text-decoration: none; }
.static-html-content .resources .tag {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11.2px;
  font-weight: 600;
  padding: 1.6px 7.2px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text-muted);
}
.static-html-content .resources a::before {
  content: "";
  width: 0; height: 0;
  border-left: 7px solid var(--crimson);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  flex-shrink: 0;
}

/* Figures */
.static-html-content .figure-stack { display: grid; gap: 24px; }
.static-html-content figure { margin: 0; }
.static-html-content figcaption {
  margin-top: 6.4px;
  font-size: 13.6px;
  font-style: italic;
  color: var(--crimson);
  text-align: center;
}
.static-html-content .figure-stack img { margin: 0 auto; }

/* ---------- Home page ---------- */

.static-html-content .hero {
  display: grid;
  grid-template-columns: minmax(0, 532px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.static-html-content .hero img { border-radius: var(--radius); }
.static-html-content .hero h1 { font-weight: 400; }
.static-html-content .hero ul { padding-left: 19.2px; margin: 0 0 16px; }
.static-html-content .hero li::marker { color: var(--crimson); }

.static-html-content .feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.static-html-content .feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* !important: the theme's `#container img { height: auto }` outranks any class selector */
.static-html-content .feature img { width: 100%; height: 220px !important; object-fit: scale-down; background: #000; }
.static-html-content .feature__body { padding: 20px; font-size: 15.2px; }
.static-html-content .more-link { font-weight: 700; white-space: nowrap; color: var(--blue); }
.static-html-content .more-link:hover { color: var(--crimson); }
.static-html-content .more-link:after { content: none; } /* theme appends a chevron */

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

.static-html-content .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; }

.static-html-content .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.6px;
  background: #fff;
  color: #111;
}
.static-html-content .data-table th, .static-html-content .data-table td { padding: 8.8px 11.2px; text-align: center; border: 1px solid #d0d0d0; }
.static-html-content .data-table thead th { background: var(--surface-2); color: #fff; border-color: var(--border); white-space: nowrap; }
.static-html-content .data-table tbody th { background: #555; color: #fff; font-weight: 700; }
.static-html-content .data-table tbody tr:nth-child(even) td { background: #f3f3f3; }
.static-html-content .data-table .mount { background: #fff !important; }
.static-html-content .data-table .mount img { margin: 6.4px auto 0; }
.static-html-content .data-table small { display: block; color: #555; }
.static-html-content .data-table tbody + tbody { border-top: 3px solid #555; }

.static-html-content .compat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.8px;
  border: 1px solid #ccc;
}
.static-html-content .compat-table th, .static-html-content .compat-table td { padding: 6.4px 8px; border: 1px solid #ccc; }
.static-html-content .compat-table thead th { font-size: 12px; }
.static-html-content .compat-table tbody th { text-align: left; font-weight: 400; }
.static-html-content .compat-table td { text-align: center; font-weight: 700; }
.static-html-content .compat-table .volar { background: var(--crimson-strong); }
.static-html-content .compat-table .subcut { background: var(--blue-strong); }

/* ---------- Galleries / lightbox ---------- */

.static-html-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 24px 0;
}
.static-html-content .gallery a { display: block; text-align: center; font-weight: 700; }
.static-html-content .gallery a:hover { text-decoration: none; }
.static-html-content .gallery img {
  margin: 0 auto 9.6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: transform .15s ease, border-color .15s ease;
}
.static-html-content .gallery a:hover img { transform: translateY(-2px); border-color: var(--crimson); }
.static-html-content .gallery .hint { display: block; font-size: 12.48px; font-weight: 400; color: var(--text-muted); }

.static-html-content .lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1400px);
  max-height: 94vh;
}
.static-html-content .lightbox::backdrop { background: rgba(0, 0, 0, .85); }
.static-html-content .lightbox img { max-width: 100%; max-height: 86vh; width: auto; margin: 0 auto; background: #fff; border-radius: 6px; }
.static-html-content .lightbox__caption { color: #fff; text-align: center; margin: 8px 0 0; font-size: 14.4px; }
.static-html-content .lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Callouts ---------- */

.static-html-content .callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  padding: 20px 24px;
}

.static-html-content .note { font-size: 13.6px; color: var(--text-muted); }

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

.static-html-content .site-footer {
  border-top: 10px solid var(--surface-2);
  padding: 20px 16px 32px;
  text-align: center;
  font-size: 12.8px;
}
.static-html-content .site-footer ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5.6px 17.6px;
  font-weight: 700;
}
.static-html-content .site-footer a { color: var(--text); }
.static-html-content .site-footer a:hover { color: var(--crimson); }
.static-html-content .site-footer p { margin: 0; color: var(--text-muted); }

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

@media (max-width: 1000px) {
  .static-html-content .hero { grid-template-columns: 1fr; }
  .static-html-content .hero img { margin: 0 auto; }
  .static-html-content .split { grid-template-columns: 1fr; }
  .static-html-content .figure-stack { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (max-width: 820px) {
  .static-html-content .layout { grid-template-columns: 1fr; padding-top: 16px; }
  .js .static-html-content .nav-toggle { display: inline-block; }
  .js .static-html-content .site-nav:not(.is-open) { display: none; }
  .static-html-content .site-nav img { display: none; }
  .static-html-content .feature-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .static-html-content * { transition: none !important; }
}
