:root{
  --bg:#f4f2ed;
  --bg-alt:#e6e3dc;
  --bg-dark:#16151a;
  --ink:#16151a;
  --ink-soft:#6d6a63;
  --ink-inv:#f4f2ed;
  --blue:#1f3fa8;
  --red:#c0452e;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:system-ui,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
  font-size:17px;
  line-height:1.7;
  overflow-x:hidden;
}
img{max-width:100%;height:auto;display:block}

.wrap{
  width:100%;
  max-width:1240px;
  margin:0 auto;
  padding:0 28px;
}
.grid{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  column-gap:24px;
}

/* ---------- header / nav ---------- */
.topbar{border-bottom:1px solid rgba(22,21,26,.18)}
.topbar-inner{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:14px 28px;
  padding-top:22px;
  padding-bottom:20px;
}
.brand{
  font-size:22px;
  font-weight:700;
  letter-spacing:-.02em;
  text-decoration:none;
  color:var(--ink);
}
.brand:hover{color:var(--blue)}
.nav{margin-left:auto}
.nav ul{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:6px 22px;
  margin:0;
  padding:0;
}
.nav a{
  color:var(--ink);
  text-decoration:none;
  font-size:15px;
  border-bottom:2px solid transparent;
  padding-bottom:2px;
}
.nav a:hover{color:var(--blue);border-bottom-color:var(--blue)}
.nav a[aria-current="page"]{border-bottom-color:var(--red)}

a{color:var(--blue)}
a:focus-visible,
button:focus-visible{
  outline:3px solid var(--blue);
  outline-offset:3px;
}

/* ---------- typography ---------- */
h1,h2,h3{letter-spacing:-.02em;line-height:1.12;margin:0}
h2{font-size:clamp(26px,3.4vw,38px);font-weight:700;line-height:1.18}
h3{font-size:20px;font-weight:700;line-height:1.3;margin-bottom:8px}
p{margin:0 0 20px}
p:last-child{margin-bottom:0}
.lead{font-size:19px}
.cap{
  font-size:13px;
  line-height:1.5;
  color:var(--ink-soft);
}
.num{
  color:var(--red);
  font-weight:700;
}

