/* ═══════ SHARED STYLES ═══════
   Common CSS for all pages of the Clinical AI Policy site.
   ═══════════════════════════════ */

:root {
  --primary-blue:    #002959;
  --mid-blue:        #1E3A8A;
  --accent-gold:     #FFD200;
  --secondary-gray:  #8B9096;
  --light-gray:      #F5F6F7;
  --dark-gray:       #4A5568;
  --white:           #FFFFFF;
  --text-primary:    #2D3748;
  --text-secondary:  #4A5568;
  --nav-width: 260px;
  --comment-width: 320px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; overflow-x: hidden; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--light-gray);
  line-height: 1.65;
  font-size: 16px;
}

/* ── LAYOUT ── */
.page { display: flex; min-height: 100vh; }

/* ── LEFT NAV ── */
.nav {
  position: fixed; top: 0; left: 0;
  width: var(--nav-width); height: 100vh;
  overflow-y: auto; background: var(--primary-blue);
  color: var(--white); padding: 28px 0 40px;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }

.nav-title {
  font-size: 14px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  padding: 0 24px 20px; color: var(--accent-gold);
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 12px;
}
.nav a {
  display: block; padding: 7px 24px;
  color: rgba(255,255,255,.72); text-decoration: none;
  font-size: 13.5px; transition: all .15s;
  border-left: 3px solid transparent;
}
.nav a:hover, .nav a.active {
  color: var(--white); background: rgba(255,255,255,.07);
  border-left-color: var(--accent-gold);
}
.nav a.sub { padding-left: 38px; font-size: 12.5px; }
.nav a.nav-quiz-link {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.15);
  border-left-color: var(--accent-gold);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent-gold);
  letter-spacing: .3px;
}
.nav a.nav-quiz-link:hover {
  color: var(--white);
  background: rgba(255,255,255,.07);
}

/* ── MAIN CONTENT ── */
.main {
  margin-left: var(--nav-width);
  flex: 1; padding: 40px 56px 80px;
  max-width: 820px;
  position: relative;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
@media (min-width: 1381px) {
  .main { margin-right: var(--comment-width); }
}

/* ── TYPOGRAPHY ── */
h1 {
  font-size: 28px; font-weight: 700; color: var(--primary-blue);
  margin-bottom: 6px; line-height: 1.25; text-align: center;
}
.subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }

h2 {
  font-size: 21px; font-weight: 700; color: var(--primary-blue);
  margin: 48px 0 16px; padding-top: 12px;
  border-top: 2px solid var(--accent-gold);
}
h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
h3 {
  font-size: 17px; font-weight: 600; color: var(--mid-blue);
  margin: 32px 0 10px;
}

p { margin-bottom: 14px; }

/* ── SECTION WRAPPER ── */
.section {
  position: relative;
  padding: 4px 0 4px 0;
}
.section + .section { margin-top: 8px; }

/* ── OPTION BLOCKS ── */
.option {
  background: var(--white);
  border: 1px solid #e2e5e9;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 8px 0;
}
.option strong { color: var(--mid-blue); }

/* ── TABLES ── */
table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0 20px; font-size: 14px;
}
th {
  background: var(--primary-blue); color: var(--white);
  text-align: left; padding: 10px 14px; font-weight: 600;
  font-size: 13px;
}
td {
  padding: 10px 14px; border-bottom: 1px solid #e2e5e9;
  vertical-align: top;
}
tr:nth-child(even) td { background: var(--light-gray); }

/* ── HR ── */
hr {
  border: none; border-top: 1px solid #dde0e4;
  margin: 36px 0;
}

/* ── LISTS ── */
ul, ol { margin: 8px 0 14px 22px; }
li { margin-bottom: 6px; }

/* ── COPY BUTTON ── */
.copy-btn {
  position: absolute; top: 0; right: -36px;
  background: none; border: none; cursor: pointer;
  opacity: 0; transition: opacity .15s;
  padding: 4px; color: var(--secondary-gray);
}
.section:hover .copy-btn { opacity: .55; }
.copy-btn:hover { opacity: 1 !important; color: var(--mid-blue); }
.copy-btn svg { width: 18px; height: 18px; }
.copy-btn.copied { color: var(--accent-gold); }
.copy-btn:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary-blue); color: var(--white);
  padding: 10px 24px; border-radius: 6px;
  font-size: 13px; font-weight: 500;
  opacity: 0; transition: all .25s; z-index: 999;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── CROSSLINKS ── */
a.xref {
  color: var(--mid-blue); text-decoration: none;
  border-bottom: 1px dashed var(--mid-blue);
  transition: color .15s;
}
a.xref:hover { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .nav {
    width: 0; padding: 0; overflow: hidden;
    transition: width .25s ease, padding .25s ease;
  }
  .nav.open { width: 260px; padding: 28px 0 40px; }
  .nav-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.35); z-index: 99;
    transition: opacity .25s;
  }
  .nav-overlay.visible { display: block; }
  .main { margin-left: 0; margin-right: 0; padding: 24px 16px 60px; max-width: 100%; overflow-x: hidden; }
  .hamburger { display: flex !important; }
  .copy-btn { display: none; }
}

/* Hamburger */
.hamburger {
  display: none !important;
  position: fixed; top: 12px; left: 12px;
  z-index: 200; background: var(--primary-blue);
  border: none; border-radius: 6px; padding: 8px 10px;
  cursor: pointer; color: var(--white);
  align-items: center; justify-content: center;
}
.hamburger svg { width: 22px; height: 22px; }

/* ── FOCUS STYLES ── */
.nav a:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: -2px;
}
.hamburger:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-radius: 4px;
}
a.xref:focus-visible {
  outline: 2px solid var(--mid-blue);
  outline-offset: 1px;
}
