:root {
  --ink: #171612;
  --muted: #565149;
  --paper: #f2efe6;
  --panel: #fbfaf5;
  --line: rgba(23, 22, 18, 0.32);
  --line-strong: #171612;
  --accent: #ef4b2c;
  --accent-dark: #a82d19;
  --cyan: #246c82;
  --amber: #d18a20;
  --blue: var(--accent);
  --blue-deep: var(--accent-dark);
  --yellow: var(--amber);
  --red: var(--accent-dark);
  --green: var(--cyan);
  --mono: Consolas, "Cascadia Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: "Malgun Gothic", "맑은 고딕", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px clamp(18px, 4vw, 52px);
  color: #fff;
  background: #101417;
  border-bottom: 3px solid var(--blue);
}

.topbar a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(11, 16, 19, 0.98), rgba(15, 23, 28, 0.93)),
    #101417;
  border-bottom: 1px solid #27343b;
}

.hero-inner,
.page-grid,
.index-layout,
footer {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-inner {
  padding: 54px 0 46px;
}

.eyebrow,
.section-number,
.source-kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.12;
}

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

h3 {
  margin: 0 0 9px;
  font-size: 19px;
  line-height: 1.38;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
}

.lead {
  max-width: 960px;
  margin-top: 18px;
  color: #d8e2e7;
  font-size: 17px;
}

.analysis-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1080px;
  margin: 30px 0 0;
  padding: 0;
  border-top: 1px solid #52616a;
  border-bottom: 1px solid #52616a;
}

.analysis-strip div {
  min-width: 0;
  padding: 13px 16px;
  border-right: 1px solid #52616a;
}

.analysis-strip div:first-child {
  padding-left: 0;
}

.analysis-strip div:last-child {
  border-right: 0;
}

.analysis-strip dt {
  margin: 0 0 2px;
  color: #64c4f2;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.analysis-strip dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
}

.page-grid,
.index-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 28px;
  padding: 36px 0 86px;
}

.toc {
  position: sticky;
  top: 70px;
  align-self: start;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
  border-radius: 0;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
}

.toc a {
  display: block;
  padding: 7px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  border-bottom: 1px dotted #c7ced2;
}

.toc a:last-child {
  border-bottom: 0;
}

article {
  min-width: 0;
}

article > section,
.series-section {
  margin-bottom: 52px;
  scroll-margin-top: 92px;
}

.question-box,
.note,
.closing-note {
  padding: 17px 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 6px solid var(--blue);
  border-radius: 0;
}

.question-box {
  color: var(--ink);
  font-size: 18px;
  font-weight: 750;
}

.table-wrap,
.source-frame-wrap {
  max-width: 100%;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid #d6dde1;
  border-bottom: 1px solid #d6dde1;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

th:last-child,
td:last-child {
  border-right: 0;
}

thead th {
  color: #fff;
  background: #1d2a31;
  font-size: 13px;
}

tbody th {
  width: 22%;
  color: var(--blue-deep);
  background: #eaf5fb;
}

.hardware-figure {
  margin: 20px 0 28px;
  background: #fff;
  border: 1px solid #89979f;
  border-radius: 0;
}

.hardware-figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid #89979f;
}

.hardware-figure figcaption span {
  color: var(--muted);
  font-size: 13px;
}

.layer-canvas {
  padding: 20px;
  background:
    linear-gradient(#eef2f4 1px, transparent 1px),
    linear-gradient(90deg, #eef2f4 1px, transparent 1px),
    #fbfcfd;
  background-size: 24px 24px;
}

.layer-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 105px;
  align-items: stretch;
  width: min(900px, 100%);
  margin: 0 auto -1px;
  background: #fff;
  border: 1px solid #92a0a8;
}

.layer-index {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--blue-deep);
  font-family: Consolas, monospace;
  font-weight: 900;
}

.layer-row > div {
  padding: 11px 14px;
}

.layer-row b {
  display: block;
}

