/* OSG v4 — core.css
 * Cycle 3: vertex-color palette aligned with Quick Diagnostic.
 * One visual language across site and tools.
 */

:root {
  --bg: #fafaf7;
  --bg-soft: #f3f0e9;
  --ink: #2c2c2c;
  --muted: #5a5a5a;
  --faint: #75716a; /* was #999 — failed contrast (2.8:1) for the small text it carries; this holds 4.5:1 on the paper field */
  --rule: #e4e2dd;
  --rule-soft: #efedea;
  --link: #2c2c2c;

  /* Canonical vertex palette — carried forward from Quick Diagnostic */
  --diff: #b06840;   /* Differentiation — terracotta · Library */
  --conn: #3d7ab5;   /* Connection — blue · Public Face */
  --bound: #558a3e;  /* Boundaries — green · Automation */
  --arch: #a89030;   /* Architecture — gold · Toolkits */

  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max: 38rem;
}

* { box-sizing: border-box; }

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.55;
  padding: 2rem 1.25rem 4rem;
}

main {
  max-width: var(--max);
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--bg);
  display: inline-block;
  margin-bottom: 1rem;
}

header.nav {
  max-width: var(--max);
  margin: 0 auto 2.5rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 2;
}
header.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 1rem;
  display: inline-block;
}
header.nav a:hover,
header.nav a:focus { color: var(--ink); }

h1 {
  font-size: 1.8rem;
  font-weight: normal;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.05rem;
  font-weight: normal;
  margin: 2rem 0 0.5rem;
  color: var(--muted);
  font-family: var(--sans);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
h3 {
  font-size: 1.05rem;
  font-weight: bold;
  margin: 1.5rem 0 0.25rem;
}

p { margin: 0 0 1rem; }

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.subtitle {
  color: var(--muted);
  margin-bottom: 2rem;
  font-style: italic;
}

/* vertex marker — small label preceding h1 on vertex pages */
.vertex-marker {
  display: block;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.4rem;
}
.vertex-marker.diff { color: var(--diff); }
.vertex-marker.conn { color: var(--conn); }
.vertex-marker.bound { color: var(--bound); }
.vertex-marker.arch { color: var(--arch); }

/* pages get a vertex-tinted top rule */
.page-rule {
  height: 3px;
  width: 4rem;
  margin: 0 0 1.5rem;
  background: var(--ink);
}
.page-rule.diff { background: var(--diff); }
.page-rule.conn { background: var(--conn); }
.page-rule.bound { background: var(--bound); }
.page-rule.arch { background: var(--arch); }

/* somatic invitation */
.invitation {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--rule);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 2rem 0;
}

/* scaffold notice */
.scaffold {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 0;
  margin: 2.5rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--sans);
}

/* edges-from-here block on vertex pages */
.edges {
  margin: 3rem 0 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.edges h2 {
  margin-top: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
}
.edges dl { margin: 0.5rem 0 0; }
.edges dt {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: bold;
  margin-top: 0.75rem;
}
.edges dt:first-of-type { margin-top: 0; }
.edges dd {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* the descent — the one site-wide device marking where a page drops
   from plain terms into structural language. Use identically everywhere:
   a rule, then the standard line, then the deep layer. */
.depth-gate {
  margin: 3.5rem 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}
.depth-gate p {
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* the depth zone — the field below the gate shifts, so depth is felt
   before it's read. Soft tint, one structural rule at the top. */
.depth-zone {
  background: var(--bg-soft);
  margin: 2rem -1.25rem 0;
  padding: 0.75rem 1.25rem 2rem;
  border-top: 3px solid var(--ink);
}
.depth-zone .axis table { background: transparent; }
.depth-zone .axis th { color: #87827a; }

/* seed line — the one sentence a section stands on, set so a skimming
   reader catches it. One per section at most; it must earn the size. */
.seed {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--ink);
  border-left: 3px solid var(--ink);
  padding: 0.35rem 0 0.35rem 1.25rem;
  margin: 2.25rem 0;
}
.seed.diff { border-left-color: var(--diff); }
.seed.conn { border-left-color: var(--conn); }
.seed.bound { border-left-color: var(--bound); }
.seed.arch { border-left-color: var(--arch); }

/* glance figure — one inline SVG near the top of a page that carries
   the page's whole shape in five seconds. Paper register: site palette,
   system fonts, no dark field (that register belongs to transmissions). */
.glance { margin: 2rem 0 2.5rem; }
.glance svg { width: 100%; height: auto; display: block; }
.glance figcaption {
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--faint);
  text-align: center;
  letter-spacing: 0.02em;
}

/* glance strip — a four-step flow in plain HTML so it reflows on a
   phone. Use for "how this works" at the top of an action page. */
ol.glance-strip {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 2rem 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  font-family: var(--sans);
}
ol.glance-strip li {
  background: var(--bg-soft);
  border-top: 3px solid var(--muted);
  padding: 0.8rem 0.9rem 0.9rem;
}
ol.glance-strip li:nth-child(1) { border-top-color: var(--conn); }
ol.glance-strip li:nth-child(2) { border-top-color: var(--diff); }
ol.glance-strip li:nth-child(3) { border-top-color: var(--arch); }
ol.glance-strip li:nth-child(4) { border-top-color: var(--bound); }
ol.glance-strip li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-block;
  width: 1.3rem; height: 1.3rem; line-height: 1.3rem;
  text-align: center; border-radius: 50%;
  background: var(--muted); color: var(--bg);
  font-size: 0.7rem; font-weight: 600;
  margin-bottom: 0.45rem;
}
ol.glance-strip .t { display: block; font-size: 0.86rem; font-weight: 600; color: var(--ink); margin-bottom: 0.2rem; }
ol.glance-strip .d { display: block; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 38rem) {
  ol.glance-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 24rem) {
  ol.glance-strip { grid-template-columns: 1fr; }
}

/* scale map — small-multiples row used in depth layers to show the
   architecture of a long list before the reader enters it. */
.scale-map { margin: 2rem 0 2.5rem; font-family: var(--sans); }
.scale-map .row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.35rem 1rem;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.scale-map .row:last-child { border-bottom: none; }
.scale-map .lbl { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--ink); }
.scale-map .lbl .n { color: var(--faint); margin-left: 0.35rem; }
.scale-map .dots { line-height: 1; }
.scale-map .dots span {
  display: inline-block; width: 0.55rem; height: 0.55rem;
  margin: 0 0.25rem 0.25rem 0; border-radius: 1px;
  background: var(--muted);
}
.scale-map .dots span.conn  { background: var(--conn); }
.scale-map .dots span.diff  { background: var(--diff); }
.scale-map .dots span.arch  { background: var(--arch); }
.scale-map .dots span.bound { background: var(--bound); }
.scale-map .what { grid-column: 2; font-size: 0.82rem; color: var(--muted); }
@media (max-width: 30rem) {
  .scale-map .row { grid-template-columns: 1fr; }
  .scale-map .what { grid-column: 1; }
}

