/* HideSync — material specimen card */
/* Fonts are loaded via <link rel="preconnect"> + stylesheet in each page <head>. */

:root {
  --linen:       #EDE6D6;
  --linen-deep:  #E3DAC3;
  --paper:       #F5F0E1;
  --ink:         #1F1A15;
  --graphite:    #3A362F;
  --muted:       #6B6254;
  --brass:       #8B6A3F;
  --brass-deep:  #6F532E;
  --oxblood:     #5A2A22;
  --rule:        #C9BEA3;
  --rule-soft:   #D8CEB4;

  --gold:        #E8C88A;        /* deep-mode bright accent */
  --on-ink:      237, 230, 214;  /* --linen as r,g,b for rgba() over --ink */

  --serif: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --measure: 62ch;
  --gutter: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-feature-settings: "onum", "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image:
    radial-gradient(rgba(31,26,21,0.035) 1px, transparent 1px),
    radial-gradient(rgba(31,26,21,0.02) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
  mix-blend-mode: multiply;
  opacity: 0.6;
}

a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); transition: border-color .15s ease, color .15s ease; }
a:hover { border-bottom-color: var(--brass); color: var(--brass-deep); }

/* keyboard focus — designed, not the UA default */
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
.deep :focus-visible { outline-color: var(--gold); }

.mono {
  font-family: var(--mono);
  font-size: 0.78em;
  letter-spacing: 0.02em;
  color: var(--graphite);
}

.mono-caps {
  font-family: var(--mono);
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.rule-double {
  border: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  height: 3px;
  margin: 0;
}

/* ---------- layout ---------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 24px;
  padding: 28px 0 16px;
  border-bottom: 1px solid var(--rule);
}
.masthead .wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.masthead .wordmark .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brass);
  display: inline-block;
  transform: translateY(-1px);
}
.masthead .nav {
  display: flex;
  gap: 28px;
  justify-self: end;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.masthead .nav a { border-bottom: none; color: var(--graphite); }
.masthead .nav a:hover { color: var(--brass-deep); }
.masthead .meta {
  justify-self: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- hero / specimen ---------- */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--rule);
}

.hero .lede h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.hero .lede h1 em {
  font-style: italic;
  color: var(--brass-deep);
}
.hero .lede p.dek {
  font-size: 19px;
  line-height: 1.6;
  color: var(--graphite);
  max-width: 46ch;
  margin: 0 0 36px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}
.btn {
  font-family: var(--serif);
  font-size: 17px;
  padding: 13px 22px 12px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--linen);
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  border-radius: 0;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--brass-deep); border-color: var(--brass-deep); }
.btn .mono { color: rgba(var(--on-ink),0.6); font-size: 12px; }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--linen); }
.btn.ghost .mono { color: var(--muted); }

.platforms {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* specimen card on right */
.specimen {
  position: relative;
  align-self: start;
}

.specimen-frame {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
}
.specimen-frame::before {
  content: "SPECIMEN 01 — MAKER FIELD KIT";
  position: absolute;
  top: -9px;
  left: 18px;
  background: var(--linen);
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.specimen-frame::after {
  content: "ED. 2026.04 / LOCAL";
  position: absolute;
  bottom: -9px;
  right: 18px;
  background: var(--linen);
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.swatch {
  aspect-ratio: 1 / 1.1;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule-soft);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px 12px;
  color: var(--ink);
}
.swatch .caption {
  position: relative;
  z-index: 2;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.swatch .caption strong {
  font-weight: 500;
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
}

/* material swatches */
.swatch.linen    { background: #E3DAC3; }
.swatch.linen .caption { color: #4a3e27; }
.swatch.linen::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient( 90deg, rgba(107,86,47,0.08) 0 1px, transparent 1px 4px ),
    repeating-linear-gradient(  0deg, rgba(107,86,47,0.08) 0 1px, transparent 1px 4px );
}
.swatch.walnut   { background: #4a2f1c; color: #EDE6D6; }
.swatch.walnut .caption { color: #EDE6D6; }
.swatch.walnut::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(96deg,
      rgba(255,230,190,0.08) 0 1px,
      transparent 1px 5px,
      rgba(0,0,0,0.12) 5px 6px,
      transparent 6px 11px);
}
.swatch.brass    { background: #a57c3f; }
.swatch.brass .caption { color: #2b1d08; }
.swatch.brass::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,235,180,0.55), transparent 55%),
    repeating-linear-gradient(135deg,
      rgba(0,0,0,0.05) 0 2px,
      transparent 2px 7px);
}
.swatch.graphite { background: #3A362F; color: var(--linen); }
.swatch.graphite .caption { color: var(--linen); }
.swatch.graphite::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,0.04) 0 1px,
      transparent 1px 3px);
}

/* ---------- section heading ---------- */

.section {
  padding: 84px 0;
  border-bottom: 1px solid var(--rule);
}
.section-head {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 48px;
  margin-bottom: 48px;
  align-items: baseline;
}
.section-head .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--ink);
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}
.section-head h2 em { font-style: italic; color: var(--brass-deep); }

