/* Colours from bostoncyber.org: navy and blue panels, gold headings. Light and dark follow the system. */
@font-face {
  font-family: "Raleway";
  src: url("/static/fonts/raleway.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --bci-navy: #00305b; --bci-blue: #0f4c85; --bci-sky: #377dbd; --bci-gold: #ccc20a;
  --bci-ink: #0c0f1d; --bci-slate: #494b56; --bci-grey: #c2c3c7;
  --body-font: "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --heading-font: Raleway, var(--body-font);
  --mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f1f2f4; --card: #ffffff; --text: var(--bci-ink); --muted: var(--bci-slate);
  --heading: var(--bci-navy); --accent: var(--bci-blue); --accent-hover: var(--bci-navy);
  --button: var(--bci-navy); --button-hover: var(--bci-blue); --button-text: #ffffff;
  --border: #d5d6da; --card-edge: var(--bci-navy); --rule: var(--bci-grey);
  --fill: var(--bci-sky); --focus: var(--bci-sky); --warn: #b3261e;
  --mark: #fff0a3; --mark-text: var(--bci-ink);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0f1d; --card: #121a2d; --text: #e6e8ee; --muted: #a9abb3;
    --heading: var(--bci-gold); --accent: #83b7e6; --accent-hover: var(--bci-gold);
    --button: #83b7e6; --button-hover: #b8d7f3; --button-text: var(--bci-ink);
    --border: #263049; --card-edge: var(--bci-sky); --rule: #3e414b;
    --fill: #83b7e6; --focus: var(--bci-gold); --warn: #f28b82;
    --mark: #6b6300; --mark-text: #ffffff;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--body-font); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
                   white-space: nowrap; }

header { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
         padding: 0.6rem 1.25rem; background: var(--bci-navy); color: #ffffff;
         border-bottom: 4px solid var(--rule); }
header a.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: #ffffff;
                 text-decoration: none; font: 600 1.2rem/1 var(--heading-font); white-space: nowrap; }
