/* MechanicsHarness site, design v2. One stylesheet, system fonts, no scripts.
   Visual language after morphingdatacommons.org (the team's sibling site): ink on paper, Georgia headings,
   a system sans for text and interface, thin rules, white cards, a black footer band. */
:root {
  --ink: #151515;        /* text, links, the one accent */
  --ink-soft: #383838;   /* card text */
  --muted: #646464;      /* secondary text: 5.6:1 on paper */
  --line: #d9d9d9;       /* rules and borders */
  --paper: #fafafa;      /* page */
  --surface: #ffffff;    /* cards, notes */
  --tile: #eeeeee;       /* flow tiles */
  --tile-edge: #888888;
  --panel: #f4f8fa;      /* card illustration panel */
  --f-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-serif: Georgia, "Times New Roman", serif;
  --gutter: max(16px, 4%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); font: 15px/1.6 var(--f-ui);
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid #111111; outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-serif); font-weight: 400; color: var(--ink); }
p, ul, ol, dl { margin: 0 0 16px; }
b { font-weight: 650; }

/* Header: brand left, navigation right, one rule below */
header.site {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px;
  padding: 20px var(--gutter); border-bottom: 1px solid var(--line);
}
.brand {
  font: 700 12px/1.2 var(--f-ui); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
}
nav.main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
nav.main a {
  font: 600 13px/1.2 var(--f-ui); color: var(--ink); text-decoration: none;
  padding: 9px 13px; border: 1px solid transparent; border-radius: 7px;
}
nav.main a:hover { background: #f0f0f0; }
nav.main a[aria-current="page"] { background: var(--surface); border-color: var(--line); }

/* Page frame */
.frame { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); }
main.frame { flex: 1 0 auto; }

/* Page opening: title, one line, status note */
.page-head { padding: 44px 0 34px; }
.page-head h1 { font-size: 40px; line-height: 1.15; letter-spacing: -1px; margin: 0; }
.page-head.hero h1 { font-size: 48px; line-height: 1.1; letter-spacing: -1.4px; }
.page-head .lede { margin: 14px 0 0; max-width: 660px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.page-head.hero .lede { font-size: 18px; max-width: 700px; }
.page-head p:not(.lede):not(.status) { margin: 14px 0 0; font-size: 16px; }
.status {
  position: relative; max-width: 760px; margin: 22px 0 0; padding: 13px 18px 13px 34px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; line-height: 1.55;
}
.status::before {
  content: ""; position: absolute; left: 16px; top: 20px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink);
}

/* Sections: heading in a left column, text on the right, thin rule between rows */
.content { padding-bottom: 56px; }
.sec {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px 48px;
  padding: 30px 0 34px; border-top: 1px solid var(--line);
}
.sec h2 { font-size: 26px; line-height: 1.2; letter-spacing: -.3px; margin: 0; }
.sec-body { max-width: 680px; font-size: 16px; line-height: 1.65; }
.sec-body > :last-child, .sec-text > :last-child { margin-bottom: 0; }
.sec-body.wide { max-width: none; }
.sec-body.with-figure {
  max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, 1fr);
  gap: 28px 56px; align-items: start;
}
.sec-body ul, .sec-body ol { padding-left: 20px; }
.sec-body li { margin-bottom: 7px; padding-left: 3px; }
.sec-body li::marker { color: #8a8a8a; }

/* Judging criteria: one row per criterion */
ul.criteria { list-style: none; padding: 0; border-top: 1px solid var(--line); }
ul.criteria li { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }

/* Building steps: numbered rows */
.block { padding-top: 4px; }
ol.steps { list-style: none; counter-reset: step; margin: 0 0 8px; padding: 0; max-width: 860px; border-top: 1px solid var(--line); }
ol.steps li {
  counter-increment: step; position: relative; margin: 0; padding: 18px 0 18px 66px;
  border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.65;
}
ol.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 15px;
  font: 400 27px/1.2 var(--f-serif); color: #7a7a7a;
}