/* ---------- recognition (why different) ---------- */

.recognition {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 48px;
}
.recognition .body {
  max-width: var(--measure);
  font-size: 19px;
  line-height: 1.65;
  color: var(--graphite);
}
.recognition .body p { margin: 0 0 1.2em; }
.recognition .body p:last-child { margin-bottom: 0; }
.recognition .body strong { color: var(--ink); font-weight: 500; }

.commitments {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.commitment {
  padding: 24px 22px 22px;
  border-right: 1px solid var(--rule);
}
.commitment:last-child { border-right: none; }
.commitment .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 10px;
}
.commitment h2,
.commitment h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}
.commitment p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--graphite);
}

/* ---------- primitives ---------- */

.primitives-intro {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 48px;
  margin-bottom: 44px;
}
.primitives-intro p {
  max-width: var(--measure);
  font-size: 19px;
  line-height: 1.65;
  color: var(--graphite);
  margin: 0;
}

.primitive-switcher {
  margin: 0 0 16px;
  display: flex;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.primitive-switcher button {
  flex: 1;
  background: transparent;
  border: none;
  border-right: 1px solid var(--rule);
  padding: 14px 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: color .15s ease, background .15s ease;
  position: relative;
}
.primitive-switcher button:last-child { border-right: none; }
.primitive-switcher button:hover { color: var(--ink); }
.primitive-switcher button.active {
  color: var(--ink);
  background: var(--paper);
}
.primitive-switcher button.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--brass);
}
.primitive-switcher button .num {
  display: block;
  color: var(--rule);
  font-size: 10px;
  margin-bottom: 4px;
  transition: color .15s ease;
}
.primitive-switcher button.active .num { color: var(--brass); }

.primitive-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  padding: 36px 0 8px;
  min-height: 340px;
}
.primitive-card .defn h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 34px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.primitive-card .defn .pronounce {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 22px;
  letter-spacing: 0.04em;
}
.primitive-card .defn .definition {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  color: var(--graphite);
  margin: 0 0 18px;
  max-width: 38ch;
}
.primitive-card .defn .example-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.primitive-card .defn .example {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  max-width: 38ch;
  margin: 0;
}

.primitive-card .record {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--graphite);
  position: relative;
  align-self: start;
}
.primitive-card .record::before {
  content: "~/hidesync/" attr(data-path);
  position: absolute;
  top: -9px;
  left: 16px;
  background: var(--linen);
  padding: 0 10px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.primitive-card .record .k { color: var(--brass-deep); }
.primitive-card .record .s { color: var(--ink); }
.primitive-card .record .c { color: var(--muted); }

/* connections under the card */
.primitive-connections {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 14px 0 0;
  border-top: 1px dashed var(--rule);
  margin-top: 18px;
  flex-wrap: wrap;
}
.primitive-connections .label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.primitive-connections .chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  color: var(--graphite);
  background: transparent;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.primitive-connections .chip:hover {
  border-color: var(--brass);
  color: var(--brass-deep);
}

/* ---------- commons ---------- */

.commons {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 48px;
}
.commons .body {
  max-width: var(--measure);
}
.commons .body p {
  font-size: 19px;
  line-height: 1.65;
  color: var(--graphite);
  margin: 0 0 1.2em;
}
.commons .pullquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.35;
  color: var(--ink);
  padding: 18px 0 18px 24px;
  border-left: 2px solid var(--brass);
  margin: 28px 0;
  max-width: 32ch;
}

/* ---------- format / local ---------- */

