/* ==========================================================================
   DSTS / DSBS Joint Meeting 2026 - scientific programme styles
   ========================================================================== */

:root {
  /* Light blue is the primary decorative accent (borders, tints, bullets).
     Each "-deep" variant is the readable counterpart used wherever the colour
     carries text - small labels, or white text on a coloured pill. */
  --dsts:        #6cb8e6;   /* DSTS accent - light blue */
  --dsts-deep:   #1d6f9f;
  --dsbs:        #12507b;   /* DSBS accent - navy */
  --dsbs-deep:   #12507b;

  /* Green sampled from the official DSTS logo (dsts.dk). */
  --dsts-green:  #226354;

  /* Novo Nordisk navy - sampled from nn_logo.svg (fill #001965). */
  --nn-navy:     #001965;

  --ink:         #1c2b36;
  --ink-soft:    #5a6b78;
  --rule:        #e3e8ec;
  --surface:     #ffffff;
  --surface-alt: #f6f8fa;

  /* Per-session accent colours; overridden per .session--* block below. */
  --accent:      var(--dsbs);
  --accent-deep: var(--dsbs-deep);
}

/* --------------------------------------------------------------------------
   Global
   -------------------------------------------------------------------------- */

body {
  color: var(--ink);
}

/* The programme is dense; give it a comfortable measure. */
main.content {
  max-width: 1000px;
}

/* Kill the default Quarto title block - we render our own banner. */
header#title-block-header {
  display: none;
}

/* --------------------------------------------------------------------------
   Banner (logos + title)
   -------------------------------------------------------------------------- */

.meeting-banner {
  margin: 0 0 2.25rem;
  padding: 2rem 1.5rem 2.25rem;
  border-top: 5px solid var(--nn-navy);
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(135deg, rgba(108, 184, 230, 0.16) 0%, rgba(34, 99, 84, 0.12) 100%);
  text-align: center;
}

.meeting-banner__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 6vw, 4rem);
  margin-bottom: 1.75rem;
}

.meeting-banner__logos img {
  height: 74px;
  width: auto;
  max-width: 40vw;
  object-fit: contain;
}

/* Logos have very different aspect ratios, so height is tuned per mark to make
   them read as the same visual weight rather than the same measured height. */
.meeting-banner__logos img.logo-dsts { height: 96px; }   /* tall: mark + wordmark */
.meeting-banner__logos img.logo-dsbs { height: 62px; }   /* wide: wordmark only   */
.meeting-banner__logos img.logo-nn   { height: 64px; }

/* Divider between the two organising societies and the host. */
.meeting-banner__logos .banner-rule {
  width: 1px;
  align-self: stretch;
  min-height: 62px;
  background: color-mix(in srgb, var(--ink-soft) 30%, transparent);
}

/* Host block: small caption stacked over the Novo Nordisk logo. */
.banner-host {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.banner-host__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.meeting-banner__logos .banner-amp {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  color: var(--ink-soft);
  line-height: 1;
  user-select: none;
}

.meeting-banner__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.meeting-banner h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  border: 0;
}

.meeting-banner__tagline {
  margin: 0 auto;
  max-width: 46rem;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Key facts strip
   -------------------------------------------------------------------------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 0 0 3rem;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 1rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface-alt);
}

.facts .facts__label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.facts .facts__value {
  display: block;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Day heading
   -------------------------------------------------------------------------- */

/* Quarto wraps each `##` in a <section>; use that for day spacing. */
section.level2 {
  margin-bottom: 3.5rem;
}

/* Headings we keep for the TOC / deep links but render visually elsewhere:
   - `## Day N`      -> shown by .day__head
   - `### Session N` -> shown by .session__title inside the card */
section#day-1 > h2,
section#day-2 > h2,
section.level3 > h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Breathing room when jumping to a section from the TOC. */
section.level2,
section.level3 {
  scroll-margin-top: 5rem;
}

.day__head {
  margin-bottom: 1.5rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--ink);
}

/* Pandoc wraps the three spans in one <p>; that <p> is the flex row. */
.day__head > p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin: 0;
}

.day__no {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dsts-deep);
}

.day__date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dsts-deep);
}

/* .day__date { */
/*   font-size: 1.5rem; */
/*   font-weight: 700; */
/*   line-height: 1.2; */
/* } */

.day__note {
  margin-left: auto;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Programme rows
   -------------------------------------------------------------------------- */

.slot {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

/* Pandoc wraps each line of a div in a <p>; strip its margins so the grid
   controls the spacing. */
.slot > p,
.slot__body > p {
  margin: 0;
}

.slot__time {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  white-space: nowrap;
  padding-top: 0.1rem;
}

/* Title and meta live in the same <p>; force them onto separate lines. */
.slot__title {
  display: block;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.35;
}

.slot__meta {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* Breaks / logistics rows are visually quieter. */
.slot--break .slot__title {
  font-weight: 500;
  color: var(--ink-soft);
}

.slot--break .slot__title::before {
  content: "•";
  margin-right: 0.55rem;
  color: var(--dsts);
}

/* Highlighted rows (keynote, dinner, ...) */
.slot--feature {
  background: linear-gradient(90deg, rgba(108, 184, 230, 0.18), transparent 60%);
  border-radius: 6px;
  padding-left: 0.75rem;
  margin-left: -0.75rem;
}

/* --------------------------------------------------------------------------
   Collapsible abstracts (<details class="abstract">, closed by default)
   -------------------------------------------------------------------------- */

.abstract {
  margin-top: 0.5rem;
}

.abstract > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.15rem 0.55rem 0.15rem 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  list-style: none;              /* hide the default triangle (standards)  */
  transition: background 0.12s ease, border-color 0.12s ease;
}

/* Hide the default triangle in WebKit/Blink too. */
.abstract > summary::-webkit-details-marker {
  display: none;
}

/* Custom chevron that rotates when the disclosure opens. */
.abstract > summary::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translate(-1px, -1px);
  transition: transform 0.15s ease;
}

.abstract[open] > summary::before {
  transform: rotate(45deg) translate(-1px, -1px);
}

.abstract > summary:hover,
.abstract > summary:focus-visible {
  background: color-mix(in srgb, var(--accent) 14%, white);
  border-color: var(--accent);
}

.abstract > summary:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

/* Body of the abstract */
.abstract[open] > summary {
  margin-bottom: 0.6rem;
}

.abstract > :not(summary) {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--ink);
}

