@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "VT323";
  src: url("fonts/VT323-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #070907;
  --void-soft: #0c0f0c;
  --paper: #edcf96;
  --paper-light: #f3dcaa;
  --paper-deep: #d7b779;
  --ink: #181810;
  --ink-soft: #4b432f;
  --phosphor: #86bd3f;
  --phosphor-bright: #a7db5d;
  --phosphor-dim: #526f2b;
  --oxide: #a33a27;
  --oxide-dark: #79291e;
  --rule: rgba(74, 61, 34, 0.42);
  --frame: #667a31;
  --radius: 7px;
  --page-width: 1404px;
  --paper-texture:
    radial-gradient(circle at 12% 18%, rgba(104, 71, 25, 0.08) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 31%, rgba(255, 248, 217, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 42% 83%, rgba(109, 73, 27, 0.055) 0 1px, transparent 2px),
    linear-gradient(105deg, rgba(255,255,255,0.13), transparent 35%, rgba(93,61,20,0.045) 70%, transparent),
    var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  background: var(--void);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  padding: 18px;
  color: var(--paper-light);
  font-family: "Courier Prime", "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.34;
  background:
    radial-gradient(circle at 50% -20%, rgba(61, 78, 35, 0.14), transparent 42%),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px),
    var(--void);
  background-size: auto, 5px 5px, auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--oxide);
}

:focus-visible {
  outline: 3px solid var(--phosphor-bright);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 0.55rem 0.8rem;
  color: var(--void);
  background: var(--phosphor-bright);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.machina-topbar,
.site-main,
.machina-footer {
  width: min(var(--page-width), 100%);
  margin-inline: auto;
}

.machina-topbar {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 1.25rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--frame);
  border-radius: var(--radius);
  color: var(--phosphor);
  background: rgba(4, 7, 5, 0.96);
  font-family: "VT323", monospace;
  box-shadow: inset 0 0 22px rgba(121, 171, 56, 0.035);
}

.system-id {
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  line-height: 1.05;
  letter-spacing: 0.03em;
}

.system-id span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.2vw, 2rem);
  color: var(--paper-light);
  font-size: 1rem;
  text-transform: uppercase;
}

.primary-nav a {
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}

.primary-nav a:hover,
.page-home .nav-home,
.page-blog .nav-blog,
.page-post .nav-blog,
.page-archives .nav-archives,
.page-tags .nav-tags,
.page-tag .nav-tags {
  color: #e64d31;
  border-bottom-color: currentColor;
}

.system-time {
  justify-self: end;
  white-space: nowrap;
  font-size: 0.9rem;
}

.status-light {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.5rem;
  border-radius: 50%;
  background: var(--phosphor-bright);
  box-shadow: 0 0 8px rgba(167, 219, 93, 0.55);
}

.site-main {
  margin-top: 12px;
}

.paper-panel {
  position: relative;
  color: var(--ink);
  background: var(--paper-texture);
}

.hero {
  min-height: 258px;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.1fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3.5rem);
  padding: 3rem 4.4rem 2.7rem;
  overflow: hidden;
  border-radius: 15px 15px 7px 7px;
  clip-path: polygon(1.6% 0, 98.4% 0, 100% 9%, 100% 100%, 0 100%, 0 9%);
  box-shadow: inset 0 0 45px rgba(77, 48, 14, 0.08);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 3.2%;
  right: 3.2%;
  height: 10px;
  pointer-events: none;
  background: radial-gradient(circle, var(--void) 0 2.5px, transparent 3px) 0 0 / 16px 10px repeat-x;
}

.brand-lockup,
.hero-copy,
.hero-art,
.feed-label,
.feed-numbers {
  position: relative;
  z-index: 1;
}

.brand-lockup a {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--ink);
  line-height: 0.72;
}

.brand-title {
  display: block;
  max-width: 11ch;
  overflow-wrap: anywhere;
  font-weight: 700;
  font-size: clamp(3rem, 5.7vw, 5.5rem);
  line-height: 0.78;
  letter-spacing: -0.11em;
  text-transform: uppercase;
  text-shadow: 2px 0 var(--ink);
}