.local {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.local .left { max-width: 46ch; }
.local h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
.local p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--graphite);
  margin: 0 0 1.1em;
}
.local .fs-tree {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--graphite);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 22px 26px;
  position: relative;
}
.local .fs-tree::before {
  content: "~/leather-studio/";
  position: absolute;
  top: -9px;
  left: 16px;
  background: var(--linen);
  padding: 0 10px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.local .fs-tree .dim { color: var(--muted); }
.local .fs-tree .hi  { color: var(--brass-deep); }

/* ---------- founder note ---------- */

.founder {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 48px;
}
.founder .letter {
  max-width: 56ch;
  font-size: 18px;
  line-height: 1.7;
  color: var(--graphite);
}
.founder .letter p { margin: 0 0 1.1em; }
.founder .letter p:first-child::first-letter {
  font-family: var(--serif);
  font-size: 58px;
  float: left;
  line-height: 0.85;
  padding: 6px 8px 0 0;
  color: var(--ink);
}
.founder .sign {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  margin-top: 20px;
}
.founder .sign .role {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* ---------- door / deep dive entry ---------- */

.door {
  padding: 64px 0 64px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(120px,180px) 1fr auto;
  gap: 48px;
  align-items: end;
}
.door .note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--ink);
}
.door .invitation {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink);
  max-width: 48ch;
}
.door .invitation em { font-style: italic; color: var(--brass-deep); }
.door .arrow {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 0;
  cursor: pointer;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink);
  align-self: end;
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.door .arrow:hover {
  color: var(--brass-deep);
  border-bottom-color: var(--brass-deep);
  transform: translateX(4px);
}

/* ---------- deep dive shell ---------- */

.deep {
  background: var(--ink);
  color: var(--linen);
}
.deep a { color: var(--linen); border-bottom-color: rgba(var(--on-ink),0.25); }
.deep a:hover { color: var(--gold); border-bottom-color: var(--gold); }

.deep .page { padding-top: 64px; padding-bottom: 64px; }

.deep .masthead-small {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(var(--on-ink),0.22);
}
.deep .masthead-small .wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 18px;
}
.deep .masthead-small .meta {
  justify-self: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(var(--on-ink),0.55);
}
.deep .masthead-small .back {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: none;
  color: rgba(var(--on-ink),0.7);
}
.deep .masthead-small .back:hover { color: var(--gold); }

.deep .opener {
  padding: 80px 0 60px;
  border-bottom: 1px solid rgba(var(--on-ink),0.22);
  display: grid;
  grid-template-columns: minmax(120px,180px) 1fr;
  gap: 48px;
}
.deep .opener .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 12px;
  border-top: 1px solid var(--gold);
}
.deep .opener h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.6vw, 50px);
  line-height: 1.08;
  margin: 0 0 28px;
  max-width: 22ch;
  letter-spacing: -0.01em;
}
.deep .opener h2 em { font-style: italic; color: var(--gold); }
.deep .opener p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: rgba(var(--on-ink),0.82);
  max-width: var(--measure);
  margin: 0 0 1.2em;
}

.deep .section {
  padding: 72px 0;
  border-bottom: 1px solid rgba(var(--on-ink),0.18);
}
.deep .section-head .tag {
  color: rgba(var(--on-ink),0.6);
  border-top-color: var(--gold);
}
.deep .section-head h2 em { color: var(--gold); }

.deep .body-copy {
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  color: rgba(var(--on-ink),0.82);
}
.deep .body-copy p { margin: 0 0 1.2em; }
.deep .body-copy strong { color: var(--linen); font-weight: 500; }

/* dual entity */
.entities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 40px;
  border-top: 1px solid rgba(var(--on-ink),0.22);
  border-bottom: 1px solid rgba(var(--on-ink),0.22);
}
.entity {
  padding: 28px 32px 30px;
  border-right: 1px solid rgba(var(--on-ink),0.22);
}
.entity:last-child { border-right: none; }
.entity .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.entity h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.entity .sub {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(var(--on-ink),0.55);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.entity p {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(var(--on-ink),0.82);
  margin: 0 0 1em;
}
.entity ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.9;
  color: rgba(var(--on-ink),0.75);
}
.entity ul li::before {
  content: "—  ";
  color: var(--gold);
}