.abstract > p,
.abstract > ul,
.abstract > ol {
  margin: 0 0 0.6rem;
  padding-left: 0.9rem;
  border-left: 2px solid color-mix(in srgb, var(--accent) 45%, white);
}

.abstract > ul,
.abstract > ol {
  padding-left: 2rem;
}

.abstract > :last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Session block
   -------------------------------------------------------------------------- */

.session {
  margin: 2rem 0;
  border: 1px solid var(--rule);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.session--observational {
  --accent: #6cb8e6;
  --accent-deep: #1d6f9f;
  --tag-bg: #6cb8e6;          /* light blue pill ... */
  --tag-fg: #0d3f5c;          /* ... with dark text for contrast */
  --head-tint: 18%;           /* light blue needs a touch more wash */
}

.session--randomised { --accent: #12507b; --accent-deep: #12507b; }
.session--ai         { --accent: #6a3d9a; --accent-deep: #6a3d9a; }
.session--tte        { --accent: #1b7a5a; --accent-deep: #1b7a5a; }
.session--pharma     { --accent: #b8631b; --accent-deep: #9c5216; }

.session__head {
  padding: 1.1rem 1.35rem;
  background: linear-gradient(90deg,
              color-mix(in srgb, var(--accent) var(--head-tint, 9%), white),
              var(--surface) 75%);
  border-bottom: 1px solid var(--rule);
}

.session__head > p {
  margin: 0;
}

.session__tag {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: var(--tag-bg, var(--accent-deep));
  color: var(--tag-fg, #fff);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.session__title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  border: 0;
}

.session__chair {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.session__chair > p {
  margin: 0;
}

.session__chair strong {
  color: var(--ink);
  font-weight: 600;
}

.session__body {
  padding: 0.4rem 1.35rem 0.9rem;
}

/* Inside a session the last row shouldn't draw a rule. */
.session__body .slot:last-child {
  border-bottom: 0;
}

/* Talk speaker line */
.talk__speaker {
  font-weight: 600;
  color: var(--accent-deep);
}

.talk__affil {
  color: var(--ink-soft);
  font-weight: 400;
}

/* TBA / placeholder marker - makes unfinished content obvious. */
.tba {
  display: inline-block;
  padding: 0 0.35rem;
  border-radius: 3px;
  background: #fff4d6;
  border: 1px dashed #d9a441;
  color: #7a5510;
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.green {
  display: inline-block;
  padding: 0 0.35rem;
  border-radius: 3px;
  background: #cff4d6;
  border: 1px dashed #39a441;
  color: #2a5510;
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.red {
  display: inline-block;
  padding: 0 0.35rem;
  border-radius: 3px;
  background: #f0f0f;
  border: 1px dashed #99000;
  color: #ff0000;
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: 0.02em;
}


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

.organisers {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.organisers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

/* First paragraph of each column acts as the column heading. */
.organisers__col > p:first-child {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.organisers__col > p:first-child strong {
  font-weight: 700;
}

.organisers ul {
  margin: 0;
  padding-left: 1.1rem;
}

.organisers li {
  margin-bottom: 0.2rem;
}

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

@media (max-width: 620px) {
  .slot {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .slot__time {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
  }

  /* Wrap the host onto its own line and drop the vertical divider. */
  .meeting-banner__logos {
    flex-wrap: wrap;
    gap: 1.25rem 1.75rem;
  }

  .meeting-banner__logos img { height: 52px; }
  .meeting-banner__logos img.logo-dsts { height: 68px; }
  .meeting-banner__logos img.logo-dsbs { height: 46px; }
  .meeting-banner__logos img.logo-nn   { height: 46px; }
  .meeting-banner__logos .banner-amp { font-size: 1.4rem; }

  .meeting-banner__logos .banner-rule { display: none; }

  .banner-host {
    flex-basis: 100%;
    padding-top: 0.25rem;
  }

  .day__note { margin-left: 0; flex-basis: 100%; }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .meeting-banner {
    background: none;
    padding-top: 0;
  }

  .session,
  .day {
    break-inside: avoid;
  }

  .session__head { background: none; }

  .slot--feature { background: none; }

  /* Hide site chrome. */
  nav, .quarto-secondary-nav, #quarto-sidebar, .nav-footer, #TOC,
  #quarto-margin-sidebar {
    display: none !important;
  }
}
