/*
 * Virtisphere documentation.
 *
 * Deployed as a site of its own, separately from the marketing pages, so it
 * keeps its own copy of the brand tokens rather than importing them. The docs
 * are what somebody reads when something has already gone wrong; they should
 * not depend on anything else being up.
 */

:root {
  --navy-900: #0a1628;
  --navy-800: #0f2038;
  --navy-700: #16304f;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --radius: 12px;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate-700);
  background: var(--white);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-600); }

/* ----------------------------------------------------------------- header */

.dh {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--slate-200);
}

.dh-in {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.dh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--navy-900);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.dh-brand img { width: 26px; height: 26px; border-radius: 6px; }

.dh-tag {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  color: var(--blue-600);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.dh-links { margin-left: auto; display: flex; align-items: center; gap: 22px; flex-shrink: 0; }

.dh-links a {
  text-decoration: none;
  color: var(--slate-500);
  font-size: 14px;
  font-weight: 500;
}

.dh-links a:hover { color: var(--navy-900); }

.dh-cta {
  background: var(--blue-600);
  color: var(--white) !important;
  padding: 8px 15px;
  border-radius: 8px;
  font-weight: 600 !important;
}

.dh-burger {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  color: var(--slate-700);
}

/* ----------------------------------------------------------------- search */

.sbox { position: relative; }

.dh-search { flex: 1; max-width: 420px; margin-left: 14px; }

.sq {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  padding: 8px 40px 8px 35px;
  border: 1px solid var(--slate-300);
  border-radius: 9px;
  background: var(--slate-50) var(--search-icon) no-repeat 11px center / 16px;
  color: var(--navy-900);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.sq::placeholder { color: var(--slate-500); }

.sq:focus {
  border-color: var(--blue-400);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.dh-search kbd {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--slate-500);
  background: var(--white);
  border: 1px solid var(--slate-300);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 6px;
  pointer-events: none;
}

.dh-search .sq:focus ~ kbd,
.dh-search .sq:not(:placeholder-shown) ~ kbd { display: none; }

.sres {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(10, 22, 40, 0.16);
  max-height: min(70vh, 540px);
  overflow-y: auto;
  padding: 6px;
}

.sres[hidden] { display: none; }

/* Wider than the box in the header, so a snippet has room to say something. */
.dh-search .sres { right: auto; width: min(580px, 92vw); }

.sres a[role="option"] {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--slate-700);
}

.sres a[role="option"]:hover,
.sres a[role="option"].on { background: #eff6ff; }

.s-crumb {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--blue-600);
  margin-bottom: 1px;
}

.sres strong {
  display: block;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--navy-900);
  line-height: 1.4;
}

.s-snip {
  display: block;
  font-size: 13px;
  line-height: 1.55;
  color: var(--slate-500);
  margin-top: 3px;
}

.sres mark {
  background: var(--amber-100);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.s-none {
  margin: 0;
  padding: 14px 12px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--slate-500);
}

.s-foot {
  margin: 4px 0 0;
  padding: 9px 12px 5px;
  border-top: 1px solid var(--slate-100);
  font-size: 12.5px;
  color: var(--slate-500);
}

/* The large box on the home page: the first thing a person with a problem sees. */
.sbox-hero { max-width: 660px; margin: 0 0 34px; }

.sbox-hero .sq {
  font-size: 16.5px;
  padding: 15px 18px 15px 48px;
  border-radius: 12px;
  background-color: var(--white);
  background-position: 17px center;
  background-size: 19px;
  box-shadow: 0 6px 24px rgba(10, 22, 40, 0.07);
}


/* ----------------------------------------------------------------- layout */

.dl {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr) 196px;
  gap: 44px;
  align-items: start;
}

/* ---------------------------------------------------------------- sidebar */

.ds {
  position: sticky;
  top: 62px;
  max-height: calc(100vh - 62px);
  overflow-y: auto;
  padding: 30px 0 60px;
}

.ds-group { margin-bottom: 26px; }

.ds-group > p {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.ds a {
  display: block;
  padding: 6px 12px;
  margin-left: -12px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--slate-700);
  font-size: 14.5px;
  line-height: 1.45;
}

.ds a:hover { background: var(--slate-100); color: var(--navy-900); }

.ds a.on {
  background: #eff6ff;
  color: var(--blue-600);
  font-weight: 600;
}

/* ------------------------------------------------------------------- main */

.dm { padding: 34px 0 90px; min-width: 0; }

.crumb {
  font-size: 13px;
  color: var(--slate-500);
  margin-bottom: 10px;
}

.crumb a { color: var(--slate-500); text-decoration: none; }
.crumb a:hover { color: var(--blue-600); }

.dm h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--navy-900);
  margin: 0 0 14px;
}