/* roles */
.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(var(--on-ink),0.22);
  border-bottom: 1px solid rgba(var(--on-ink),0.22);
  margin-top: 36px;
}
.role {
  padding: 26px 28px;
  border-right: 1px solid rgba(var(--on-ink),0.22);
}
.role:last-child { border-right: none; }
.role .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 10px;
}
.role h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  margin: 0 0 6px;
}
.role .eq {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(var(--on-ink),0.55);
  margin-bottom: 14px;
}
.role p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(var(--on-ink),0.78);
  margin: 0;
}

/* market data table */
.market-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 13px;
}
.market-table th,
.market-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(var(--on-ink),0.18);
  color: rgba(var(--on-ink),0.85);
}
.market-table th {
  font-weight: 500;
  color: rgba(var(--on-ink),0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 11px;
  border-bottom: 1px solid rgba(var(--on-ink),0.35);
}
.market-table td.num {
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}

/* thesis list */
.thesis {
  margin-top: 32px;
  counter-reset: thesis;
}
.thesis > li {
  list-style: none;
  padding: 22px 0 22px 64px;
  border-top: 1px solid rgba(var(--on-ink),0.2);
  position: relative;
  counter-increment: thesis;
}
.thesis > li:last-child { border-bottom: 1px solid rgba(var(--on-ink),0.2); }
.thesis > li::before {
  content: "§ " counter(thesis, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
}
.thesis > li h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  margin: 0 0 8px;
  color: var(--linen);
  letter-spacing: -0.005em;
}
.thesis > li p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: rgba(var(--on-ink),0.78);
  margin: 0;
  max-width: 62ch;
}

/* contact */
.contact {
  display: grid;
  grid-template-columns: minmax(120px,180px) 1fr;
  gap: 48px;
  padding: 64px 0 12px;
}
.contact h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  color: var(--linen);
}
.contact h3 em { font-style: italic; color: var(--gold); }
.contact p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: rgba(var(--on-ink),0.8);
  max-width: 54ch;
  margin: 0 0 22px;
}
.contact .addrs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(var(--on-ink),0.22);
}
.contact .addr {
  padding: 20px 22px 22px;
  border-right: 1px solid rgba(var(--on-ink),0.22);
}
.contact .addr:last-child { border-right: none; }
.contact .addr .role {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.contact .addr .who {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--linen);
  margin-bottom: 8px;
}
.contact .addr .email {
  font-family: var(--mono);
  font-size: 12.5px;
  color: rgba(var(--on-ink),0.7);
  border-bottom: 1px solid rgba(var(--on-ink),0.25);
  padding-bottom: 1px;
}
.contact .addr .email:hover { color: var(--gold); border-bottom-color: var(--gold); }

.contact.addrs {
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(var(--on-ink), 0.22);
}

/* ---------- footer (colophon) ---------- */

.colophon {
  padding: 40px 0 56px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(var(--on-ink),0.55);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 24px;
}
.colophon .set { text-transform: uppercase; letter-spacing: 0.14em; }

/* ---------- Rillmark additions ---------- */

.rillmark-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.rillmark-mark svg {
  width: 22px;
  height: 22px;
}

.institution-masthead {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.institution-masthead .wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.institution-masthead .wordmark .sub {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.institution-masthead .status {
  margin-left: auto;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.institution-masthead .status .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--brass);
  border-radius: 50%;
  margin-right: 6px;
  transform: translateY(-1px);
}
.institution-masthead .nav {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.institution-masthead .nav a { border-bottom: none; color: var(--graphite); }
.institution-masthead .nav a:hover { color: var(--brass-deep); }

/* Thesis hero */
.thesis-hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: minmax(0, 180px) 1fr;
  gap: 48px;
  align-items: start;
}
.thesis-hero .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--ink);
}
.thesis-hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.2vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  text-wrap: balance;
  max-width: 16ch;
}
.thesis-hero h1 em { font-style: italic; color: var(--brass-deep); }
.thesis-hero .standfirst {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--graphite);
  max-width: 48ch;
  margin: 0 0 30px;
}
.thesis-hero .etym {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  letter-spacing: 0.04em;
  max-width: 54ch;
  padding-top: 22px;
  border-top: 1px dashed var(--rule);
}
.thesis-hero .etym strong {
  color: var(--graphite);
  font-weight: 500;
}

