/* openOMSI website - Material Design 2 */
:root {
  --primary: #f47f30;
  --primary-dark: #d9661a;
  --on-primary: #fff;
  --surface: #ffffff;
  --background: #f5f5f6;
  --on-surface: rgba(0, 0, 0, .87);
  --on-surface-solid: #000;
  --secondary-text: rgba(0, 0, 0, .6);
  --divider: rgba(0, 0, 0, .12);
  --code-bg: #f1f2f4;
  --warning-bg: #fff4e5;
  --warning-fg: #8a4b0f;
  --hover: rgba(0, 0, 0, .05);
  --selected: rgba(244, 127, 48, .12);
  /* text in the brand colour: #d9661a is only 3.2:1 on white, this one 4.9:1 */
  --link: #b8530f;
  --accent-text: #b8530f;
  --appbar: #ffffff;
  --appbar-fg: rgba(0, 0, 0, .87);
  --appbar-border: rgba(0, 0, 0, .12);
  --hero-bg: linear-gradient(160deg, #ffffff 0%, #eceef1 100%);
  --hero-fg: rgba(0, 0, 0, .87);
  --hero-sub: rgba(0, 0, 0, .7);
  --chip-bg: rgba(0, 0, 0, .06);
  --outline: rgba(0, 0, 0, .3);
  /* GitHub label colours are mixed towards this for their text, so a pale label
     (enhancement, question) stays readable on white and a dark one on black */
  --label-ink: #000;
  --st-closed: #8250df;
  --logo-on-dark: none;
  --logo-on-light: block;
  --drawer-w: 264px;
  color-scheme: light;
}
/* dark: by the system setting unless the visitor picked light, or picked dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #24272c;
    --background: #181a1e;
    --on-surface: rgba(255, 255, 255, .87);
    --on-surface-solid: #fff;
    --secondary-text: rgba(255, 255, 255, .64);
    --divider: rgba(255, 255, 255, .12);
    --code-bg: #2d3138;
    --warning-bg: #3a2a18;
    --warning-fg: #ffc48f;
    --hover: rgba(255, 255, 255, .06);
    --selected: rgba(244, 127, 48, .16);
    --link: #f8924d;
    --accent-text: #f8924d;
    --appbar: #1f2227;
    --appbar-fg: #fff;
    --appbar-border: transparent;
    --hero-bg: linear-gradient(160deg, #2d3138 0%, #14161a 100%);
    --hero-fg: #fff;
    --hero-sub: rgba(255, 255, 255, .85);
    --chip-bg: rgba(255, 255, 255, .12);
    --outline: rgba(255, 255, 255, .5);
    --label-ink: #fff;
    --st-closed: #a371f7;
    --logo-on-dark: block;
    --logo-on-light: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface: #24272c;
  --background: #181a1e;
  --on-surface: rgba(255, 255, 255, .87);
  --on-surface-solid: #fff;
  --secondary-text: rgba(255, 255, 255, .64);
  --divider: rgba(255, 255, 255, .12);
  --code-bg: #2d3138;
  --warning-bg: #3a2a18;
  --warning-fg: #ffc48f;
  --hover: rgba(255, 255, 255, .06);
  --selected: rgba(244, 127, 48, .16);
  --link: #f8924d;
  --accent-text: #f8924d;
  --appbar: #1f2227;
  --appbar-fg: #fff;
  --appbar-border: transparent;
  --hero-bg: linear-gradient(160deg, #2d3138 0%, #14161a 100%);
  --hero-fg: #fff;
  --hero-sub: rgba(255, 255, 255, .85);
  --chip-bg: rgba(255, 255, 255, .12);
  --outline: rgba(255, 255, 255, .5);
  --label-ink: #fff;
  --st-closed: #a371f7;
  --logo-on-dark: block;
  --logo-on-light: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 400 16px/1.6 Roboto, system-ui, sans-serif;
  color: var(--on-surface);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: "Roboto Mono", ui-monospace, monospace; font-size: .88em; }
code { background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 4px; overflow-x: auto; line-height: 1.45; max-width: 100%; }
pre code { background: none; padding: 0; overflow-wrap: normal; }
img, video { max-width: 100%; height: auto; }
.logo-on-dark { display: var(--logo-on-dark) !important; }
.logo-on-light { display: var(--logo-on-light) !important; }
.material-icons { font-size: 24px; line-height: 1; vertical-align: middle; }
.elevation-1 { box-shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12); }
.elevation-2 { box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); }
.elevation-4 { box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12); }

/* top app bar */
.appbar {
  position: fixed; inset: 0 0 auto 0; height: 64px; z-index: 20;
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--appbar); color: var(--appbar-fg); border-bottom: 1px solid var(--appbar-border);
}
.brand img { height: 30px; display: block; margin-left: 4px; }
.spacer { flex: 1; }
.icon-btn {
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: none; color: inherit;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: var(--hover); text-decoration: none; }
.icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* navigation drawer */
.drawer {
  position: fixed; top: 64px; bottom: 0; left: 0; width: var(--drawer-w); z-index: 15;
  background: var(--surface); border-right: 1px solid var(--divider);
  overflow-y: auto; padding: 8px 0; transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.drawer-subheader { padding: 16px 24px 6px; font-size: 14px; font-weight: 500; color: var(--secondary-text); }
.drawer-section { padding: 0 8px; }
.drawer-section + .drawer-subheader { border-top: 1px solid var(--divider); margin-top: 8px; }
.drawer a {
  display: flex; align-items: center; gap: 28px; height: 44px; padding: 0 12px; margin: 2px 0;
  border-radius: 4px; color: var(--on-surface); font-size: 14px; font-weight: 500;
}
.drawer a .material-icons { color: var(--secondary-text); }
.drawer a:hover { background: var(--hover); text-decoration: none; }
.drawer a.active { background: var(--selected); color: var(--accent-text); }
.drawer a.active .material-icons { color: var(--primary); }
.scrim { display: none; }
#menu-btn { display: none; }

main { margin-left: var(--drawer-w); padding-top: 64px; min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
#view { flex: 1; min-width: 0; }
.content { max-width: 960px; margin: 0 auto; padding: 32px 24px 48px; }
.footer { padding: 24px; text-align: center; font-size: 13px; color: var(--secondary-text); border-top: 1px solid var(--divider); }

/* hero */
.hero {
  background: var(--hero-bg); color: var(--hero-fg); border-bottom: 1px solid var(--appbar-border);
  padding: 64px 24px 56px; text-align: center;
}
.hero-logo { width: min(460px, 86%); margin: 0 auto; }
.hero-text { font-size: 20px; font-weight: 300; max-width: 640px; margin: 16px auto 28px; color: var(--hero-sub); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; padding: 4px 12px 4px 8px;
  border-radius: 16px; background: var(--chip-bg); font-size: 14px;
}
.chip-warn { margin-right: 8px; background: rgba(244,127,48,.22); }
.chip .material-icons { font-size: 18px; color: var(--primary); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px;
  border-radius: 4px; font-size: 14px; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
  cursor: pointer; transition: box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; }
.btn .material-icons { font-size: 18px; }
.btn-contained { background: var(--primary); color: var(--on-primary) !important; box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12); }
.btn-contained:hover { background: var(--primary-dark); box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12); }
.btn-outlined { border: 1px solid var(--outline); color: var(--on-surface) !important; }
.btn-outlined:hover { background: var(--hover); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* cards */
.card { background: var(--surface); border-radius: 4px; padding: 20px 24px; }
.card h3 { margin: 8px 0 4px; font-size: 18px; font-weight: 500; }
.card p { margin: 0; color: var(--secondary-text); font-size: 15px; }
.card-icon { color: var(--primary); font-size: 32px; }
.card-warning { display: flex; gap: 16px; align-items: flex-start; background: var(--warning-bg); border-left: 4px solid var(--primary); margin-bottom: 32px; }
.card-warning h3 { margin-top: 2px; color: var(--warning-fg); }
.card-warning p { color: var(--on-surface); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 24px 0; }
.dl-card { display: flex; flex-direction: column; gap: 6px; }
.dl-card .btn { margin-top: auto; align-self: flex-start; }
.dl-card p:last-of-type { margin-bottom: 12px; }
.section-title { font-size: 24px; font-weight: 400; margin: 40px 0 12px; }
.lead { font-size: 17px; }
.steps li { margin: 6px 0; }

/* documentation (rendered Markdown) */
.doc { background: var(--surface); border-radius: 4px; padding: 8px 40px 40px; overflow-wrap: break-word; }
/* a long path or identifier in running text breaks instead of widening the whole page */
.doc :not(pre) > code { overflow-wrap: anywhere; }
h1 { line-height: 1.25; }
.doc h1 { font-size: 34px; font-weight: 400; margin: 28px 0 16px; }
.doc h2 { font-size: 24px; font-weight: 400; line-height: 1.3; margin: 40px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--divider); }
.doc h3 { font-size: 19px; font-weight: 500; line-height: 1.35; margin: 28px 0 8px; }
.doc h2 a.anchor, .doc h3 a.anchor { opacity: 0; margin-left: 8px; font-size: .8em; }
.doc h2:hover a.anchor, .doc h3:hover a.anchor { opacity: .6; }
.doc table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; display: block; overflow-x: auto; }
.doc th, .doc td { border-bottom: 1px solid var(--divider); padding: 8px 12px; text-align: left; vertical-align: top; }
.doc th { font-weight: 500; color: var(--secondary-text); }
.doc blockquote { margin: 16px 0; padding: 12px 16px; background: var(--warning-bg); border-left: 4px solid var(--primary); border-radius: 4px; }
.doc blockquote p { margin: 0; }
.doc img { max-width: 100%; height: auto; }
.doc-toolbar { display: flex; justify-content: flex-end; padding-top: 16px; font-size: 14px; }
.loading { padding: 48px; text-align: center; color: var(--secondary-text); }

