:root {
  --bg: #e1e0e2;
  --ink: #0b0b0c;
  --dim: #3b3b3b;
  --faint: #77767a;
  --line: #b3b2b5;
  --hi: #111;
  --acc: #f6f6f6;
  --sans: "Hanken Grotesk","Helvetica Neue",Helvetica,Arial,sans-serif;
  --mono: "IBM Plex Mono","SF Mono",Menlo,Consolas,monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 4px;
  text-decoration-color: var(--faint);
}

a:hover {
  text-decoration-color: var(--acc);
}

.frame {
  max-width: 1040px;
  margin: 0 auto;
  border-left: 1px dashed var(--line);
  border-right: 1px dashed var(--line);
  min-height: 100vh;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  padding: 0 26px;
  background: var(--bg);
  border-bottom: 1px dashed var(--line);
}

.bar .home {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}

.bar .id {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.bar .id b {
  max-width: 330px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.bar .id i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  color: var(--dim);
}

.menu {
  position: static;
}

.menu summary {
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0 10px;
  cursor: pointer;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu summary span {
  display: block;
  height: 1.6px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

.menu[open] summary span:nth-child(1) {
  transform: translateY(7.6px) rotate(45deg);
}

.menu[open] summary span:nth-child(2) {
  opacity: 0;
}

.menu[open] summary span:nth-child(3) {
  transform: translateY(-7.6px) rotate(-45deg);
}

.menu summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

.menu nav {
  position: absolute;
  top: 72px;
  right: 0;
  width: 320px;
  max-width: 100%;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  background: var(--bg);
  border-left: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  padding: 10px 0 14px;
}

.menu nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 9px 26px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
}

.menu nav a i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  color: var(--faint);
}

.menu nav a:hover,
.menu nav a:focus-visible {
  background: var(--ink);
  color: var(--bg);
  outline: none;
}

.menu nav a:hover i,
.menu nav a:focus-visible i {
  color: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  .menu summary span {
    transition: none;
  }
}

.cover {
  padding: 86px 26px 78px;
  text-align: center;
  border-bottom: 1px dashed var(--line);
}

.cover h1 {
  font-size: 40px;
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 auto;
  max-width: 760px;
}

.cover .sub {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--dim);
  margin-top: 26px;
}

.cover .sub b {
  font-weight: 500;
  color: var(--ink);
}

.cover .hero {
  display: block;
  width: 688px;
  max-width: 100%;
  height: auto;
  margin: 46px auto 0;
}

.col {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 26px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 0;
}

.tag {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1;
  padding: 9px 14px;
  white-space: nowrap;
}

.tag.w {
  background: var(--hi);
  color: var(--bg);
}

.tag.g {
  background: var(--acc);
  color: #000;
}

.tag.o {
  border: 1px dashed var(--faint);
  color: var(--ink);
}

section {
  padding: 64px 0 10px;
  scroll-margin-top: 82px;
}

section + section {
  border-top: 1px dashed var(--line);
}

h2 {
  margin: 0 0 30px;
  font-size: 0;
  line-height: 1;
}

h2 .n {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  background: var(--acc);
  color: #000;
  padding: 9px 11px;
  vertical-align: top;
}

h2 .t {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--hi);
  color: var(--bg);
  padding: 9px 14px;
  vertical-align: top;
}

h3 {
  font-size: 25px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 46px 0 14px;
}

h4 {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  border: 1px dashed var(--faint);
  padding: 8px 14px;
  margin: 34px 0 14px;
}

p {
  margin: 0 0 20px;
  color: var(--ink);
}

p.lead {
  font-size: 23px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.01em;
}

em {
  font-style: italic;
}

b,
strong {
  font-weight: 600;
}

.k {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(0,0,0,0.1);
  padding: 2px 7px;
  white-space: nowrap;
}

.bracket {
  position: relative;
  margin: 44px 0;
  padding: 38px 46px;
  text-align: center;
}

.bracket:before,
.bracket:after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22px;
  border: 3px solid var(--ink);
}

.bracket:before {
  left: 0;
  border-right: 0;
}

.bracket:after {
  right: 0;
  border-left: 0;
}

.bracket p {
  font-size: 25px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}

.bracket p + p {
  margin-top: 10px;
  color: var(--dim);
  font-weight: 500;
}

p.chain {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--dim);
  border-left: 2px solid var(--ink);
  padding-left: 16px;
  margin: 26px 0;
}

p.todo {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
}

.inv {
  background: #111;
  color: #f2f2f2;
  padding: 28px 32px 30px;
  margin: 36px 0;
}

.inv .lab {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c8c8c8;
  margin-bottom: 14px;
}