/* Thesis hero right column — expands the 2-col base to 3 when a panel is active */
.thesis-aside {
  display: none;
  align-self: start;
  padding-top: 14px;
}
body[data-hero-right="specimen"] .thesis-hero,
body[data-hero-right="opg"] .thesis-hero {
  grid-template-columns: minmax(0, 180px) 1fr minmax(0, 320px);
}
body[data-hero-right="specimen"] .thesis-aside,
body[data-hero-right="opg"] .thesis-aside { display: block; }

/* contact — 2-col, expands to right panel when active */
body[data-contact-right="quote"] .contact,
body[data-contact-right="roles"] .contact {
  grid-template-columns: minmax(0,180px) 1fr 1fr;
  gap: 48px;
}
body[data-contact-right="quote"] #contact-right,
body[data-contact-right="roles"] #contact-right { display: block; }
#contact-right { display: none; }

.opg-schema {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 22px 22px 20px;
}
.opg-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-soft);
}
.opg-nodes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.opg-node {
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--rule-soft);
  border-right: 1px solid var(--rule-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
  transition: background .15s ease;
}
.opg-node:hover { background: var(--linen-deep); }
.opg-node:nth-child(even) { border-right: none; }
.opg-node:nth-last-child(-n+2) { border-bottom: none; }
.opg-n {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  color: var(--brass-deep);
  letter-spacing: 0.1em;
}
.opg-foot {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  line-height: 1.6;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

/* Two doors */
.two-doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.door-card {
  padding: 40px 36px 36px;
  border-right: 1px solid var(--rule);
  position: relative;
  background: var(--linen);
  transition: background .2s ease;
  cursor: pointer;
  display: block;
  color: inherit;
  border-bottom: none;
}
.door-card:last-child { border-right: none; }
.door-card:hover { background: var(--paper); }
.door-card .tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 20px;
}
.door-card h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  max-width: 20ch;
}
.door-card h2 em { font-style: italic; color: var(--brass-deep); }
.door-card p {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--graphite);
  margin: 0 0 28px;
  max-width: 42ch;
}
.door-card .arrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-block;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.door-card:hover .arrow {
  color: var(--brass-deep);
  border-bottom-color: var(--brass-deep);
  transform: translateX(3px);
}

/* The proof — hidesync panel on surface */
.hidesync-panel {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 48px;
  margin-top: 40px;
}
.hidesync-panel .card {
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: 34px 38px 32px;
  position: relative;
}
.hidesync-panel .card::before {
  content: "MVP — SHIPPING NOW";
  position: absolute;
  top: -9px;
  left: 24px;
  background: var(--linen);
  padding: 0 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--brass-deep);
}
.hidesync-panel .card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 30px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.hidesync-panel .card .pos {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.hidesync-panel .card p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--graphite);
  margin: 0 0 22px;
  max-width: 60ch;
}
.hidesync-panel .downloads {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.hidesync-panel .downloads .arrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: color .15s ease, border-color .15s ease, transform .15s ease;
}
.hidesync-panel .downloads .arrow:hover {
  color: var(--brass-deep);
  border-bottom-color: var(--brass-deep);
  transform: translateX(3px);
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 48px;
}
.pricing .intro p {
  max-width: var(--measure);
  font-size: 19px;
  line-height: 1.65;
  color: var(--graphite);
  margin: 0 0 32px;
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-family: var(--serif);
}
.pricing-table th,
.pricing-table td {
  text-align: left;
  padding: 18px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
.pricing-table thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
  padding-top: 0;
}
.pricing-table .tier {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.005em;
  width: 22%;
}
.pricing-table .price {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  width: 16%;
  font-variant-numeric: tabular-nums;
}
.pricing-table .annual {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--brass-deep);
  width: 18%;
  font-variant-numeric: tabular-nums;
}
.pricing-table .notes {
  font-size: 15px;
  color: var(--graphite);
  line-height: 1.5;
}
.pricing-table tr.free .tier::after {
  content: " — free forever";
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  color: var(--brass-deep);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-left: 8px;
}
.pricing-table tr:hover { background: var(--paper); }

.pricing .fineprint {
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.7;
  max-width: 62ch;
}

/* ---------- palette variants applied to root ---------- */

