/* GD v/x AI: reading layout in the PkWr site style (pkwr.co)
   IBM Plex Mono Italic, no bold, green strip and sliding panel on the right. */

:root {
  --ink: #111;
  --paper: #f4f2ee;
  --muted: #6b6862;
  --rule: #d9d5ce;
  --strip: #00ff88;        /* GD v/x AI green (yellow on pkwr.co) */
  --strip-hover: #00dd77;
  --panel-bg: #fff;
  --strip-w: 44px;
  --panel-w: 380px;
  --gutter: 28px;
  --font: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
/* no bold anywhere: one weight only, and no faux-bold */
h1, h2, h3, h4, h5, h6, strong, b, th, dt { font-weight: 400; }
html { font-synthesis: none; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--panel-bg); padding: 8px 12px; }

/* ---------- Reading column ---------- */
.reader {
  min-height: 100vh;
  padding: 72px var(--gutter) 96px;
  margin-right: calc(var(--panel-w) + var(--strip-w));
  transition: margin-right 450ms var(--ease);
}
.panel-closed .reader { margin-right: var(--strip-w); transition: margin-right 450ms var(--ease) 260ms; }
.doc, .pager { max-width: 68ch; margin: 0 auto; }
.doc { font-size: 15px; line-height: 1.7; outline: none; }
.loading { color: var(--muted); }

/* page header: eyebrow (group / number) + title, as on the project pages */
.doc-head { margin: 0 0 48px; }
.eyebrow {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  font-style: normal; font-weight: 400; color: var(--muted); margin: 0 0 14px;
}
.eyebrow a { text-decoration: none; border-bottom: 1px solid var(--strip); }
.eyebrow a:hover { border-bottom-color: var(--ink); }
.doc-title { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 300; margin: 0; }

/* body text */
.doc p { margin: 0 0 1.1em; }
.doc h1, .doc h2 {           /* a document's own top-level headings read as sections */
  font-size: 26px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 300;
  margin: 2.4em 0 .7em; padding-top: .8em; border-top: 1px solid var(--ink);
}
.doc h3 { font-size: 19px; line-height: 1.25; font-weight: 300; letter-spacing: -0.01em; margin: 2em 0 .5em; }
.doc h4, .doc h5, .doc h6 {
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-style: normal;
  color: var(--muted); margin: 2em 0 .6em;
}
.doc h1:first-child, .doc h2:first-child { margin-top: 0; }
.doc strong, .doc b { font-weight: 400; font-style: normal; }   /* emphasis by turning upright, not weight */
.doc em { font-style: normal; }
.doc a { text-decoration: none; border-bottom: 1px solid var(--strip); transition: border-color 150ms; }
.doc a:hover { border-bottom-color: var(--ink); }
.doc a[target="_blank"]::after { content: " \2197"; font-size: .85em; }
.doc ul, .doc ol { margin: 0 0 1.2em; padding-left: 1.6em; }
.doc ul { list-style: none; }
.doc ul > li { position: relative; }
.doc ul > li::before { content: "–"; position: absolute; left: -1.3em; color: var(--muted); }
.doc li { margin: .25em 0; }
.doc li > p { margin: 0 0 .4em; }
.doc ol { list-style: decimal; }
.doc ol > li::marker { color: var(--muted); font-size: .85em; }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.doc hr.dotted { border-top-style: dotted; }
.doc blockquote { margin: 1.4em 0; padding: 0 0 0 18px; border-left: 3px solid var(--strip); }
.doc code { font-family: var(--font); font-style: normal; font-size: .9em; background: #e9e6e0; padding: .05em .3em; }
.doc pre { background: #e9e6e0; padding: 14px 16px; overflow-x: auto; font-size: 13px; line-height: 1.55; }
.doc pre code { background: none; padding: 0; }
.doc img { display: block; max-width: 100%; height: auto; margin: 1.6em 0; }

/* tables: ruled, small, scroll sideways on narrow screens */
.table-wrap { overflow-x: auto; margin: 1.6em 0 2em; }
.doc table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.5; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--rule); }
.doc th {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-style: normal;
  color: var(--muted); border-bottom: 1px solid var(--ink);
}

/* previous / next document */
.pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 72px; padding-top: 18px; border-top: 1px solid var(--ink); }
.pager a { text-decoration: none; max-width: 48%; }
.pager .next { text-align: right; margin-left: auto; }
.pager small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--muted); margin-bottom: 4px; }
.pager span { font-size: 20px; font-weight: 300; letter-spacing: -0.02em; }
.pager a:hover span { font-style: normal; }

