/* Shared styles for the cq site (index, spec, capabilities). */


body {
  max-width: 820px;
  /* extra top padding gives breathing room above the menu */
  margin: 0.5em;
  padding: 0;
  line-height: 1.45;
  font-family: system-ui, sans-serif;
  background: #018281;
}

pre {
  overflow-x: auto;
  background: #f4f4f4;
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
}

/* license page: preserve the .txt's line breaks but read as prose, not a code block */
pre.license {
  background: none;
  padding: 0;
  border-radius: 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1em;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

code {
  background: #f4f4f4;
  padding: 0 3px;
  border-radius: 3px;
}

pre code {
  background: none;
  padding: 0;
}

pre[class*="language-"],
code[class*="language-"] {
  font-size: 0.9em !important;
  /* Adjust the size to your preference */
  line-height: 1.5;
}


h2 {
  border-bottom: 1px solid #ddd;
  padding-bottom: 2px;
  margin-top: 2rem;
}

h3 {
  margin-bottom: 0.2rem;
}

.title {
  padding-left: 0.5em;
  text-align: left;

  font-family: sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  font-variation-settings:
    "slnt" 0,
    "wdth" 100,
    "GRAD" 0,
    "ROND" 0;
}

/* ---------- Windows 95 nav ---------- */
/* Authentic 4-color double bevel. Raised = light top/left, dark bottom/right; pressed inverts. */
:root {
  --w95-raised: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --w95-pressed: inset -1px -1px #ffffff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

nav.menu {
  position: relative;
  display: flex;
  align-items: flex-end;
  /* tabs sit on the bar's bottom edge */
  justify-content: space-between;
  flex-wrap: wrap;                 /* tabs drop to a new line when they collide with the title */
  gap: 0.5em;
  margin: 0;
  padding: 3px 6px 0;
  /* minimal silver above the tabs; none below */
  color: #000;
  background: #c0c0c0;
  /* classic silver */
  /* raised bevel with an OPEN bottom, so the tab strip joins the content panel below */
  box-shadow:
    inset 1px 0 #ffffff, inset 2px 0 #dfdfdf,
    /* left highlight */
    inset 0 1px #ffffff, inset 0 2px #dfdfdf,
    /* top highlight */
    inset -1px 0 #0a0a0a, inset -2px 0 #808080;
  /* right shadow */
}

.title {
  font-weight: 700;
  align-self: center;
  flex-shrink: 0;                  /* don't squeeze — collide (wrap) instead, so JS can collapse */
  /* keep the title centered while tabs drop to the edge */
}

.nav-links {
  display: flex;
  align-items: flex-end;
  /* tabs sit on a common baseline */
  flex-shrink: 0;                  /* wrap as a whole rather than shrinking the tabs */
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* nav links styled as Win95 tab controls: rounded top, open bottom, sitting on the bar */
.nav-links a {
  display: block;
  margin-top: 3px;
  /* inactive tabs ride a little lower */
  padding: 3px 14px;
  color: #000;
  font-weight: 700;
  text-decoration: none;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  /* light top/left, dark right */
  border-bottom: none;
  /* open bottom — a tab, not a button */
  border-radius: 6px 6px 0 0;
}

.nav-links a:visited {
  color: #000;
}

/* the current page is the selected tab: taller and forward, not pressed.
   (Keyed off .active, not :active, so there's no click/release flicker.) */
.nav-links a.active {
  margin-top: 0;
  /* stands up above the inactive tabs */
  margin-bottom: -2px;
  /* float over the frame's top beveled edge */
  padding: 5px 15px 6px;
  position: relative;
  z-index: 2;
}

/* mobile: drop the breadcrumb so "CQ" + the tabs fit on one line (no hamburger needed) */
@media (max-width: 640px) {
  .crumb {
    display: none;
  }
}

/* silver window frame: a thin raised bevel all round (its top edge is where the gray tabs
   sit, and the active tab floats over it). Contains the sunken white content box. */
.main {
  background: #c0c0c0;
  margin: 0;
  padding: 3px;
  box-shadow: var(--w95-raised);
}

/* the content in a sunken inset box */
.page {
  background: #fff;
  padding: 0.5em 1em;
  box-shadow: var(--w95-pressed);
}

h1:first-of-type {
  margin-top: 0.1em;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #ccc;
  padding: 1em;
  font-size: 0.8em;
}

.footer-left {
  float: left;
}

.footer-right {
  float: right;
}

/* table of contents — generated from {{ TOC }} (markdown headings, H1 excluded) */
.toc {
  margin: 1rem 0 1.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.toc ol {
  margin: 0;
  padding-left: 1.5rem;
}

.toc li {
  margin: 0.15rem 0;
}

/* content tables (markdown) — a plain, default bordered style */
.page table {
  border-collapse: collapse;
  margin: 0.8rem 0;
}

.page th,
.page td {
  border: 1px solid #ccc;
  padding: 4px 10px;
  text-align: left;
  vertical-align: top;
}

.page th {
  background: #f4f4f4;
}

.dl {
  font-size: 1.1rem;
  font-weight: bold;
}

.dl .meta {
  color: #666;
  font-size: 0.9rem;
}

/* tabbed CLI download instructions (home) — Win95 buttons */
.tabs .tabbtns {
  display: flex;
  gap: 4px;
  margin: 0.5rem 0;
}

.tabs .tabbtns button {
  padding: 4px 13px;
  font: inherit;
  font-weight: 700;
  color: #000;
  cursor: pointer;
  background: #c0c0c0;
  border: none;
  box-shadow: var(--w95-raised);
}

/* the selected OS tab reads as a pressed button, like the nav */
.tabs .tabbtns button.active {
  box-shadow: var(--w95-pressed);
  padding: 5px 12px 3px 14px;
}

/* the code panes share one box; the copy button overlays its top-right corner */
.tabs .codewrap {
  position: relative;
}

.tabs .copy-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 1;
  font: inherit;
  font-size: 0.75rem;
  padding: 3px 10px;
  color: #000;
  cursor: pointer;
  background: #c0c0c0;
  border: none;
  box-shadow: var(--w95-raised);
}

.tabs .copy-btn:active {
  box-shadow: var(--w95-pressed);
}

.tabs pre[data-os] {
  display: none;
}

.tabs pre[data-os].active {
  display: block;
}