
/* =============================================================
   Legacy documentation layout adapted to the 2026 Encoded visual system.
   Shared design-system styles follow this block and govern visible chrome.
   ============================================================= */


:root {
  --r: #FF4F00;        /* International Orange */
  --r-hover: #E64700;
  --r-pressed: #B83900;
  --r-light: #FFF0E8;
  --k: #0A0A0A;
  --w: #FFFFFF;

  --g50:  #F6F6F6;
  --g100: #EBEBEB;
  --g200: #D4D4D4;
  --g400: #9C9C9C;
  --g600: #6B6B6B;
  --g800: #333333;

  --moss: #2C3E2D;
  --amber: #FF4F00;

  --fg-1: var(--k);
  --fg-2: var(--g800);
  --fg-3: var(--g600);
  --fg-4: var(--g400);

  --bg-paper: var(--w);
  --bg-paper-2: var(--g50);
  --bg-code: #1A1714;

  --rule: var(--g100);

  --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Aeonik', 'Iowan Old Style', Georgia, serif;
  --mono:  'Geist Mono', 'SF Mono', Menlo, Consolas, monospace;

  --hairline: 0.5px solid var(--rule);
  --radius: 0;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 200ms;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--fg-1); background: var(--w); text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--r-light); color: var(--k); }


.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ============ NAV ============ */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.94); backdrop-filter: blur(6px); border-bottom: 2px solid var(--r); }
.nav-inner { height: 60px; display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.nav-brand { display: flex; align-items: center; gap: 14px; }
.nav-brand svg { width: 26px; height: 26px; display: block; }
.nav-mark { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--fg-1); }
.nav-mark .u { color: var(--r); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--g600); }
.nav-link:hover { color: var(--r); }
.nav-link.active { color: var(--r); }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em; padding: 11px 22px; border: none; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.btn.primary { background: var(--k); color: #fff; }
.btn.primary:hover { background: var(--g800); }
.btn.ghost { background: transparent; color: var(--k); border: 0.5px solid var(--k); }
.btn.ghost:hover { background: var(--k); color: #fff; }
.btn.accent { background: var(--r); color: #fff; }
.btn.accent:hover { background: var(--r-hover); }
.btn.accent:active { background: var(--r-pressed); }
.btn .arrow { transition: transform var(--dur) var(--ease); display: inline-block; }
.btn:hover .arrow { transform: translateX(3px); }
.btn.sm { font-size: 11px; padding: 7px 14px; white-space: nowrap; }

/* ============ DOCS LAYOUT ============ */
.docs-layout { max-width: 1200px; margin: 0 auto; padding: 56px 40px 112px; display: grid; grid-template-columns: 232px minmax(0,1fr); gap: 72px; align-items: start; }
.toc { position: sticky; top: 92px; font-family: var(--mono); font-size: 12px; line-height: 1.5; border-left: 0.5px solid var(--rule); padding-left: 22px; }
.toc-label { display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--g400); margin-bottom: 16px; }
.toc a { display: block; color: var(--g600); padding: 4px 0; transition: color var(--dur) var(--ease); }
.toc a:hover, .toc a.active { color: var(--r); }

.docs-body { max-width: 78ch; min-width: 0; }

/* ============ DOCS TYPE ============ */
.hero-sub { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-4); margin-bottom: 24px; display: inline-flex; align-items: center; gap: 8px; }
.hero-sub::before { content: ""; width: 6px; height: 6px; background: var(--r); display: inline-block; }
.docs-body h1 { font-family: var(--sans); font-weight: 500; font-size: clamp(48px, 6vw, 80px); letter-spacing: -0.035em; line-height: 0.92; margin: 0 0 16px; }
.docs-body h1 em { font-style: normal; color: var(--r); }
.docs-body .lede { font-family: var(--sans); font-size: 19px; line-height: 1.55; color: var(--fg-2); max-width: 60ch; margin-bottom: 40px; }
.docs-body .lede a { color: var(--r); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 0.5px; }
.docs-body h2 { font-family: var(--sans); font-weight: 500; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.025em; line-height: 1.05; margin: 72px 0 20px; padding-top: 28px; border-top: 0.5px solid var(--rule); }
.docs-body h2 em { font-style: normal; color: var(--r); }
.docs-body h2:first-of-type { margin-top: 40px; }
.docs-body h3 { font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; margin: 36px 0 12px; }
.docs-body p { color: var(--fg-2); font-size: 16.5px; line-height: 1.65; margin: 0 0 16px; }
.docs-body p b { color: var(--fg-1); font-weight: 600; }
.docs-body ul, .docs-body ol { color: var(--fg-2); font-size: 16px; line-height: 1.7; padding-left: 22px; margin: 12px 0 20px; }
.docs-body li { margin-bottom: 7px; }
.docs-body a:not(.btn) { color: var(--r); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 0.5px; }
.docs-body a:not(.btn):hover { color: var(--k); }

/* inline code */
.docs-body li code, .docs-body p code, .docs-body td code, .callout code, .canon-block code {
  font-family: var(--mono); font-size: 0.88em; background: var(--g50); padding: 1px 6px; border: 0.5px solid var(--rule); color: var(--fg-1);
}

/* Code cards use the same file treatment as the homepage hero: a black
   file header, a light document body, and the red offset block as the one
   elevation device. The label stays generic because examples range from
   BCP files to hosting configuration and consumer code. */
.docs-body pre {
  position: relative;
  background: var(--w);
  color: var(--g800);
  padding: 61px 18px 18px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
  margin: 20px 12px 32px 0;
  border: 0.5px solid var(--k);
  box-shadow: 12px 12px 0 var(--r);
}
.docs-body pre::before {
  content: "BCP file";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: var(--k);
  color: var(--w);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.docs-body pre::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 7px;
  height: 7px;
  background: var(--r);
}
.docs-body pre .c { color: var(--g400); }
.docs-body pre .k { color: var(--r); }
.docs-body pre .s { color: var(--g800); }
.docs-body pre .h { color: var(--k); font-weight: 600; }

/* callouts — brand red-bar motif, square */
.callout { margin: 24px 0; padding: 18px 22px; background: var(--g50); border-left: 3px solid var(--r); font-size: 15px; line-height: 1.6; color: var(--fg-2); }
.callout.honest { border-left-color: var(--moss); }
.callout b { color: var(--fg-1); }
.callout .tag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r); display: block; margin-bottom: 6px; }
.callout.honest .tag { color: var(--moss); }

