/* ============================================================
   Yardstick — shared stylesheet
   Design direction: a machinist's rule. Calibrated, quiet,
   graphite on cool drafting paper with a single brass accent.
   ============================================================ */

:root {
  --paper:      #E9ECED;   /* cool drafting paper */
  --panel:      #F5F6F6;   /* instrument face      */
  --ink:        #101A28;   /* midnight blue        */
  --ink-2:      #4A5663;
  --ink-3:      #5D6874;
  --rule:       #C1C7CC;
  --rule-2:     #D6DBDE;
  --gold:       #CBB45A;   /* signal gold — masthead + section rules */
  --gold-deep:  #A08A34;
  --brass:      #75601F;   /* accent text          */
  --brass-mark: #A08630;   /* accent marks         */

  --rail-w: 56px;
  --measure: 64ch;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding-left: var(--rail-w);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
}

/* ---------- the rule: a measuring edge down the page ---------- */

.rail {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--rail-w);
  /* The right edge is drawn as a background layer rather than a border so it can
     turn gold inside the masthead cap instead of running a grey seam through it.
     Layer order: gold edge (top 68px) over grey edge (full height) over the fill. */
  background-image:
    linear-gradient(to right, transparent 0 calc(100% - 1px), var(--gold-deep) calc(100% - 1px)),
    linear-gradient(to right, transparent 0 calc(100% - 1px), var(--rule) calc(100% - 1px)),
    linear-gradient(var(--gold) 0 67px, var(--gold-deep) 67px 68px, var(--panel) 68px);
  background-size: 100% 68px, 100% 100%, 100% 100%;
  background-repeat: no-repeat;
  z-index: 20;
}
.rail::before,
.rail::after {
  content: "";
  position: absolute;
  right: 0; top: 68px; bottom: 0;
}
.rail::before {          /* minor graduations */
  width: 9px;
  background-image: repeating-linear-gradient(
    to bottom, var(--rule) 0 1px, transparent 1px 10px);
}
.rail::after {           /* major graduations */
  width: 21px;
  background-image: repeating-linear-gradient(
    to bottom, var(--rule) 0 1px, transparent 1px 50px);
}
.rail-mark {
  position: absolute;
  left: 9px;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--f-display);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* ---------- shell ---------- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ---------- header ---------- */

.masthead {
  border-bottom: 1px solid var(--gold-deep);
  background: var(--gold);
  position: sticky;
  top: 0;
  z-index: 15;
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .wm-mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
}
/* On the gold masthead a gold reading would vanish, so force the whole mark to
   ink there; the text is already ink. In the dark footer the mark inherits the
   paper link colour via currentColor and the reading returns to gold. */