.dm .lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--slate-500);
  margin: 0 0 30px;
  max-width: 62ch;
}

.dm h2 {
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: -0.015em;
  color: var(--navy-900);
  margin: 46px 0 14px;
  padding-top: 4px;
  scroll-margin-top: 84px;
}

/* Where a search result lands, briefly marked so the eye finds it. */
.dm h2:target { animation: landed 1.8s ease-out; border-radius: 6px; }

@keyframes landed {
  0% { background: var(--amber-100); box-shadow: 0 0 0 8px var(--amber-100); }
  100% { background: transparent; box-shadow: 0 0 0 8px transparent; }
}

.dm h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--navy-800);
  margin: 30px 0 8px;
}

.dm p { margin: 0 0 16px; max-width: 72ch; }

.dm ul, .dm ol { margin: 0 0 18px; padding-left: 22px; max-width: 72ch; }
.dm li { margin-bottom: 8px; }
.dm li::marker { color: var(--blue-500); }

.dm ol { counter-reset: step; list-style: none; padding-left: 0; }

.dm ol > li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin-bottom: 13px;
}

.dm ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--blue-600);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dm strong { color: var(--navy-800); font-weight: 650; }

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: 5px;
  padding: 1px 5px;
  color: var(--navy-800);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ notes */

.note, .warn {
  border-left: 3px solid var(--blue-500);
  background: var(--slate-50);
  border-radius: 0 10px 10px 0;
  padding: 15px 18px;
  margin: 0 0 22px;
  max-width: 72ch;
}

.warn { border-left-color: var(--amber-500); background: var(--amber-50); }

.note > p:last-child, .warn > p:last-child { margin-bottom: 0; }

.note strong:first-child, .warn strong:first-child {
  display: block;
  margin-bottom: 4px;
  color: var(--navy-900);
}

/* ----------------------------------------------------------------- tables */

.tw { overflow-x: auto; margin: 0 0 24px; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
  min-width: 480px;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}

th {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate-500);
  border-bottom-color: var(--slate-300);
  white-space: nowrap;
}

td code { white-space: nowrap; }

/* ------------------------------------------------------------------ cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 15px;
  margin: 0 0 30px;
}

.card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 19px 20px;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  background: var(--white);
}

.card:hover {
  border-color: var(--blue-400);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(10, 22, 40, 0.07);
}

.card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--navy-900);
  margin-bottom: 4px;
}

.card span { font-size: 14px; color: var(--slate-500); line-height: 1.55; }

/* ------------------------------------------------------------- on this page */

.toc { position: sticky; top: 62px; padding: 38px 0 60px; }

.toc p {
  margin: 0 0 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.toc a {
  display: block;
  padding: 4px 0 4px 12px;
  border-left: 2px solid var(--slate-200);
  text-decoration: none;
  color: var(--slate-500);
  font-size: 13.5px;
  line-height: 1.45;
}

.toc a:hover { color: var(--blue-600); border-left-color: var(--blue-400); }

/* ----------------------------------------------------------------- footer */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 58px;
  padding-top: 24px;
  border-top: 1px solid var(--slate-200);
}

.pager a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-600);
}

.pager span { font-size: 12px; color: var(--slate-500); display: block; font-weight: 500; }

.df {
  border-top: 1px solid var(--slate-200);
  background: var(--slate-50);
  padding: 26px 24px;
  text-align: center;
  font-size: 13.5px;
  color: var(--slate-500);
}

.df a { color: var(--slate-500); text-decoration: none; margin: 0 9px; }
.df a:hover { color: var(--blue-600); }

/* ------------------------------------------------------------ small screens */

@media (max-width: 1100px) {
  .dl { grid-template-columns: 232px minmax(0, 1fr); }
  .toc { display: none; }
  /* The search box needs the room more than three marketing links do. */
  .dh-links a:not(.dh-cta) { display: none; }
}

@media (max-width: 820px) {
  html { scroll-padding-top: 126px; }
  .dh-in {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    row-gap: 10px;
  }
  .dh-burger { display: block; }
  .dh-links { display: none; }
  /* Search gets a row of its own: on a phone it is the main way in. */
  .dh-search { order: 3; flex-basis: 100%; max-width: none; margin-left: 0; }
  .dh-search kbd { display: none; }
  .dh-search .sres { right: 0; width: auto; }
  .dl { grid-template-columns: 1fr; gap: 0; }
  .ds {
    display: none;
    position: static;
    max-height: none;
    padding: 18px 0 6px;
    border-bottom: 1px solid var(--slate-200);
  }
  .ds.open { display: block; }
  .dm { padding-top: 26px; }
  .dm h2 { scroll-margin-top: 124px; }
}
