@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../fonts/inter-tight-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
}

:root {
  --bg: #0b0f14;
  --bg-soft: #0f151d;
  --panel: #111821;
  --panel-2: #0d131a;
  --text: #e6edf3;
  --muted: #9aa7b2;
  --faint: #6e7a86;
  --accent: #58d174;
  --accent-soft: rgba(88, 209, 116, 0.14);
  --border: #26313d;
  --border-strong: #344251;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);

  /* themed surfaces */
  --header-bg: rgba(11, 15, 20, 0.82);
  --header-border: rgba(255, 255, 255, 0.04);
  --panel-bg: #1a2230;
  --panel-overlay: rgba(255, 255, 255, 0.025);
  --surface-soft: rgba(255, 255, 255, 0.015);
  --surface-button: rgba(255, 255, 255, 0.02);
  --edge: rgba(230, 237, 243, 0.65);

  /* button primary */
  --button-primary-grad: linear-gradient(180deg, rgba(88, 209, 116, 0.9), rgba(56, 151, 78, 0.9));
  --button-primary-border: rgba(88, 209, 116, 0.45);
  --button-primary-text: #07100a;

  /* accent variants */
  --accent-edge: rgba(88, 209, 116, 0.55);

  /* body gradients */
  --bg-glow-1: rgba(88, 209, 116, 0.08);
  --bg-glow-2: rgba(70, 120, 255, 0.07);

  /* code-block copy button overlay */
  --copy-btn-bg: rgba(255, 255, 255, 0.08);

  --max-width: 1180px;
  --radius: 10px;

  --font-main:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --font-code:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --font-text:
    "Inter Tight", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;

  /* Solarized Light */
  --bg: #fdf6e3;             /* base3  */
  --bg-soft: #eee8d5;        /* base2  */
  --panel: #fdf6e3;
  --panel-2: #eee8d5;
  --text: #586e75;           /* base01 */
  --muted: #657b83;          /* base00 */
  --faint: #93a1a1;          /* base1  */
  --accent: #859900;         /* green  */
  --accent-soft: rgba(133, 153, 0, 0.10);
  --border: #d9d2ba;
  --border-strong: #b8b09a;
  --shadow: 0 30px 80px rgba(0, 43, 54, 0.12);

  /* themed surfaces */
  --header-bg: rgba(253, 246, 227, 0.92);
  --header-border: rgba(88, 110, 117, 0.14);
  --panel-bg: #f7f0db;
  --panel-overlay: rgba(0, 0, 0, 0.022);
  --surface-soft: rgba(0, 0, 0, 0.025);
  --surface-button: rgba(0, 0, 0, 0.02);
  --edge: rgba(88, 110, 117, 0.35);

  /* button primary */
  --button-primary-grad: linear-gradient(180deg, rgba(133, 153, 0, 0.95), rgba(102, 122, 0, 0.95));
  --button-primary-border: rgba(133, 153, 0, 0.55);
  --button-primary-text: #fdf6e3;

  /* accent variants */
  --accent-edge: rgba(133, 153, 0, 0.55);

  /* body gradients */
  --bg-glow-1: rgba(133, 153, 0, 0.07);
  --bg-glow-2: rgba(38, 139, 210, 0.05);

  /* code-block copy button overlay */
  --copy-btn-bg: rgba(0, 0, 0, 0.06);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 1.6;
}

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

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

