/* ==========================================================================
   BioF:GREAT Content Styles — content-component stylesheet
   Derived from the static rebuild's assets/css/site.css (1163 lines).

   Site chrome (masthead, primary navigation and its dropdowns, footer,
   breadcrumb, prev/next pager, html/body resets, bare `a` element rules) has
   been removed: in WordPress the theme owns all of that. What remains is the
   page-content vocabulary only, and every selector is scoped to
   `.bg-content` — the wrapper this plugin adds around post content — so
   nothing here can reach the theme's own furniture.

   Brand colours and spacing/typography tokens live in the :root block below,
   which is deliberately left unscoped so the custom properties cascade.
   Change a colour there and it propagates through every component.
   ========================================================================== */

/* ==========================================================================
   Glycosyltransferase Family Repository — site stylesheet
   Single stylesheet for all page types: landing, family index, gene record.
   ========================================================================== */
:root {
  --brand-dark:    #14304f;
  --brand:         #1d5b8f;
  --brand-light:   #2e7bb5;
  --brand-pale:    #eaf2f9;
  --accent:        #b8541e;
  --accent-pale:   #fdf1e8;
  --ink:           #1c2733;
  --ink-soft:      #4a5866;
  --ink-faint:     #7b8794;
  --rule:          #d3dbe3;
  --bg:            #ffffff;
  --bg-alt:        #f6f8fa;

  /* Record category colours (mirror the source spreadsheet legend) */
  --cat-model:     #ddebf7;
  --cat-nonmodel:  #fce4ec;
  --cat-low:       #e6d9f2;
  --cat-flag:      #c0392b;
  --gct-pdb:       #d4edda;
  --gct-user:      #fff3cd;

  --maxw: 1240px;
  --mono: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}
.bg-content, .bg-content *, .bg-content *::before, .bg-content *::after { box-sizing: border-box; }

/* ---------- Masthead ---------------------------------------------------- */
/* The supplied logo is artwork on an opaque white background, so it sits on a
   white plate rather than directly on the gradient. */
/* 96px is the smallest height at which the logo's third line ("Research,
   Education and Training") and the biofgreat.org URL stay legible. */
/* ---------- Primary navigation ------------------------------------------ */
/* ---------- Layout ------------------------------------------------------ */
.bg-content .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px 60px;
}
.bg-content .page {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 26px 30px 34px;
}
.bg-content h2.page-title {
  margin: 0 0 6px;
  font-size: 1.62rem;
  color: var(--brand-dark);
  line-height: 1.25;
}
.bg-content h3.section {
  margin: 30px 0 10px;
  font-size: 1.12rem;
  color: var(--brand-dark);
  border-bottom: 2px solid var(--brand-pale);
  padding-bottom: 5px;
}
.bg-content h4 { margin: 18px 0 6px; font-size: 1rem; color: var(--ink); }
.bg-content p.lede { font-size: 1.02rem; color: var(--ink-soft); margin-top: 0; }
.bg-content .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

@media (max-width: 900px) {
  .bg-content .two-col { grid-template-columns: 1fr; }
}

/* ---------- Landing page cards ------------------------------------------ */
.bg-content .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
  margin: 18px 0 6px;
}
.bg-content .card {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand-light);
  border-radius: 5px;
  padding: 14px 16px 16px;
  background: var(--bg);
}
.bg-content .card h4 { margin: 0 0 6px; font-size: 1.02rem; color: var(--brand-dark); }
.bg-content .card p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.bg-content .stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 20px 0 8px;
}
.bg-content .stat {
  background: var(--brand-pale);
  border: 1px solid #cfe0ee;
  border-radius: 5px;
  padding: 12px 14px;
  text-align: center;
}
.bg-content .stat .num { display: block; font-size: 1.7rem; font-weight: 700; color: var(--brand-dark); line-height: 1.1; }
.bg-content .stat .lbl { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }

/* ---------- Family chip grid -------------------------------------------- */
.bg-content .family-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.bg-content .fam-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 76px;
  padding: 7px 10px 6px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--bg);
  font-size: .92rem;
  font-weight: 600;
  color: var(--brand);
}
.bg-content .fam-chip .n { font-size: .72rem; font-weight: 400; color: var(--ink-faint); }
.bg-content .fam-chip:hover { background: var(--brand-pale); text-decoration: none; }
.bg-content .fam-chip.built { border-left: 4px solid var(--brand); }
.bg-content .fam-chip.pending {
  color: var(--ink-faint);
  background: var(--bg-alt);
  border-style: dashed;
  cursor: default;
}
.bg-content .fam-chip.pending:hover { background: var(--bg-alt); }

/* ---------- Tables ------------------------------------------------------- */
.bg-content .table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0 10px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 5px;
}
.bg-content .table-tools input[type="search"],
.bg-content .table-tools select {
  font-family: var(--sans);
  font-size: .9rem;
  padding: 6px 9px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
.bg-content .table-tools input[type="search"] { min-width: 260px; flex: 1 1 260px; }
.bg-content .table-tools label { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.bg-content .table-tools .count { font-size: .85rem; color: var(--ink-soft); margin-left: auto; }
.bg-content .table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 5px; }
.bg-content table.records {
  border-collapse: collapse;
  width: 100%;
  font-size: .875rem;
  background: #fff;
}
.bg-content table.records thead th {
  background: var(--brand-dark);
  color: #fff;
  text-align: left;
  padding: 9px 10px;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.bg-content table.records thead th.sortable { cursor: pointer; user-select: none; }
.bg-content table.records thead th.sortable:hover { background: var(--brand); }
.bg-content table.records thead th .arrow { opacity: .45; font-size: .7rem; margin-left: 4px; }
.bg-content table.records thead th[data-dir="asc"] .arrow,
.bg-content table.records thead th[data-dir="desc"] .arrow { opacity: 1; }
.bg-content table.records td { padding: 7px 10px; border-top: 1px solid var(--rule); vertical-align: top; }
.bg-content table.records tbody tr:hover td { background: rgba(29,91,143,.06); }
.bg-content table.records td.gene { font-weight: 700; white-space: nowrap; }
.bg-content table.records td.species { font-style: italic; white-space: nowrap; }
.bg-content table.records td.mono { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
.bg-content table.records td.wrapcell { min-width: 260px; }
.bg-content tr.cat-model    td:first-child { box-shadow: inset 4px 0 0 #6fa8dc; }
.bg-content tr.cat-nonmodel td:first-child { box-shadow: inset 4px 0 0 #e39ab4; }
.bg-content tr.cat-low      td:first-child { box-shadow: inset 4px 0 0 #a884d0; }

/* Detail table on record pages */
.bg-content table.detail { border-collapse: collapse; width: 100%; font-size: .92rem; margin: 4px 0 8px; }
.bg-content table.detail th {
  text-align: left;
  width: 220px;
  padding: 8px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  font-weight: 600;
  vertical-align: top;
}
.bg-content table.detail td { padding: 8px 12px; border: 1px solid var(--rule); vertical-align: top; }
.bg-content table.detail td .empty { color: var(--ink-faint); font-style: italic; }

/* ---------- Badges ------------------------------------------------------- */
.bg-content .badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 14px; }
.bg-content .badge {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 11px;
  border: 1px solid var(--rule);
  background: var(--bg-alt);
  color: var(--ink-soft);
  white-space: nowrap;
}
.bg-content .badge.fam { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.bg-content .badge.model { background: var(--cat-model); border-color: #9bc3e2; color: #14425f; }
.bg-content .badge.nonmodel { background: var(--cat-nonmodel); border-color: #e7b3c6; color: #7b2c46; }
.bg-content .badge.low { background: var(--cat-low); border-color: #c3aade; color: #4a2f6b; }
.bg-content .badge.flag { background: var(--cat-flag); border-color: var(--cat-flag); color: #fff; }
.bg-content .badge.gct-pdb { background: var(--gct-pdb); border-color: #a9d5b5; color: #1e5730; }
.bg-content .badge.gct-user { background: var(--gct-user); border-color: #e6d193; color: #6b551a; }

/* ---------- Sequences --------------------------------------------------- */
.bg-content .seq-block { margin: 10px 0 18px; }
.bg-content .seq-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.bg-content .seq-head .len { font-size: .82rem; color: var(--ink-faint); }
.bg-content .seq-head .btn-row { margin-left: auto; display: flex; gap: 7px; }
.bg-content .seq {
  font-family: var(--mono);
  font-size: .8rem;
  line-height: 1.65;
  letter-spacing: .055em;
  word-break: break-all;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand-light);
  border-radius: 4px;
  padding: 11px 13px;
  margin: 0;
  white-space: pre-wrap;
  max-height: 320px;
  overflow-y: auto;
}
.bg-content .btn {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 11px;
  border: 1px solid var(--brand-light);
  border-radius: 4px;
  background: #fff;
  color: var(--brand);
  cursor: pointer;
}
.bg-content .btn:hover { background: var(--brand-pale); text-decoration: none; }

/* ---------- Link pills, lists, misc ------------------------------------- */
.bg-content .link-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.bg-content .pill {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  padding: 6px 13px;
  border: 1px solid var(--brand-light);
  border-radius: 15px;
  background: #fff;
  color: var(--brand);
}
.bg-content .pill:hover { background: var(--brand-pale); text-decoration: none; }
.bg-content .pill.ext::after { content: " \2197"; font-weight: 400; }
.bg-content ul.tight { margin: 6px 0 6px 20px; padding: 0; }
.bg-content ul.tight li { margin-bottom: 5px; }
.bg-content ul.plain { list-style: none; margin: 6px 0; padding: 0; }
.bg-content ul.plain li { margin-bottom: 4px; }
.bg-content .note {
  background: var(--accent-pale);
  border-left: 4px solid var(--accent);
  padding: 11px 14px;
  border-radius: 4px;
  font-size: .9rem;
  color: #5d3316;
  margin: 16px 0;
}
.bg-content .legend-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px; margin: 12px 0; }
.bg-content .legend-item { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; }
.bg-content .swatch { flex: 0 0 auto; width: 26px; height: 18px; border: 1px solid #9aa5b1; border-radius: 3px; margin-top: 2px; }
.bg-content code.inline { font-family: var(--mono); font-size: .85em; background: var(--bg-alt); padding: 1px 5px; border-radius: 3px; border: 1px solid var(--rule); }

@media print {
  .bg-content .table-tools,
  .bg-content .btn { display: none; }
  .bg-content .page { border: 0; }
}

/* ==========================================================================
   BioF:GREAT site extensions
   Additional components layered on the shared design system: hero banner,
   people cards, catalogue grid, news and event items, FAQ, project accordions.
   All colours and spacing derive from the :root tokens defined above.
   ========================================================================== */
/* ---------- Dropdown primary navigation --------------------------------- */
/* ---------- Hero -------------------------------------------------------- */
.bg-content .hero {
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 22px;
  background: linear-gradient(100deg, var(--brand-dark) 0%, var(--brand) 62%, var(--brand-light) 100%);
}
.bg-content .hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  object-position: center;
}
.bg-content .hero-body {
  padding: 22px 30px 26px;
  color: #fff;
}
.bg-content .hero-body h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  line-height: 1.2;
  max-width: 780px;
}
.bg-content .hero-body p {
  margin: 0 0 16px;
  max-width: 720px;
  font-size: 1rem;
  color: #dbe9f7;
}
.bg-content .hero .btn-hero {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  padding: 9px 20px;
  border-radius: 4px;
}
.bg-content .hero .btn-hero:hover { background: #a04616; text-decoration: none; }

@media (max-width: 860px) {
  .bg-content .hero img { max-height: 170px; }
  .bg-content .hero-body { padding: 18px 20px 22px; }
  .bg-content .hero-body h2 { font-size: 1.3rem; }
  .bg-content .hero-body p { font-size: .92rem; }
}

/* ---------- People ------------------------------------------------------ */
.bg-content .people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px;
  margin: 16px 0 8px;
}
.bg-content .person {
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bg-content .person .portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: var(--bg-alt);
  display: block;
  border-bottom: 3px solid var(--brand-light);
}
.bg-content .person .person-body { padding: 11px 14px 14px; }
.bg-content .person h4 { margin: 0 0 2px; font-size: 1rem; color: var(--brand-dark); }
.bg-content .person .role {
  margin: 0;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--ink-faint);
  font-weight: 600;
}
.bg-content .person .affil { margin: 4px 0 0; font-size: .85rem; color: var(--ink-soft); }

/* Full biography layout (PI page) */
.bg-content .bio {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.bg-content .bio:first-of-type { border-top: 0; }
.bg-content .bio .portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 5px;
  border: 1px solid var(--rule);
  background: var(--bg-alt);
}
.bg-content .bio h3 { margin: 0 0 2px; font-size: 1.18rem; color: var(--brand-dark); }
.bg-content .bio .role {
  margin: 0 0 10px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  color: var(--accent);
}
.bg-content .bio p { margin: 0 0 10px; font-size: .93rem; color: var(--ink-soft); }

@media (max-width: 700px) {
  .bg-content .bio { grid-template-columns: 1fr; }
  .bg-content .bio .portrait { max-width: 210px; }
}

/* ---------- Catalogue --------------------------------------------------- */
.bg-content .cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 16px 0 8px;
}
.bg-content .cat-card {
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bg-content .cat-card:hover { border-color: var(--brand-light); box-shadow: 0 2px 10px rgba(20,48,79,.10); }
.bg-content .cat-card .thumb {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #fff;
  padding: 10px;
  border-bottom: 1px solid var(--rule);
  display: block;
}
.bg-content .cat-card .cat-body { padding: 11px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.bg-content .cat-card .gene {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent);
  margin: 0 0 3px;
}
.bg-content .cat-card h4 { margin: 0 0 8px; font-size: .93rem; line-height: 1.35; color: var(--brand-dark); }
.bg-content .cat-card .price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
}
.bg-content .cat-card .price { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.bg-content .cat-card .unit { font-size: .74rem; color: var(--ink-faint); }
.bg-content .price-tag {
  display: inline-block;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-dark);
  background: var(--brand-pale);
  border: 1px solid #cfe0ee;
  border-radius: 5px;
  padding: 6px 16px;
}
.bg-content .order-box {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 5px;
  background: var(--bg-alt);
  padding: 16px 18px;
  margin: 18px 0;
}
.bg-content .order-box h4 { margin: 0 0 8px; color: var(--brand-dark); }
.bg-content .btn-order {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  padding: 9px 20px;
  border-radius: 4px;
  border: 0;
}
.bg-content .btn-order:hover { background: #a04616; text-decoration: none; color: #fff; }
.bg-content .btn-secondary {
  display: inline-block;
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand-light);
  font-weight: 600;
  font-size: .88rem;
  padding: 8px 18px;
  border-radius: 4px;
}
.bg-content .btn-secondary:hover { background: var(--brand-pale); text-decoration: none; }
.bg-content .figure-plate { margin: 16px 0; }
.bg-content .figure-plate img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
  display: block;
}
.bg-content .figure-plate figcaption { font-size: .82rem; color: var(--ink-faint); margin-top: 6px; }

/* ---------- News, events, generic media rows ---------------------------- */
.bg-content .news-list { margin: 14px 0; }
.bg-content .news-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.bg-content .news-item:first-child { border-top: 0; }
.bg-content .news-item img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--rule);
  background: var(--bg-alt);
}
.bg-content .news-item h4 { margin: 0 0 5px; font-size: 1.03rem; color: var(--brand-dark); }
.bg-content .news-item p { margin: 0 0 8px; font-size: .9rem; color: var(--ink-soft); }
.bg-content .news-item .meta {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .bg-content .news-item { grid-template-columns: 1fr; }
}
.bg-content .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.bg-content .gallery img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--rule);
  background: var(--bg-alt);
}

/* ---------- FAQ / disclosure -------------------------------------------- */
.bg-content .faq { margin: 14px 0; }
.bg-content .faq details {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand-light);
  border-radius: 5px;
  background: var(--bg);
  margin-bottom: 9px;
  padding: 0;
}
.bg-content .faq summary {
  cursor: pointer;
  padding: 11px 15px;
  font-weight: 600;
  font-size: .96rem;
  color: var(--brand-dark);
  list-style: none;
}
.bg-content .faq summary::-webkit-details-marker { display: none; }
.bg-content .faq summary::before { content: "+ "; color: var(--accent); font-weight: 700; }
.bg-content .faq details[open] summary::before { content: "\2212 "; }
.bg-content .faq details[open] summary { border-bottom: 1px solid var(--rule); }
.bg-content .faq .faq-body { padding: 12px 15px 14px; font-size: .92rem; color: var(--ink-soft); }
.bg-content .faq .faq-body p:first-child { margin-top: 0; }
.bg-content .faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- Project rows ------------------------------------------------ */
.bg-content .project {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand);
  border-radius: 5px;
  background: var(--bg);
  padding: 12px 15px;
  margin-bottom: 10px;
}
.bg-content .project h4 { margin: 0 0 4px; font-size: .98rem; color: var(--brand-dark); }
.bg-content .project .labs {
  font-size: .8rem;
  color: var(--ink-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.bg-content .project p { margin: 6px 0 0; font-size: .9rem; color: var(--ink-soft); }

/* ---------- Step / flowchart -------------------------------------------- */
.bg-content .steps { counter-reset: step; margin: 16px 0; padding: 0; list-style: none; }
.bg-content .steps li {
  counter-increment: step;
  position: relative;
  padding: 12px 14px 12px 56px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--bg);
  margin-bottom: 10px;
  font-size: .93rem;
  color: var(--ink-soft);
}
.bg-content .steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 11px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bg-content .steps li strong { color: var(--ink); }

/* ---------- Publications ------------------------------------------------ */
.bg-content .pub-list { list-style: none; margin: 12px 0; padding: 0; }
.bg-content .pub-list li {
  padding: 11px 0 11px 15px;
  border-left: 3px solid var(--brand-pale);
  border-bottom: 1px solid var(--rule);
  font-size: .9rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
.bg-content .pub-list li:hover { border-left-color: var(--accent); }
.bg-content .pub-list .authors { color: var(--ink); }
.bg-content .pub-list .jrnl { font-style: italic; }

/* ---------- Contact ------------------------------------------------------ */
.bg-content .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 16px 0; }

@media (max-width: 800px) {
  .bg-content .contact-grid { grid-template-columns: 1fr; }
}
.bg-content .contact-card {
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 16px 18px;
  background: var(--bg);
}
.bg-content .contact-card h4 { margin: 0 0 8px; color: var(--brand-dark); }
.bg-content .field { margin-bottom: 12px; }
.bg-content .field label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.bg-content .field input,
.bg-content .field textarea,
.bg-content .field select {
  width: 100%;
  font-family: var(--sans);
  font-size: .92rem;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
.bg-content .field textarea { min-height: 130px; resize: vertical; }

/* ---------- Utility ------------------------------------------------------ */
.bg-content .muted { color: var(--ink-faint); font-size: .88rem; }
.bg-content .center { text-align: center; }
.bg-content .mt0 { margin-top: 0; }
.bg-content .pending {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--gct-user);
  border: 1px solid #e6d193;
  color: #6b551a;
}

/* ---------- Third-level navigation flyouts ------------------------------ */
/* Groups inside a primary dropdown (Education > Teach and Learn Glycoscience). */
/* ---------- News item date + lead item ---------------------------------- */
.bg-content .news-item.lead { grid-template-columns: 300px 1fr; }
.bg-content .news-item.lead img { height: 190px; }
.bg-content .news-item.lead h4 { font-size: 1.18rem; }

@media (max-width: 640px) {
  .bg-content .news-item.lead { grid-template-columns: 1fr; }
}
.bg-content .meta-line {
  margin: -6px 0 14px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  color: var(--ink-faint);
}

/* ---------- Home page: recent publications ------------------------------ */
.bg-content .pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin: 16px 0 6px;
}
.bg-content .pub-card {
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bg-content .pub-card > img {
  width: 100%;
  height: 172px;
  object-fit: contain;
  object-position: center;
  background: #fff;
  border-bottom: 1px solid var(--rule);
  padding: 8px;
  display: block;
}
.bg-content .pub-card-body { padding: 13px 16px 15px; }
.bg-content .pub-card h4 {
  margin: 3px 0 5px;
  font-size: 1.03rem;
  color: var(--brand-dark);
  line-height: 1.35;
}
.bg-content .pub-card p { margin: 0 0 8px; font-size: .89rem; color: var(--ink-soft); line-height: 1.6; }
.bg-content .pub-card p:last-child { margin-bottom: 0; }
.bg-content .pub-meta {
  font-size: .76rem !important;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
  color: var(--ink-faint) !important;
}
.bg-content .pub-meta .jrnl { font-style: italic; text-transform: none; letter-spacing: 0; }
.bg-content .pub-card .pub-title {
  font-size: .84rem !important;
  color: var(--ink) !important;
  font-weight: 600;
  line-height: 1.45;
}
.bg-content .pub-card .pub-links { font-size: .84rem !important; font-weight: 600; }
.bg-content .pub-card .pub-links .sep { color: var(--ink-faint); margin: 0 4px; }

/* Project cards inside a .card-grid on the home page. */
.bg-content .card-grid > .project { margin-bottom: 0; }
.bg-content .card-grid > .project h4 a { color: var(--brand-dark); }

/* ---------- Portrait imagery -------------------------------------------- */
/* Head-and-shoulders photographs cropped into the 300x190 news thumbnail lose
   the face to a centre crop; bias the crop upwards. */
.bg-content .news-item img.portrait,
.bg-content .news-item.lead img.portrait { object-position: center 8%; }
.bg-content .figure-plate.portrait img { max-width: 340px; }

/* ---------- External review board --------------------------------------- */
.bg-content .reviewer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 14px;
  margin: 16px 0 8px;
}
.bg-content .reviewer {
  border: 1px solid var(--rule);
  border-left: 4px solid var(--brand-light);
  border-radius: 5px;
  background: var(--bg);
  padding: 12px 15px 13px;
}
.bg-content .reviewer h4 { margin: 0 0 3px; font-size: .98rem; color: var(--brand-dark); }
.bg-content .reviewer .affil { margin: 0; font-size: .86rem; color: var(--ink-soft); }
.bg-content .reviewer .area {
  margin: 6px 0 0;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  color: var(--ink-faint);
}

