/* Hallmark · v2.0.0 · shape: docs · theme: creoglyph-docs (brand) · genre: modern-minimal · surface: absolute */
/* critique: calm reading page, one orange accent, contents beside the text, figures drawn in the page's own tokens */
/* Hallmark · waive 7b · --on-accent is white only on the #d93d00 accent fill · white on the orange accent measures 4.55:1 and any off-white drops below the 4.5:1 text contrast */
/* Hallmark · dismissed F4 · the home hero has one filled action; "Read the docs" is .btn without .primary: transparent fill and a 1px rule, an outlined button */
/* Hallmark · dismissed 58 · /docs is reference text read in parts through the contents panel, not a landing screen; the home page keeps the 450-word budget */
/* Creoglyph docs style (shared by Creoglyph product docs; decisions 57-58). The family look of the Creogen docs on the mantra's terms:
   tokens only, a type scale whose steps are at least 1.125 apart, spacing on the 4px scale, one radius per nesting level, the
   Creoglyph orange as the only accent (contrast-measured tones), light and dark, 320 to 2560. */
:root{
  --paper:#ffffff;--paper-2:#f5f5f5;--ink:#0a0d0b;--graphite:#545654;--rule:#e2e3e2;--rule-2:#d0d1d0;--code:#f0f1f0;
  --accent:#d93d00;--accent-hover:#b83400;--accent-text:#c2410c;--on-accent:#ffffff;--accent-soft:#ffe5d9;
  --font-head:"Schibsted Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-body:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  /* type scale: 13 / 16 / 20 / 24 / 32 / 40 (mobile tops out at 32) */
  --t-small:13px;--t-body:16px;--t-lede:20px;--t-h3:24px;--t-h2:32px;--t-h1:40px;
  --lh-small:20px;--lh-body:28px;--lh-lede:32px;--lh-h3:32px;--lh-h2:40px;--lh-h1:48px;
  /* spacing: the 4px scale */
  --s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:24px;--s6:32px;--s7:48px;--s8:64px;--s9:96px;
  --r-sm:4px;--r-md:8px;--r-lg:12px;
  --measure:68ch;--wide:1280px;--toc:200px;--header:64px;--gutter:var(--s5);
  color-scheme:light;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){--paper:#0a0d0b;--paper-2:#141715;--ink:#f4f5f4;--graphite:#b5b6b6;--rule:#232624;--rule-2:#3b3d3c;--code:#161917;--accent-text:#ff8a5c;--accent-soft:#3a1a0c;color-scheme:dark}}
:root[data-theme="dark"]{--paper:#0a0d0b;--paper-2:#141715;--ink:#f4f5f4;--graphite:#b5b6b6;--rule:#232624;--rule-2:#3b3d3c;--code:#161917;--accent-text:#ff8a5c;--accent-soft:#3a1a0c;color-scheme:dark}
@media (min-width:720px){:root{--gutter:var(--s6)}}
@media (min-width:1080px){:root{--t-h1:48px;--lh-h1:56px;--t-h2:40px;--lh-h2:48px;--gutter:var(--s7)}}

@font-face{font-family:"Inter";src:url(/assets/fonts/inter-var.woff2) format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Schibsted Grotesk";src:url(/assets/fonts/schibsted-grotesk-var.woff2) format("woff2");font-weight:400 900;font-display:swap}

*{box-sizing:border-box}
html,body{overflow-x:clip}
html{background:var(--paper);scroll-padding-top:calc(var(--header) + var(--s4))}
body{margin:0;background:var(--paper);color:var(--ink);font:400 var(--t-body)/var(--lh-body) var(--font-body);text-rendering:optimizeLegibility}
a{color:var(--accent-text);text-underline-offset:3px}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--r-sm)}
code{font-family:var(--font-mono);font-size:1em;line-height:1;overflow-wrap:anywhere;background:var(--code);padding:0 var(--s1);border-radius:var(--r-sm)}
p,li{max-width:var(--measure)}
h1,h2,h3,h4{font-family:var(--font-head);font-weight:600;margin:0;text-wrap:balance}
h1{font-size:var(--t-h1);line-height:var(--lh-h1)}
h2{font-size:var(--t-h2);line-height:var(--lh-h2)}
h3{font-size:var(--t-h3);line-height:var(--lh-h3)}
h4{font-size:var(--t-body);line-height:var(--lh-body)}
p{margin:var(--s3) 0 0;text-wrap:pretty}
ul,ol{margin:var(--s3) 0 0;padding-left:var(--s5)}
li+li{margin-top:var(--s2)}

.skip{position:absolute;left:var(--s4);top:calc(var(--s8) * -1);background:var(--ink);color:var(--paper);padding:var(--s2) var(--s3);border-radius:var(--r-md);z-index:20}
.skip:focus{top:var(--s3)}

/* header */
.top{position:sticky;top:0;z-index:10;background:var(--paper);border-bottom:1px solid var(--rule)}
.top-in{max-width:var(--wide);margin:0 auto;height:var(--header);padding:0 var(--gutter);display:flex;align-items:center;justify-content:space-between;gap:var(--s4)}
.brand{display:flex;align-items:center;gap:var(--s2);color:var(--ink);text-decoration:none;font:600 var(--t-body)/var(--lh-body) var(--font-head)}
.brand span{color:var(--graphite);font-weight:500}
.brand .cb-mark{width:28px;height:28px;flex:none}
.theme-switch{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border:1px solid var(--rule-2);border-radius:var(--r-md);background:transparent;color:var(--ink);cursor:pointer}
.theme-switch svg{width:20px;height:20px}
.theme-switch .moon{display:none}
.theme-switch[aria-checked="true"] .sun{display:none}
.theme-switch[aria-checked="true"] .moon{display:block}
@media (hover:hover){.theme-switch:hover{background:var(--paper-2)}}
.theme-switch{transition:transform 120ms ease-out}
.theme-switch:active{transform:scale(0.96)}
a:active{color:var(--ink)}

/* layout */
.wrap{max-width:var(--wide);margin:0 auto;padding:0 var(--gutter)}
.layout{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--s7)}
.toc{display:none}
@media (min-width:1080px){
  .layout{grid-template-columns:var(--toc) minmax(0,1fr)}
  .toc{display:block;position:sticky;top:calc(var(--header) + var(--s6));align-self:start;max-height:calc(100vh - var(--header) - var(--s8));overflow:auto;padding-top:var(--s6)}
}
.toc-title{margin:0 0 var(--s2);font:600 var(--t-small)/var(--lh-small) var(--font-body);color:var(--ink)}
.toc ol{position:relative;list-style:none;margin:0;padding:0}
.toc li{margin:0;max-width:none}
.toc a{display:block;padding:var(--s1) 0 var(--s1) var(--s3);border-left:2px solid var(--rule);color:var(--graphite);text-decoration:none;font-size:var(--t-small);line-height:var(--lh-small)}
.toc a[data-depth="1"]{padding-left:var(--s6)}
.toc a[aria-current="true"]{color:var(--ink);font-weight:600;border-left-color:var(--accent)}
@media (hover:hover){.toc a:hover{color:var(--ink)}}
/* the curved rail (docs.js): replaces the left rules when script runs */
.toc ol.has-rail a{border-left-color:transparent}
.rail{position:absolute;inset:0;overflow:visible;pointer-events:none}
.rail path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.rail-base{stroke:var(--rule-2);stroke-width:1.5}
.rail-active{stroke:var(--accent);stroke-width:2.5;stroke-dasharray:0 99999;transition:stroke-dashoffset 450ms cubic-bezier(.4,0,.2,1),stroke-dasharray 450ms cubic-bezier(.4,0,.2,1)}
@media (prefers-reduced-motion:reduce){.rail-active{transition:none}}
main{min-width:0;padding:var(--s7) 0 var(--s9)}

