/* Business MD. Direction A "Daylight" is the default; B and C are previews set by html[data-dir]. */
:root {
  --bg: #ffffff; --fg: #0a0a0a; --muted: #5c5c5c; --line: #e4e4e0; --surface: #f5f5f2;
  --mark-bg: #ffe600; --mark-fg: #0a0a0a; --btn-bg: #0a0a0a; --btn-fg: #ffffff; --link: #0a0a0a;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --stretch: 118%; --dweight: 750; --dtrack: -0.03em;
  --r1: 4px; --r2: 8px;
}
html[data-dir="b"] {
  --bg: #0f2a22; --fg: #f3eedf; --muted: #b4bea8; --line: #2a4a3e; --surface: #153429;
  --mark-bg: transparent; --mark-fg: #c9a45c; --btn-bg: #c9a45c; --btn-fg: #0f2a22; --link: #c9a45c;
  --display: "Newsreader", Georgia, serif; --stretch: 100%; --dweight: 500; --dtrack: -0.02em;
}
html[data-dir="c"] {
  --bg: #1433d6; --fg: #ffffff; --muted: #c9d3ff; --line: #3d59e6; --surface: #1b3de6;
  --mark-bg: #ffffff; --mark-fg: #1433d6; --btn-bg: #ffffff; --btn-fg: #1433d6; --link: #ffffff;
  --font: "IBM Plex Sans", Arial, sans-serif; --display: "IBM Plex Sans", Arial, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --stretch: 100%; --dweight: 600; --dtrack: -0.035em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
code, pre, .mono { font-family: var(--mono); font-size: 0.86em; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 16px; background: var(--bg); padding: 8px 12px; z-index: 10; }

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
.sec { padding-block: 96px; border-top: 1px solid var(--line); }
.sec.first { border-top: 0; padding-block: 72px 48px; }
.sec.tight { padding-block: 0 96px; border-top: 0; }

/* Type */
.h1, .hero h1 { font-family: var(--display); font-stretch: var(--stretch); font-weight: var(--dweight); letter-spacing: var(--dtrack); line-height: 1.02; margin: 0 0 24px; text-wrap: balance; }
.h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }
.hero h1 { font-size: clamp(2.9rem, 7.2vw, 5.6rem); }
.h2 { font-family: var(--display); font-stretch: var(--stretch); font-weight: var(--dweight); letter-spacing: -0.025em; font-size: clamp(1.9rem, 3.6vw, 2.85rem); line-height: 1.06; margin: 0 0 20px; max-width: 18ch; text-wrap: balance; }
.h3 { font-weight: 650; font-size: 1.2rem; line-height: 1.25; margin: 0 0 8px; letter-spacing: -0.01em; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--muted); max-width: 60ch; margin: 0 0 32px; }
.label { font-weight: 650; font-size: 0.82rem; color: var(--muted); margin: 0 0 12px; }
.small, .meta, .aside { font-size: 0.92rem; color: var(--muted); }
mark { background: var(--mark-bg); color: var(--mark-fg); padding: 0 0.12em; margin: 0 -0.06em; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
html[data-dir="b"] mark { padding: 0; margin: 0; font-style: italic; text-decoration: underline 2px; text-underline-offset: 0.14em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; background: var(--btn-bg); color: var(--btn-fg); font: 650 1rem/1 var(--font); border: 1.5px solid var(--btn-bg); border-radius: var(--r1); text-decoration: none; cursor: pointer; transition: transform 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.94rem; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--fg); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--display); font-stretch: var(--stretch); font-weight: 750; font-size: 1.08rem; letter-spacing: -0.02em; white-space: nowrap; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { color: var(--fg); text-decoration: none; font-weight: 500; font-size: 0.96rem; padding: 8px 0; }
.nav nav a:hover, .nav nav a[aria-current] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Hero */
.hero { padding-block: 80px 96px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: center; }
.hero .lede { font-size: clamp(1.15rem, 1.7vw, 1.4rem); color: var(--fg); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.proof { font-size: 0.95rem; color: var(--muted); margin: 0; }

/* File card */
.filecard { background: var(--bg); border: 1.5px solid var(--fg); border-radius: var(--r2); overflow: hidden; }
.hero .filecard { box-shadow: 10px 10px 0 var(--fg); }
html[data-dir="b"] .hero .filecard, html[data-dir="c"] .hero .filecard { box-shadow: 10px 10px 0 var(--line); background: var(--surface); }
.filecard-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1.5px solid var(--fg); font-size: 0.92rem; }
.filecard-bar code { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-actions { display: flex; gap: 18px; font-size: 0.88rem; white-space: nowrap; }
.filecard .prose { padding: 8px 28px 28px; }
.hero .filecard .prose { padding: 4px 24px 24px; font-size: 0.93rem; max-height: 430px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 78%, transparent); mask-image: linear-gradient(#000 78%, transparent); }

/* Prose (rendered Markdown) */
.prose { max-width: 74ch; overflow-wrap: anywhere; }
.prose h1, .prose h2 { font-family: var(--display); font-stretch: var(--stretch); font-weight: var(--dweight); letter-spacing: -0.02em; font-size: 1.7em; line-height: 1.1; margin: 1.1em 0 0.5em; }
.prose h3 { font-size: 1.12em; font-weight: 650; margin: 1.7em 0 0.4em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.prose h4, .prose h5, .prose h6 { font-size: 1em; font-weight: 650; margin: 1.4em 0 0.3em; }
.prose p, .prose ul, .prose ol { margin: 0 0 0.9em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: 0.3em; }
.prose blockquote { margin: 0 0 1em; padding: 2px 0 2px 16px; border-left: 3px solid var(--mark-fg); color: var(--muted); }
html:not([data-dir]) .prose blockquote { border-left-color: var(--mark-bg); }
.prose blockquote p { margin: 0; }
.prose code { background: var(--surface); padding: 0.1em 0.35em; border-radius: 3px; }
.prose pre { background: var(--surface); padding: 16px; border-radius: var(--r1); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.table { overflow-x: auto; margin: 0 0 1.1em; }
table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
th, td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); }
th { font-weight: 650; border-bottom: 1.5px solid var(--fg); }

/* Home sections */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
.said { list-style: none; margin: 0; padding: 0; }
.said li { padding: 22px 0; border-top: 1px solid var(--line); font-size: clamp(1.15rem, 1.9vw, 1.5rem); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.said li:last-child { border-bottom: 1px solid var(--line); }
.belief { margin: 32px 0 0; font-size: 1.05rem; color: var(--muted); }
.layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 48px; border-top: 1.5px solid var(--fg); }
.layer { padding: 28px 32px 8px 0; }
.layer + .layer { padding-left: 32px; border-left: 1px solid var(--line); }
.layer h3 { font-family: var(--display); font-stretch: var(--stretch); font-weight: var(--dweight); font-size: 1.6rem; letter-spacing: -0.02em; margin: 0 0 4px; }
.layer > p { color: var(--muted); margin: 0 0 20px; }
.layer dl { margin: 0; }
.layer dt { margin-top: 18px; } .layer dt a { font-family: var(--mono); font-size: 0.9rem; font-weight: 500; }
.layer dd { margin: 4px 0 0; font-size: 0.95rem; color: var(--muted); }
.steps { list-style: none; counter-reset: s; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.steps li { counter-increment: s; border-top: 1.5px solid var(--fg); padding-top: 20px; }
.steps li::before { content: counter(s); display: block; font-family: var(--display); font-stretch: var(--stretch); font-weight: var(--dweight); font-size: 3.2rem; line-height: 1; letter-spacing: -0.04em; margin-bottom: 16px; }
.steps p { margin: 0; color: var(--muted); }
.addr { display: inline-block; background: var(--surface); padding: 4px 8px; border-radius: 3px; overflow-wrap: anywhere; }
.closer { background: var(--fg); color: var(--bg); border: 0; }
.closer .h2 { max-width: none; font-size: clamp(2.2rem, 5vw, 4rem); }
.closer .btn { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.closer p { color: inherit; opacity: 0.75; max-width: 46ch; margin: 0 0 32px; }

/* Directory */
.org-list { list-style: none; margin: 0 0 48px; padding: 0; border-top: 1.5px solid var(--fg); }
.org-link { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: 24px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.org-link:hover .org-name { text-decoration: underline; text-underline-offset: 4px; }
.org-name { font-weight: 650; font-size: 1.15rem; }
.org-sum { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips code { background: var(--surface); padding: 3px 7px; border-radius: 3px; font-size: 0.74rem; }
.tag { display: inline-block; vertical-align: middle; font: 600 0.72rem/1 var(--font); letter-spacing: 0; padding: 4px 7px; border: 1px solid var(--fg); border-radius: 3px; }
.tag-lg { font-size: 0.85rem; margin-left: 8px; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; background: var(--surface); padding: 32px; border-radius: var(--r2); margin-bottom: 24px; }
.callout p { margin: 0; color: var(--muted); max-width: 52ch; }

/* Org page */
.crumb { font-size: 0.92rem; color: var(--muted); margin: 0 0 20px; }
.org-head .lede { margin-bottom: 12px; }
.org-body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.file-nav { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 8px; }
.file-nav .label:not(:first-child) { margin-top: 28px; }
.file-stack { display: grid; gap: 32px; }
.file-stack .filecard { scroll-margin-top: 96px; }

/* Forms */
.form { display: grid; gap: 24px; max-width: 760px; }
.field { display: grid; gap: 6px; }
.field label, .field .lab { font-weight: 650; font-size: 0.96rem; }
.field .hint { font-size: 0.88rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], select, textarea { width: 100%; font: inherit; color: var(--fg); background: var(--bg); border: 1.5px solid var(--fg); border-radius: var(--r1); padding: 12px 14px; }
textarea { font-family: var(--mono); font-size: 0.88rem; line-height: 1.5; min-height: 260px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.slug-row { display: flex; align-items: center; border: 1.5px solid var(--fg); border-radius: var(--r1); }
.slug-row span { padding: 0 0 0 14px; color: var(--muted); font-family: var(--mono); font-size: 0.88rem; white-space: nowrap; }
.slug-row input { border: 0; padding-left: 2px; font-family: var(--mono); font-size: 0.88rem; }
.filebox { border: 1px solid var(--line); border-radius: var(--r2); padding: 20px; display: grid; gap: 14px; background: var(--surface); }
.filebox-top { display: flex; gap: 12px; align-items: center; } .filebox-top select { max-width: 280px; }
.hp { position: absolute; left: -9999px; }
.notice { border-left: 4px solid var(--mark-bg); background: var(--surface); padding: 18px 20px; border-radius: 0 var(--r1) var(--r1) 0; }
html[data-dir] .notice { border-left-color: var(--mark-fg); }
.notice p { margin: 0 0 6px; } .notice p:last-child { margin: 0; }
.msg { font-weight: 600; } .msg.err { color: #b3261e; } html[data-dir] .msg.err { color: var(--fg); text-decoration: underline; }
.done { border: 1.5px solid var(--fg); border-radius: var(--r2); padding: 32px; max-width: 760px; }
.key { display: block; font-family: var(--mono); font-size: 0.95rem; background: var(--surface); padding: 14px; border-radius: var(--r1); margin: 10px 0 16px; overflow-wrap: anywhere; user-select: all; }

/* Standard + brand pages */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-nav { position: sticky; top: 100px; display: grid; gap: 8px; font-size: 0.95rem; }
.doc .prose h2 { margin-top: 2em; padding-top: 1.2em; border-top: 1px solid var(--line); scroll-margin-top: 90px; } .doc .prose h2:first-child { margin-top: 0; padding-top: 0; border: 0; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 16px 0 32px; }
.sw { border: 1px solid var(--line); border-radius: var(--r1); overflow: hidden; font-size: 0.82rem; } .sw i { display: block; height: 72px; } .sw span { display: block; padding: 8px 10px; }
.dirs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 20px 0 8px; }
.dir { text-align: left; font: inherit; color: var(--fg); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r2); padding: 20px; cursor: pointer; }
.dir[aria-pressed="true"] { border-color: var(--fg); }
.dir b { display: block; font-size: 1.1rem; margin-bottom: 4px; } .dir span { color: var(--muted); font-size: 0.9rem; }
.specimen { font-family: var(--display); font-stretch: var(--stretch); font-weight: var(--dweight); letter-spacing: var(--dtrack); font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 1; margin: 16px 0 32px; }
.tpl-list { list-style: none; padding: 0; margin: 0; border-top: 1.5px solid var(--fg); }
.tpl-list li { display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.tpl-list span { color: var(--muted); }

/* Preview chip + footer */
.dirchip { position: fixed; right: 16px; bottom: 16px; z-index: 9; background: var(--fg); color: var(--bg); font-size: 0.85rem; padding: 10px 14px; border-radius: var(--r1); }
.dirchip a { color: inherit; margin-left: 10px; }
.foot { border-top: 1px solid var(--line); padding-block: 48px; font-size: 0.93rem; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.foot-brand p { margin: 8px 0 0; color: var(--muted); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; } .foot nav a { color: var(--fg); text-decoration: none; } .foot nav a:hover { text-decoration: underline; }
.foot-note { grid-column: 1 / -1; color: var(--muted); margin: 8px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .sec { padding-block: 64px; } .sec.first { padding-block: 48px 32px; } .sec.tight { padding-block: 0 64px; }
  .hero { padding-block: 48px 72px; }
  .hero-grid, .split, .org-body, .doc { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .layers, .steps, .dirs { grid-template-columns: minmax(0, 1fr); gap: 0; } .steps { gap: 32px; }
  .layer, .layer + .layer { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .org-link, .tpl-list li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .file-nav, .doc-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 16px; display: flex; } .file-nav .label, .file-nav .small { display: none; }
  .two { grid-template-columns: 1fr; } .dirs { gap: 12px; }
  .hero .filecard { box-shadow: 6px 6px 0 var(--fg); }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: min(1160px, 100% - 36px); }
  .nav nav { display: none; } .nav-in { justify-content: space-between; gap: 12px; height: 60px; }
  .cta-row .btn { width: 100%; } .filecard .prose { padding: 4px 18px 20px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

html[data-dir="c"] .hero h1 { line-height: 1.14; }
