:root {
  --black: #090b0c;
  --charcoal: #121619;
  --panel: #1a1e21;
  --panel-2: #20262a;
  --red: #a7191f;
  --red-hot: #d12b31;
  --paper: #eee9dc;
  --muted: #aaa89f;
  --steel: #78858c;
  --steel-dark: #394249;
  --line: #30383d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--paper);
  background-color: var(--black);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #f3bd3b; outline-offset: 2px; }
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 30;
  padding: 8px 12px;
  color: var(--black);
  background: var(--paper);
  visibility: hidden;
  transform: translateY(-220%);
}
.skip-link:focus-visible { visibility: visible; transform: translateY(0); }

.utility {
  min-height: 28px;
  border-bottom: 3px solid var(--red);
  color: #d7d6d0;
  background: #050606;
  font: 10px/27px "Courier New", monospace;
}
.utility-inner,
.masthead,
.lead,
.journal,
.practice,
.site-footer {
  width: min(1040px, calc(100% - 32px));
  margin-inline: auto;
}
.utility-inner { display: flex; justify-content: space-between; gap: 20px; }

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  min-height: 92px;
  margin-top: 16px;
  border: 1px solid var(--steel-dark);
  border-top: 5px solid var(--red);
  background: var(--charcoal);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  text-decoration: none;
}
.brand img { width: 54px; height: 54px; border: 1px solid var(--steel); }
.brand-name {
  display: block;
  font: 700 23px/1 Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}
.brand-note {
  display: block;
  margin-top: 7px;
  color: var(--steel);
  font: 700 10px/1 "Courier New", monospace;
  text-transform: uppercase;
}
.edition {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.masthead nav { display: flex; align-items: stretch; border-left: 1px solid var(--steel-dark); }
.masthead nav a {
  display: grid;
  place-items: center;
  min-width: 105px;
  padding: 12px;
  border-left: 1px solid #252c30;
  color: #d7d6d0;
  background: #0e1113;
  font: 700 11px/1.2 "Courier New", monospace;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}
.masthead nav a:hover { color: #fff; background: var(--red); }

.lead {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .7fr);
  gap: 0;
  margin-top: 18px;
  border: 1px solid var(--steel-dark);
  background: var(--panel);
}
.lead > div {
  min-height: 285px;
  padding: 42px 44px;
  border-right: 1px solid var(--steel-dark);
  background:
    linear-gradient(135deg, transparent 74%, rgba(167,25,31,.18) 74%, rgba(167,25,31,.18) 76%, transparent 76%),
    var(--panel);
}
.lead-kicker, .section-kicker {
  display: inline-block;
  padding: 5px 8px;
  color: #fff;
  background: var(--red);
  font: 700 10px/1 "Courier New", monospace;
  text-transform: uppercase;
}
.lead h1 {
  max-width: 670px;
  margin: 20px 0 15px;
  font: 700 45px/.98 Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}
.lead h1 em { display: block; color: var(--red-hot); font-style: normal; }
.lead-copy {
  max-width: 670px;
  margin: 0;
  color: #c6c5be;
  font-size: 14px;
}
.lead-aside {
  align-self: stretch;
  padding: 28px 24px;
  background: #0d1012;
}
.lead-aside::before {
  content: "DOJO PROTOCOL // 01";
  display: block;
  margin: -28px -24px 25px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--steel-dark);
  color: #d7d6d0;
  background: #22282c;
  font: 700 10px/1 "Courier New", monospace;
}
.lead-aside strong { display: block; color: #fff; font-size: 16px; text-transform: uppercase; }
.lead-aside p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.lead-aside p::after {
  content: "OBSERVE  /  TEST  /  REFINE";
  display: block;
  margin-top: 28px;
  padding-top: 15px;
  border-top: 1px dashed var(--steel-dark);
  color: var(--red-hot);
  font: 700 10px/1.5 "Courier New", monospace;
}

.journal {
  margin-top: 18px;
  margin-bottom: 18px;
  border: 1px solid var(--steel-dark);
  background: var(--charcoal);
}
.journal-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 105px;
  padding: 21px 25px;
  border-bottom: 1px solid var(--steel-dark);
}
.journal h2, .practice h2 {
  margin: 10px 0 0;
  font: 700 24px/1 Tahoma, Verdana, sans-serif;
  text-transform: uppercase;
}
.journal-intro { margin: 0; color: var(--muted); font-size: 12px; }
.note-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--steel-dark);
  background: #0d1012;
}
.note-tabs button {
  min-height: 54px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid var(--steel-dark);
  color: #bbbdbb;
  background: transparent;
  font: 700 10px/1.25 "Courier New", monospace;
  cursor: pointer;
  text-transform: uppercase;
}
.note-tabs button:last-child { border-right: 0; }
.note-tabs button[aria-selected="true"] {
  color: #fff;
  background: var(--red);
  box-shadow: inset 0 -4px 0 #e7e1d3;
}
.note-tabs button:hover:not([aria-selected="true"]) { color: #fff; background: #262c30; }
.note-panel[hidden] { display: none; }
.note-panel { animation: record-in .16s linear; }
@keyframes record-in { from { opacity: .45; } }
.note-list { margin: 0; padding: 12px 20px 18px; list-style: none; }
.note-list li {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 115px;
  align-items: center;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}
.note-list .number {
  color: var(--red-hot);
  font: 700 10px/1 "Courier New", monospace;
}
.note-list a {
  padding: 13px 15px 13px 0;
  color: #efeee8;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.note-list a::before { content: "RECORD: "; color: var(--steel); font: 10px "Courier New", monospace; }
.note-list a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red-hot); text-underline-offset: 4px; }
.note-list .subject {
  justify-self: end;
  color: var(--steel);
  font: 9px/1 "Courier New", monospace;
  text-transform: uppercase;
}
.full-index {
  display: block;
  min-height: 43px;
  padding: 13px 24px;
  border-top: 1px solid var(--steel-dark);
  color: #fff;
  background: #20262a;
  font: 700 10px/1.6 "Courier New", monospace;
  text-decoration: none;
  text-transform: uppercase;
}
.full-index:hover { background: var(--red); }