/* hero */
.hero{padding-bottom:var(--s7);border-bottom:1px solid var(--rule)}
.lede{font-size:var(--t-lede);line-height:var(--lh-lede);color:var(--graphite);margin-top:var(--s4)}
.mantra{list-style:none;display:flex;flex-wrap:wrap;gap:var(--s2);padding:0;margin:var(--s5) 0 0;max-width:none}
.mantra li{margin:0;padding:var(--s1) var(--s3);border:1px solid var(--rule-2);border-radius:999px;font-size:var(--t-small);line-height:var(--lh-small);font-weight:500}

/* groups and topics */
.group{padding-top:var(--s8)}
.group-lede{font-size:var(--t-lede);line-height:var(--lh-lede);color:var(--graphite);margin-top:var(--s3)}
.topic{padding-top:var(--s7)}

/* the flow: numbered steps */
.flow{list-style:none;counter-reset:f;padding:0;margin:var(--s5) 0 0;max-width:none;border-top:1px solid var(--rule)}
.flow li{counter-increment:f;display:grid;grid-template-columns:var(--s7) minmax(0,1fr);gap:var(--s3);margin:0;padding:var(--s4) 0;border-bottom:1px solid var(--rule);max-width:none}
.flow li::before{content:counter(f);font:600 var(--t-h3)/var(--lh-h3) var(--font-head);color:var(--accent-text)}
.flow b{display:block;font-weight:600}
.flow span{display:block;color:var(--graphite)}