/* ---------- section rhythm ---------- */
.s-wide{padding:120px 0}
.s-tight{padding:56px 0}
.alt{background:var(--bg-alt)}
.dark{background:var(--bg-dark);color:var(--ink-inv)}
.dark h2,.dark h3{color:var(--ink-inv)}
.dark .cap{color:#a8a49b}
.dark a{color:#9fb1ee}

/* ---------- hero ---------- */
.hero{padding:88px 0 72px;position:relative}
.hero-head{
  grid-column:1 / 12;
  border-left:4px solid var(--blue);
  padding-left:26px;
}
.hero-head h1{
  font-size:clamp(38px,7.4vw,84px);
  font-weight:700;
  letter-spacing:-.035em;
}
.hero-head h1 span{display:block}
.hero-head h1 span:nth-child(2){margin-left:8%}
.hero-head h1 span:nth-child(3){margin-left:16%}
.hero-intro{
  grid-column:1 / 6;
  margin-top:44px;
  font-size:19px;
}
.topics{
  grid-column:1 / 10;
  margin-top:22px;
  font-size:15px;
  color:var(--ink-soft);
}
.topics b{color:var(--blue);font-weight:700;padding:0 8px}

/* ---------- images ---------- */
.figmain{
  grid-column:5 / 13;
  margin-top:56px;
  display:flex;
  gap:18px;
  align-items:flex-start;
}
.figmain .cap{
  writing-mode:vertical-rl;
  transform:rotate(180deg);
  flex:0 0 auto;
  font-size:13px;
  max-height:340px;
}
.figmain img{width:100%}

.detailblock{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  column-gap:24px;
  row-gap:36px;
  align-items:start;
}
.detailblock figure{grid-column:2 / 6;margin:0}
.detailblock figure .cap{margin-top:12px}
.detailblock .txt{grid-column:7 / 13}

/* ---------- separators ---------- */
.rule{
  height:3px;
  background:var(--blue);
  border:0;
  width:33.333%;
  margin:0;
}
.rule.center{margin:0 auto}
.rule.right{margin-left:auto}
.rule.red{background:var(--red)}

/* ---------- content blocks ---------- */
.b5{grid-column:1 / 6}
.b6{grid-column:1 / 7}
.b7{grid-column:1 / 8}
.b7r{grid-column:6 / 13}
.b9{grid-column:1 / 10}
.b9r{grid-column:4 / 13}

.head-side{
  grid-column:1 / 4;
}
.body-side{
  grid-column:5 / 12;
}

.stack > * + *{margin-top:26px}

/* checklists */
ol.steps{
  list-style:none;
  margin:28px 0 0;
  padding:0;
  counter-reset:st;
}
ol.steps li{
  counter-increment:st;
  position:relative;
  padding-left:60px;
  margin-bottom:24px;
}
ol.steps li::before{
  content:counter(st,decimal-leading-zero);
  position:absolute;
  left:0;
  top:-2px;
  font-size:24px;
  font-weight:700;
  color:var(--red);
  letter-spacing:-.03em;
}
ol.steps li:last-child{margin-bottom:0}
ul.marks{
  list-style:none;
  margin:24px 0 0;
  padding:0;
}
ul.marks li{
  position:relative;
  padding-left:28px;
  margin-bottom:14px;
}
ul.marks li::before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  width:14px;
  height:3px;
  background:var(--blue);
}
.dark ul.marks li::before{background:#7f96e0}

dl.terms{margin:24px 0 0}
dl.terms dt{font-weight:700;margin-top:20px}
dl.terms dd{margin:4px 0 0}

/* ---------- footer ---------- */
.site-foot{
  border-top:3px solid var(--blue);
  padding:52px 0 60px;
  background:var(--bg-alt);
}
.foot-name{
  font-size:clamp(34px,6vw,62px);
  font-weight:700;
  letter-spacing:-.035em;
  line-height:1;
  margin:0 0 34px;
}
.foot-cols{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px 24px;
}
.foot-cols ul{list-style:none;margin:0;padding:0}
.foot-cols li{margin-bottom:8px}
.foot-cols a{color:var(--ink);text-decoration:none;border-bottom:1px solid rgba(31,63,168,.4)}
.foot-cols a:hover{color:var(--blue);border-bottom-color:var(--blue)}
.foot-note{font-size:15px;color:var(--ink-soft);margin-top:16px}
.foot-mail{font-size:19px;font-weight:700}
.foot-mail a{border-bottom:2px solid var(--red)}

/* ---------- page header (inner pages) ---------- */
.page-head{padding:72px 0 40px}
.page-head h1{
  grid-column:1 / 11;
  font-size:clamp(32px,5.4vw,58px);
  font-weight:700;
  letter-spacing:-.03em;
  border-left:4px solid var(--blue);
  padding-left:24px;
}
.page-head h1 span{display:block}
.page-head h1 span:nth-child(2){margin-left:7%}
.page-head p.lead{grid-column:1 / 8;margin-top:28px;font-size:22px;line-height:1.5}

.doc{grid-column:1 / 8}
.doc h2{margin-top:52px;margin-bottom:14px}
.doc h2:first-child{margin-top:0}
.doc h3{margin-top:30px}

/* ---------- responsive ---------- */
@media (max-width:900px){
  .wrap{padding:0 20px}
  .s-wide{padding:64px 0}
  .s-tight{padding:40px 0}
  .hero{padding:52px 0 44px}
  .hero-head,.hero-intro,.topics,.figmain,
  .b5,.b6,.b7,.b7r,.b9,.b9r,
  .head-side,.body-side,.doc,
  .page-head h1,.page-head p.lead,
  .detailblock figure,.detailblock .txt{grid-column:1 / -1}
  .hero-head h1 span:nth-child(2){margin-left:5%}
  .hero-head h1 span:nth-child(3){margin-left:10%}
  .figmain{margin-top:36px;flex-direction:column;gap:12px}
  .figmain .cap{writing-mode:horizontal-tb;transform:none;max-height:none;order:2}
  .figmain img{order:1}
  .rule{width:60%}
  .foot-cols{grid-template-columns:1fr}
  .detailblock figure{max-width:420px}
  body{font-size:17px}
}
@media (max-width:600px){
  ol.steps li{padding-left:46px}
  ol.steps li::before{font-size:20px}
  .page-head{padding:44px 0 28px}
}
