/* ig.systems documentation stylesheet
   Integrity design system (brand/BRAND.md, brand/tokens.css) for the /docs pages.
   The docs are standalone pages without the Webflow CSS, so every value here
   mirrors the brand tokens 1:1. Markup changes live in tools/restyle_docs.py. */

@font-face { font-family: Borna; src: url(/cdn.prod.website-files.com/672378ba82b4ab2f45d8226e/67287ca943bd18b104ee1bdd_Borna-Regular.otf) format("opentype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: Borna; src: url(/cdn.prod.website-files.com/672378ba82b4ab2f45d8226e/67287ca9bef8d344f82e2541_Borna-RegularItalic.otf) format("opentype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: Borna; src: url(/cdn.prod.website-files.com/672378ba82b4ab2f45d8226e/67287ca972ab8a237882e1d5_Borna-Medium.otf) format("opentype"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: Borna; src: url(/cdn.prod.website-files.com/672378ba82b4ab2f45d8226e/67287ca90921b8828591356b_Borna-SemiBold.otf) format("opentype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: Borna; src: url(/cdn.prod.website-files.com/672378ba82b4ab2f45d8226e/67287ca92f64aa075ba86ee9_Borna-SemiBoldItalic.otf) format("opentype"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: Borna; src: url(/cdn.prod.website-files.com/672378ba82b4ab2f45d8226e/67287ca9abc7c8db8ff5091a_Borna-Bold.otf) format("opentype"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* brand/tokens.css */
  --navy: #0e0e53;
  --orange: #ff6633;
  --teal: #24baff;
  --ice: #eff4f6;
  --bg: #f8f8f8;
  --white: #ffffff;
  --warm: #fff9f7;
  --orange-light: #fff2ed;
  --muted: #0e0e5399;            /* navy 60 %, secondary text */
  --radius-card: 1.5rem;
  --radius-card-large: 2rem;
  --radius-pill: 6rem;
  --glow-teal: inset 0 2px 16px #ffffff66, 0 0 36px 12px #24baff3d;
  --glow-teal-hover: inset 0 2px 16px #ffffff66, 0 0 36px 12px #24baff6e;
  --glow-teal-soft: 0 0 36px 12px #24baff1f;
  --glow-orange: inset 0 2px 16px #ffffff66, 0 0 36px 12px #ff683661;
  --glow-orange-hover: inset 0 2px 16px #ffffff66, 0 0 36px 12px #ff683694;
  /* derived from navy, no new hues */
  --line: #0e0e531a;
  --line-strong: #0e0e5329;
  --code-bg: #0e0e53;
  --code-ink: #e9ecfb;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  font-family: Borna, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--navy);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: .25rem; }

/* ---------- Header ---------- */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f8f8f8e6;
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.docs-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: .9rem 5%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.docs-logo { display: inline-flex; flex: 0 0 auto; }
.docs-logo img { display: block; width: 112px; height: auto; }
.docs-label {
  flex: 0 0 auto;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line-strong);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--orange);
}
.docs-site-nav { display: flex; gap: 1.1rem; margin: 0 auto; }
.docs-site-nav a { white-space: nowrap; }
.docs-site-nav a,
.lang-switch a,
.lang-switch .lang-off {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
}
.docs-site-nav a:hover,
.lang-switch a:hover { color: var(--navy); text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lang-switch { display: flex; gap: .9rem; }
.lang-switch a { color: var(--muted); }
.lang-switch a.current { color: var(--navy); text-decoration: underline; text-decoration-color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lang-switch .lang-off { color: #0e0e5359; cursor: default; }

/* Pill buttons (BRAND.md section 5) */
.docs-cta,
.docs-button {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: all .4s;
}
.docs-cta {
  flex: 0 0 auto;
  padding: .6rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--teal);
  color: var(--navy);
  box-shadow: var(--glow-teal);
}
.docs-cta:hover { box-shadow: var(--glow-teal-hover); }
.docs-cta img, .docs-button img { width: 1rem; height: 1rem; }
.docs-button {
  padding: 1.1rem 1.75rem;
  font-size: .85rem;
  background: var(--orange);
  border: 1px solid var(--orange);
  color: var(--white);
  box-shadow: var(--glow-orange);
}
.docs-button:hover { box-shadow: var(--glow-orange-hover); }

/* ---------- Page body ---------- */
.docs-main {
  max-width: 54rem;
  margin: 2.5rem auto 4rem;
  padding: 3rem 3.5rem 3.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card-large);
}
.docs-main > :first-child { margin-top: 0; }

.backlink { margin: 0 0 1.75rem; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.docs-main .backlink a {
  display: inline-flex;
  align-items: center;
  padding: .3rem .85rem;
  border-radius: var(--radius-pill);
  background: var(--ice);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.docs-main .backlink a:hover { background: #24baff24; }
.crumb { color: var(--muted); font-size: .85rem; }

.docs-main h1 {
  margin: 0 0 1rem;
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.01em;
}
.docs-main h2 { margin: 3rem 0 1rem; font-size: 1.75rem; line-height: 1.25; font-weight: 600; }
.docs-main h3 { margin: 2.25rem 0 .75rem; font-size: 1.3rem; line-height: 1.3; font-weight: 600; }
.docs-main h4 { margin: 1.75rem 0 .5rem; font-size: 1.1rem; line-height: 1.4; font-weight: 600; }
.docs-main h5, .docs-main h6 { margin: 1.5rem 0 .5rem; font-size: 1rem; line-height: 1.4; font-weight: 600; }
.heading-wrapper { position: relative; }
.heading-wrapper:focus { outline: none; }
.docs-main p { margin: 0 0 1rem; }
.lead { font-size: 1.25rem; line-height: 1.6; color: var(--muted); }
.docs-main strong, .docs-main b { font-weight: 600; }

/* Links: navy text with a teal underline keeps contrast; teal marks interaction */
.docs-main a {
  color: var(--navy);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--teal);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: background-color .2s;
}
.docs-main a:hover { background: #24baff24; border-radius: .2rem; }
.docs-main a[target="_blank"] > span:last-child { font-size: .8em; color: var(--teal); }

.docs-main ul, .docs-main ol { margin: 0 0 1.1rem; padding-left: 1.5rem; }
.docs-main li { margin-bottom: .45rem; }
.docs-main li > ul, .docs-main li > ol { margin: .45rem 0 .2rem; }
.docs-main ul > li::marker { color: var(--teal); }
.docs-main ol > li::marker { font-weight: 600; }
.docs-main hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.docs-main sup { font-size: .7em; }

/* Code */
.docs-main code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--ice);
  color: var(--navy);
  padding: .12em .42em;
  border-radius: .4rem;
  overflow-wrap: anywhere;
}
.docs-main a code { background: transparent; padding: 0; }
.docs-main pre {
  margin: 1.1rem 0 1.4rem;
  padding: 1.15rem 1.35rem;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 1rem;
  overflow-x: auto;
  font-size: .86rem;
  line-height: 1.65;
  tab-size: 2;
}
.docs-main pre code { background: none; color: inherit; padding: 0; font-size: inherit; overflow-wrap: normal; }
.docs-main div:has(> pre + button) { position: relative; }
.docs-main button[aria-label="Copy to clipboard"] {
  position: absolute;
  top: .65rem;
  right: .65rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid #ffffff2e;
  border-radius: var(--radius-pill);
  background: #ffffff14 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e9ecfb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='12' height='12' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E") center / 1rem no-repeat;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s, background-color .2s;
}
.docs-main button[aria-label="Copy to clipboard"]:hover { opacity: 1; background-color: #24baff40; }
.docs-main button[aria-label="Copy to clipboard"][data-copied] {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324baff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.code-block { margin: 1.1rem 0 1.4rem; }
.code-block pre { margin: 0; }
.code-title {
  display: inline-block;
  padding: .35rem 1rem;
  border-radius: 1rem 1rem 0 0;
  background: var(--code-bg);
  color: var(--teal);
  font: 600 .78rem/1.4 var(--mono);
}
.code-block .code-title + pre { border-top-left-radius: 0; }

/* Tabs (package managers, config formats) */
.docs-main [role="tablist"] {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: .5rem 0 .25rem;
  padding: .25rem;
  border-radius: var(--radius-pill);
  background: var(--ice);
}
.docs-main [role="tab"] {
  padding: .35rem .95rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  font: 600 .8rem/1.4 Borna, sans-serif;
  color: var(--muted);
  cursor: pointer;
}
.docs-main [role="tab"][aria-selected="true"] { background: var(--white); border-color: var(--teal); color: var(--navy); box-shadow: 0 0 16px 2px #24baff2e; }
.docs-main [role="tabpanel"] + [role="tabpanel"] { margin-top: .5rem; }
.docs-main [role="tabpanel"][hidden] { display: none; }

/* Callouts (Note, Caution, Tip ...) */
.callout,
.docs-main .note {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: var(--ice);
  box-shadow: inset 4px 0 0 var(--teal);
  font-size: .97rem;
}
.callout-caution, .callout-important { background: var(--orange-light); box-shadow: inset 4px 0 0 var(--orange); }
.callout-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .35rem !important;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.callout-label::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--teal); }
.callout-caution .callout-label::before, .callout-important .callout-label::before { background: var(--orange); }
.callout-body > :last-child, .docs-main .note > :last-child { margin-bottom: 0; }
.callout pre { margin: .75rem 0; }
/* asides the restyle script could not normalise */
.docs-main aside:not(.callout) { margin: 1.5rem 0; padding: 1rem 1.25rem; border-radius: 1rem; background: var(--ice); box-shadow: inset 4px 0 0 var(--teal); }

/* Tables */
.table-scroll {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: var(--white);
}
.docs-main table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.55; }
.docs-main th, .docs-main td { padding: .7rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.docs-main th { background: var(--ice); font-weight: 600; white-space: nowrap; }
.docs-main tbody tr:last-child td { border-bottom: 0; }
.docs-main td > :last-child { margin-bottom: 0; }

/* Details, quotes, media */
.docs-main details { margin: 1rem 0; border: 1px solid var(--line-strong); border-radius: 1rem; background: var(--white); }
.docs-main summary { display: flex; align-items: center; gap: .65rem; padding: .85rem 1.2rem; font-weight: 600; cursor: pointer; list-style: none; }
.docs-main summary::-webkit-details-marker { display: none; }
.docs-main summary::before { content: ""; flex: 0 0 auto; width: .5rem; height: .5rem; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); transition: transform .2s; }
.docs-main details[open] > summary::before { transform: rotate(45deg); }
.docs-main summary > * { margin: 0 !important; font-size: 1rem; font-weight: 600; }
.docs-main details[open] summary { border-bottom: 1px solid var(--line); }
.docs-main details > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }
.docs-main details > :last-child { margin-bottom: 1rem; }
.docs-main blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 3px solid var(--teal); color: var(--muted); }
.docs-main img { border-radius: .75rem; }
.docs-main figure { margin: 1.5rem 0; }
.docs-main figcaption { margin-top: .5rem; font-size: .85rem; color: var(--muted); }
.docs-main iframe { max-width: 100%; border: 0; border-radius: 1rem; }
.docs-main kbd { font-family: var(--mono); font-size: .85em; padding: .1em .45em; border: 1px solid var(--line-strong); border-radius: .35rem; background: var(--white); }

/* Integrity guides: byline, FAQ */
.doc-author { display: flex; align-items: center; gap: .85rem; margin: .75rem 0 .5rem; }
.doc-author img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.doc-author div { font-size: .9rem; line-height: 1.4; }
.faq-item { margin-bottom: 1.25rem; }
.faq-item h3 { margin: 0 0 .35rem; font-size: 1.1rem; }

/* ---------- Landing (/docs) ---------- */
.docs-main.landing {
  max-width: 80rem;
  margin-top: 0;
  padding: 4rem 5% 1rem;
  background: none;
  border: 0;
  border-radius: 0;
}
.landing-intro { max-width: 48rem; }
.landing-intro h1 { font-size: 3.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.25rem; margin: 2.5rem 0 3.5rem; }
.card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--navy);
  text-decoration: none !important;
  font-weight: 400 !important;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.docs-main a.card:hover { background: var(--white); border-color: var(--teal); box-shadow: var(--glow-teal-soft); transform: translateY(-2px); }
.card h2 { margin: 0 0 .6rem; font-size: 1.3rem; line-height: 1.3; }
.card p { margin: 0 0 1.25rem; color: var(--muted); font-size: .97rem; line-height: 1.6; }
.card .cta { margin-top: auto; font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.waf-toc {
  padding: 2.5rem 3rem 2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card-large);
}
.waf-toc > h2:first-child { margin-top: 0; }
.waf-toc h2 { font-size: 1.75rem; }
.waf-toc h3 { margin-top: 2rem; }
.waf-toc ul { columns: 3; column-gap: 2.5rem; padding-left: 1.1rem; }
.waf-toc li { break-inside: avoid; }

/* ---------- Closing CTA and footer ---------- */
.docs-pilot {
  max-width: 54rem;
  margin: 0 auto 4rem;
  padding: 3rem 2rem;
  border-radius: var(--radius-card-large);
  background: radial-gradient(120% 140% at 50% 0%, var(--orange-light) 0%, var(--warm) 55%, var(--white) 100%);
  border: 1px solid #ff663333;
  text-align: center;
}
.docs-pilot p { margin: 0 0 1.5rem; font-size: 2rem; line-height: 1.2; font-weight: 600; }
.docs-pilot p span { color: var(--orange); }

.docs-footer { background: var(--white); border-top: 1px solid var(--line); }
.docs-footer-inner { max-width: 80rem; margin: 0 auto; padding: 3rem 5% 2rem; }
.docs-source {
  margin-bottom: 2.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: var(--bg);
  font-size: .85rem;
  line-height: 1.6;
  color: var(--muted);
}
.docs-source p { margin: 0 0 .4rem; }
.docs-source p:last-child { margin: 0; }
.docs-source a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 2px; overflow-wrap: anywhere; }
.docs-footer-brand { display: flex; justify-content: space-between; gap: 3rem; flex-wrap: wrap; }
.docs-footer-brand > a img { display: block; width: 120px; height: auto; }
.docs-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(9rem, auto)); gap: 2.5rem 4rem; }
.docs-footer-cols p { margin: 0 0 .9rem; font-size: .9rem; font-weight: 600; }
.docs-footer-cols a { display: block; margin-bottom: .6rem; font-size: .9rem; color: var(--muted); text-decoration: none; }
.docs-footer-cols a:hover { color: var(--navy); }
.docs-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
  color: var(--muted);
}
.docs-footer-bottom p { margin: 0; }
.docs-footer-bottom a { color: var(--navy); }