.inv p {
  color: #f2f2f2;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}

.inv p + p {
  margin-top: 12px;
}

.inv.first {
  margin: 40px 0 0;
}

.inv p.small {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
  color: #dcdcdc;
}

.note {
  border: 1px dashed var(--faint);
  padding: 20px 22px;
  margin: 28px 0;
}

.note .tag {
  display: inline-block;
  margin-bottom: 14px;
}

.note p:last-child {
  margin-bottom: 0;
}

figure {
  margin: 38px 0;
}

figure img,
figure svg {
  display: block;
  width: 100%;
  height: auto;
}


figure.photo {
  margin-left: -40px;
  margin-right: -40px;
}

figure.photo img {
  filter: grayscale(1);
  -webkit-mask-image: linear-gradient(to bottom,transparent 0,transparent 2%,#000 6%,#000 76%,transparent 100%),linear-gradient(to right,transparent 0,#000 9%,#000 91%,transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom,transparent 0,transparent 2%,#000 6%,#000 76%,transparent 100%),linear-gradient(to right,transparent 0,#000 9%,#000 91%,transparent 100%);
  mask-composite: intersect;
}

figure.photo figcaption {
  margin-left: 40px;
  margin-right: 40px;
}

figcaption {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--dim);
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 26px 0 30px;
  font-size: 17px;
  line-height: 1.55;
}

th {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  color: var(--dim);
  padding: 0 14px 10px 0;
  border-bottom: 1px dashed var(--faint);
  vertical-align: bottom;
}

td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px dashed var(--line);
  vertical-align: top;
}

td:first-child {
  font-family: var(--mono);
  font-size: 14px;
  white-space: nowrap;
}

ol.steps {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

ol.steps li {
  counter-increment: s;
  position: relative;
  padding: 0 0 14px 46px;
}

ol.steps li:before {
  content: counter(s,decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 3px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--bg);
  background: var(--hi);
  padding: 3px 6px;
  line-height: 1.3;
}

ul.plain {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

ul.plain li {
  position: relative;
  padding: 0 0 10px 26px;
}

ul.plain li:before {
  content: "[ ]";
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}

p.up {
  margin: 44px 0 0;
  text-align: right;
  font-family: var(--mono);
  font-size: 13px;
}

p.up a {
  color: var(--dim);
  text-decoration: none;
  padding: 6px 0 6px 12px;
}

p.up a::after {
  content: " \2191";
}

p.up a:hover,
p.up a:focus-visible {
  color: var(--ink);
}

.foot {
  border-top: 1px dashed var(--line);
  margin-top: 70px;
  padding: 44px 26px 70px;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
  color: var(--dim);
}

.foot a {
  color: var(--ink);
}

.draft {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.side {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  margin: 0 0 18px;
}

.side figure.cut {
  flex: 0 0 130px;
  width: 130px;
  margin: 4px 0 0;
}

.side ul.plain {
  margin: 0;
}

@media (max-width:640px) {
  .side {
    flex-direction: column;
    gap: 18px;
  }

  .bar {
    height: 68px;
    padding: 0 20px;
  }
  .bar .id b {
    max-width: 250px;
    font-size: 11.5px;
  }
  .menu nav {
    top: 68px;
    max-height: calc(100vh - 68px);
  }
  .menu nav {
    width: 100%;
    border-left: 0;
  }
  .menu nav a {
    padding: 11px 20px;
  }
  body {
    font-size: 17px;
  }
  .cover {
    padding: 56px 20px;
  }
  .cover h1 {
    font-size: 29px;
  }
  .col {
    padding: 0 20px;
  }
  p.lead {
    font-size: 18px;
  }
  .bracket {
    padding: 30px 34px;
  }
  .inv {
    padding: 22px 22px 24px;
  }
  .inv p {
    font-size: 19px;
  }
  .bracket p {
    font-size: 19px;
  }
  td:first-child {
    white-space: normal;
  }
}

@media print {
  html,
  body {
    background: #fff;
    color: #000;
  }
  .frame {
    border: 0;
  }
}

figure.cut {
  margin: 30px 0 34px;
}

figure.cut img {
  max-width: 100%;
  height: auto;
  margin: 0;
}

mark.hl {
  background: #ffe500;
  color: #000;
  cursor: pointer;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

::selection {
  background: #ffe500;
  color: #000;
}

.cover .get {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 28px;
  background: var(--ink);
  color: var(--acc);
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.cover .get:hover {
  background: transparent;
  color: var(--ink);
}

.cover .getnote {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin-top: 12px;
}

.menu nav a.dl {
  font-weight: 700;
}

figure.video {
  margin: 34px 0;
}

figure.video iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: var(--ink);
}

.bar .lang {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.bar .lang b {
  font-weight: 500;
  color: var(--ink);
}

.bar .lang a {
  color: var(--faint);
  text-decoration: none;
}

.bar .lang a:hover {
  color: var(--ink);
}
