/* FONTS
   Mapped from the reference manual's embedded faces:
     MyriadPro-Regular (body, headings, cover title) -> Source Sans 3 400
     MyriadPro-Bold (table labels, run-in heads, steps) -> Source Sans 3 700
   No semibold face sets visible text, so no 600 on the page.
   RolandOwnersManual-01rev2 is Roland's dingbat font (bullets, arrows);
   its glyphs are replaced by Unicode • ➡ */
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,400;0,700;1,400&display=swap");

/* PALETTE — sampled off the reference manual's pages */
:root {
  --ink: #231f20; /* body text, box titles, table rules */
  --green: #1c844d; /* chapter rule and bar, MEMO badge */
  --green-deep: #007139; /* sub-heading text, WARNING label */
  --green-tint: #a5c4af; /* table header row, row-header column */
  --dots: #8bb498; /* dotted rule under sub-headings and WARNING */
  --blue: #4f81bd; /* bold instruction text in numbered steps */
  --link: #0070c0; /* hyperlinks */
  --orange: #d36a41; /* step numbers */
}

/* RESETS */
* {
  box-sizing: border-box;
  margin-top: 0;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* GLOBAL STYLING */
body {
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  margin: 0;
}
p {
  line-height: 1.55;
}
main {
  margin-left: 20vw;
  padding-bottom: 3em;
}
img {
  width: 100%;
  margin-bottom: 0.75em;
}
a {
  text-decoration: none;
  color: var(--link);
}
a:hover,
a:active {
  text-decoration: underline;
}

/* The cover: BOSS logo and wordmark in black on white, the pedal beside them */
#masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5em 3em;
  padding: 2em 3em;
}
#masthead > img {
  order: -1;
  width: 10em;
  margin: 0;
}
#masthead .title {
  flex: 1 1 20em;
}
#masthead h1 {
  display: flex;
  flex-direction: column;
  gap: 1.25em;
  margin: 0;
}
#masthead h1 img {
  margin: 0;
}
#masthead h1 img:first-child {
  width: min(13em, 55%);
}
#masthead h1 img:last-child {
  width: min(30em, 100%);
  align-self: flex-end;
}
#masthead .title p {
  font-size: 1.9em;
  font-weight: 400;
  text-align: right;
  border-bottom: 3px solid var(--ink);
  margin: 0.5em 0 0;
}

/* HEADINGS
   Chapter: large black type with a heavy green bar to its left, over a green rule */
.flow h2 {
  font-weight: 400;
  font-size: 2.4em;
  line-height: 1.15;
  border-left: 6px solid var(--green);
  border-bottom: 4px solid var(--green);
  padding: 0 0 0.05em 0.3em;
  margin-bottom: 0.75em;
}
/* Section: regular green text over a row of square green dots */
.flow h3,
.warning-label {
  font-weight: 400;
  font-size: 1.45em;
  line-height: 1.2;
  color: var(--green-deep);
  padding-bottom: 0.25em;
  background: linear-gradient(90deg, var(--dots) 57%, transparent 0) left bottom / 0.55rem 0.28rem repeat-x;
}
.flow h3 {
  margin: 1.5em 0 0.6em;
}
/* Small run-in heads stay inside their column, plain black text */
.flow h4.plain {
  column-span: none;
  font-weight: 700;
  font-size: 1.05em;
  color: var(--ink);
  margin: 1em 0 0.4em;
}
.flow h3,
.flow h4,
.flow h5 {
  break-after: avoid;
}
/* Headings and tables run across the section; the text between them fills the columns */
.flow h3,
.flow h4,
.table-scroll,
figure.wide {
  column-span: all;
}
.half-container > header + * {
  margin-top: 0;
}

/* SIDE NAVIGATION */
#side-nav {
  width: 20vw;
  background: white;
  position: fixed;
  z-index: 5;
  height: 100%;
  overflow-y: auto;
  border-right: 1px solid rgba(44, 131, 75, 0.2);
}
.nav-container {
  display: flex;
  flex-direction: column;
  margin: 1em 1em 2em;
}
.nav-container h3 {
  margin-bottom: 1.5rem;
}
.nav-container h4,
#toc-mobile h4 {
  font-size: 1em;
  font-weight: 700;
  margin: 0.9em 0 0.4em;
}
.nav-container h5,
#toc-mobile h5 {
  font-size: 0.9em;
  font-weight: 400;
  margin: 0 0 0.35em 0.75em;
}
/* Green belongs to the manual's rules and bars, not to the whole table of contents */
.nav-container a,
#toc-mobile a {
  color: var(--ink);
}
#toc-mobile {
  padding: 0 1em;
}

/* CONTAINERS */
/* Text runs from the nav edge, not centred in what the nav leaves over:
   a column centred inside a right-shifted main reads as off-centre */