/* narrow screens: modal drawer */
@media (max-width: 960px) {
  #menu-btn { display: inline-flex; }
  .drawer { transform: translateX(-100%); z-index: 30; top: 0; padding-top: 16px; }
  .drawer.open { transform: none; box-shadow: 0 8px 10px -5px rgba(0,0,0,.2), 0 16px 24px 2px rgba(0,0,0,.14); }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.32); z-index: 25; }
  main { margin-left: 0; }
  .doc { padding: 4px 16px 24px; }
  .doc h1 { font-size: 28px; }
  .doc h2 { font-size: 21px; }
  .content { padding: 24px 16px 40px; }
}
@media (max-width: 600px) {
  .hero { padding: 48px 16px 40px; }
  .hero-text { font-size: 18px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: min(100%, 280px); justify-content: center; }
  .card-warning { flex-direction: column; gap: 4px; padding: 16px; }
  .grid { grid-template-columns: 1fr; }
  /* room for the Donate pill, which floats over the end of the page */
  .footer { padding-bottom: 80px; }
  .release summary .spacer { display: none; }
}

/* releases and issues */
.muted { color: var(--secondary-text); font-size: .875rem; }
.label { display: inline-block; font-size: .75rem; font-weight: 500; padding: 1px 8px; border-radius: 999px; margin: 0 4px 0 0;
  border: 1px solid color-mix(in srgb, var(--lc) 70%, var(--label-ink)); color: color-mix(in srgb, var(--lc) 45%, var(--label-ink));
  background: color-mix(in srgb, var(--lc) 16%, transparent); vertical-align: 1px; white-space: nowrap; }
