:root {
  --ink: #16202A;
  --slate: #4B5967;
  --rule: #D3D9DF;
  --paper: #F6F7F8;
  --white: #FFFFFF;
  --pen: #A62B2B;
  --pen-dark: #8A2222;
  --focus: #1B5FAA;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--pen-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--white); color: var(--ink); padding: 8px 12px;
}
.skip:focus { left: 8px; top: 8px; z-index: 10; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 28px; padding-top: 16px; padding-bottom: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1.1;
  color: var(--ink); text-decoration: none;
}
.brand-mark { display: block; width: 40px; height: 40px; }
.brand-name { border-bottom: 3px solid var(--pen); padding-bottom: 1px; }
.brand:hover { color: var(--ink); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; }
.site-nav a {
  font-size: .95rem; color: var(--slate); text-decoration: none;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--pen); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; max-width: 66ch; }
.lede { font-size: 1.2rem; max-width: 62ch; }

/* Page heads */
.page-head { padding: 60px 0 28px; }
.page-head h1 { max-width: 22ch; }

/* Hero */
.hero { padding: 64px 0 56px; }
.hero .wrap > div { max-width: 760px; }
.hero h1 { max-width: 26ch; }

.btn {
  display: inline-block; background: var(--ink); color: var(--white);
  padding: 14px 26px; border: 0; border-radius: 2px;
  font-family: var(--sans); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--pen-dark); color: var(--white); }


/* Requirements matrix illustration */
.matrix {
  background: var(--white); border: 1px solid var(--rule);
  font-size: .8rem; line-height: 1.3; color: var(--slate);
}
.matrix-row {
  display: grid; grid-template-columns: 1.1fr 1.3fr 1fr .7fr;
  gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); align-items: center;
}
.matrix-row:first-child { border-top: 0; }
.matrix-head { background: var(--ink); color: var(--white); font-weight: 600; }
.matrix .id { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.matrix .bar { display: block; height: 7px; background: var(--rule); border-radius: 1px; }
.matrix .bar.short { width: 55%; }
.matrix .ok { color: var(--ink); font-weight: 700; }
.matrix .flag { color: var(--pen); font-weight: 700; }

/* Sections */
.section { padding: 48px 0; border-top: 1px solid var(--rule); }
.section > .wrap > h2 { margin-bottom: .75em; }

.checklist {
  list-style: none; margin: 0 0 1.25em; padding: 0; max-width: 700px;
  columns: 2; column-gap: 40px;
}
.checklist li { position: relative; padding: 4px 0 4px 1.7em; break-inside: avoid; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--pen); font-weight: 700; }

.plain-list { margin: 0 0 1em; padding-left: 1.2em; max-width: 66ch; }
.plain-list li { padding: 2px 0; }

/* Service and experience blocks */
.block { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 20px 48px; padding: 36px 0; border-top: 1px solid var(--rule); }
.block:first-of-type { border-top: 0; }
.block h2 { margin: 0; }
.block p:last-child, .block ul:last-child { margin-bottom: 0; }

/* Steps: a real sequence */
.steps { list-style: none; counter-reset: step; margin: 0 0 1.5em; padding: 0; max-width: 700px; }
.steps li {
  counter-increment: step; display: grid; grid-template-columns: 56px 1fr;
  gap: 4px 12px; padding: 20px 0; border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step); grid-row: span 2;
  font-family: var(--serif); font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--pen);
}
.steps strong { font-family: var(--serif); font-size: 1.25rem; }
.steps span { color: var(--slate); }

.closing { font-family: var(--serif); font-size: 1.3rem; max-width: 36ch; }

/* Contact form */
.company { margin-bottom: 1.6em; }
.form { background: var(--white); border: 1px solid var(--rule); padding: 28px; max-width: 640px; }
.form label { display: block; font-weight: 600; margin-bottom: 4px; }
.form .field { margin-bottom: 18px; }
.form input, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--slate); border-radius: 2px; padding: 10px 12px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form .hint { font-size: .9rem; color: var(--slate); margin: 14px 0 0; }

.form .trap { position: absolute; left: -9999px; }
.form-status { font-weight: 600; margin: 18px 0 0; max-width: 640px; }
.form-status:empty { display: none; }
.fallback { margin-top: 14px; }
.fallback textarea { margin-bottom: 14px; }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--rule); padding: 28px 0; color: var(--slate); font-size: .9rem; margin-top: 48px; }
.site-footer p { margin: 0; max-width: none; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; }
.site-footer a { color: var(--slate); }
.site-footer a:hover { color: var(--pen-dark); }

@media (max-width: 860px) {
  .block { grid-template-columns: 1fr; }
  .page-head { padding-top: 44px; }
  .hero { padding-top: 44px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .checklist { columns: 1; }
  .form { padding: 20px; }
  .matrix-row { grid-template-columns: 1fr 1.2fr .9fr .6fr; padding: 9px 8px; gap: 6px; }
}