header a.brand:hover { color: var(--bci-gold); }
header .who { text-align: right; }
header .who .muted { margin-right: 0.5rem; }
header span.muted { color: var(--bci-grey); }
header button.quiet { color: #ffffff; border-color: rgb(255 255 255 / 0.45); }
header button.quiet:hover { color: var(--bci-gold); border-color: var(--bci-gold); }
header :focus-visible, .hero :focus-visible { outline-color: var(--bci-gold); }

.seal { display: block; border-radius: 50%; background: #ffffff; }
header .seal { width: 2.25rem; height: 2.25rem; padding: 2px; }
.hero { background: linear-gradient(120deg, var(--bci-blue), var(--bci-navy) 70%); color: #ffffff; }
.hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.25rem;
              max-width: 52rem; margin: 0 auto; padding: 2.5rem 1rem; }
.hero-inner > div { flex: 1 1 18rem; }
.hero .seal { flex: none; width: 10rem; height: 10rem; padding: 5px; box-shadow: 0 6px 24px rgb(0 0 0 / 0.35); }
.hero h1 { color: var(--bci-gold); font-size: 2.3rem; margin-bottom: 0.5rem; }
.hero p { color: #dfe6ef; margin: 0 0 1.25rem; }
.hero p:last-child { margin-bottom: 0; }
.hero .button { background: var(--bci-gold); color: var(--bci-navy); }
.hero .button:hover { background: #e2d728; }
@media (max-width: 36rem) {
  .hero .seal { width: 7rem; height: 7rem; padding: 4px; }
  .hero h1 { font-size: 1.85rem; }
}

main { max-width: 76rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1, h2, h3 { font-family: var(--heading-font); color: var(--heading); line-height: 1.25; }
h1 { font-size: 1.6rem; font-weight: 500; margin: 0 0 0.35rem; overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; font-weight: 600; margin: 0 0 0.9rem; }
.muted { color: var(--muted); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
code { font-family: var(--mono-font); font-size: 0.88em; overflow-wrap: anywhere; }
mark { background: var(--mark); color: var(--mark-text); border-radius: 2px; padding: 0 1px; }

.button, button { display: inline-block; border: 1px solid transparent; border-radius: 3px; cursor: pointer;
                  padding: 0.5rem 1.1rem; background: var(--button); color: var(--button-text);
                  font: inherit; font-weight: 600; text-decoration: none; }
.button:hover, button:hover { background: var(--button-hover); color: var(--button-text); }
button.quiet, .button.quiet { background: transparent; color: var(--muted); border-color: var(--border);
                              font-weight: 400; }
button.quiet:hover, .button.quiet:hover { background: transparent; color: var(--text); border-color: var(--muted); }
button.small { padding: 0.1rem 0.6rem; font-size: 0.85rem; }
input { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--border);
        border-radius: 3px; padding: 0.5rem 0.75rem; min-width: 0; }
form.inline { display: inline; margin: 0; }

.card { background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--card-edge);
        border-radius: 4px; padding: 0.85rem 1.1rem; margin-bottom: 0.75rem; }
.card h3 { margin: 0 0 0.25rem; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.card p { margin: 0.35rem 0 0; }
.card a.stretch { text-decoration: none; color: inherit; display: block; }
.card:has(a.stretch:hover) { border-color: var(--fill); border-top-color: var(--card-edge); }
.badge { display: inline-block; padding: 0 0.5rem; border: 1px solid var(--warn); border-radius: 999px;
         font-size: 0.75rem; font-weight: 600; color: var(--warn); }
.notice { margin: 0.75rem 0; padding: 0.5rem 0.85rem; border-left: 3px solid var(--bci-gold); background: var(--card); }
.notice.warn { border-left-color: var(--warn); }

/* The search page: results, and saved searches beside them. */
.columns { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 2rem; align-items: start; }
@media (max-width: 56rem) { .columns { grid-template-columns: minmax(0, 1fr); } }
form.search { display: flex; gap: 0.5rem; }
form.search input { flex: 1; font-size: 1.1rem; }
details.tips { margin: 0.5rem 0 1rem; font-size: 0.9rem; }
details.tips summary { cursor: pointer; color: var(--accent); width: max-content; }
details.tips table { border-collapse: collapse; margin: 0.5rem 0; }
details.tips td { padding: 0.2rem 1rem 0.2rem 0; vertical-align: top; }
details.tips p { margin: 0; }
.summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
           gap: 0 1rem; margin: 1.25rem 0 0.75rem; }
form.save { display: flex; gap: 0.5rem; margin: 0 0 1rem; }
form.save input[type="text"] { flex: 0 1 20rem; }
.result .meta { margin: 0; overflow-wrap: anywhere; }
.excerpt { font-size: 0.93rem; overflow-wrap: anywhere; }
.role { color: var(--muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
        letter-spacing: 0.03em; margin-right: 0.25rem; }
.pages { display: flex; gap: 0.5rem; margin-top: 1rem; }
.saved .card.running { border-color: var(--fill); border-top-color: var(--bci-gold); }
.saved-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
              margin-top: 0.5rem; font-size: 0.8rem; }

/* One chat. */
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.2rem 1rem; align-items: baseline;
           margin: 0.75rem 0 1.25rem; font-size: 0.93rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.message { background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--rule);
           border-radius: 4px; padding: 0.75rem 1.1rem; margin-bottom: 0.75rem; }
.message.user { border-left-color: var(--bci-gold); }
.message.assistant { border-left-color: var(--fill); }
.message h2 { margin: 0 0 0.35rem; font: 600 0.75rem/1.4 var(--body-font); color: var(--muted);
              text-transform: uppercase; letter-spacing: 0.03em; }
.message .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.message.reasoning .text, .message.system .text, .message.tool .text { color: var(--muted); }