.brand-subtitle {
  display: block;
  margin-top: 0.38em;
  color: var(--oxide);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.8vw, 2.85rem);
  line-height: 0.8;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.brand-motto {
  display: block;
  margin-top: 1.15rem;
  color: var(--ink);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy {
  align-self: center;
}

.hero-copy-wide {
  grid-column: 1 / 3;
  padding-left: 3.5rem;
}

.hero-section .brand-lockup + .hero-copy {
  padding-left: 1rem;
}

.hero-copy h1 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: 0.015em;
}

.hero-copy p {
  max-width: 45ch;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.hero-copy .eyebrow {
  margin: 0 0 0.35rem;
  color: var(--oxide);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.red-rule {
  display: block;
  width: 2rem;
  margin-top: 0.8rem;
  border-top: 2px solid var(--oxide);
}

.hero-art {
  width: 100%;
  max-width: 430px;
  max-height: 205px;
  justify-self: end;
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
  filter: contrast(1.03) saturate(0.8);
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at center, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at center, #000 62%, transparent 100%);
}

.hero-error .hero-art {
  max-height: 220px;
  object-fit: contain;
}

.feed-label {
  position: absolute;
  color: var(--oxide);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.feed-label-left {
  left: 14px;
  top: 62px;
  transform: rotate(180deg);
}

.feed-label-right {
  right: 14px;
  top: 62px;
}

.hero-filter {
  position: absolute;
  z-index: 3;
  left: 4.4rem;
  right: 4.4rem;
  bottom: 23px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  overflow: hidden;
  color: var(--oxide-dark);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-filter strong {
  padding: 0.22rem 0.38rem;
  color: var(--paper-light);
  background: var(--void);
}

.hero-filter a:hover {
  text-decoration: underline;
}

.feed-numbers,
.sheet-feed-numbers {
  position: absolute;
  left: 3.5%;
  right: 3.5%;
  bottom: 7px;
  overflow: hidden;
  color: var(--oxide);
  font-family: "VT323", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  white-space: nowrap;
  opacity: 0.86;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(280px, 0.85fr);
  gap: 12px;
  margin-top: 12px;
}

.machina-box {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--frame);
  border-radius: var(--radius);
  background: var(--void-soft);
}

.box-header {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.32rem 0.75rem;
  color: var(--phosphor);
  background: linear-gradient(180deg, #0c100d, #080a08);
  border-bottom: 1px solid var(--frame);
  font-family: "VT323", monospace;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.box-header::after {
  content: "";
  height: 1px;
  flex: 1;
  order: 2;
  background: linear-gradient(90deg, var(--phosphor-dim), transparent);
  opacity: 0.65;
}

.box-header h2 {
  order: 1;
  margin: 0;
  font: inherit;
}

.box-header > a,
.box-header > span:last-child:not(:first-child) {
  order: 3;
  white-space: nowrap;
}

.indicator {
  order: 0;
  width: 0.65rem;
  height: 0.65rem;
  flex: 0 0 auto;
  border-radius: 50%;
}

.indicator.red {
  background: #e94a2b;
}

.box-glyph {
  order: 0;
  color: var(--phosphor-bright);
  font-size: 1.3rem;
}

.article-list {
  padding: 9px;
}

.article-row {
  min-height: 88px;
  display: grid;
  grid-template-columns: 105px 70px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 0.8rem;
  overflow: hidden;
  border: 1px solid rgba(83, 65, 30, 0.55);
  border-radius: 6px;
}

.article-row + .article-row {
  margin-top: 5px;
}

.article-row::before,
.tag-entry::before,
.year-entry::before,
.recovery-card::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 10px;
  pointer-events: none;
  background: radial-gradient(circle, var(--void) 0 3px, transparent 3.5px) 0 0 / 10px 18px repeat-y;
}

.article-row::after,
.tag-entry::after,
.year-entry::after,
.recovery-card::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 7px;
  bottom: 8px;
  width: 7px;
  pointer-events: none;
  background: radial-gradient(circle, var(--void) 0 2px, transparent 2.5px) 0 0 / 7px 15px repeat-y;
  opacity: 0.82;
}

.row-ticket {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding-left: 2.4rem;
  border-right: 1px solid var(--rule);
  color: var(--oxide);
}

.row-ticket span:last-child {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.row-date {
  font-size: 0.82rem;
  font-weight: 700;
}

.row-icon {
  width: 62px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--phosphor-bright);
  background: linear-gradient(145deg, #0b100c, #030503);
  border: 1px solid rgba(42, 54, 27, 0.8);
  border-radius: 7px;
  box-shadow: inset 0 0 18px rgba(133, 190, 59, 0.06);
  font-family: "VT323", monospace;
  font-size: 1.7rem;
}

.row-icon b {
  font-weight: 400;
}

.row-copy {
  min-width: 0;
  padding: 0.75rem 0;
}

.row-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.18;
}

.row-copy h3 a:hover {
  color: var(--oxide);
}

.row-tags,
.row-file {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.row-tags,
.row-tags a {
  color: var(--oxide);
  font-weight: 700;
}

.row-file {
  color: var(--ink-soft);
}

.row-arrow {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: var(--ink);
  font-size: 1.6rem;
}

.row-arrow:hover {
  color: var(--oxide);
  background: rgba(163, 58, 39, 0.07);
}

.sidebar-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-paper {
  padding: 1rem 1.3rem;
  border-radius: 0 0 10px 10px;
}

.sidebar-paper::before,
.sidebar-paper::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 7px;
  background: radial-gradient(circle, var(--void) 0 2px, transparent 2.5px) 0 0 / 7px 15px repeat-y;
  opacity: 0.75;
}

.sidebar-paper::before {
  left: 6px;
}

.sidebar-paper::after {
  right: 6px;
}

.archive-years {
  display: grid;
  gap: 0.5rem;
}

.archive-years > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.45rem;
  color: var(--ink);
  border-bottom: 1px dotted var(--rule);
}

.archive-years > a:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.archive-years strong {
  color: var(--oxide);
  font-size: 1.1rem;
}

.archive-years span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-cloud a {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.26rem 0.45rem;
  color: var(--ink);
  border: 1px solid rgba(78, 64, 32, 0.62);
  border-radius: 4px;
  font-size: 0.75rem;
}

.tag-cloud a:hover {
  color: var(--oxide-dark);
  background: rgba(163, 58, 39, 0.07);
}

.tag-cloud span {
  color: var(--oxide);
}

.file-list {
  display: grid;
  gap: 0.4rem;
}

.file-list a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  color: var(--ink);
}

.file-list a span {
  overflow-wrap: anywhere;
}

.icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  color: var(--oxide);
}