/* reuse ladder: climb from the bottom */
.ladder{list-style:none;display:grid;grid-auto-rows:1fr;gap:var(--s2);padding:0;margin:var(--s5) 0 0;max-width:480px} /* written top rung first (ol reversed): one row height for every rung */
.ladder li{margin:0;display:grid;grid-template-columns:var(--s6) minmax(0,1fr);column-gap:var(--s3);padding:var(--s3) var(--s4);border:1px solid var(--rule-2);border-radius:var(--r-lg);background:var(--paper)}
.ladder li::before{content:attr(data-rung);grid-row:span 2;font:600 var(--t-body)/var(--lh-body) var(--font-head);color:var(--graphite)}
.ladder b{font-weight:600}
.ladder small{color:var(--graphite);font-size:var(--t-small);line-height:var(--lh-small)}
.ladder li.ask{border-style:dashed}
.ladder li.top{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.ladder li.top::before,.ladder li.top small{color:var(--on-accent)}

/* content homes: a 2x2 grid of plain cells */
.homes{display:grid;grid-template-columns:minmax(0,1fr);margin-top:var(--s5);border:1px solid var(--rule-2);border-radius:var(--r-lg);overflow:hidden}
@media (min-width:720px){.homes{grid-template-columns:repeat(2,minmax(0,1fr))}}
.homes>div{padding:var(--s5);border-bottom:1px solid var(--rule)}
@media (min-width:720px){.homes>div:nth-child(odd){border-right:1px solid var(--rule)}}
.homes h3{font-size:var(--t-body);line-height:var(--lh-body)} /* a card title under an h2: next level, body size */
.homes p{margin-top:var(--s1);color:var(--graphite)}
.homes ul{padding-left:var(--s5);font-size:var(--t-small);line-height:var(--lh-small)}

/* rules list */
.rules{list-style:none;padding:0;columns:2 280px;column-gap:var(--s6);max-width:none}
.rules li{break-inside:avoid;font-size:var(--t-small);line-height:var(--lh-small);margin:0 0 var(--s2)}

/* tables: the first column stays put when the table scrolls sideways */
.tablewrap{margin-top:var(--s5);overflow-x:auto;border:1px solid var(--rule-2);border-radius:var(--r-lg)}
.tools{width:100%;border-collapse:collapse;font-size:var(--t-small);line-height:var(--lh-small)}
.tools th,.tools td{text-align:left;vertical-align:top;padding:var(--s3) var(--s4);border-bottom:1px solid var(--rule)}
.tools tr:last-child td{border-bottom:0}
.tools th{color:var(--graphite);font-weight:600;background:var(--paper-2)}
.tools th:first-child,.tools td:first-child{position:sticky;left:0;background:var(--paper);z-index:1;box-shadow:inset -1px 0 0 var(--rule-2)} /* a visible edge: content scrolls under it */
.tools th:first-child{background:var(--paper-2)}

/* the cross-functional flow figure */
.xflow{margin:var(--s5) 0 0}
.xflow-scroll{overflow-x:auto}
.xflow svg{display:block;width:100%;min-width:720px;height:auto;font-family:var(--font-body);border:1px solid var(--rule-2);border-radius:var(--r-lg)} /* the figure owns its frame */
.xflow .lane{fill:var(--paper-2)}
.xflow .lane-line{stroke:var(--rule);stroke-width:1}
.xflow .lane-name{fill:var(--graphite);font-size:13px;font-weight:600}
.xflow .node rect{fill:var(--paper);stroke:var(--rule-2);stroke-width:1.25}
.xflow .node.you rect{stroke:var(--ink)}
.xflow .node.gate rect{fill:var(--accent);stroke:var(--accent)}
.xflow .node text{fill:var(--ink);font-size:13px}
.xflow .node.gate text{fill:var(--on-accent);font-weight:600}
.xflow .step{fill:var(--accent-text);font-family:var(--font-head);font-size:13px;font-weight:600}
.xflow .edge{stroke:var(--graphite);stroke-width:1.25;fill:none}
.xflow .edge.loop{stroke-dasharray:4 4}
.xflow .head{fill:var(--graphite)}
.xflow figcaption{margin-top:var(--s3);color:var(--graphite);font-size:var(--t-small);line-height:var(--lh-small);max-width:var(--measure)}

footer.group{margin-top:var(--s8);padding-top:var(--s5);border-top:1px solid var(--rule);color:var(--graphite);font-size:var(--t-small);line-height:var(--lh-small)}

/* actions (home hero): one primary, one quiet; 44px targets; every state */
.actions{display:flex;flex-wrap:wrap;gap:var(--s3);margin-top:var(--s5)}
.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 var(--s5);border:1px solid var(--rule-2);border-radius:var(--r-md);background:transparent;color:var(--ink);font:600 var(--t-body)/var(--lh-body) var(--font-body);text-decoration:none;transition:transform 120ms ease-out,background-color 120ms ease-out}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
@media (hover:hover){.btn:hover{background:var(--paper-2)}.btn.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover)}}
.btn:active{transform:scale(0.98)}
.btn[aria-disabled="true"],.btn:disabled,.theme-switch:disabled{background:var(--paper-2);border-color:var(--rule);color:var(--graphite);cursor:not-allowed;transform:none} /* three channels, never opacity alone */
.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:var(--r-md)}

@media (max-width:479px){.actions .btn{flex:1 1 100%}} /* stacked actions share one width */

/* breadcrumb (tool pages) */
.crumbs ol{list-style:none;display:flex;flex-wrap:wrap;gap:var(--s2);padding:0;margin:0 0 var(--s5);max-width:none;font-size:var(--t-small);line-height:var(--lh-small);color:var(--graphite)}
.crumbs li{margin:0}
.crumbs li+li::before{content:"/";margin-right:var(--s2);color:var(--rule-2)}
.crumbs a{color:var(--graphite)}

/* previous / next (tool pages) */
.pager{list-style:none;display:flex;flex-wrap:wrap;gap:var(--s3) var(--s6);padding:0;max-width:none}
.pager li{margin:0}

/* footer navigation */
.site-foot ul{list-style:none;display:flex;flex-wrap:wrap;gap:var(--s2) var(--s5);padding:0;margin:0;max-width:none}
.site-foot li{margin:0}
.site-foot a{color:var(--graphite)}
@media (hover:hover){.site-foot a:hover,.crumbs a:hover{color:var(--ink)}}

@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media (forced-colors:active){.ladder li.top{forced-color-adjust:none}}