body[data-palette="cool"] {
  --linen: #E9E7E1;
  --linen-deep: #DAD8D1;
  --paper: #F1EFE8;
  --ink: #1A1C22;
  --graphite: #2F323A;
  --muted: #636774;
  --brass: #3E5B7F;
  --brass-deep: #2A4263;
  --rule: #C3C1BA;
  --rule-soft: #D3D1CA;
  --gold: #9DBBDC;
  --on-ink: 233, 231, 225;
}
body[data-palette="slate"] {
  --linen: #E6E4DE;
  --linen-deep: #D7D5CE;
  --paper: #EFEDE6;
  --ink: #15171A;
  --graphite: #2A2C30;
  --muted: #5E6168;
  --brass: #2A2C30;
  --brass-deep: #15171A;
  --rule: #BDBBB4;
  --rule-soft: #CFCDC5;
  --gold: #C2C0B8;
  --on-ink: 230, 228, 222;
}
body[data-palette="oxblood"] {
  --linen: #EFE7D5;
  --linen-deep: #E2D9C3;
  --paper: #F5EEDC;
  --ink: #1D1411;
  --graphite: #3A2D26;
  --muted: #6E5C52;
  --brass: #7A2E24;
  --brass-deep: #5A2018;
  --rule: #CBBFA2;
  --rule-soft: #D9CEB2;
  --gold: #D89A6A;
  --on-ink: 239, 231, 213;
}

/* primitive layout variants */
body[data-primitives="grid"] .primitive-switcher { display: none; }
body[data-primitives="grid"] .primitives-grid { display: grid; }
body[data-primitives="grid"] .primitives-stack { display: none; }
body[data-primitives="grid"] #primitive-stage { display: none; }

body[data-primitives="stack"] .primitives-grid { display: none; }
body[data-primitives="stack"] .primitives-stack { display: block; }
body[data-primitives="stack"] .primitive-switcher { display: none; }
body[data-primitives="stack"] #primitive-stage { display: none; }

body[data-primitives="switch"] .primitives-grid { display: none; }
body[data-primitives="switch"] .primitives-stack { display: none; }

/* combined: always-visible grid + expanded detail below active cell */
body[data-primitives="combo"] .primitive-switcher { display: none; }
body[data-primitives="combo"] .primitives-stack { display: none; }
body[data-primitives="combo"] .primitives-grid { display: grid; cursor: default; }
body[data-primitives="combo"] .primitives-grid .cell { cursor: pointer; transition: background .15s ease; }
body[data-primitives="combo"] .primitives-grid .cell:hover { background: var(--paper); }
body[data-primitives="combo"] .primitives-grid .cell.active {
  background: var(--paper);
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}
body[data-primitives="combo"] .primitives-grid .cell.active .n { color: var(--brass-deep); }
body[data-primitives="combo"] #primitive-stage { display: block; margin-top: -1px; border-top: 1px solid var(--brass); background: var(--paper); padding: 36px 40px 32px; }
body[data-primitives="combo"] #primitive-stage .primitive-card { padding: 0; min-height: 0; }
body[data-primitives="combo"] #primitive-stage .primitive-card .defn h3 { display: none; }
body[data-primitives="combo"] #primitive-stage .primitive-connections { padding-top: 18px; }

