/* SI LCME Hub — professional academic theme */
:root {
  --navy: #1c2b4a;
  --navy-dark: #131e35;
  --gold: #b98a2f;
  --gold-light: #f4ead2;
  --paper: #faf9f6;
  --ink: #232a35;
  --muted: #5b6472;
  --line: #e2e0d8;
  --card: #ffffff;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
}
h1, h2, h3, .serif {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.25;
}
a { color: var(--navy); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }

/* Header */
.site-header { background: var(--navy); color: #fff; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 8px; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-weight: bold; font-size: 20px; color: var(--navy-dark);
  flex: none;
}
.brand-name { font-family: Georgia, serif; font-size: 20px; letter-spacing: 0.2px; }
.brand-sub { font-size: 12px; color: #c9d2e4; letter-spacing: 1.2px; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #dbe2f0; text-decoration: none; font-size: 15px; padding: 8px 12px;
  border-radius: 6px;
}
.nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav a.active { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }

/* Hero */
.hero { background: var(--navy-dark); color: #eef1f7; padding: 56px 0 48px; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.5vw, 44px); margin: 0 0 12px; }
.hero p.lede { font-size: 19px; color: #c9d2e4; max-width: 720px; margin: 0 0 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px; font-size: 16px;
  font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--navy-dark); }