/* ---------- Compound structures in catalogue tables --------------------- */
.bg-content img.structure {
  width: 108px;
  height: 108px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  display: block;
}
.bg-content #compounds td { vertical-align: top; }

/* ---------- Icon links: social, ORCID, Scholar, lab sites --------------- */
.bg-content .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin: 0 5px 0 0;
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--brand);
  background: var(--bg);
  transition: color .12s, border-color .12s, background .12s;
}
.bg-content .icon-link svg { width: 17px; height: 17px; display: block; }
.bg-content .icon-link:hover,
.bg-content .icon-link:focus-visible {
  color: var(--brand-dark);
  border-color: var(--brand-light);
  background: var(--brand-pale);
}

/* These are icons, not text links: suppress the external-link arrow. */
.bg-content .icon-link[target="_blank"]::after { content: none; }
.bg-content .profile-links { margin: 8px 0 10px; line-height: 1; }

/* ---------- Compound tables --------------------------------------------- */
.bg-content #xylose td,
.bg-content #murnac td { vertical-align: top; }
.bg-content #xylose .btn-secondary,
.bg-content #murnac .btn-secondary { white-space: nowrap; }

/* ---------- Committee tables -------------------------------------------- */
.bg-content #irc td { vertical-align: top; }
.bg-content #irc tr.current td {
  background: var(--brand-pale);
  font-weight: 600;
  color: var(--brand-dark);
}
.bg-content .reviewer .affil a { font-weight: 600; }


/* ==========================================================================
   OPTIONAL — typography and link colour inside content
   --------------------------------------------------------------------------
   The static rebuild set these on `html`/`body` and on the bare `a` element,
   which in WordPress belongs to the theme. They are re-applied here, scoped to
   `.bg-content`, because this site is deliberately kept visually consistent
   with its sibling resources GT-CORE (`/glycosyltransferases/`) and GE-REX
   (`/glycoenzymes/`), which use this same design system. Body typography and
   the brand link colour are a visible part of that consistency: without these
   rules 632 links across 88 pages fall back to the theme's link colour.

   Because both blocks are scoped to `.bg-content`, they affect the imported
   page content ONLY -- never the header, navigation, footer or sidebars, which
   remain entirely the theme's. To hand typography and link colour back to the
   theme, comment either block out again; nothing else depends on them.
   ========================================================================== */

.bg-content {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
}

.bg-content a { color: var(--brand); text-decoration: none; }
.bg-content a:hover { text-decoration: underline; }