.release { padding: 0; margin: 0 0 12px; display: block; overflow: hidden; }
.release summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; cursor: pointer; list-style: none; }
.release summary::-webkit-details-marker { display: none; }
.release summary .spacer { flex: 1; }
.rel-tag { font-weight: 700; font-size: 1.1rem; }
.rel-name { color: var(--secondary-text); }
.rel-body { padding: 0 18px 4px; border-top: 1px solid var(--divider); }
.rel-body h2 { font-size: 1.15rem; } .rel-body h3 { font-size: 1rem; }
.assets { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--divider); }
.asset { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--divider); border-radius: 6px; font-size: .875rem; max-width: 100%; overflow-wrap: anywhere; }
.asset .material-icons { font-size: 18px; } .asset small { color: var(--secondary-text); }
.issue-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0 14px; }
.tabs { display: inline-flex; border: 1px solid var(--divider); border-radius: 6px; overflow: hidden; }
.tabs button { background: none; border: 0; padding: 8px 14px; color: var(--on-surface); font: inherit; cursor: pointer; }
.tabs button.on { background: var(--selected); color: var(--accent-text); font-weight: 500; }
.tabs button:not(.on):hover { background: var(--hover); }
#iq { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--divider); border-radius: 6px; background: var(--surface); color: var(--on-surface); font: inherit; }
.issue-list { padding: 0; display: block; }
.issue-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--divider); color: var(--on-surface); }
.issue-row:last-child { border-bottom: 0; } .issue-row:hover { background: var(--hover); }
.issue-main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.issue-main .muted { flex-basis: 100%; }
.issue-title { font-weight: 500; overflow-wrap: anywhere; }
.st-open { color: #2da44e; } .st-closed { color: var(--st-closed); }
.issue-new { margin: 0 0 16px; }
.issue-head { overflow-wrap: anywhere; }
.cm { display: inline-flex; align-items: center; gap: 3px; } .cm .material-icons { font-size: 16px; }
.comment { display: block; padding: 0; margin: 0 0 12px; overflow: hidden; }
.comment-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--divider); background: var(--hover); }
.comment-head img { width: 24px; height: 24px; border-radius: 50%; }
.comment .doc { padding: 4px 16px; overflow-wrap: anywhere; }
.comment .doc img { max-width: 100%; height: auto; }