.primitives-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.primitives-grid .cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px 24px 26px;
  position: relative;
  min-height: 210px;
}
.primitives-grid .cell .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--brass-deep);
  margin-bottom: 10px;
}
.primitives-grid .cell h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.primitives-grid .cell p {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--graphite);
  margin: 0 0 12px;
}
.primitives-grid .cell .ex {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.primitives-stack { display: none; }
.primitives-stack .row {
  display: grid;
  grid-template-columns: 60px 200px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.primitives-stack .row:last-child { border-bottom: 1px solid var(--rule); }
.primitives-stack .row .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brass-deep);
  letter-spacing: 0.1em;
}
.primitives-stack .row .name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  letter-spacing: -0.005em;
}
.primitives-stack .row .defn {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--graphite);
  max-width: 62ch;
}
.primitives-stack .row .defn .ex {
  display: block;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ================================================================ */
/* RESPONSIVE                                                        */
/* ================================================================ */

/* -- mid (tablet landscape / small desktop) -- */
@media (max-width: 1100px) {
  :root { --gutter: clamp(16px, 3vw, 40px); }

  .thesis-hero { grid-template-columns: minmax(0,180px) 1fr; padding: 64px 0 56px; gap: 32px; }
  .thesis-aside { display: none; }
  .thesis-hero h1 { font-size: clamp(38px, 5vw, 62px); }
  .thesis-hero .standfirst { font-size: 19px; }

  .section-head { gap: 32px; }
  .section-head .tag { min-width: 140px; }

  .recognition { gap: 32px; }
  .primitives-intro { gap: 32px; }
  .commons { gap: 32px; }
  .hidesync-panel { gap: 32px; }
  .pricing { gap: 32px; }
  .founder { gap: 32px; }

  .commitments { grid-template-columns: 1fr 1fr; }
  .commitments .commitment:last-child { grid-column: 1 / -1; border-right: none; border-top: 1px solid var(--rule); }

  .two-doors .door-card { padding: 40px 32px 36px; }
  .two-doors .door-card h2 { font-size: 28px; }

  .entities { grid-template-columns: 1fr 1fr; }

  .deep .opener { padding: 60px 0 48px; gap: 32px; }
  .deep .section { padding: 56px 0; }
  .contact { gap: 32px; }

  .primitive-card { gap: 32px; }

  .market-table th, .market-table td { padding: 12px 10px; font-size: 12px; }
}

/* -- tablet portrait -- */
@media (max-width: 900px) {
  :root { --gutter: 20px; }

  /* masthead */
  .masthead { grid-template-columns: auto 1fr; }
  .masthead .meta { display: none; }

  .institution-masthead { gap: 16px; }
  .institution-masthead .status { display: none; }
  .institution-masthead .nav { gap: 16px; font-size: 11px; margin-left: auto; }

  /* hero */
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; }

  /* thesis hero */
  .thesis-hero { grid-template-columns: 1fr; gap: 18px; padding: 48px 0 40px; }
  .thesis-hero .tag { padding-top: 0; border-top: none; }
  .thesis-hero h1 { font-size: clamp(34px, 7vw, 52px); }
  .thesis-hero .standfirst { font-size: 17px; max-width: 100%; }
  .thesis-hero .etym { font-size: 11.5px; }

  /* two doors */
  .two-doors { grid-template-columns: 1fr; }
  .two-doors .door-card { border-right: none; border-bottom: 1px solid var(--rule); padding: 36px 28px 32px; }
  .two-doors .door-card:last-child { border-bottom: none; }
  .two-doors .door-card h2 { font-size: 28px; }

  /* section headings — collapse left label column */
  .section-head,
  .recognition,
  .primitives-intro,
  .commons,
  .founder,
  .door,
  .hidesync-panel,
  .pricing,
  .deep .opener,
  .contact { grid-template-columns: 1fr; gap: 18px; }

  /* right-panel expansions (data-hero-right / data-contact-right) out-specify
     the collapse above — neutralise them so panels stack full-width on mobile */
  body[data-hero-right] .thesis-hero,
  body[data-contact-right] .contact { grid-template-columns: 1fr; }

  .section-head .tag,
  .recognition .mono-caps,
  .door .note,
  .deep .opener .tag,
  .commons .mono-caps,
  .hidesync-panel .mono-caps,
  .pricing .mono-caps { padding-top: 0; border-top: none; }

  .section .section-head { margin-bottom: 32px; }
  .section { padding: 56px 0; }

  /* local */
  .local { grid-template-columns: 1fr; gap: 32px; }

  /* primitives */
  .primitives-grid { grid-template-columns: 1fr 1fr !important; }
  .primitives-grid .cell { border-right: 1px solid var(--rule) !important; }
  .primitives-grid .cell:nth-child(even) { border-right: none !important; }
  .primitive-card { grid-template-columns: 1fr; gap: 24px; min-height: auto; }
  .primitive-switcher { flex-wrap: wrap; }
  .primitive-switcher button { flex: 1 1 30%; border-bottom: 1px solid var(--rule); }
  .primitives-stack .row { grid-template-columns: 40px 1fr; gap: 12px; }
  .primitives-stack .row .name { display: none; }

  /* commitments */
  .commitments { grid-template-columns: 1fr; }
  .commitment { border-right: none !important; border-bottom: 1px solid var(--rule); }
  .commitment:last-child { border-bottom: none; }

  /* deep dive */
  .entities { grid-template-columns: 1fr; }
  .entity { border-right: none !important; border-bottom: 1px solid rgba(var(--on-ink),0.2); }
  .entity:last-child { border-bottom: none; }

  .roles { grid-template-columns: 1fr; }
  .role { border-right: none !important; border-bottom: 1px solid rgba(var(--on-ink),0.2); }
  .role:last-child { border-bottom: none; }

  /* compound .contact.addrs (both classes on one el) collapses to one column */
  .contact.addrs { grid-template-columns: 1fr; }
  .contact .addr { border-right: none !important; border-bottom: 1px solid rgba(var(--on-ink),0.22); }
  .contact .addr:last-child { border-bottom: none; }

  /* door */
  .door { grid-template-columns: 1fr; padding: 48px 0; }

  /* pricing table */
  .pricing-table .annual { display: none; }
  .pricing-table thead th:nth-child(3) { display: none; }
  .market-table { font-size: 12px; }
  .market-table th, .market-table td { padding: 10px 8px; }

  /* deep masthead */
  .deep .masthead-small { grid-template-columns: auto 1fr; }
  .deep .masthead-small .meta { display: none; }

  /* colophon */
  .colophon { grid-template-columns: 1fr; gap: 8px; }
}

