/* Deliberately plain CSS in static/: no SCSS, so a non-extended Hugo binary
   builds the site too. */
:root {
  --fg: #1a1a1a; --muted: #5b6470; --bg: #ffffff; --accent: #10456b;
  --rule: #d8dde3; --band: #f4f6f8;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--fg); background: var(--bg);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrapper { max-width: 54rem; margin: 0 auto; padding: 0 1.25rem; }
a { color: var(--accent); }
h1 { font-size: 1.65rem; line-height: 1.25; margin: 1.5rem 0 .5rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; padding-bottom: .25rem; border-bottom: 1px solid var(--rule); }
.muted { color: var(--muted); font-size: .9rem; }

.site-header { border-bottom: 1px solid var(--rule); background: var(--band); }
.site-header .wrapper { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; padding-top: .9rem; padding-bottom: .9rem; }
.site-title { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.home-icon { flex: none; color: var(--accent); }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 1rem; }

/* Below this width the seven-item nav no longer fits comfortably next to the
   site title, so it collapses into a <details> menu instead. Both markups
   are always in the DOM (see header.html); only display toggles here, the
   same no-JS pattern used for .trial-toc-fixed/.trial-toc-mobile. */
.site-nav-toggle { display: none; margin-left: auto; }
@media (max-width: 48rem) {
  .site-nav { display: none; }
  .site-nav-toggle { display: block; }
}
.site-nav-toggle summary {
  cursor: pointer; list-style: none; font-weight: 600; padding: .3rem .6rem;
  border: 1px solid var(--rule); border-radius: 4px;
}
.site-nav-toggle summary::-webkit-details-marker { display: none; }
.site-nav-collapsed { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }

main { padding-bottom: 3rem; }
.authors { margin: .25rem 0; font-size: 1.02rem; }
.trial-meta { display: grid; grid-template-columns: 12rem 1fr; gap: .3rem 1rem; margin: 1rem 0; }
.trial-meta dt { color: var(--muted); font-size: .88rem; }
.trial-meta dd { margin: 0; overflow-wrap: anywhere; }

table.trials { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .93rem; }
table.trials th, table.trials td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.trials thead th { background: var(--band); }
/* Wide tables scroll inside the page rather than pushing the body sideways. */
main { overflow-x: auto; }

.citation-list { padding-left: 1.2rem; }
.citation-list li { margin-bottom: .6rem; }
.taglist { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.taglist li a {
  display: inline-block; padding: .15rem .55rem; background: var(--band);
  border: 1px solid var(--rule); border-radius: 999px; font-size: .85rem; text-decoration: none;
}
details.how-to-cite {
  background: var(--band); border-left: 3px solid var(--accent);
  padding: .1rem 1rem 1rem; margin: 1rem 0 1.5rem; border-radius: 0 4px 4px 0;
}
details.how-to-cite summary { cursor: pointer; list-style: none; }
details.how-to-cite summary::-webkit-details-marker { display: none; }
details.how-to-cite summary::before { content: "\25B8  "; color: var(--muted); }
details.how-to-cite[open] summary::before { content: "\25BE  "; }
details.how-to-cite summary h2 { display: inline; margin: 0; border-bottom: none; padding-bottom: 0; }
details.how-to-cite p { margin: .6rem 0 0; }
.citation-downloads { font-size: .9rem; }
.citation-downloads a { font-weight: 600; }
.pager { display: flex; gap: 1rem; align-items: baseline; margin: 1.5rem 0; }
.site-footer { border-top: 1px solid var(--rule); background: var(--band); padding: 1.25rem 0; font-size: .9rem; }

@media (max-width: 40rem) { .trial-meta { grid-template-columns: 1fr; } .trial-meta dd { margin-bottom: .4rem; } }

/* Search box is revealed by static/js/search.js; [hidden] keeps it out of the
   no-JS rendering entirely. */
.trial-search-form { margin: 1.25rem 0; }
.trial-search-form label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: .25rem; }
.trial-search-form input[type="search"] {
  width: 100%; padding: .5rem .65rem; font-size: 1rem;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--bg); color: var(--fg);
}
.trial-search-status { margin: .4rem 0 0; min-height: 1.2em; }
[hidden] { display: none !important; }

.pager { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; margin: 1.5rem 0; }
.pager a, .pager-current { padding: .15rem .5rem; border: 1px solid var(--rule); border-radius: 3px; text-decoration: none; }
.pager-current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager .muted { border: 0; margin-left: auto; }

.license { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .9rem; }
.license img { display: block; }

/* "On this page" navigation for a trial: a fixed sidebar on wide viewports
   (outside the centered .wrapper), a collapsed <details> under the title
   everywhere else. Both markups always exist in the DOM; only display
   toggles, so this needs no JavaScript. */
.trial-toc-fixed { display: none; }
.trial-toc-mobile {
  margin: 1rem 0; border: 1px solid var(--rule); border-radius: 4px;
  padding: .5rem .75rem; font-size: .92rem;
}
.trial-toc-mobile summary { cursor: pointer; font-weight: 600; }
.trial-toc-mobile ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.trial-toc-mobile li { margin-bottom: .3rem; }

/* Wrapper is 54rem/2=27rem from center; sidebar (13rem) plus a 1.5rem gap on
   each side needs at least 27+1.5+13=41.5rem of half-viewport, so the fixed
   sidebar only has room from 84rem (~1344px) up. */
@media (min-width: 84rem) {
  .trial-toc-mobile { display: none; }
  .trial-toc-fixed {
    display: block; position: fixed; top: 6rem;
    left: max(1rem, calc(50% - 41.5rem)); width: 13rem;
    max-height: calc(100vh - 8rem); overflow-y: auto; font-size: .88rem;
  }
  .trial-toc-heading {
    font-weight: 600; color: var(--muted); margin: 0 0 .5rem;
    text-transform: uppercase; font-size: .72rem; letter-spacing: .04em;
  }
  .trial-toc-fixed ul { list-style: none; padding: 0; margin: 0; }
  .trial-toc-fixed li { margin-bottom: .4rem; }
  .trial-toc-fixed a { color: var(--fg); text-decoration: none; }
  .trial-toc-fixed a:hover { color: var(--accent); text-decoration: underline; }
}