.masthead .wordmark .wm-mark [stroke="var(--brass-mark)"] { stroke: var(--ink); }
.foot .wordmark .wm-mark [stroke="var(--brass-mark)"] { stroke: var(--gold); }
.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
}
.nav a {
  color: #1C2838;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: rgba(16, 26, 40, 0.3); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

.btn {
  display: inline-block;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover { background: #000; border-color: #000; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }

/* the nav button must beat `.nav a`, which is more specific than `.btn` */
.nav a.btn,
.nav a.btn:hover,
.nav a.btn[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: transparent;
}

/* ---------- type ---------- */

h1, h2, h3, .h-num {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.033em;
  max-width: 17ch;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
h3 {
  font-size: 1.0625rem;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
p { margin: 0 0 1.1em; max-width: var(--measure); }
h1 + p, h2 + p { margin-top: 20px; }

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
}
.dek {
  font-size: 1.0625rem;
  color: var(--ink-2);
  max-width: 60ch;
}
a { color: var(--brass); }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass-mark);
  outline-offset: 3px;
}

/* ---------- sections ---------- */

.band { padding: 84px 0; border-bottom: 1px solid var(--gold); }
.band-tight { padding: 56px 0; }
.band-dark {
  background: var(--ink);
  color: var(--paper);
  border-bottom: none;
}
.band-dark h2, .band-dark h3 { color: var(--paper); }
.band-dark p { color: #AEB8C4; }
.band-dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.band-dark .btn:hover { background: #fff; border-color: #fff; }

.hero { padding: 96px 0 72px; border-bottom: 1px solid var(--gold); }
.hero .lede { margin-top: 26px; }

/* ---------- example readout (hero instrument) ---------- */

.readout {
  margin: 52px 0 0;
  border: 1px solid var(--rule);
  background: var(--panel);
  padding: 26px 30px 18px;
  max-width: 720px;
}
.readout-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 12px;
}
.readout-head strong {
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
}
.readout-verdict {
  margin: 18px 0 0;
  font-family: var(--f-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  max-width: 36ch;
}
.readout-svg { display: block; width: 100%; height: auto; margin-top: 22px; }
.readout-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-2);
  font-family: var(--f-display);
  font-size: 12px;
  color: var(--ink-3);
}


/* ---------- ruled lists (used instead of cards) ---------- */

.ruled { border-top: 1px solid var(--rule); margin-top: 40px; }
.ruled-row {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.ruled-row p { margin: 0; max-width: 58ch; color: var(--ink-2); }
.ruled-row .unit {
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 5px;
}

.steps { counter-reset: step; margin-top: 44px; }
.step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 22px;
  padding: 26px 0;
  border-top: 1px solid var(--rule);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--brass);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}
.step p { margin: 6px 0 0; color: var(--ink-2); max-width: 58ch; }

/* ---------- comparison ---------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 44px;
  border-top: 1px solid var(--rule);
}
.compare-col { padding: 26px 30px 30px 0; }
.compare-col + .compare-col {
  border-left: 1px solid var(--rule);
  padding-left: 30px;
  padding-right: 0;
}
.compare-col h3 { margin-bottom: 4px; }
.compare-col .tag {
  font-family: var(--f-display);
  font-size: 12px;
  color: var(--ink-3);
  display: block;
  margin-bottom: 14px;
}
.compare-col ul { list-style: none; margin: 0; padding: 0; }
.compare-col li {
  padding: 11px 0;
  border-top: 1px solid var(--rule-2);
  color: var(--ink-2);
  font-size: 1rem;
}
.compare-col.is-ours li { color: var(--ink); }
.compare-col.is-ours li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 1px;
  background: var(--brass-mark);
  vertical-align: middle;
  margin-right: 10px;
}

/* ---------- team ---------- */

.people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  margin-top: 52px;
}
.person figure { margin: 0; }
.portrait {
  aspect-ratio: 4 / 5;
  background: var(--panel);
  border: 1px solid var(--rule);
  background-image: repeating-linear-gradient(
    to bottom, rgba(196, 202, 205, 0.5) 0 1px, transparent 1px 16px);
  display: flex;
  align-items: flex-end;
  padding: 14px;
}
.portrait span {
  font-family: var(--f-display);
  font-size: 11.5px;
  color: var(--ink-3);
}
.person h3 { margin-top: 18px; }
.person .role {
  font-family: var(--f-display);
  font-size: 12.5px;
  color: var(--brass);
  margin: 3px 0 12px;
}
.person p { font-size: 1rem; color: var(--ink-2); margin-bottom: 0; }
.credits { list-style: none; margin: 14px 0 0; padding: 0; }
.credits li {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--rule-2);
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.credits b {
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  padding-top: 3px;
}

/* ---------- form ---------- */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 72px;
  margin-top: 44px;
  align-items: start;
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 11px 13px;
  border-radius: 0;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'><path d='M1 1l4.5 4.5L10 1' fill='none' stroke='%234E585F' stroke-width='1.4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  outline: 2px solid var(--brass-mark);
  outline-offset: 1px;
}
.field-hint { font-size: 0.875rem; color: var(--ink-3); margin: 6px 0 0; }
.aside-block { border-top: 1px solid var(--rule); padding-top: 20px; }
.aside-block + .aside-block { margin-top: 30px; }
.aside-block h3 { margin-bottom: 8px; }
.aside-block p { font-size: 0.9375rem; color: var(--ink-2); margin-bottom: 0; }

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--gold);
  padding: 34px 0 46px;
  font-family: var(--f-display);
  font-size: 13px;
  color: var(--ink-3);
}
.foot .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  body { padding-left: 0; }
  .rail { display: none; }
  .wrap { padding: 0 24px; }
  .hero { padding: 60px 0 52px; }
  .band { padding: 56px 0; }
  .people { grid-template-columns: 1fr; gap: 46px; max-width: 460px; }
  .form-grid { grid-template-columns: 1fr; gap: 44px; }
  .compare { grid-template-columns: 1fr; }
  .compare-col { padding: 24px 0 26px; }
  .compare-col + .compare-col {
    border-left: none;
    border-top: 1px solid var(--rule);
    padding-left: 0;
  }
  .ruled-row { grid-template-columns: 1fr; gap: 8px; }
  .readout { padding: 20px 18px 14px; }
  .nav { gap: 18px; font-size: 13px; }
  .masthead .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
}

@media (max-width: 560px) {
  .nav .btn { padding: 8px 14px; }
}