.empty-state {
  padding: 2rem;
  text-align: center;
}

.tag-ledger,
.year-ledger {
  display: grid;
  gap: 6px;
  padding: 9px;
}

.tag-entry {
  min-height: 82px;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto 36px;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.8rem 0.75rem 2rem;
  border: 1px solid rgba(83, 65, 30, 0.55);
  border-radius: 9px;
}

.tag-mark {
  width: 58px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--phosphor-bright);
  background: var(--void);
  border-radius: 6px;
  font-family: "VT323", monospace;
  font-size: 2rem;
}

.tag-entry strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
}

.tag-entry small {
  display: block;
  margin-top: 0.2rem;
  color: var(--oxide);
  text-transform: uppercase;
}

.tag-entry > b {
  color: var(--oxide);
  font-size: 1.5rem;
}

.tag-entry > i {
  color: var(--ink);
  font-style: normal;
  font-size: 1.4rem;
}

.year-entry {
  min-height: 110px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 0.75rem 1rem 2.4rem;
  border: 1px solid rgba(83, 65, 30, 0.55);
  border-radius: 9px;
}

.year-stamp {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rule);
}

.year-stamp a {
  color: var(--oxide);
  font-size: 1.65rem;
  font-weight: 700;
}

.year-stamp span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.year-months {
  display: grid;
  grid-template-columns: repeat(6, minmax(42px, 1fr));
  gap: 0.45rem;
}

.year-months a,
.month-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.35rem;
  color: var(--ink);
  border: 1px solid rgba(78, 64, 32, 0.45);
  border-radius: 4px;
}

.year-months a:hover,
.month-grid a:hover {
  color: var(--oxide);
  border-color: var(--oxide);
}

.year-months span,
.month-grid span {
  color: var(--oxide);
  font-size: 0.7rem;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.large-link {
  color: var(--oxide-dark);
  font-weight: 700;
}

.post-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(285px, 0.95fr);
  gap: 12px;
}

