:root{
  --bg:#f3f4f6;
  --header-bg:#1c2b3a;
  --header-bg-dark:#13202d;
  --accent:#00609b;
  --accent-dark:#004d7c;
  --card-bg:#e2dfe0;
  --card-border:#e1e1e4;
  --text-dark:#2a2a2a;
  --text-muted:#5c5c5c;
  --track:#d9dade;
  --placeholder-bg:#eceef1;
  --placeholder-border:#c7c9cf;
  --placeholder-text:#9a9ca3;
}
*{box-sizing:border-box;}
html,body{height:100%;margin:0;}
body{
  font-family:'Segoe UI', Arial, Helvetica, sans-serif;
  background:#ffffff;
  background-attachment:fixed;
  color:var(--text-dark);
  font-size:15px;
  line-height:1.55;
  display:flex;
  flex-direction:column;
  overflow:hidden; /* body itself never scrolls -- only main.scroll-area does */
}
a{color:inherit;text-decoration:none;}

/* ---------- Frozen header (filled by js/navbar.js) ---------- */
header#site-header{
  flex:0 0 auto;
  background:var(--header-bg);
  border-bottom:2px solid var(--accent);
  min-height:46px;
}
.nav-wrap{
  max-width:none;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  padding:12px 24px;
  gap:12px;
}
.nav-left{justify-self:start;}
.nav-center{justify-self:center;}
.nav-right{justify-self:end;display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.logo-mark{font-size:1.05rem;font-weight:700;letter-spacing:0.3px;color:#fff;white-space:nowrap;}
nav ul{list-style:none;display:flex;gap:20px;margin:0;padding:0;flex-wrap:wrap;}
nav ul li a{font-weight:600;font-size:0.85rem;padding:4px 2px;border-bottom:2px solid transparent;transition:border-color .2s,color .2s;color:#dfe3e8;white-space:nowrap;}
nav ul li a:hover{border-color:#FFD700;color:#FFD700;}
nav ul li a.active{border-color:var(--accent);color:#fff;}
.nav-right a.nav-mini-btn{
  font-weight:700;
  font-size:0.78rem;
  padding:6px 12px;
  border-radius:6px;
  color:#fff;
  background:rgba(255,255,255,0.12);
  border:1px solid rgba(255,255,255,0.28);
  text-decoration:none;
  white-space:nowrap;
  transition:background .2s, color .2s, border-color .2s;
}
.nav-right a.nav-mini-btn:hover{background:#FFD700;color:#1c2b3a;border-color:#FFD700;}


/* ---------- Scrollable middle content ---------- */
main.scroll-area{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:var(--accent) var(--track);
}
main.scroll-area::-webkit-scrollbar{width:11px;}
main.scroll-area::-webkit-scrollbar-track{background:var(--track);}
main.scroll-area::-webkit-scrollbar-thumb{background:var(--accent);border-radius:6px;border:2px solid var(--track);}
main.scroll-area::-webkit-scrollbar-thumb:hover{background:var(--accent-dark);}

.page-wrap{
  max-width:1000px;
  margin:0 auto;
  padding:28px 20px 50px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.container{
  position:relative;
  background:var(--card-bg); /* solid/opaque container background */
  border:2px solid var(--accent);
  border-left:6px solid var(--accent);
  border-radius:8px;
  padding:20px 24px;
  box-shadow:0 1px 4px rgba(0,0,0,0.06);
}

h1,h2,h3,h4{color:var(--header-bg);margin-top:0;}
h1{font-size:1.5rem;}
h2{font-size:1.25rem;}
h3{font-size:1.05rem;}
h4{font-size:0.98rem;}
p{margin:0 0 10px;color:var(--text-muted);font-size:0.93rem;}
p:last-child{margin-bottom:0;}

.mini-btn{
  display:inline-block;
  background:var(--accent);
  color:#fff;
  font-weight:600;
  padding:8px 18px;
  border-radius:5px;
  font-size:0.85rem;
  transition:background 0.2s;
}
.mini-btn:hover{color:#FFD700;}

/* ---------- Frozen footer (filled by js/footer.js) ---------- */
footer#site-footer{
  flex:0 0 auto;
  background:var(--header-bg);
  border-top:2px solid var(--accent);
  min-height:30px;
}
.footer-wrap{
  max-width:1100px;
  margin:0 auto;
  padding:9px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:8px;
  font-size:0.78rem;
  color:#dfe3e8;
}
.footer-links{display:flex;gap:16px;}
.footer-links a{color:#dfe3e8;font-weight:600;}
.footer-links a:hover{color:#FFD700;}

/* ---------- Picture placeholders (page fillers) ---------- */
.img-placeholder{
  background:var(--placeholder-bg);
  border:2px dashed var(--placeholder-border);
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--placeholder-text);
  font-size:0.82rem;
  font-weight:600;
  text-align:center;
  min-height:130px;
  padding:10px;
}

@media(max-width:800px){
  .page-wrap{padding:20px 14px 40px;}
  .container{padding:16px 18px;}
}

/* ============================================================
   RICH TEXT
   Styles for content written in the Manage Content editor.
   These containers are <div class="rich-text"> -- NOT <p> --
   because paragraphs and lists can't legally sit inside a <p>;
   the browser silently rearranges the page if you try.
   ============================================================ */
.rich-text > *:first-child{margin-top:0;}
.rich-text > *:last-child{margin-bottom:0;}
.rich-text p{margin:0 0 0.85em;}
.rich-text ul,
.rich-text ol{margin:0 0 0.85em;padding-left:1.5em;}
.rich-text li{margin-bottom:0.4em;}
.rich-text li:last-child{margin-bottom:0;}
.rich-text h3,
.rich-text h4{
  color:var(--accent-dark);
  margin:1.2em 0 0.5em;
  line-height:1.3;
}
.rich-text h3{font-size:1.05rem;}
.rich-text h4{font-size:0.95rem;}
.rich-text strong,
.rich-text b{font-weight:700;}
.rich-text em,
.rich-text i{font-style:italic;}
.rich-text blockquote{
  margin:0 0 0.85em;
  padding:2px 0 2px 14px;
  border-left:3px solid var(--accent);
  color:var(--text-muted);
  font-style:italic;
}
/* The global rule is a{color:inherit;text-decoration:none;} -- without this
   override a link typed into the editor would be completely invisible,
   styled exactly like the text around it. */
.rich-text a{
  color:var(--accent-dark);
  text-decoration:underline;
  font-weight:600;
}
.rich-text a:hover{color:var(--accent);}