/* refusals — four shadow axes */
.axis {
  margin: 2.5rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.axis h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}
.axis.connection h3 { color: var(--conn); }
.axis.differentiation h3 { color: var(--diff); }
.axis.architecture h3 { color: var(--arch); }
.axis.boundaries h3 { color: var(--bound); }

.axis .axis-frame {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1rem;
}
.axis table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.axis th, .axis td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.5rem 0.5rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.axis th {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

footer.site {
  max-width: var(--max);
  margin: 4rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
}
footer.site p { margin: 0.25rem 0; }
footer.site nav { margin-bottom: 0.75rem; }
footer.site nav a {
  color: var(--muted);
  margin-right: 0.75rem;
  text-decoration: none;
}
footer.site nav a:hover,
footer.site nav a:focus { color: var(--ink); }

ul.bare {
  list-style: none;
  padding-left: 0;
}
ul.bare li {
  margin-bottom: 0.5rem;
}

ul.framed { list-style: none; padding-left: 0; }
ul.framed li {
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule-soft);
}
ul.framed em { display: block; margin-bottom: 0.2rem; }
ul.framed .frame {
  color: var(--muted);
  font-size: 0.95rem;
}

/* engagement-shape cards on consult page */
.engagement {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--bound);
}
.engagement h3 {
  margin-top: 0;
  font-family: var(--sans);
  font-size: 1rem;
}

/* sliding-scale table on consult page */
.band-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}
.band-table th, .band-table td {
  text-align: left;
  padding: 0.6rem 0.6rem 0.6rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.band-table th {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  border-bottom-color: var(--rule);
}

/* mobile */
/* Page-tail cross-link bar — discreet trust-substrate cross-link
   that sits above the site footer on action-surfaces. Per cycle 83
   receiver-face canonical synthesis: every action-surface should
   cross-link to its trust anchors (refusals + the body of work + the
   related action-surface) so the bio-as-substrate principle operates
   architecturally rather than only conceptually. */
.page-tail {
  margin: 3rem 0 2rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  line-height: 1.8;
}
.page-tail a {
  color: var(--faint);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 0.1rem;
  margin: 0;
}
.page-tail a:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.page-tail .sep {
  margin: 0 0.6rem;
  color: var(--rule-soft);
}

@media (max-width: 30rem) {
  html { font-size: 16px; }
  body { padding: 1.25rem 1rem 3rem; }
  header.nav { margin-bottom: 1.5rem; }
  header.nav a { margin-right: 0.75rem; }
  h1 { font-size: 1.5rem; }
  .axis table, .axis tbody, .axis tr, .axis td, .axis th {
    display: block;
  }
  .axis th { padding-bottom: 0; }
  .axis td { padding-top: 0.25rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--rule); }
  .axis td:first-of-type { font-weight: bold; padding-top: 0.75rem; }
  .band-table, .band-table tbody, .band-table tr, .band-table td, .band-table th {
    display: block;
  }
  .band-table td { padding-top: 0.25rem; }
  .page-tail {
    line-height: 2.2;
  }
  .page-tail .sep {
    display: none;
  }
  .page-tail a {
    display: inline-block;
    margin-right: 0.75rem;
  }
}