/* ---------- Responsive (Webflow breakpoints: 991, 767, 479) ---------- */
@media (max-width: 1199px) {
  .docs-site-nav { display: none; }
  .lang-switch { margin-left: auto; }
}
@media (max-width: 991px) {
  .docs-main { margin: 1.5rem 4% 3rem; padding: 2.25rem 2rem 2.5rem; }
  .docs-main h1 { font-size: 2.25rem; }
  .landing-intro h1 { font-size: 2.75rem; }
  .waf-toc ul { columns: 2; }
  .docs-pilot { margin: 0 4% 3rem; }
}
@media (max-width: 767px) {
  body { font-size: 1rem; }
  .docs-header-inner { gap: 1rem; }
  .docs-label { padding-left: 1rem; }
  .docs-cta { display: none; }
  .docs-main { margin: 1rem 3% 2.5rem; padding: 1.75rem 1.25rem 2rem; border-radius: var(--radius-card); }
  .docs-main h1 { font-size: 1.9rem; }
  .docs-main h2 { font-size: 1.45rem; margin-top: 2.25rem; }
  .docs-main h3 { font-size: 1.2rem; }
  .docs-main.landing { padding: 2.5rem 5% 1rem; }
  .landing-intro h1 { font-size: 2.25rem; }
  .waf-toc { padding: 1.75rem 1.25rem; border-radius: var(--radius-card); }
  .waf-toc ul { columns: 1; }
  .docs-pilot p { font-size: 1.5rem; }
  .docs-footer-cols { grid-template-columns: repeat(2, minmax(8rem, auto)); gap: 2rem; }
}
@media (max-width: 479px) {
  .docs-logo img { width: 120px; }
  .docs-label { display: none; }
  .docs-main pre { font-size: .8rem; padding: 1rem; }
}