.layer-row p {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.layer-row small {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #334249;
  background: #eaf5fb;
  border-left: 1px solid #92a0a8;
  font-family: Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.layer-articles {
  display: grid;
  gap: 0;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.layer-article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 17px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.layer-article > span {
  align-self: start;
  padding: 7px 8px;
  color: #fff;
  background: var(--blue-deep);
  text-align: center;
  font-family: Consolas, monospace;
  font-weight: 900;
}

.layer-article p:last-child {
  margin-bottom: 0;
  color: var(--green);
  font-weight: 700;
}

.flow-canvas {
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  padding: 28px 20px;
  background: #f9fbfc;
}

.flow-step {
  flex: 1 0 112px;
  min-width: 0;
  border: 1px solid #73838c;
  background: #fff;
}

.flow-step b {
  display: block;
  padding: 5px 8px;
  color: #fff;
  background: var(--blue-deep);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.flow-step span {
  display: grid;
  min-height: 72px;
  place-items: center;
  padding: 10px;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 13px;
  font-weight: 750;
}

.flow-arrow {
  align-self: center;
  color: var(--red);
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
}

.contract-canvas {
  display: grid;
  grid-template-columns: 1fr 30px 1fr 30px 1fr;
  gap: 0;
  padding: 24px;
  background: #f9fbfc;
}

.contract-canvas > div {
  padding: 14px;
  background: #fff;
  border: 1px solid #73838c;
}

.contract-canvas > i {
  display: grid;
  place-items: center;
  color: var(--red);
  font-style: normal;
  font-weight: 900;
}

.contract-canvas b {
  color: var(--blue-deep);
  font-family: Consolas, monospace;
}

.contract-canvas p {
  margin: 5px 0 0;
  font-size: 13px;
}

.contract-canvas .contract-done {
  grid-column: 1 / -1;
  margin-top: 12px;
  border-left: 7px solid var(--yellow);
}

.synopsys-scope {
  padding: 18px 20px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 7px solid var(--red);
  font-weight: 700;
}

.synopsys-block-canvas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 20px;
  background:
    linear-gradient(#edf1f3 1px, transparent 1px),
    linear-gradient(90deg, #edf1f3 1px, transparent 1px),
    #f9fbfc;
  background-size: 24px 24px;
}

.synopsys-block {
  position: relative;
  min-width: 0;
  padding: 18px;
  background: #fff;
  border-right: 1px solid #82919a;
  border-bottom: 1px solid #82919a;
}

.synopsys-block:nth-child(odd) {
  border-left: 1px solid #82919a;
}

.synopsys-block:nth-child(-n + 2) {
  border-top: 1px solid #82919a;
}

.synopsys-block > span {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 8px;
  color: #fff;
  background: var(--blue-deep);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
}

.synopsys-block:nth-child(4n + 2) > span,
.synopsys-block:nth-child(4n + 3) > span {
  color: #171612;
  background: var(--yellow);
}

.synopsys-block h3 {
  padding-right: 38px;
}

.synopsys-block p {
  font-size: 14px;
}

.synopsys-block dl {
  margin: 14px 0 0;
  border-top: 1px solid #d6dde1;
}

.synopsys-block dl div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  padding: 8px 0;
  border-bottom: 1px solid #d6dde1;
}

.synopsys-block dt {
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 900;
}

.synopsys-block dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.subsection-title {
  margin-top: 38px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--blue-deep);
  font-size: 23px;
}

.synopsys-boundary-table tbody th {
  color: #8d2a1d;
  background: #fff0ed;
}

.synopsys-register-table tbody th {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 12px;
}

.synopsys-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.synopsys-notes article {
  min-width: 0;
  padding: 18px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.synopsys-notes article p {
  margin-bottom: 0;
}

.source-study {
  margin: 24px 0 42px;
  scroll-margin-top: 92px;
}

.source-study h3 {
  font-size: 22px;
}

.source-origin {
  overflow-wrap: anywhere;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13px;
}

.source-origin a {
  color: var(--blue-deep);
  font-weight: 800;
}

.source-frame {
  min-width: 820px;
  margin: 0;
  padding: 16px 0;
  color: #111;
  background: #fff;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 13px;
  line-height: 1.58;
}

.source-row {
  display: grid;
  grid-template-columns: 58px minmax(max-content, 1fr);
}

.source-row:hover {
  background: #e9f6fc;
}

.source-row > b {
  padding: 0 12px 0 8px;
  color: #71808a;
  text-align: right;
  user-select: none;
  border-right: 1px solid #d2d9dd;
}

.source-row > code {
  padding-left: 14px;
  white-space: pre;
}

.line-notes {
  border: 1px solid var(--line);
  border-top: 0;
}

.line-note {
  display: grid;
  grid-template-columns: 72px minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  border-bottom: 1px solid #d6dde1;
}

.line-note:last-child {
  border-bottom: 0;
}

.line-note > span,
.line-note > code,
.line-note > p {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.line-note > span {
  color: #fff;
  background: var(--blue-deep);
  font-family: Consolas, monospace;
  font-weight: 800;
}

.line-note > code {
  color: #102b38;
  background: #eaf5fb;
  border-right: 1px solid #d6dde1;
  font-size: 12px;
}

.line-note > p {
  color: #424b50;
  font-size: 13px;
  line-height: 1.55;
}

.source-reference {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--yellow);
}

.reference-functions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
  border: 1px solid #d6dde1;
}

.reference-functions div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid #d6dde1;
}

.reference-functions div:last-child {
  border-right: 0;
}

.reference-functions dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.reference-functions dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.verification-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: verify;
  border-top: 1px solid var(--line);
}

.verification-list li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  counter-increment: verify;
}

