/* Freshet docs: the landing page's world (styles.css) set for reading. A sidebar of
   pages, one measured column, the sapphire terminal for every command. No motion
   beyond hover and focus. */

.docs { display: grid; grid-template-columns: 14.5rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); padding-block: clamp(2rem, 5vw, 3.5rem) var(--band); }

/* ── sidebar ─────────────────────────────────────────────────────────── */
.side { position: sticky; top: 5.5rem; align-self: start; max-height: calc(100vh - 7rem); overflow-y: auto; }
.side__label { font: 400 .75rem/1.3 var(--mono); color: var(--grog-ink); margin: 0 0 .6rem; }
.side ol { list-style: none; margin: 0 0 1.75rem; padding: 0; border-top: 2px solid var(--cobalt); }
.side li { border-bottom: 1px solid var(--ash); }
.side a { display: block; padding: .6rem .2rem; font: 700 1.1rem/1.2 var(--display); color: var(--sapphire); text-decoration: none; }
.side a:hover { color: var(--cobalt); }
.side a[aria-current="page"] { color: var(--cobalt); }
.side a[aria-current="page"]::after { content: ""; display: inline-block; width: 5px; height: 9px; margin-left: .45rem; border-radius: 0 0 3px 3px; background: var(--cobalt); vertical-align: .1em; }
.side .toc a { font: 400 .8125rem/1.35 var(--sans); padding: .4rem .2rem; color: var(--ink-2); }
.side .toc { border-top-width: 1px; border-top-color: var(--ash); }

/* ── article ─────────────────────────────────────────────────────────── */
.doc { min-width: 0; max-width: 46rem; }
.doc h1 { font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem); line-height: .98; letter-spacing: -.005em; max-width: 18ch; }
.doc .intro { font-size: 1.15rem; color: var(--ink-2); margin: 1.1rem 0 2rem; max-width: 62ch; }
.doc h2 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1.02; margin: 3.25rem 0 1rem; scroll-margin-top: 5.5rem; }
.doc h2::after {
  content: ""; display: block; width: 4.25rem; height: 13px; margin-top: .55rem;
  background:
    linear-gradient(var(--cobalt), var(--cobalt)) 0 0 / 100% 3px no-repeat,
    linear-gradient(var(--cobalt), var(--cobalt)) right 5px top 0 / 3px 8px no-repeat,
    radial-gradient(circle at 50% 50%, var(--cobalt) 3px, transparent 3.6px) right 2.5px bottom 0 / 8px 8px no-repeat;
}
.doc h3 { font-size: 1.45rem; line-height: 1.1; margin: 2.25rem 0 .6rem; scroll-margin-top: 5.5rem; }
.doc p, .doc li { max-width: 68ch; }
.doc p { color: var(--sapphire); }
.doc ul, .doc ol { padding-left: 1.2rem; margin: 0 0 1.1rem; }
.doc li { margin: .3rem 0; }
.doc li::marker { color: var(--cobalt); }
.doc strong { color: var(--sapphire); }

.doc .term { margin: 1.1rem 0 1.5rem; position: relative; }
.doc .term pre { font-size: .8rem; }
.doc .term + p { margin-top: -.25rem; }
.out { color: #aebbe0; }              /* what the command printed, set apart from what you type */
.term .copy {
  position: absolute; top: .45rem; right: .5rem;
  font: 700 .6875rem/1 var(--mono); color: var(--thin); background: transparent;
  border: 1px solid rgba(142, 166, 221, .45); border-radius: 3px; padding: .35rem .5rem; cursor: pointer;
}
.term .copy:hover { color: #fff; border-color: var(--thin); }
.term .copy[data-done] { color: #fff; border-color: #fff; }

/* A note the reader must not miss. A tinted block with a hairline rule, not a stripe. */
.note { margin: 1.25rem 0 1.5rem; padding: .95rem 1.1rem; background: var(--ghost); border: 1px solid var(--thin); border-radius: 4px; }
.note p { margin: 0; color: var(--sapphire); }
.note p + p { margin-top: .5rem; }
.note strong { color: var(--cobalt); }

.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; font-size: .9rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .6rem .7rem .6rem 0; border-bottom: 1px solid var(--ash); }
.doc thead th { font: 700 .72rem/1.3 var(--mono); color: var(--grog-ink); border-bottom-color: var(--grog); }
.doc tbody th { font-weight: 600; color: var(--sapphire); white-space: nowrap; }
.doc td { color: var(--ink-2); }
.table-wrap { overflow-x: auto; }

.steps { counter-reset: step; list-style: none; padding: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 1.1rem 0; max-width: none; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: .05rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 .85rem/1 var(--mono); color: #fff; background: var(--cobalt);
}

.next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 2px solid var(--cobalt); }
.next a { display: block; padding: .9rem 1rem; border: 1px solid var(--ash); border-radius: 4px; background: var(--card); text-decoration: none; }
.next a:hover { border-color: var(--cobalt); }
.next span { display: block; font: 400 .72rem/1.3 var(--mono); color: var(--grog-ink); }
.next b { display: block; font: 700 1.3rem/1.15 var(--display); color: var(--cobalt); margin-top: .2rem; }
.next a:last-child:not(:first-child) { text-align: right; }

.nav a[aria-current="page"] { color: var(--cobalt); text-decoration: underline; text-underline-offset: .35em; }

@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 1.25rem; }
  .side { position: static; max-height: none; overflow: visible; }
  .side ol:first-of-type { display: flex; overflow-x: auto; gap: 1.1rem; border-bottom: 1px solid var(--ash); margin-bottom: .5rem; }
  .side ol:first-of-type li { border: 0; flex: none; }
  .side .toc, .side .side__label:not(:first-child) { display: none; }
  .next { grid-template-columns: 1fr; }
  .next a:last-child:not(:first-child) { text-align: left; }
}

/* the copy button sits over the title bar: keep titles clear of it */
.doc .term__bar { padding-right: 5rem; line-height: 1.35; }