main {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  min-height: 76px;
  margin: 0 auto;
  padding: 0 max(1rem, calc((100% - var(--max-width)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--header-border);
}

.brand {
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand span {
  color: var(--accent);
}

.brand .caret {
  animation: caret-blink 1.2s steps(2, end) infinite;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

.main-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a,
.site-footer a {
  color: var(--muted);
  font-size: 0.9rem;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  background: var(--surface-button);
  border: 1px solid var(--faint);
  border-radius: 6px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle::before {
  content: "☀";
}

html[data-theme="light"] .theme-toggle::before {
  content: "☾";
}

.hero {
  min-height: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4.5rem 0 3.5rem;
}

.hero h1 {
  font-family: "Inter Tight", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 11ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

h1::after {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-top: 1.4rem;
  background: var(--accent);
  border-radius: 999px;
}

.hero-text {
  max-width: 620px;
  color: var(--muted);
  font-size: 1rem;
  text-align: justify;
  hyphens: auto;
}

.hero-actions,
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 1.05rem;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface-button);
  font-size: 0.9rem;
}

.button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button-primary {
  border-color: var(--button-primary-border);
  background: var(--button-primary-grad);
  color: var(--button-primary-text);
  font-weight: 700;
}

.button-primary:hover {
  color: var(--button-primary-text);
  filter: brightness(1.05);
}

.hero-diagram {
  position: relative;
  min-height: 330px;
  margin-top: 5%;
}

.diagram-box,
.kernel-box {
  border: 1px solid var(--edge);
  background: var(--surface-soft);
}

.diagram-box {
  padding: 0.8rem;
  text-align: center;
}

.diagram-box.app {
  width: 78%;
  margin-left: auto;
}

.diagram-arrow {
  position: relative;
  width: 78%;
  margin-left: auto;
  padding: 0.6rem 0;
  text-align: center;
}


.kernel-box {
  width: 78%;
  margin-left: auto;
  padding: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .kernel-modules span,
  .kernel-box .diagram-box,
  .brand .caret {
    animation: none;
  }
}

.diagram-label {
  margin-bottom: 0.9rem;
  text-align: center;
  color: var(--text);
}

.kernel-modules {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.7rem;
}

.kernel-modules span {
  border: 1px solid var(--border-strong);
  padding: 0.55rem 0.25rem;
  text-align: center;
  font-size: 0.76rem;
}

.kernel-modules span:not(:last-child) {
  animation: module-pulse 8s ease-in-out infinite;
}

.kernel-modules span:nth-child(1) { animation-duration: 7.3s; animation-delay: 0s; }
.kernel-modules span:nth-child(2) { animation-duration: 8.7s; animation-delay: 2.4s; }
.kernel-modules span:nth-child(3) { animation-duration: 6.9s; animation-delay: 4.1s; }
.kernel-modules span:nth-child(4) { animation-duration: 7.7s; animation-delay: 1.3s; }

.kernel-modules + .diagram-box {
  animation: layer-pulse 17s ease-in-out infinite;
  animation-delay: 5.2s;
}

.kernel-modules + .diagram-box + .diagram-box {
  animation: layer-pulse 19s ease-in-out infinite;
  animation-delay: 12.6s;
}

@keyframes module-pulse {
  0%, 12%, 100% {
    border-color: var(--border-strong);
    color: inherit;
    background: transparent;
  }
  6% {
    border-color: var(--accent-edge);
    color: var(--accent);
    background: var(--accent-soft);
  }
}

@keyframes layer-pulse {
  0%, 8%, 100% {
    border-color: var(--edge);
    color: inherit;
    background: var(--surface-soft);
  }
  4% {
    border-color: var(--accent-edge);
    color: var(--accent);
    background: var(--accent-soft);
  }
}

.kernel-box .diagram-box {
  margin-top: 0.7rem;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-bg);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1.5rem;
}

.feature-grid > .panel {
  border-radius: 0;
  min-width: 0;
}

.feature-grid > .panel:first-child {
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

.feature-grid > .panel:last-child {
  border-top-right-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.book-panel,
.toc-panel,
.recent-panel,
.topics-panel,
.projects-panel,
.notes-panel {
  padding: 2rem;
}

.book-panel p,
.notes-panel p {
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.section-title h2,
.small-heading {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.05em;
}

.icon {
  color: var(--accent);
  font-size: 1.4rem;
}

.book-panel .section-title h2 {
  color: var(--accent);
}

.book-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  color: var(--text);
  font-size: 0.9rem;
}

.progress-bar {
  height: 6px;
  margin-top: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--border-strong);
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.small-heading {
  margin-bottom: 1.2rem;
}

.toc-panel {
  position: relative;
}

.toc-next {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft);
  line-height: 1;
}

.toc-next::after {
  content: "›";
  font-size: 1.2rem;
}

.toc-next:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.toc-parts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 1.4rem;
}

.bookmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bookmap-head .small-heading {
  margin-bottom: 0;
}

.bookmap-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.bookmap-btn {
  width: 1.9rem;
  height: 1.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.bookmap-btn:hover:not(:disabled),
.bookmap-btn:focus-visible:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.bookmap-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.bookmap-viewport {
  overflow: hidden;
  margin-top: 1.4rem;
}

.bookmap-track {
  display: flex;
  transition: transform 0.35s ease;
  will-change: transform;
}

.bookmap-slide {
  flex: 0 0 100%;
  min-width: 0;
  overflow: hidden;
}

.bookmap-slide .toc-parts {
  margin-top: 0;
  /* Nudge content off the slide's left clip edge so the first column's
     ordered-list numbers (which hang left of their box) aren't cut off. */
  padding-left: 0.75rem;
}

.toc-more {
  display: inline-block;
  margin-top: 0.45rem;
  margin-left: 1.4rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.toc-more:hover {
  color: var(--accent);
}

.toc-part h3 {
  margin-bottom: 0.5rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
}

li.disabled {
  color: var(--faint);
  opacity: 0.55;
}

li.disabled > a,
li.disabled > span {
  color: inherit;
  cursor: not-allowed;
}

.toc-more.disabled {
  color: var(--faint);
  opacity: 0.55;
  cursor: not-allowed;
}

.toc-part ol {
  margin: 0;
  padding-left: 1.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.toc-part li + li {
  margin-top: 0.25rem;
}

.post-list,
.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li + li {
  margin-top: 1.35rem;
}

.post-list time {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--faint);
  font-size: 0.78rem;
}

.post-list a {
  display: block;
  line-height: 1.4;
}

.text-link {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.lower-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.topic-card {
  display: block;
  min-height: 145px;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.topic-card:hover {
  border-color: rgba(88, 209, 116, 0.5);
  background: var(--accent-soft);
}

.topic-card h3 {
  margin-bottom: 0.55rem;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 500;
}

.topic-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--font-text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.project-list li + li {
  border-top: 1px solid var(--border);
}

.project-list a {
  position: relative;
  display: block;
  padding: 0.85rem 2rem 0.85rem 0.85rem;
  border-radius: 6px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.project-list a:hover {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(88, 209, 116, 0.5);
}

.project-list a::after {
  content: "›";
  position: absolute;
  right: 0.85rem;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
  transition: transform 0.15s ease, color 0.15s ease;
}

.project-list a:hover::after {
  color: var(--accent);
  transform: translateY(-50%) translateX(3px);
}

.project-list strong {
  display: block;
  color: var(--accent);
  font-weight: 500;
}

.project-list span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-family: var(--font-text);
  font-size: 0.88rem;
  line-height: 1.45;
}

.notes-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.8fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.note-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-content: start;
}

.note-links a {
  display: block;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.note-links span,
.note-links small {
  display: block;
}

.note-links span {
  color: var(--text);
  font-size: 0.86rem;
}

.note-links small {
  margin-top: 0.25rem;
  color: var(--muted);
}

.quote {
  max-width: 680px;
  margin: 2.5rem auto 3.5rem;
  color: var(--muted);
  text-align: center;
  font-size: 1rem;
}

.quote::before,
.quote::after {
  color: var(--border-strong);
  font-size: 2rem;
}

.quote::before {
  content: "“ ";
}

.quote::after {
  content: " ”";
}

.quote-attribution {
  display: block;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--faint);
  font-style: normal;
}

.site-footer {
  width: min(100% - 2rem, var(--max-width));
  margin: 3rem auto 0;
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--header-border);
  color: var(--faint);
  font-size: 0.85rem;
}

/* Tablet */
@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
    align-items: center;
    min-height: auto;
    padding: 0.75rem max(1rem, calc((100% - var(--max-width)) / 2));
    gap: 0.75rem 1rem;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 0.3rem;
  }

  .main-nav .theme-toggle {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 3rem;
  }

  h1 {
    max-width: 12ch;
  }

  .hero-diagram {
    min-height: 300px;
    padding-right: 0;
  }

  .feature-grid,
  .lower-grid,
  .notes-panel {
    grid-template-columns: 1fr;
  }

  .feature-grid > .panel,
  .feature-grid > .panel:first-child,
  .feature-grid > .panel:last-child {
    border-radius: var(--radius);
  }

  .feature-grid {
    gap: 1.5rem;
  }

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

/* Mobile */
@media (max-width: 620px) {
  main,
  .site-footer {
    width: min(100% - 1rem, var(--max-width));
  }

  .site-header {
    width: 100%;
    padding-left: max(0.5rem, calc((100% - var(--max-width)) / 2));
    padding-right: max(0.5rem, calc((100% - var(--max-width)) / 2));
    min-height: auto;
  }

  .brand {
    font-size: 0.95rem;
  }

  .main-nav {
    font-size: 0.85rem;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  h1 {
    font-size: 12vw;
    max-width: none;
    text-align: center;
    letter-spacing: -0.02em;
  }

  h1::after {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-text {
    font-size: 0.94rem;
  }

  /* .hero-actions, */
  .panel-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .hero-diagram {
    display: none;
  }

  .book-panel,
  .toc-panel,
  .recent-panel,
  .topics-panel,
  .projects-panel,
  .notes-panel {
    padding: 1.25rem;
  }

  .section-title h2,
  .small-heading {
    font-size: 1.15rem;
  }

  .topic-grid,
  .note-links {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: unset;
  }

  .book-status {
    flex-direction: column;
    gap: 0.25rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .toc-parts {
    grid-template-columns: 1fr;
    row-gap: 1.25rem;
  }
}

/* About page */
.about-intro {
  display: grid;
  grid-template-columns: minmax(170px, 210px) 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2.75rem 2rem;
  margin: 1.5rem 0;
}

.about-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.about-body {
  min-width: 0;
}

.about-block {
  margin-top: 1.5rem;
}

.about-intro h1 {
  max-width: none;
  margin-bottom: 1.2rem;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
}

.about-lead {
  margin-bottom: 0;
  color: var(--muted);
  font-family: var(--font-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.about-lead strong {
  color: var(--accent);
  font-weight: 600;
}

.about-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 132px;
  height: 132px;
  border: 1px solid var(--accent-edge);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  object-fit: cover;
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.about-id-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  font-family: var(--font-text);
}

.about-id-text strong {
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.about-id-text > span {
  color: var(--faint);
  font-size: 0.85rem;
}

.about-role {
  margin-top: 0.35rem;
}

.about-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.about-links a {
  color: var(--accent);
}

.about-links .sep {
  color: var(--faint);
}

.about-links a:hover {
  text-decoration: underline;
}

.about-prose p {
  color: var(--muted);
  font-family: var(--font-text);
  font-size: 0.98rem;
}

.about-prose p + p {
  margin-top: 0.9rem;
}

.about-intro .about-prose {
  margin-top: 1rem;
}

.about-prose a {
  color: var(--accent);
}

@media (max-width: 760px) {
  .about-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1.25rem;
  }

  .about-rail {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .about-avatar {
    width: 88px;
    height: 88px;
  }
}

/* Kernel-panic 404. Themed to look like a Linux console oops. */
body.panic-page {
  background: #000;
  color: #d7d7d7;
  margin: 0;
}

body.panic-page .site-header,
body.panic-page .site-footer {
  display: none;
}

body.panic-page main,
body.panic-page > main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.panic-screen {
  display: block;
  min-height: 100vh;
  margin: 0;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem) 2rem;
  font-family: ui-monospace, "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  line-height: 1.45;
  color: #d7d7d7;
  background: #000;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.12);
}

.panic-tag {
  color: #ff6b6b;
  font-weight: 700;
}

.panic-prompt {
  display: inline-block;
  margin-top: 1.5rem;
  color: #9aa0a6;
}

.panic-prompt a {
  color: #58d174;
  text-decoration: underline;
}

.panic-prompt a:hover {
  color: #7bdf90;
}

.panic-cursor {
  display: inline-block;
  background: #d7d7d7;
  color: transparent;
  width: 0.55em;
  margin-left: 0.15em;
  animation: panic-cursor 1.05s steps(2, end) infinite;
}

@keyframes panic-cursor {
  50% { opacity: 0; }
}