.verification-list > li > span {
  padding: 16px;
  color: var(--blue-deep);
  background: #eaf5fb;
  font-weight: 900;
}

.verification-list > li > div {
  padding: 14px 16px;
}

.verification-list p {
  margin: 0 0 5px;
}

.failure-table tbody th {
  color: #8d2a1d;
  background: #fff0ed;
}

.closing-note {
  margin-top: 18px;
  border-left-color: var(--yellow);
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 54px;
}

.article-nav a {
  min-width: 0;
  padding: 16px;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--blue);
}

.article-nav a:last-child {
  text-align: right;
}

.article-nav small,
.article-nav b {
  display: block;
}

.article-nav small {
  color: var(--muted);
}

.article-nav b {
  overflow-wrap: anywhere;
}

.index-hero h1 {
  font-size: clamp(48px, 7vw, 72px);
}

.index-intro {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.series-heading {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(300px, 1.2fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
}

.series-heading h2 {
  margin: 0;
}

.series-heading > p {
  margin: 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.topic-card {
  display: block;
  min-width: 0;
  padding: 20px;
  text-decoration: none;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.topic-card:hover {
  background: #edf8fd;
}

.topic-card > span {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 8px;
  color: #fff;
  background: var(--blue-deep);
  font-family: Consolas, monospace;
  font-weight: 900;
}

.topic-card h3 {
  font-size: 21px;
}

.topic-card b {
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 12px;
}

.manual-section {
  padding-top: 4px;
}

.manual-intro {
  padding: 20px 22px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  font-size: 17px;
}

.manual-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 24px 0 54px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.manual-index a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  min-width: 0;
  padding-right: 14px;
  color: var(--ink);
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.manual-index a:hover,
.manual-index a:focus-visible {
  background: #eef7fb;
}

.manual-index span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  min-height: 54px;
  margin-right: 14px;
  color: #fff;
  background: #303c41;
  font-family: var(--mono);
  font-size: 12px;
}

.manual-index b {
  align-self: end;
  padding-top: 9px;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.manual-index small {
  align-self: start;
  padding: 3px 0 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

.manual-chapter {
  margin: 0 0 76px;
  padding-top: 26px;
  scroll-margin-top: 92px;
  border-top: 4px solid var(--line-strong);
}

.manual-chapter-number {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.manual-chapter > h3 {
  margin-bottom: 14px;
  font-family: "Arial Black", "Malgun Gothic", sans-serif;
  font-size: 27px;
  line-height: 1.3;
}

.manual-chapter-intro {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: 16px;
}

.manual-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0 30px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.manual-facts article {
  min-width: 0;
  padding: 17px 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.manual-chapter h4,
.manual-references h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

.manual-facts p,
.manual-references p {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.68;
}

.manual-table-section,
.manual-procedure {
  margin: 30px 0;
}

.manual-table-section > h4,
.manual-procedure > h4 {
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 4px solid var(--cyan);
  font-size: 17px;
}

.manual-table {
  min-width: 860px;
}

.manual-table tbody th {
  width: 17%;
}

.manual-procedure-table {
  min-width: 920px;
}

.manual-warning {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  margin: 24px 0 0;
  color: var(--ink);
  background: #fff7e9;
  border: 1px solid rgba(209, 138, 32, 0.54);
}

.manual-warning strong {
  display: grid;
  place-items: center;
  padding: 13px;
  color: #fff;
  background: #8a6120;
}

.manual-warning span {
  padding: 13px 16px;
}

.manual-references {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 4px solid var(--accent);
}

.manual-references > h3 {
  font-size: 23px;
}

.manual-references > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.manual-references article {
  min-width: 0;
  padding: 17px 18px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.manual-references a {
  color: var(--cyan);
  overflow-wrap: anywhere;
}

.manual-page-grid .toc a {
  overflow-wrap: anywhere;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer a {
  color: var(--blue-deep);
  font-weight: 800;
}

/* Match the visual grammar used by the Kernel and System Programming articles. */
.topbar {
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 48px);
  color: #fffdf7;
  background: rgba(12, 13, 12, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hero {
  color: #fffdf7;
  background: #111210;
  border-bottom: 5px solid var(--accent);
}

.hero-inner,
.page-grid,
.index-layout,
footer {
  width: min(1180px, calc(100% - 40px));
}

.hero-inner {
  padding: 54px 0 42px;
}

.eyebrow,
.section-number,
.source-kicker {
  color: var(--accent);
  font-family: var(--mono);
}

h1 {
  max-width: 1080px;
  font-family: "Arial Black", "Malgun Gothic", sans-serif;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.14;
  word-break: keep-all;
}

h2 {
  font-family: "Arial Black", "Malgun Gothic", sans-serif;
  font-size: 29px;
  line-height: 1.25;
}

h3 {
  font-size: 18px;
  line-height: 1.35;
}

.lead {
  max-width: 930px;
  color: rgba(255, 253, 247, 0.82);
}

.analysis-strip {
  border-top-color: rgba(255, 255, 255, 0.24);
  border-bottom-color: rgba(255, 255, 255, 0.24);
}

.analysis-strip div {
  border-right-color: rgba(255, 255, 255, 0.16);
}

.analysis-strip dt {
  color: var(--accent);
}

.analysis-strip dd {
  color: rgba(255, 253, 247, 0.88);
  font-family: var(--mono);
}

.page-grid,
.index-layout {
  gap: 34px;
  padding: 38px 0 86px;
}

.toc {
  top: 72px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.toc strong {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  font-size: 14px;
}

.toc a {
  padding: 6px 0;
  border-bottom: 0;
  font-size: 13px;
  font-weight: 700;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--accent-dark);
}

.question-box,
.note,
.closing-note,
.source-frame-wrap,
.source-reference,
.synopsys-scope,
.synopsys-notes article,
.article-nav a,
.topic-card {
  background: var(--panel);
}

.question-box,
.note,
.closing-note {
  border-left-color: var(--accent);
}

th,
td,
.synopsys-block dl,
.synopsys-block dl div,
.line-note,
.reference-functions,
.reference-functions div {
  border-color: rgba(23, 22, 18, 0.18);
}

thead th {
  color: #fffdf7;
  background: #303c41;
}

tbody th {
  color: var(--cyan);
  background: #eef7fb;
}

.hardware-figure {
  border-color: var(--line-strong);
}

.hardware-figure figcaption {
  border-bottom-color: var(--line-strong);
}

.layer-canvas,
.synopsys-block-canvas {
  background:
    linear-gradient(rgba(23, 22, 18, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 22, 18, 0.045) 1px, transparent 1px),
    #f8f7f2;
  background-size: 24px 24px;
}

.flow-canvas,
.contract-canvas {
  background: #f8f7f2;
}

.layer-row,
.flow-step,
.contract-canvas > div {
  border-color: #7e8a8f;
}

.layer-index,
.layer-article > span,
.synopsys-block > span,
.topic-card > span {
  background: var(--accent-dark);
  font-family: var(--mono);
}

.layer-row small,
.verification-list > li > span {
  color: var(--accent-dark);
  background: #f7e4e0;
}

.flow-step b,
.line-note > span {
  color: #fff;
  background: #303c41;
  font-family: var(--mono);
}

.contract-canvas b,
.synopsys-block dt,
.source-origin a,
footer a {
  color: var(--cyan);
}

.contract-canvas b,
.source-origin,
.source-frame,
.line-note > span,
.topic-card > span,
.topic-card b {
  font-family: var(--mono);
}

.subsection-title {
  border-bottom-color: var(--accent);
}

.synopsys-boundary-table tbody th,
.failure-table tbody th {
  color: var(--accent-dark);
  background: #fbefec;
}

.source-row:hover,
.topic-card:hover {
  background: #eef7fb;
}

.line-note > code {
  color: #17313f;
  background: #eef7fb;
}

.article-nav a {
  border-top-color: var(--accent);
}

.topic-card b {
  color: var(--cyan);
}

@media (max-width: 900px) {
  .page-grid,
  .index-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0 16px;
  }

  .toc strong {
    width: 100%;
  }

  .analysis-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-strip div:nth-child(2) {
    border-right: 0;
  }

  .analysis-strip div:first-child,
  .analysis-strip div:nth-child(3) {
    padding-left: 0;
  }

  .series-heading {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .synopsys-block-canvas,
  .synopsys-notes,
  .manual-index,
  .manual-facts,
  .manual-references > div {
    grid-template-columns: 1fr;
  }

  .synopsys-block,
  .synopsys-block:nth-child(odd),
  .synopsys-block:nth-child(-n + 2) {
    border-top: 0;
    border-right: 1px solid #82919a;
    border-bottom: 1px solid #82919a;
    border-left: 1px solid #82919a;
  }

  .synopsys-block:first-child {
    border-top: 1px solid #82919a;
  }

  .line-note {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .line-note > p {
    grid-column: 1 / -1;
    border-top: 1px solid #d6dde1;
  }

  .manual-chapter > h3 {
    font-size: 23px;
  }
}

@media (max-width: 640px) {
  .hero-inner,
  .page-grid,
  .index-layout,
  footer {
    width: min(100% - 24px, 1220px);
  }

  .hero-inner {
    padding: 38px 0 34px;
  }

  h1 {
    font-size: 35px;
  }

  h2 {
    font-size: 26px;
  }

  .analysis-strip,
  .topic-grid,
  .article-nav {
    grid-template-columns: 1fr;
  }

  .analysis-strip div {
    padding-left: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  }

  .analysis-strip div:last-child {
    border-bottom: 0;
  }

  .hardware-figure figcaption {
    display: block;
  }

  .hardware-figure figcaption span {
    display: block;
    margin-top: 4px;
  }

  .layer-canvas {
    padding: 10px;
  }

  .layer-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .layer-row small {
    display: none;
  }

  .layer-article {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
  }

  .contract-canvas {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .contract-canvas > i {
    transform: rotate(90deg);
  }

  .verification-list li {
    grid-template-columns: 1fr;
  }

  .reference-functions {
    grid-template-columns: 1fr;
  }

  .reference-functions div {
    border-right: 0;
    border-bottom: 1px solid #d6dde1;
  }

  .reference-functions div:last-child {
    border-bottom: 0;
  }

  .article-nav a:last-child {
    text-align: left;
  }

  .manual-intro {
    padding: 16px;
  }

  .manual-index a {
    font-size: 13px;
  }

  .manual-warning {
    grid-template-columns: 1fr;
  }

  .manual-warning strong {
    justify-content: start;
  }
}