.practice-wrap { border-block: 1px solid var(--steel-dark); background: #0d1012; }
.practice { display: grid; grid-template-columns: 210px 1fr; gap: 30px; padding-block: 32px; }
.practice .section-kicker { background: var(--steel-dark); }
.practice-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--steel-dark); }
.practice article { min-height: 142px; padding: 18px; border-right: 1px solid var(--steel-dark); background: var(--panel); }
.practice article:last-child { border-right: 0; }
.practice strong { color: var(--red-hot); font: 700 10px/1 "Courier New", monospace; }
.practice h3 { margin: 13px 0 8px; color: #fff; font-size: 14px; text-transform: uppercase; }
.practice p { margin: 0; color: var(--muted); font-size: 11px; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px 40px;
  color: var(--steel);
  font: 10px/1.5 "Courier New", monospace;
}
.site-footer a { color: #ddd9ce; }

.library {
  width: min(960px, calc(100% - 32px));
  margin: 18px auto 60px;
  border: 1px solid var(--steel-dark);
  background: var(--charcoal);
}
.library-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 28px;
  border-top: 5px solid var(--red);
  border-bottom: 1px solid var(--steel-dark);
}
.library-header a { grid-column: 1 / -1; color: var(--steel); font: 700 10px/1 "Courier New", monospace; text-transform: uppercase; }
.library h1 { margin: 8px 0 0; font: 700 27px/1 Tahoma, Verdana, sans-serif; text-transform: uppercase; }
.library header p { max-width: 410px; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.library .note-list { padding-top: 12px; }

@media (max-width: 760px) {
  .masthead { grid-template-columns: 1fr; }
  .masthead nav { border-left: 0; border-top: 1px solid var(--steel-dark); }
  .masthead nav a { flex: 1; min-width: 0; }
  .lead { grid-template-columns: 1fr; }
  .lead > div { min-height: auto; padding: 34px 30px; border-right: 0; border-bottom: 1px solid var(--steel-dark); }
  .lead h1 { font-size: 36px; }
  .journal-head { grid-template-columns: 1fr; gap: 14px; }
  .practice { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) {
  .utility-inner, .masthead, .lead, .journal, .practice, .site-footer, .library { width: calc(100% - 20px); }
  .utility-inner span:last-child { display: none; }
  .brand { padding: 13px; }
  .brand img { width: 46px; height: 46px; }
  .brand-name { font-size: 18px; }
  .masthead nav a { min-height: 42px; padding: 8px 4px; font-size: 9px; }
  .lead > div { padding: 28px 20px; }
  .lead h1 { font-size: 29px; line-height: 1.03; }
  .lead-aside { padding: 25px 19px; }
  .lead-aside::before { margin: -25px -19px 22px; }
  .journal-head { min-height: 0; padding: 20px; }
  .note-tabs { grid-template-columns: 1fr 1fr; }
  .note-tabs button { border-bottom: 1px solid var(--steel-dark); }
  .note-list { padding-inline: 13px; }
  .note-list li { grid-template-columns: 36px minmax(0, 1fr); }
  .note-list .subject { display: none; }
  .note-list a { padding-right: 0; overflow-wrap: anywhere; }
  .note-list a::before { display: block; margin-bottom: 3px; }
  .practice-grid { grid-template-columns: 1fr; }
  .practice article { min-height: 0; border-right: 0; border-bottom: 1px solid var(--steel-dark); }
  .practice article:last-child { border-bottom: 0; }
  .site-footer { display: block; }
  .site-footer span { display: block; }
  .site-footer span + span { margin-top: 9px; }
  .library-header { grid-template-columns: 1fr; padding: 22px; }
  .library h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .note-panel { animation: none; } }