.flex-container {
  display: flex;
  padding-left: 2em;
}
/* Every section flows into columns sized from whatever width the page gives it:
   `2 30em` caps the count at two and drops to one below ~63em of room, so the
   measure follows the window instead of a fixed cap, with no breakpoint */
.half-container {
  padding: 0 1em;
  width: 100%;
  columns: 2 30em;
  column-gap: 3em;
}
.no-columns {
  columns: auto !important;
}
/* The title rules across the whole section, not across one column */
.half-container > header {
  column-span: all;
}
/* Short blocks move to the next column whole instead of splitting a line off */
.flow p,
.flow li,
figure,
.note {
  break-inside: avoid;
}
section + section {
  margin-top: 3em;
}
/* Skips the parent element and selects just the children */
.flow > * + * {
  margin-bottom: 1em;
}

/* FIGURES */
figure {
  margin: 0 0 1em;
}
figure img {
  display: block;
  margin: 0;
}
/* Upper bounds keep crops near their native size instead of upscaling */
.fig-knob img {
  max-width: 6.5em;
}
.fig-s img {
  max-width: 16em;
}
.fig-m img {
  max-width: 28em;
}

/* STEPS: orange numbers, blue instructions, plain follow-up text */
ol.steps {
  padding-left: 1.5em;
}
ol.steps > li {
  margin-bottom: 1.1em;
}
ol.steps > li::marker {
  color: var(--orange);
  font-weight: 700;
}
ol.steps p {
  margin-bottom: 0.4em;
}
ol.steps .do {
  color: var(--blue);
  font-weight: 700;
}
ol.steps ul {
  padding-left: 1.2em;
  margin-bottom: 0.4em;
}

.xref::before {
  content: "➡ ";
}
/* The battery-usage cautions are set bold */
ul.strong {
  font-weight: 700;
}

/* BADGES AND CALLOUTS */
/* The MEMO pill: white text on the manual's green */
.badge {
  display: inline-block;
  font-weight: 700;
  font-size: 1.2em;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--green);
  border-radius: 1em;
  padding: 0 0.7em;
  margin-bottom: 0.2em;
}
.note p,
.note ul {
  margin-bottom: 0.4em;
}
/* WARNING: the sign beside a green label over the dotted rule, then a bold
   title and the blue "!" before the instruction */
.warning {
  margin: 1em 0 0.3em;
}
.warning img {
  width: 1.9em;
  margin: 0 0.4em 0 0;
  vertical-align: bottom;
}
.warning-label {
  margin-bottom: 0.4em;
}
.warning-label img {
  width: 1.8em;
}
.warning > strong {
  display: block;
}

/* REFERENCE TABLES: green header row, green-tint row headers, rules between rows */
.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.5em;
}
.doc-table {
  width: 100%;
  min-width: 32em;
  border-collapse: collapse;
  /* the manual rules rows and inner columns but leaves the outer edges open */
  border-left: hidden;
  border-right: hidden;
  font-size: 0.92em;
  line-height: 1.4;
}
.doc-table th,
.doc-table td {
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0.2em 0.5em;
  text-align: left;
  vertical-align: top;
}
.doc-table thead th {
  background: var(--green-tint);
  font-weight: 700;
  border-bottom: 3px double var(--ink);
}
.doc-table tbody th {
  background: var(--green-tint);
  font-weight: 700;
  vertical-align: middle;
}
/* A table without a header row opens on a rule */
.doc-table tbody:first-child tr:first-child > * {
  border-top: 1px solid var(--ink);
}
.doc-table small {
  font-size: 0.72em;
}
.doc-table p {
  margin-bottom: 0.3em;
}
.doc-table p:last-child {
  margin-bottom: 0;
}
.doc-table ul {
  margin: 0.3em 0;
  padding-left: 1.2em;
}
.doc-table ol.steps {
  margin-bottom: 0;
}
/* Panel callouts: the number in its own tinted column, the part name beside it on white */
.doc-table .num {
  background: var(--green-tint);
  font-weight: 700;
  vertical-align: middle;
}
.doc-table tbody th.name {
  background: none;
  font-weight: 400;
  vertical-align: top;
}
.c-num {
  width: 2.2em;
}
.c-name {
  width: 15%;
}

/* Legal notes keep the manual's smaller setting */
.fine-print {
  font-size: 0.9em;
}

@media (max-width: 900px) {
  .flex-container {
    flex-direction: column;
    padding-left: 0;
  }
  .half-container {
    width: 100%;
    padding: 0;
  }
  nav#side-nav {
    display: none;
  }
  main {
    margin: 0 auto;
    padding: 0 1em 3em;
  }
  #masthead {
    padding: 1.5em 0;
  }
  #masthead > img {
    width: 7em;
  }
  #toc-mobile {
    display: block;
    padding: 0 0 1em;
  }
}

/* 901, not 900: both queries match at exactly 900px, and this one comes later,
   so at that width the nav is hidden and the mobile TOC would be too */
@media (min-width: 901px) {
  #toc-mobile {
    display: none;
  }
}