.btn-gold:hover { background: #c9973a; }
.btn-outline { border-color: #8b96ad; color: #eef1f7; background: transparent; }
.btn-outline:hover { border-color: #fff; color: #fff; }
.edition-note {
  margin-top: 26px; font-size: 14px; color: #9aa5bd; max-width: 720px;
  border-left: 3px solid var(--gold); padding-left: 14px;
}

/* Sections */
.section { padding: 48px 0; }
.section h2 { font-size: 30px; margin: 0 0 8px; }
.section .kicker { text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; color: var(--gold); font-weight: 700; margin: 0 0 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; text-decoration: none; color: inherit; display: block;
}
.card:hover { border-color: var(--gold); box-shadow: 0 4px 18px rgba(28,43,74,0.08); }
.card h3 { margin: 0 0 8px; font-size: 21px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card .go { color: var(--gold); font-weight: 700; font-size: 15px; margin-top: 12px; display: inline-block; }

/* Standards page */
.searchbar { margin: 20px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.searchbar input {
  flex: 1; min-width: 220px; padding: 12px 16px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.std-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.std-head { padding: 20px 24px; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.std-head:hover { background: #f6f4ee; }
.std-head h3 { margin: 0; font-size: 20px; }
.std-num {
  flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 19px;
}
.std-stmt { padding: 0 24px 16px; color: var(--muted); font-size: 15.5px; font-style: italic; }
.std-elements { border-top: 1px solid var(--line); display: none; }
.std-block.open .std-elements { display: block; }
.el { padding: 16px 24px; border-bottom: 1px solid #f0ede4; }
.el:last-child { border-bottom: none; }
.el-id {
  display: inline-block; font-weight: 700; color: var(--navy); background: var(--gold-light);
  border-radius: 6px; padding: 2px 10px; font-size: 14px; margin-bottom: 6px;
}
.el-title { font-weight: 700; font-size: 16.5px; margin: 0 0 4px; color: var(--ink); }
.el-text { margin: 0; font-size: 15.5px; color: var(--ink); }
.no-results { padding: 30px; text-align: center; color: var(--muted); }
mark { background: #f9e9bd; padding: 0 2px; border-radius: 2px; }

/* Updates page */
.update-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; position: relative; transition: border-color .15s, box-shadow .15s; }
.update-item .card-link::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); cursor: pointer;
}
.update-item:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(28,43,74,.08); }
.update-item .card-source { margin: 10px 0 0; font-size: 12.5px; color: var(--gold); font-weight: 600; }
.update-item .card-link:focus-visible::after { outline: 2px solid var(--gold); outline-offset: 2px; }
/* keep any in-card links (e.g. the mailto) clickable above the stretched card link */
.update-item p a { position: relative; z-index: 1; }
.update-item .date-badge {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--navy); background: var(--gold-light);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 10px;
}
.update-item .date-badge.soon { background: var(--navy); color: #fff; }
.update-item h3 { margin: 0 0 6px; font-size: 20px; }
.update-item p { margin: 6px 0; font-size: 15.5px; color: var(--muted); }
.update-item p:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: 12.5px; border: 1px solid var(--line); border-radius: 4px; padding: 1px 8px; color: var(--muted); margin-right: 6px; }

/* Chat */
.chat-shell { max-width: 780px; margin: 0 auto; }
.chat-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  height: 480px; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.msg { max-width: 85%; padding: 12px 16px; border-radius: 12px; font-size: 15.5px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #f1efe8; color: var(--ink); border-bottom-left-radius: 4px; }
.msg.bot .cite { font-size: 13px; color: var(--muted); }
.msg.bot h3 { font-size: 16.5px; margin: 14px 0 6px; }
.msg.bot h3:first-child { margin-top: 0; }
.msg.bot h4 { font-size: 15.5px; margin: 12px 0 4px; }
.msg.bot p { margin: 0 0 10px; }
.msg.bot p:last-child { margin-bottom: 0; }
.msg.bot ul, .msg.bot ol { margin: 0 0 10px; padding-left: 22px; }
.msg.bot li { margin-bottom: 5px; }
.msg.bot li:last-child { margin-bottom: 0; }
.msg.bot hr { border: 0; border-top: 1px solid #d8d4c8; margin: 12px 0; }
.msg.bot .tbl-wrap { overflow-x: auto; margin: 0 0 12px; }
.msg.bot table { border-collapse: collapse; width: 100%; font-size: 14px; }
.msg.bot th, .msg.bot td { border: 1px solid #d8d4c8; padding: 7px 10px; text-align: left; vertical-align: top; }
.msg.bot th { background: var(--navy); color: #fff; font-weight: 600; }
.msg.bot td { background: #fff; }
.export-bar { display: flex; gap: 8px; margin-top: 10px; }
.export-bar button {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--navy);
}
.export-bar button:hover { border-color: var(--gold); }
.chat-input-row { display: flex; gap: 10px; margin-top: 14px; align-items: flex-end; }
.chat-input-row textarea {
  flex: 1; padding: 13px 16px; font-size: 16px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; resize: none; overflow-y: auto;
  max-height: 180px; font-family: inherit; line-height: 1.45;
}
.chat-input-row button {
  padding: 13px 26px; background: var(--navy); color: #fff; border: none;
  border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer;
}
.chat-input-row button:disabled { opacity: 0.5; cursor: default; }
#chat-attach {
  padding: 13px 14px; background: #fff; color: var(--navy);
  border: 1px solid var(--line); font-size: 18px; line-height: 1;
}
#chat-attach:hover { border-color: var(--gold); }
.typing { color: var(--muted); font-style: italic; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.suggestions button {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 8px 16px;
  font-size: 14px; cursor: pointer; color: var(--navy);
}
.suggestions button:hover { border-color: var(--gold); }
.chat-soon {
  background: var(--gold-light); border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--navy);
}
.disclaimer {
  margin-top: 26px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* Footer */
.site-footer { background: var(--navy-dark); color: #9aa5bd; padding: 36px 0; font-size: 14px; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #c9d2e4; }
.site-footer strong { color: #fff; }

@media (max-width: 640px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chat-box { height: 380px; }
  .section { padding: 34px 0; }
}

/* Accreditation toolkit (standards page) */
.toolkit { margin: 28px 0 8px; }
.toolkit h3 { margin: 0 0 4px; font-size: 21px; }
.toolkit-sub { color: var(--muted); margin: 0 0 16px; max-width: 760px; }
.toolkit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tool-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; text-decoration: none;
  color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card:hover { border-color: var(--gold); box-shadow: 0 2px 10px rgba(28,43,74,.08); transform: translateY(-1px); }
.tool-card .tool-kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.tool-card strong { display: block; font-size: 16.5px; margin-bottom: 6px; }
.tool-card span:last-child { font-size: 14px; color: var(--muted); line-height: 1.5; }
.tool-card--primary { background: var(--navy); border-color: var(--navy); }
.tool-card--primary:hover { border-color: var(--gold); }
.tool-card--primary strong { color: #fff; }
.tool-card--primary .tool-kicker { color: var(--gold); }
.tool-card--primary span:last-child { color: rgba(255,255,255,.82); }