.article-sheet {
  min-width: 0;
  overflow: hidden;
  padding: 2.5rem clamp(2rem, 5vw, 5rem) 3.2rem;
  border-radius: var(--radius);
  box-shadow: inset 0 0 50px rgba(81, 51, 13, 0.06);
}

.article-sheet::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 12px;
  width: 10px;
  background: radial-gradient(circle, var(--void) 0 3px, transparent 3.5px) 0 0 / 10px 19px repeat-y;
}

.article-sheet::after {
  content: "";
  position: absolute;
  top: 24px;
  right: 12px;
  bottom: 24px;
  width: 10px;
  background: radial-gradient(circle, var(--void) 0 3px, transparent 3.5px) 0 0 / 10px 19px repeat-y;
}

.sheet-label {
  position: absolute;
  top: 78px;
  right: 22px;
  color: var(--oxide);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.article-header {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}

.article-ticket {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-right: 1rem;
  color: var(--oxide);
  border-right: 1px solid var(--rule);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.article-ticket i {
  width: 65px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-top: 0.5rem;
  color: var(--phosphor-bright);
  background: var(--void);
  border-radius: 6px;
  font-family: "VT323", monospace;
  font-size: 1.7rem;
  font-style: normal;
}

.article-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.article-byline {
  margin: 0.75rem 0;
  color: var(--oxide);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.article-tags a {
  padding: 0.2rem 0.4rem;
  color: var(--ink-soft);
  border: 1px solid rgba(76, 66, 37, 0.6);
  border-radius: 4px;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.sheet-feed-numbers {
  bottom: 8px;
}

.terminal-note pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  color: var(--phosphor);
  background: var(--void);
  border: 0;
  font: 1.1rem/1.2 "VT323", monospace;
}

.markdown-body {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.markdown-body > :first-child {
  margin-top: 0;
}

.markdown-body > :last-child {
  margin-bottom: 0;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  margin: 1.7em 0 0.55em;
  color: var(--oxide);
  line-height: 1.15;
}

.markdown-body h2 {
  font-size: 1.6rem;
}

.markdown-body h3 {
  font-size: 1.25rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote {
  margin: 0.8rem 0;
}

.markdown-body a {
  color: var(--oxide-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.markdown-body blockquote {
  padding: 0.85rem 1rem;
  color: var(--oxide-dark);
  border: 1px dashed rgba(163, 58, 39, 0.55);
  border-left: 5px solid var(--oxide);
  background: rgba(255, 245, 212, 0.16);
}

.markdown-body code {
  padding: 0.08rem 0.28rem;
  color: var(--oxide-dark);
  background: rgba(255, 247, 213, 0.3);
  border: 1px solid rgba(111, 80, 34, 0.3);
  border-radius: 3px;
  font-family: "Courier Prime", monospace;
}

.markdown-body pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 1rem;
  color: var(--phosphor-bright);
  background: var(--void) !important;
  border: 1px solid var(--frame);
  border-radius: 7px;
  font-family: "VT323", monospace;
  font-size: 1.15rem;
  line-height: 1.22;
}

.markdown-body pre code {
  padding: 0;
  color: inherit;
  background: none;
  border: 0;
  font: inherit;
}

.markdown-body .terminal-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.75rem;
  margin: 0;
  color: var(--phosphor-bright);
  font-size: 0.85rem;
}

.markdown-body .terminal-output {
  color: var(--paper-light);
}

.terminal-label {
  font-weight: 700;
}

.terminal-input .terminal-label,
.terminal-output .terminal-label,
.terminal-block > .terminal-copy:first-child {
  margin-left: 0.75rem;
}

.terminal-label,
.terminal-copy {
  position: relative;
  z-index: 1;
  transform: translateY(50%);
  padding: 0.2rem 0.55rem;
  background: #10190e;
  border: 1px solid currentColor;
  border-radius: 3px;
}

.terminal-input .terminal-label,
.terminal-input .terminal-copy {
  margin-top: -0.8rem;
}

.terminal-copy {
  opacity: 0;
  pointer-events: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.terminal-block:hover .terminal-copy,
.terminal-block:focus-within .terminal-copy {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: none) {
  .terminal-copy {
    opacity: 1;
    pointer-events: auto;
  }
}

.terminal-output .terminal-copy {
  background: #20211c;
}

.terminal-output .terminal-label {
  background: #20211c;
}

.terminal-copy:hover {
  background: #282f26;
}

.terminal-output .terminal-copy:hover {
  background: #363733;
}

.terminal-copy:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.markdown-body .terminal-block pre {
  width: 100%;
  margin: 0;
  padding-bottom: 8px;
  color: inherit;
  background: #10190e !important;
  border: 1px solid var(--frame);
  border-left: 1px solid var(--phosphor);
  border-radius: var(--radius);
}

.markdown-body .terminal-output pre {
  background: #20211c !important;
  border-color: #77715f;
}

.markdown-body table {
  display: block;
  width: max-content;
  min-width: 100%;
  max-width: 100%;
  margin: 1rem 0;
  overflow-x: auto;
  border-collapse: collapse;
}

.markdown-body th,
.markdown-body td {
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(81, 66, 34, 0.5);
  text-align: left;
  vertical-align: top;
}

.markdown-body thead th {
  color: var(--paper-light);
  background: var(--void);
}

.markdown-body tbody tr:nth-child(even) {
  background: rgba(94, 69, 28, 0.08);
}

.markdown-body hr {
  border: 0;
  border-top: 1px dashed var(--rule);
}

.markdown-body img,
.markdown-body video,
.markdown-body iframe,
.markdown-body .asciinema-player {
  max-width: 100%;
}

.markdown-body img {
  height: auto;
  border: 1px solid var(--rule);
}

.markdown-body .source-snippet {
  margin: 1.2rem 0;
}

.markdown-body .source-snippet figcaption {
  padding: 0.4rem 0.65rem;
  color: var(--phosphor);
  background: var(--void);
  border: 1px solid var(--frame);
  border-bottom: 0;
  font-family: "VT323", monospace;
  font-size: 1rem;
}

.markdown-body .source-snippet pre {
  margin-top: 0;
  border-radius: 0 0 7px 7px;
}

.recovery-box {
  margin-top: 12px;
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px;
}

.recovery-card {
  min-height: 130px;
  display: grid;
  grid-template-columns: 72px 1fr 24px;
  grid-template-rows: auto 1fr;
  gap: 0.25rem 0.8rem;
  align-items: center;
  padding: 1rem 0.8rem 1rem 2rem;
  border-radius: 8px;
}

.recovery-card > span {
  grid-row: 1 / 3;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  color: var(--phosphor-bright);
  background: var(--void);
  border-radius: 7px;
  font-family: "VT323", monospace;
  font-size: 2rem;
}

.recovery-card strong {
  color: var(--oxide);
  text-transform: uppercase;
}

.recovery-card small {
  align-self: start;
  color: var(--ink-soft);
}

.recovery-card i {
  grid-column: 3;
  grid-row: 1 / 3;
  font-size: 1.4rem;
  font-style: normal;
}

.machina-footer {
  min-height: 160px;
  display: grid;
  grid-template-columns: 280px minmax(320px, 1fr) 250px;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 12px;
  padding: 1rem 1.7rem;
  overflow: hidden;
  color: var(--phosphor);
  background: linear-gradient(180deg, #080b08, #050705);
  border: 1px solid var(--frame);
  border-radius: var(--radius);
  font-family: "VT323", monospace;
  font-size: 1rem;
}

.footer-terminal {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
  border-right: 1px solid var(--phosphor-dim);
}

.footer-terminal strong {
  margin: 0 0 0.55rem 0.8rem;
  color: var(--phosphor-bright);
  font-weight: 400;
}

.footer-terminal span:nth-of-type(n+3):not(:last-child) {
  margin-left: 0.8rem;
}

.punch-matrix {
  align-self: center;
  min-height: 100px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.35rem;
  padding-inline: 1rem;
  color: var(--phosphor);
}

.punch-matrix > span {
  grid-column: 1 / -1;
  text-align: center;
  letter-spacing: 0.55em;
}

.punch-matrix i {
  display: block;
  height: 64px;
  background:
    radial-gradient(circle, var(--phosphor-bright) 0 2px, transparent 2.5px) 0 0 / 20px 16px,
    radial-gradient(circle, var(--phosphor-dim) 0 2px, transparent 2.5px) 10px 8px / 20px 16px;
  opacity: 0.75;
}

.footer-connect {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-left: 1rem;
  border-left: 1px solid var(--phosphor-dim);
}

.footer-connect strong {
  color: var(--phosphor-bright);
}

.footer-connect nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-connect a {
  border-bottom: 1px dotted currentColor;
}

.footer-connect span {
  margin-top: auto;
}

.footer-connect span + span {
  margin-top: 0;
  color: var(--phosphor-dim);
}

@media (max-width: 1100px) {
  .machina-topbar {
    grid-template-columns: 1fr auto;
  }

  .system-id {
    display: none;
  }

  .primary-nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: minmax(230px, 0.8fr) minmax(280px, 1fr) minmax(230px, 0.75fr);
    gap: 1.2rem;
    padding-inline: 3.5rem;
  }

  .content-grid,
  .post-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .article-row {
    grid-template-columns: 105px 74px minmax(0, 1fr) 34px;
  }

  .recovery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 850px) {
  body {
    padding: 9px;
  }

  .machina-topbar {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .system-time {
    display: none;
  }

  .primary-nav {
    justify-content: center;
  }

  .hero {
    min-height: 310px;
    grid-template-columns: 1fr 0.8fr;
    padding: 3.2rem 3rem 2.2rem;
  }

  .brand-lockup {
    grid-column: 1;
  }

  .hero-copy {
    grid-column: 1;
  }

  .hero-copy-wide {
    padding-left: 0;
  }

  .hero-section .brand-lockup + .hero-copy {
    padding-left: 0;
  }

  .hero-art {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .content-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .post-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .machina-footer {
    grid-template-columns: 1fr 1fr;
  }

  .punch-matrix {
    display: none;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .machina-topbar {
    padding-inline: 0.65rem;
  }

  .primary-nav {
    gap: 0.85rem;
    font-size: 1rem;
  }

  .hero {
    min-height: 0;
    display: block;
    padding: 3rem 2rem 2.2rem;
    clip-path: none;
    border-radius: var(--radius);
  }

  .brand-lockup {
    margin-bottom: 1.8rem;
  }

  .brand-title {
    font-size: clamp(2.8rem, 17vw, 4.6rem);
  }

  .hero-art {
    width: 75%;
    max-height: 175px;
    display: block;
    margin: 1rem auto 0;
  }

  .feed-label {
    display: none;
  }

  .box-header > span:last-child:not(:first-child),
  .box-header > a {
    display: none;
  }

  .article-row {
    min-height: 112px;
    grid-template-columns: 84px minmax(0, 1fr) 32px;
    gap: 0.65rem;
  }

  .row-ticket {
    min-height: 82px;
    padding-left: 2rem;
  }

  .row-icon {
    display: none;
  }

  .row-copy {
    padding-right: 0.2rem;
  }

  .row-file {
    display: none;
  }

  .tag-entry {
    grid-template-columns: 58px minmax(0, 1fr) 28px;
    gap: 0.65rem;
  }

  .tag-entry > b {
    display: none;
  }

  .tag-mark {
    width: 52px;
  }

  .year-entry {
    grid-template-columns: 90px minmax(0, 1fr) 28px;
    gap: 0.75rem;
    padding-left: 2rem;
  }

  .year-months {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-sheet {
    padding: 2rem 1.5rem 3rem 2.2rem;
  }

  .article-header {
    grid-template-columns: 1fr;
  }

  .article-ticket {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 0 0 0.6rem;
  }

  .article-ticket i {
    display: none;
  }

  .post-sidebar {
    display: flex;
  }

  .recovery-grid {
    grid-template-columns: 1fr;
  }

  .machina-footer {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .footer-terminal {
    padding-bottom: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--phosphor-dim);
  }

  .footer-connect {
    padding-left: 0;
    border-left: 0;
  }
}

@media print {
  body {
    padding: 0;
    color: #000;
    background: #fff;
  }

  .machina-topbar,
  .machina-footer,
  .post-sidebar,
  .hero {
    display: none;
  }

  .post-grid {
    display: block;
  }

  .article-sheet {
    background: #fff;
    box-shadow: none;
  }
}