/* Evaluation flow (home): tiles with arrows; the reference joins the scorer from the side */
.flow {
  margin: 4px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .74fr);
  column-gap: 40px; row-gap: 26px;
}
.flow-steps { display: contents; }
.flow-steps li { list-style: none; }
.flow-steps li, .flow-ref {
  position: relative; margin: 0; padding: 11px 15px 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted);
}
.flow-steps li { grid-column: 1; background: var(--tile); border-bottom: 3px solid var(--tile-edge); }
.flow b { display: block; margin-bottom: 1px; font-size: 14px; font-weight: 650; color: var(--ink); }
.flow-steps li.flow-agent { background: var(--ink); border-bottom-color: var(--ink); color: #d4d4d4; }
.flow-steps li.flow-agent b { color: #ffffff; }
.flow-steps li.flow-score { grid-row: 5; }
.flow-ref { grid-column: 2; grid-row: 5; background: var(--surface); border: 1px dashed #aaaaaa; }
.flow-steps li:not(.flow-score)::before {
  content: ""; position: absolute; left: 24px; top: calc(100% + 3px); width: 1.5px; height: 20px; background: var(--tile-edge);
}
.flow-steps li:not(.flow-score)::after {
  content: ""; position: absolute; left: 21px; top: calc(100% + 14px); width: 6px; height: 6px;
  border-right: 1.5px solid var(--tile-edge); border-bottom: 1.5px solid var(--tile-edge); transform: rotate(45deg);
}
.flow-ref::before {
  content: ""; position: absolute; top: 50%; left: -36px; width: 30px; height: 1.5px; background: var(--tile-edge);
}
.flow-ref::after {
  content: ""; position: absolute; top: calc(50% - 3px); left: -34.5px; width: 6px; height: 6px;
  border-left: 1.5px solid var(--tile-edge); border-bottom: 1.5px solid var(--tile-edge); transform: rotate(45deg);
}

/* Benchmark cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 0; }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.cardtop { display: flex; justify-content: space-between; gap: 10px; padding: 16px 20px 10px; }
.tag {
  display: inline-block; font-size: 11px; line-height: 1.4; padding: 4px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
}
.illustration {
  display: flex; align-items: center; justify-content: center; height: 148px; margin: 0 12px;
  background: var(--panel); border-radius: 8px;
}
.illustration svg { height: 92px; width: auto; }
.g-edge { fill: none; stroke: #2c3a44; stroke-width: 1.5; stroke-linejoin: round; }
.g-hidden { fill: none; stroke: #9aa5ad; stroke-width: 1.2; stroke-dasharray: 3 3; }
.g-node circle { fill: #ffffff; stroke: var(--ink); stroke-width: 1.4; }
.cardbody { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 21px; }
.card h3 { font-size: 24px; line-height: 1.2; margin: 0 0 12px; }
.card p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 18px; }
.cardfooter { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.cardfooter dt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cardfooter dd { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }

/* Three short sections in one row (home) */
.principles {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 40px;
  padding: 30px 0 4px; border-top: 1px solid var(--line);
}
.principle h2 { font-size: 22px; line-height: 1.25; margin: 0 0 10px; }
.principle p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 520px; }

/* Footer: black band */
footer.site { background: var(--ink); color: #eeeeee; font-size: 13px; line-height: 1.6; }
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 40px;
  padding-top: 24px; padding-bottom: 26px;
}
footer.site p { margin: 0; max-width: 640px; }
footer.site a { color: #ffffff; }
footer.site a:focus-visible { outline-color: #ffffff; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-nav a { color: #cfcfcf; text-decoration: none; }
.footer-nav a:hover { color: #ffffff; text-decoration: underline; }

/* Narrower screens */
@media (max-width: 1180px) {
  .sec-body.with-figure { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
}
@media (max-width: 900px) {
  .sec { grid-template-columns: minmax(0, 1fr); padding: 26px 0 28px; }
  .sec h2 { font-size: 24px; }
  .cards, .principles { grid-template-columns: minmax(0, 1fr); }
  .principles { gap: 26px; }
}
@media (max-width: 700px) {
  header.site { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 18px; padding-bottom: 12px; }
  nav.main { margin-left: -9px; gap: 2px 2px; }
  nav.main a { padding: 7px 9px; }
  .page-head { padding: 30px 0 26px; }
  .page-head h1 { font-size: 32px; letter-spacing: -.6px; }
  .page-head.hero h1 { font-size: 36px; letter-spacing: -.8px; }
  .page-head .lede, .page-head.hero .lede { font-size: 16.5px; }
  .sec-body, ol.steps li { font-size: 15.5px; }
  ol.steps li { padding-left: 52px; }
  ol.steps li::before { font-size: 23px; }
  .cardbody { padding: 16px 18px 19px; }
  .card h3 { font-size: 22px; }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow-ref { grid-column: 1; grid-row: 6; margin-left: 40px; }
  .flow-ref::before { top: -23px; left: 24px; width: 1.5px; height: 20px; }
  .flow-ref::after { top: -23px; left: 21px; border: 0; border-left: 1.5px solid var(--tile-edge); border-top: 1.5px solid var(--tile-edge); }
}

@media print {
  nav.main, .footer-nav { display: none; }
  footer.site { background: none; color: var(--ink); border-top: 1px solid var(--line); }
  footer.site a { color: var(--ink); }
}
