/* docs.ripewise.app. The colours are those of the RipeWise control plane.
   Everything is served from this site: no font, script or image comes from
   another origin (the Content-Security-Policy in nginx.conf allows none). */

:root {
  color-scheme: light;
  --ink: #1c2620; --ink-2: #4a564d; --ink-3: #6b756d;
  --forest: #23402c; --forest-2: #2f5539; --banana: #e9b824;
  --advice-bg: #fbefcf; --muted-bg: #ece9e2;
  --bg: #f5f3ee; --surface: #fff; --line: #e8e4da; --line-2: #f0ede6;
  --bar: #14191f;
  --display: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body { margin: 0; font: 400 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--forest-2); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid #2f6fb0; outline-offset: 2px; }

.bar { display: flex; align-items: center; min-height: 52px; padding: 0 24px; background: var(--bar); border-bottom: 3px solid var(--banana); }
.brand { font: 600 18px/1 var(--display); color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.badge { margin-left: 8px; padding: 3px 7px; border-radius: 5px; font: 600 10px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--bar); background: var(--banana); vertical-align: 2px; }

.shell { display: grid; grid-template-columns: 17rem minmax(0, 1fr); align-items: start; }
.side { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; padding: 24px 16px 40px 24px; font-size: 14px; line-height: 1.4; }
.side ul { margin: 0 0 20px; padding: 0; list-style: none; }
.side ul ul { margin: 2px 0 6px; padding-left: 12px; border-left: 1px solid var(--line); }
.side li { margin: 0; }
.side a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.side a:hover { color: var(--ink); background: var(--muted-bg); }
.side a[aria-current="page"] { color: #fff; background: var(--forest); }
.side .soft { opacity: .75; font-size: 12px; }
.label { margin: 0 0 6px 8px; font: 600 11px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }

main { min-width: 0; max-width: 54rem; padding: 28px 32px 80px; }
main.plain { max-width: 46rem; margin: 0 auto; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; }
h1 { margin: 56px 0 14px; padding-top: 28px; border-top: 1px solid var(--line); font: 600 30px/1.15 var(--display); letter-spacing: -.01em; }
main > h1:first-child, .notice + h1 { margin-top: 0; padding-top: 0; border-top: 0; }
h2 { margin: 36px 0 10px; font: 600 21px/1.25 var(--display); }
h3 { margin: 26px 0 8px; font: 600 16px/1.3 var(--sans); }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 1.4rem; }
li { margin-bottom: 6px; }
li > p { margin-bottom: 6px; }
code, pre { font-family: var(--mono); font-size: .86em; }
code { padding: 1px 5px; border-radius: 5px; background: var(--muted-bg); overflow-wrap: anywhere; }
pre { margin: 0 0 16px; padding: 14px 16px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; line-height: 1.5; }
pre code { padding: 0; background: none; font-size: 13px; overflow-wrap: normal; }
table { display: block; width: 100%; margin: 0 0 18px; overflow-x: auto; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink-2); background: #fbfaf7; border-bottom-color: var(--line); white-space: nowrap; }
td code { background: none; padding: 0; }
td:first-child code { overflow-wrap: normal; white-space: nowrap; }
blockquote { margin: 0 0 14px; padding: 2px 16px; border-left: 3px solid var(--line); color: var(--ink-2); }
.notice { margin: 0 0 24px; padding: 10px 14px; border-radius: 8px; background: var(--advice-bg); }
.lead { font-size: 18px; color: var(--ink-2); }
.cards { display: grid; gap: 14px; margin: 24px 0; padding: 0; list-style: none; }
.cards li { margin: 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.cards h2 { margin: 0 0 6px; }
.cards p:last-child { margin-bottom: 0; }

@media (max-width: 56rem) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; max-height: none; padding: 16px 16px 0; border-bottom: 1px solid var(--line); }
  main { padding: 20px 16px 60px; }
}
@media print {
  .bar, .side { display: none; }
  .shell { display: block; }
  body { background: #fff; }
}