/* -- mobile -- */
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }

  .institution-masthead { gap: 12px; flex-wrap: wrap; }
  .institution-masthead .wordmark .sub { display: none; }
  .masthead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }

  /* mobile nav affordance: surface the existing nav as a wrapped row under the wordmark */
  .institution-masthead .nav,
  .masthead .nav {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 6px 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
    font-size: 11px;
  }
  .institution-masthead .nav a,
  .masthead .nav a { padding: 12px 2px; }

  .thesis-hero h1 { font-size: clamp(30px, 8vw, 42px); }

  .two-doors .door-card { padding: 28px 20px 24px; }
  .two-doors .door-card h2 { font-size: 24px; }
  .two-doors .door-card p { font-size: 15px; }

  .section { padding: 44px 0; }

  .primitives-grid { grid-template-columns: 1fr !important; }
  .primitives-grid .cell { border-right: none !important; }

  .primitive-switcher button { flex: 1 1 48%; font-size: 10.5px; padding: 15px 8px; min-height: 44px; }

  .specimen-frame { grid-template-columns: 1fr 1fr; }

  .hero .lede h1 { font-size: clamp(30px, 7vw, 44px); }
  .hero .lede p.dek { font-size: 16px; }
  .btn { font-size: 15px; padding: 12px 16px 11px; }
  .cta-row { flex-direction: column; align-items: flex-start; }

  .hidesync-panel .card { padding: 24px 20px; }

  .section-head h2 { font-size: clamp(24px, 6vw, 34px); }

  .deep .opener h2 { font-size: clamp(28px, 7vw, 40px); }

  .recognition .body { font-size: 16px; }
  .commons .body { font-size: 16px; }
  .body-copy { font-size: 16px; }

  .pullquote { font-size: 20px; }

  .market-table { font-size: 11px; }
  .market-table th, .market-table td { padding: 8px 6px; }
  .market-table th:last-child,
  .market-table td:last-child { display: none; }

  .thesis { counter-reset: thesis; }
  .thesis > li { padding-left: 48px; }
  .thesis > li h3 { font-size: 18px; }

  .primitives-stack .row { padding: 16px 0; }

  .primitive-card .defn h3 { font-size: 28px; }
  .primitive-card .defn .definition { font-size: 16px; }
  .primitive-card .record { font-size: 11.5px; padding: 16px 18px; }
  .primitive-card .record,
  .local .fs-tree { white-space: pre-wrap; overflow-wrap: anywhere; }

  .entity h3 { font-size: 22px; }
  .entity ul { font-size: 11.5px; }

  .contact h3 { font-size: 26px; }

  .colophon { font-size: 10px; }

  /* deep dive at mobile */
  .deep .page { padding-top: 32px; padding-bottom: 32px; }
  .deep .masthead-small { padding-bottom: 16px; }

  .door .arrow { font-size: 12px; }
}

/* -- very small (Galaxy Fold cover, ~280px) -- */
@media (max-width: 360px) {
  /* the OPG schema's 2-col node grid is the narrowest hard floor; stack it
     so the hero column can shrink below ~300px without overflow */
  .opg-schema .opg-nodes { grid-template-columns: 1fr; }
  .opg-schema .opg-node { border-right: none; border-bottom: 1px solid var(--rule-soft); }
  .opg-schema .opg-node:last-child { border-bottom: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