/* ---------- Drawer: yellow strip + panel, as on pkwr.co ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 20;
  display: flex;
  background: var(--panel-bg);
  box-shadow: -10px 0 30px rgba(0,0,0,.12);
  transform: translateX(0);
  transition: transform 450ms var(--ease), background-color 700ms ease 120ms;
}
.panel-closed .drawer {
  transform: translateX(var(--panel-w));
  background: var(--strip);
  transition: transform 450ms var(--ease) 260ms, background-color 420ms ease;
}
.strip {
  width: var(--strip-w); flex-shrink: 0; margin: 0; padding: 22px 0; border: 0;
  background: var(--panel-bg); color: var(--ink); font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  transition: background-color 700ms ease 120ms;
}
.panel-closed .strip { background: var(--strip); transition: background-color 420ms ease; }
.panel-closed .strip:hover { background: var(--strip-hover); }
.strip-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; white-space: pre; }
.strip-icon { font-size: 22px; line-height: 1; font-style: normal; transform: rotate(45deg); transition: transform 300ms var(--ease); }
.panel-closed .strip-icon { transform: none; }

.panel {
  width: var(--panel-w); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--gutter) var(--gutter) 48px 10px;
}
.panel > * { transition: opacity 400ms ease 250ms; }
.panel-closed .panel > * { opacity: 0; transition: opacity 180ms ease; }
.panel-closed .panel { visibility: hidden; transition: visibility 0s linear 720ms; }
.panel-head { margin-bottom: 28px; }
.panel-title { font-size: 34px; font-weight: 300; letter-spacing: -0.03em; line-height: 1; margin: 0 0 8px; }
.panel-sub { font-size: 13px; color: var(--muted); margin: 0; }

/* document list: the site's menu style (Light Italic, upright on hover) */
.menu h2 { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-style: normal; color: var(--muted); margin: 28px 0 10px; }
.menu h2:first-child { margin-top: 0; }
.menu ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.menu li { border-bottom: 1px solid var(--rule); }
.menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 6px; margin: 0 -6px; text-decoration: none; }
.menu .menu-label { font-size: 17px; font-weight: 300; letter-spacing: -0.01em; line-height: 1.15; }
.menu .menu-meta { font-size: 11px; color: var(--muted); font-style: normal; flex-shrink: 0; }
.menu a:hover .menu-label, .menu a:focus-visible .menu-label { font-style: normal; }
.menu a.is-current .menu-label::after { content: " \2190"; font-size: 13px; }
.menu a.ext .menu-label::after { content: " \2197"; font-size: 13px; }

/* the open document's sections, listed under it */
.toc { list-style: none; margin: 0 0 10px; padding: 0 0 0 14px; border-left: 1px solid var(--strip); }
.menu .toc li { border: 0; }
.toc a { display: block; padding: 3px 0; margin: 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.toc a:hover, .toc a.is-here { color: var(--ink); }
.toc a.is-here { font-style: normal; }

/* ---------- Phones and narrow windows ---------- */
.topbar { display: none; }
@media (max-width: 960px) {
  :root { --panel-w: min(380px, 100vw); --gutter: 18px; }
  .reader, .panel-closed .reader { margin-right: 0; padding-top: 88px; }
  .topbar {
    display: flex; justify-content: space-between; align-items: center;
    position: fixed; top: 0; left: 0; right: 0; z-index: 15; height: 52px; padding: 0 16px;
    background: var(--paper); border-bottom: 1px solid var(--rule);
  }
  .topbar-title { font-size: 18px; font-weight: 300; text-decoration: none; letter-spacing: -0.02em; }
  .topbar-menu { font: inherit; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-style: normal; background: var(--strip); border: 0; padding: 8px 12px; cursor: pointer; }
  .strip { display: none; }
  .drawer { box-shadow: -10px 0 30px rgba(0,0,0,.25); }
  .panel-closed .drawer { transform: translateX(100%); }
  .panel { padding-left: var(--gutter); }
  .doc { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .drawer, .topbar, .pager { display: none; }
  .reader { margin: 0; padding: 0; }
  body { background: #fff; }
}

/* the file's own heading, when it says more than the title */
.doc-sub { font-size: 15px; line-height: 1.45; color: var(--muted); margin: 14px 0 0; max-width: 56ch; }
.no-anim *, .no-anim *::before { transition: none !important; }

/* the page title is not a section heading */
.doc .doc-title { border: 0; padding: 0; margin: 0; font-size: clamp(32px, 4.2vw, 52px); line-height: 1.02; letter-spacing: -0.03em; }
/* headings written in bold in the files stay italic like every other heading */
.doc h1 strong, .doc h2 strong, .doc h3 strong, .doc h1 em, .doc h2 em, .doc h3 em { font-style: inherit; }
/* long section names (e.g. the SoTL form questions) stay on one line in the panel */
.toc a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc .doc-sub { margin: 18px 0 0; }
.menu .toc { margin: 2px 0 12px; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--strip); }

/* status icons: Material Symbols in place of the documents' emoji (light outline, to sit with Plex Mono Light) */
.icon {
  font-family: "Material Symbols Outlined"; font-weight: 300; font-style: normal;
  font-size: 1.2em; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap;
  display: inline-block; vertical-align: -0.22em; width: 1em; overflow: hidden;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  font-feature-settings: "liga"; -webkit-font-smoothing: antialiased;
}
.icon-check_circle, .icon-autorenew { color: var(--strip); }
.icon-cancel { color: #e63c18; }   /* the dust red */
