/*
  Taba documentation.

  The same palette and type as the landing page, laid out for reading rather
  than for selling: one column of text at a measure you can actually read,
  a sidebar that stays put, and no motion. Nothing here is built — it is
  plain CSS served as a file, like apps/landing next door.
*/
:root {
  --bg: #0b0e12;
  --bg-2: #0f1318;
  --panel: #12171d;
  --panel-2: #171d24;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eef1f3;
  --muted: #8b949e;
  --dim: #5d6670;
  --green: #68f19f;
  --green-dim: rgba(104, 241, 159, 0.12);
  --amber: #f1bf6a;
  --amber-dim: rgba(241, 191, 106, 0.1);
  --red: #ff5f6d;
  --ink: #1b1b1b;
  --radius: 14px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Anchored headings land below the fixed bar, not under it. */
  scroll-padding-top: 88px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 18, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.bar-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.bar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 600;
  font-size: 16px;
}
.bar-logo:hover {
  text-decoration: none;
}
.bar-logo svg {
  height: 22px;
  width: auto;
  color: var(--green);
  display: block;
}
.bar-tag {
  color: var(--dim);
  font-size: 13px;
  padding-left: 11px;
  border-left: 1px solid var(--line-2);
}
.bar-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bar-links a {
  color: var(--muted);
  font-size: 14px;
  padding: 7px 13px;
  border-radius: 999px;
}
.bar-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}
.bar-cta {
  background: var(--green);
  color: var(--ink) !important;
  font-weight: 500;
}
.bar-cta:hover {
  background: #7df5ae;
}

/* ---------- layout ---------- */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.side > summary {
  display: none;
}
/*
  The contents list is a <details> so a phone can fold it away without any
  script. On a wide screen it is always open, which takes overriding the two
  different mechanisms browsers use to hide closed details content:
  `content-visibility` on ::details-content in current Chromium, and
  `display: none` on the children everywhere else. The children are given
  explicit values rather than `revert`, which would put the links back to
  inline and undo the list below.
*/
@media (min-width: 881px) {
  .side::details-content {
    content-visibility: visible;
    block-size: auto;
  }
  .side > h4,
  .side > a {
    display: block;
  }
}
.side {
  position: sticky;
  top: 64px;
  padding: 36px 0 60px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}
.side h4 {
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 22px 0 8px;
}
.side h4:first-child {
  margin-top: 0;
}
.side a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 5px 10px;
  margin-left: -10px;
  border-radius: 8px;
}
.side a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
/* Where you are. A rail rather than a fill: the sidebar is a list of
   sixteen, and a filled row at this density reads as a button. */
.side a.on {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 2px 0 0 var(--green);
}
.doc {
  padding: 36px 0 90px;
  min-width: 0;
  /* Roughly 70 characters. Long lines are the main thing that makes
     documentation tiring rather than hard. */
  max-width: 44rem;
}

/* ---------- type ---------- */
.doc h1 {
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.doc h2 {
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 46px 0 12px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.doc h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 26px 0 6px;
}
.doc p {
  margin: 0 0 14px;
  color: #cdd4da;
}
.doc .lead {
  font-size: 18px;
  color: var(--muted);
  margin: 14px 0 8px;
}
.doc ul,
.doc ol {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #cdd4da;
}
.doc li {
  margin-bottom: 5px;
}
.doc li::marker {
  color: var(--dim);
}
.doc strong {
  color: var(--text);
  font-weight: 600;
}
.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
.doc hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px 0;
}
.updated {
  color: var(--dim);
  font-size: 13px;
  font-family: var(--mono);
  margin-top: 6px;
}

/* ---------- pieces ---------- */
.note {
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--green);
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 18px;
  margin: 20px 0;
}
.note.warn {
  border-left-color: var(--amber);
}
.note p:last-child {
  margin-bottom: 0;
}
.note b {
  color: var(--text);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 12px;
  margin: 20px 0 26px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 17px;
}
.card b {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}
.card span {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 14.5px;
}
th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  color: var(--dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
td {
  color: #cdd4da;
}
td b {
  color: var(--text);
}

/* A page should never be a dead end: the next one is always one click on. */
.walk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 54px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.walk a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
}
.walk a:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
  text-decoration: none;
}
.walk small {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.walk b {
  font-size: 14.5px;
  font-weight: 500;
}
.walk-next {
  text-align: right;
}

/* ---------- foot ---------- */
.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.foot-in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  color: var(--dim);
  font-size: 13.5px;
}
.foot-in a {
  color: var(--muted);
}
.foot-in .sep {
  margin-left: auto;
}

@media (max-width: 880px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  /*
    The contents list folds away on a phone.

    Sixteen links is most of a small screen, and landing on them instead of on
    the page is the wrong first impression. A <details> collapses it with no
    script, which matters here: these pages are served under a policy that
    forbids script entirely.
  */
  .side {
    position: static;
    max-height: none;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .side > summary {
    display: block;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    list-style: none;
  }
  .side > summary::-webkit-details-marker {
    display: none;
  }
  .side > summary::after {
    content: " ▾";
    color: var(--dim);
  }
  .side[open] > summary::after {
    content: " ▴";
  }
  .side > summary + h4 {
    margin-top: 14px;
  }
  .doc {
    padding-top: 26px;
  }
  .doc h1 {
    font-size: 30px;
  }
  /* The bar keeps the mark and the way in; the rest is in the page already. */
  .bar-tag,
  .bar-links a:not(.bar-cta) {
    display: none;
  }
}

/*
  A field that still has to be filled in before this page is true.

  Rendered loudly on purpose: a placeholder that looks like body text is a
  placeholder that ships. Delete the span along with the text inside it.
*/
.todo {
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px dashed rgba(241, 191, 106, 0.45);
  border-radius: 5px;
  padding: 0 6px;
  font-family: var(--mono);
  font-size: 0.87em;
}