/* canonical-definition block */
.canon-block { margin: 24px 0 36px; padding: 30px 32px; background: var(--g50); border-left: 4px solid var(--r); }
.canon-block .tag { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--r); margin-bottom: 14px; }
.canon-block .headline { font-family: var(--sans); font-weight: 500; font-size: clamp(22px, 2.8vw, 30px); letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 14px; color: var(--fg-1); }
.canon-block .headline em { font-style: normal; color: var(--r); }
.canon-block p { font-size: 16px; line-height: 1.6; color: var(--fg-2); margin: 0; }

/* tables */
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; }
th { text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--g600); font-weight: 500; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--k); }
td { padding: 12px 14px 12px 0; border-bottom: 0.5px solid var(--rule); color: var(--fg-2); vertical-align: top; }
td:first-child { font-family: var(--mono); font-size: 13px; white-space: nowrap; color: var(--fg-1); }

.btn-row { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ FOOTER ============ */
.foot { background: var(--k); color: #fff; position: relative; padding: 56px 0 32px; }
.foot::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--r); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 32px; border-bottom: 0.5px solid #222; }
.foot-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.foot-brand svg { width: 24px; height: 24px; }
.foot-brand-text { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: #fff; }
.foot-brand-text .u { color: var(--r); }
.foot-sub { font-family: var(--mono); font-size: 11px; line-height: 1.65; color: var(--g600); max-width: 32ch; }
.foot-col h5 { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--g400); margin-bottom: 14px; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { padding: 4px 0; }
.foot-col a { font-family: var(--mono); font-size: 12px; color: var(--g200); }
.foot-col a:hover { color: var(--r); }
.foot-bottom { margin-top: 24px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--g600); }
.foot-bottom .star { color: var(--r); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 28px; padding: 32px 24px 80px; }
  .toc { position: static; border-left: 0; padding-left: 0; border-bottom: 0.5px solid var(--rule); padding-bottom: 20px; }
  .wrap { padding: 0 24px; }
}
@media (max-width: 720px) {
  .nav-inner { padding: 0 24px; }
  .nav-link:not(.cta) { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