/* Donate: a small pill in the corner, out of the way of the content; it opens a menu
   upwards with the ways to give (Buy Me a Coffee, Ko-fi) */
.donate { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.donate-fab { display: flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border: 0; border-radius: 999px;
  background: #ffdd00; color: #1b1b1b; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  opacity: .92; transition: opacity .15s, transform .15s; }
.donate-fab .material-icons { font-size: 18px; color: #d93025; }
.donate-fab:hover, .donate-fab[aria-expanded="true"] { opacity: 1; transform: translateY(-2px); }
.donate-fab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.donate-menu { display: flex; flex-direction: column; min-width: 200px; padding: 6px; border-radius: 12px;
  background: var(--surface); color: var(--on-surface); border: 1px solid var(--divider); transform-origin: bottom right; animation: donate-up .14s ease-out; }
.donate-menu[hidden] { display: none; }
.donate-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: inherit; text-decoration: none; font-weight: 500; }
.donate-menu a:hover, .donate-menu a:focus-visible { background: var(--hover); text-decoration: none; outline: none; }
.donate-icon { width: 22px; text-align: center; font-size: 18px; }
.donate-menu .material-icons.donate-icon { color: #29abe0; }
@keyframes donate-up { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  .donate { right: 14px; bottom: 14px; }
  .donate-fab { padding: 10px 14px 10px 12px; }
}
.dl-mine { outline: 2px solid var(--primary); }
.dl-mine { outline-offset: -2px; }
.dl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dl-badge { white-space: nowrap; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 10px; border-radius: 999px; background: var(--primary); color: #fff; }

/* "playing now": a green dot in front of the count */
.chip-live .material-icons { color: #2ea043; }