/* ------------------------------------------------------------
   Late overrides — these share specificity with rules above and
   rely on source order, so they must stay at the end of the file.
   ------------------------------------------------------------ */

.band-dark .btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(233, 236, 237, 0.42);
}
.band-dark .btn-ghost:hover {
  background: transparent;
  color: #fff;
  border-color: var(--paper);
}

/* ============================================================
   Added for the Method, What-we-see and revised Team pages
   ============================================================ */

/* the single commitment a page turns on */
.pledge {
  border-left: 2px solid var(--gold);
  padding: 2px 0 2px 26px;
  margin: 36px 0 0;
}
.pledge p {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 0;
  max-width: 54ch;
}

/* stacked question / answer blocks */
.qa { border-top: 1px solid var(--rule); margin-top: 42px; }
.qa-item { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.qa-item h3 { margin-bottom: 9px; max-width: 54ch; }
.qa-item p { color: var(--ink-2); margin-bottom: 0; }
.qa-item p + p { margin-top: 0.9em; }

/* short inline list of collected / withheld fields */
.fields { list-style: none; margin: 0; padding: 0; }
.fields li {
  padding: 10px 0;
  border-top: 1px solid var(--rule-2);
  color: var(--ink-2);
  font-size: 1rem;
}
.fields li b {
  font-family: var(--f-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  display: block;
}

/* the contact form's "this isn't wired up yet" guard */
.form-note {
  margin-top: 20px;
  border: 1px solid var(--brass-mark);
  background: #F6F1E1;
  padding: 15px 17px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: 56ch;
}
.form-note p { margin: 0; max-width: none; }
.form-note p + p { margin-top: 0.7em; }

/* two-up team layout now that there are two founders */
.people-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 56px;
  margin-top: 52px;
  max-width: 860px;
}

.nav { flex-wrap: wrap; row-gap: 6px; }

@media (max-width: 900px) {
  .people-two { grid-template-columns: 1fr; gap: 46px; max-width: 460px; }
  .pledge { padding-left: 18px; }
}

/* real portraits drop straight into the placeholder's slot */
.portrait-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--rule);
}

/* the gold dash marker belongs on one-line list items, not on the
   two-line field entries, where it lands on a line of its own */
.compare-col.is-ours .fields li::before { content: none; }

/* the commitment, restated as the last word on the page */
.pledge-final {
  font-family: var(--f-display);
  font-size: clamp(1.375rem, 2.5vw, 1.8125rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.018em;
  color: var(--paper);
  max-width: 34ch;
  border-left: 2px solid var(--gold);
  padding-left: 26px;
  margin: 0 0 30px;
}
@media (max-width: 900px) { .pledge-final { padding-left: 18px; } }

/* With five primary links the header needs a deliberate stacked layout on
   narrow screens rather than a ragged right-aligned wrap. */
@media (max-width: 900px) {
  /* three rows of header is too much to keep pinned over a phone viewport */
  .masthead { position: static; }
  .masthead .wrap {
    display: block;
    padding-top: 14px;
    padding-bottom: 14px;
    min-height: 0;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 16px;
    row-gap: 9px;
    margin-top: 12px;
    font-size: 13px;
  }
  .nav a.btn { padding: 8px 15px; margin-left: auto; }
}


/* ---------- inline code + readout table ---------- */

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  background: var(--panel);
  border: 1px solid var(--rule-2);
  padding: 1px 5px;
  white-space: nowrap;
}

.readout-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-family: var(--f-display);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.readout-table th,
.readout-table td {
  text-align: left;
  padding: 9px 12px 9px 0;
  border-top: 1px solid var(--rule-2);
  vertical-align: top;
}
.readout-table thead th { border-top: 0; color: var(--ink-3); font-weight: 500; }
.readout-table tbody th { color: var(--ink-2); font-weight: 500; }
.readout-table td { color: var(--ink); font-weight: 600; }
.readout-table td:nth-child(2) { color: var(--brass); }

@media (max-width: 560px) {
  code { white-space: normal; }
  .readout-table { font-size: 12px; }
}

/* ============================================================
   Launch refresh: hero call to action, button rows, contact
   form states. Inline style attributes were moved here so the
   site can ship a strict Content-Security-Policy.
   ============================================================ */

.rail-mark { bottom: 28px; }

.eyebrow {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 18px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.hero .actions { margin-top: 32px; }
.effective { margin-top: 20px; }

/* honeypot: present for bots, invisible and unreachable for people */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note.is-ok { border-color: #4F7A5A; background: #E8F0E9; }
.form-note.is-error { border-color: #A3462F; background: #F7E9E4; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
