@font-face {
  font-family: "DOS";
  src: url("/fonts/Perfect DOS VGA 437 Win.ttf") format("truetype");
  font-display: swap;
}

[data-theme="bios"] {
  font-family: "DOS", "Lucida Console", monospace !important;
  font-size: 18px;
}

[data-theme="bios"] body {
  background: #0c1f80;
  color: #ffffff;
  cursor: default;
  line-height: 1.5;
}

[data-theme="bios"] *,
[data-theme="bios"] *::before,
[data-theme="bios"] *::after {
  transition: none !important;
  animation: none !important;
  border-radius: 0 !important;
  font-family: inherit !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Window frame */
[data-theme="bios"] .window {
  background: #0c1f80 !important;
  border: 2px solid #c8c8c8 !important;
  box-shadow: 6px 6px #000000 !important;
}

/* Headings */
[data-theme="bios"] h1,
[data-theme="bios"] h2,
[data-theme="bios"] h3,
[data-theme="bios"] h4,
[data-theme="bios"] h5,
[data-theme="bios"] h6 {
  color: #e8d870 !important;
  font-weight: normal !important;
  text-transform: uppercase;
  letter-spacing: 2px;
}

[data-theme="bios"] p,
[data-theme="bios"] li,
[data-theme="bios"] span,
[data-theme="bios"] div {
  color: #ffffff;
}

/* Links */
[data-theme="bios"] a {
  color: #6fd4d8 !important;
  text-decoration: none !important;
  padding: 1px 2px;
}

[data-theme="bios"] a:hover {
  color: #e8d870 !important;
  background: #0a1d70 !important;
}

[data-theme="bios"] a:focus,
[data-theme="bios"] a:focus-visible {
  color: #e8d870 !important;
  background: #0a1d70 !important;
  outline: 2px solid #e8d870 !important;
  outline-offset: 0;
}

/* Lists */
[data-theme="bios"] ul > li::before {
  content: "├─" !important;
  color: #a8a8a8 !important;
}

[data-theme="bios"] .list-plain > li::before {
  content: none !important;
}

/* Buttons */
[data-theme="bios"] button,
[data-theme="bios"] .btn {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border: 2px outset #c8c8c8 !important;
  padding: 6px 18px;
  cursor: pointer;
  box-shadow: 3px 3px #000000 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: none !important;
}

[data-theme="bios"] button:hover,
[data-theme="bios"] .btn:hover {
  background: #00aa00 !important;
  color: #000000 !important;
}

[data-theme="bios"] button:active,
[data-theme="bios"] .btn:active {
  background: #00aaaa !important;
  box-shadow: none !important;
  transform: translate(3px, 3px) !important;
  border-style: inset !important;
}

[data-theme="bios"] .btn-ghost {
  background: transparent !important;
  color: #ffffff !important;
  border: 2px solid #c8c8c8 !important;
  box-shadow: none !important;
}

[data-theme="bios"] .btn-ghost:hover {
  background: #0a1d70 !important;
  color: #e8d870 !important;
}

/* Title bar */
[data-theme="bios"] .site-header,
[data-theme="bios"] .title-bar {
  background: #a8a8a8 !important;
  border-bottom: 3px solid #000000 !important;
  color: #000000 !important;
}

[data-theme="bios"] .title-bar-brand,
[data-theme="bios"] .title-bar-brand:hover {
  color: #000000 !important;
}

[data-theme="bios"] .title-bar-name { color: #000000 !important; }
[data-theme="bios"] .title-bar-sep { color: #000000 !important; }
[data-theme="bios"] .title-bar-section { color: #0c1f80 !important; }

[data-theme="bios"] .nav-link {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  padding: 4px 14px !important;
  box-shadow: 2px 2px #000000 !important;
  letter-spacing: 1px;
  text-transform: uppercase;
}

[data-theme="bios"] .nav-link:hover {
  background: #00aa00 !important;
}

[data-theme="bios"] .nav-link.is-current {
  background: #0c1f80 !important;
  color: #ffffff !important;
  border-color: #c8c8c8 !important;
}

/* Burger / mobile drawer */
[data-theme="bios"] .title-bar-burger {
  background: #a8a8a8 !important;
  border: 2px outset #c8c8c8 !important;
  box-shadow: 2px 2px #000000 !important;
  color: #000000 !important;
}

[data-theme="bios"] .burger-line { background: #000000 !important; }

[data-theme="bios"] .mobile-nav {
  background: #0c1f80 !important;
  border-top: 2px solid #c8c8c8 !important;
}

[data-theme="bios"] .mobile-nav-link {
  color: #ffffff !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

[data-theme="bios"] .mobile-nav-link:hover {
  background: #0a1d70 !important;
  color: #e8d870 !important;
}

[data-theme="bios"] .mobile-nav-link.is-current {
  background: #00aaaa !important;
  color: #000000 !important;
}

[data-theme="bios"] .kbd-trigger {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border: 2px outset #c8c8c8 !important;
  box-shadow: 2px 2px #000000 !important;
}

/* Theme switcher */
[data-theme="bios"] .theme-trigger {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border: 2px outset #c8c8c8 !important;
  box-shadow: 2px 2px #000000 !important;
}

[data-theme="bios"] .theme-trigger:hover {
  background: #00aa00 !important;
}

[data-theme="bios"] .theme-trigger-caret { color: #000000 !important; }

[data-theme="bios"] .theme-menu {
  background: #0c1f80 !important;
  border: 2px solid #c8c8c8 !important;
  box-shadow: 6px 6px #000000 !important;
  padding: 6px;
}

[data-theme="bios"] .theme-option {
  color: #ffffff !important;
  background: transparent !important;
  border-color: transparent !important;
}

[data-theme="bios"] .theme-option:hover,
[data-theme="bios"] .theme-option:focus-visible {
  background: #0a1d70 !important;
  color: #e8d870 !important;
  outline: 2px solid #e8d870 !important;
}

[data-theme="bios"] .theme-option[aria-selected="true"] {
  background: #00aaaa !important;
  color: #000000 !important;
}

[data-theme="bios"] .theme-option[aria-selected="true"] .theme-option-name,
[data-theme="bios"] .theme-option[aria-selected="true"] .theme-option-desc {
  color: #000000 !important;
}

[data-theme="bios"] .theme-option-name { color: #ffffff !important; }
[data-theme="bios"] .theme-option-desc { color: #a8a8a8 !important; }
[data-theme="bios"] .theme-option-swatch { border-color: #c8c8c8 !important; border-width: 2px !important; }
[data-theme="bios"] .theme-trigger-swatch { border-color: #000000 !important; border-width: 2px !important; }
[data-theme="bios"] .theme-option-check { color: #e8d870 !important; }

/* Status bar */
[data-theme="bios"] .site-footer,
[data-theme="bios"] .status-bar {
  background: #a8a8a8 !important;
  border-top: 3px solid #000000 !important;
  color: #000000 !important;
}

[data-theme="bios"] .status-bar a { color: #000000 !important; }
[data-theme="bios"] .status-bar a:hover {
  background: #00aa00 !important;
  color: #000000 !important;
}

[data-theme="bios"] .status-bar-hint { color: #000000 !important; }

[data-theme="bios"] .status-bar-hint kbd {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

/* Panels */
[data-theme="bios"] .panel {
  background: #0a1d70 !important;
  border: 2px solid #c8c8c8 !important;
  box-shadow: 4px 4px #000000 !important;
  overflow: visible !important;
}

[data-theme="bios"] .panel-title {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border-bottom: 3px solid #000000 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
}

[data-theme="bios"] .panel-title a {
  color: #000000 !important;
}

[data-theme="bios"] .panel-title a:hover {
  background: #00aa00 !important;
}

[data-theme="bios"] .panel-title-index { color: #0c1f80 !important; }

[data-theme="bios"] .post-panel-date,
[data-theme="bios"] .post-date { color: #a8a8a8 !important; }

/* Tags */
[data-theme="bios"] .tag {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  box-shadow: 2px 2px #000000 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

[data-theme="bios"] .tag:hover {
  background: #00aa00 !important;
  color: #000000 !important;
}

[data-theme="bios"] .tag.is-active,
[data-theme="bios"] .tag[aria-pressed="true"] {
  background: #0c1f80 !important;
  color: #e8d870 !important;
  border-color: #c8c8c8 !important;
}

[data-theme="bios"] .blog-filter {
  background: #0a1d70 !important;
  border: 2px solid #c8c8c8 !important;
  box-shadow: 4px 4px #000000 !important;
}

[data-theme="bios"] .tag-count {
  color: #6fd4d8 !important;
  border-left-color: #000000 !important;
}

/* Inputs */
[data-theme="bios"] input,
[data-theme="bios"] textarea,
[data-theme="bios"] select {
  background: #0a1d70 !important;
  color: #ffffff !important;
  border: 2px inset #c8c8c8 !important;
}

[data-theme="bios"] input:focus,
[data-theme="bios"] textarea:focus,
[data-theme="bios"] select:focus {
  outline: 3px solid #e8d870 !important;
  border-color: #e8d870 !important;
}

/* Construction notice */
[data-theme="bios"] .construction-notice {
  border: 4px double #e8d870 !important;
  background: #0a1d70 !important;
  box-shadow: 4px 4px #000000 !important;
}

[data-theme="bios"] .construction-notice h2 {
  color: #e8d870 !important;
}

[data-theme="bios"] .progress-bar {
  background: #000000 !important;
  border: 2px solid #a8a8a8 !important;
  height: 12px !important;
}

[data-theme="bios"] .progress-fill {
  background: #00aa00 !important;
}

[data-theme="bios"] .nsfw-flag { color: #e8d870 !important; }

/* Section divider */
[data-theme="bios"] .section-divider hr {
  border-top: 3px solid #a8a8a8 !important;
}

/* Dialogue */
[data-theme="bios"] .dialogue img {
  image-rendering: pixelated;
  filter: contrast(1.5) saturate(0) brightness(0.8);
  border: 2px solid #c8c8c8 !important;
  background: #0a1d70 !important;
  width: 96px !important;
  height: 96px !important;
}

[data-theme="bios"] .dialogue-text {
  color: #6fd4d8 !important;
}

[data-theme="bios"] .dialogue-weee {
  color: #e8d870 !important;
}

[data-theme="bios"] .dialogue-cursor { color: #e8d870 !important; }

/* Gallery / lightbox */
[data-theme="bios"] .gallery-thumb {
  border: 2px solid #c8c8c8 !important;
  box-shadow: 4px 4px #000000 !important;
  background: #0a1d70 !important;
}

[data-theme="bios"] .gallery-thumb:hover {
  border-color: #e8d870 !important;
  transform: none !important;
}

[data-theme="bios"] .gallery-thumb-img {
  image-rendering: pixelated;
  filter: contrast(1.3) saturate(0.3) brightness(0.85) !important;
  transform: none !important;
}

[data-theme="bios"] .lightbox-backdrop {
  background: rgba(12, 31, 128, 0.95) !important;
}

[data-theme="bios"] .lightbox-modal {
  border: 2px solid #c8c8c8 !important;
  box-shadow: 6px 6px #000000 !important;
  background: #0c1f80 !important;
}

[data-theme="bios"] .lightbox-img {
  border: 2px solid #c8c8c8 !important;
  background: #0c1f80 !important;
  image-rendering: pixelated;
  filter: contrast(1.3) saturate(0.3) brightness(0.85);
}

[data-theme="bios"] .lightbox-caption,
[data-theme="bios"] .lightbox-counter {
  color: #ffffff !important;
}

/* Help modal */
[data-theme="bios"] .kbd-help-art,
[data-theme="bios"] .kbd-help-version {
  display: block !important;
}

[data-theme="bios"] .kbd-help-modal {
  background: #0c1f80 !important;
  border: 4px double #c8c8c8 !important;
  box-shadow: 8px 8px #000000 !important;
}

[data-theme="bios"] .kbd-help-art {
  color: #6fd4d8 !important;
  font-family: 'Fira Code', 'Cascadia Code', ui-monospace, 'Courier New', monospace !important;
  font-size: 0.75rem;
  line-height: 1.1;
}

[data-theme="bios"] .kbd-help-version {
  color: #a8a8a8 !important;
  letter-spacing: 2px;
}

[data-theme="bios"] .kbd-help-title { color: #e8d870 !important; }
[data-theme="bios"] .kbd-help-list dt { color: #6fd4d8 !important; }
[data-theme="bios"] .kbd-help-list dd { color: #ffffff !important; }

[data-theme="bios"] kbd {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border: 2px solid #c8c8c8 !important;
}

[data-theme="bios"] .kbd-help-footer {
  border-top: 3px double #a8a8a8 !important;
}

/* Post body */
[data-theme="bios"] .post-body :global(blockquote) {
  border-left-color: #e8d870 !important;
  font-style: normal !important;
  color: #e8d870 !important;
}

[data-theme="bios"] .post-body :global(code) {
  background: #000000 !important;
  color: #00ff00 !important;
  border-color: #a8a8a8 !important;
}

[data-theme="bios"] .post-body :global(pre) {
  background: #000000 !important;
  color: #00ff00 !important;
  border: 3px solid #a8a8a8 !important;
}

[data-theme="bios"] .post-body :global(table) {
  border: 2px solid #c8c8c8 !important;
}

[data-theme="bios"] .post-body :global(th) {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border-color: #000000 !important;
}

[data-theme="bios"] .post-body :global(td) {
  border-color: #a8a8a8 !important;
  color: #ffffff !important;
}

[data-theme="bios"] .post-body :global(tr:nth-child(even) td) {
  background: #0a1d70 !important;
}

/* Misc */
[data-theme="bios"] hr {
  border: none;
  border-bottom: 3px solid #a8a8a8;
}

[data-theme="bios"] ::selection {
  background: #a8a8a8;
  color: #000000;
}

[data-theme="bios"] *:focus-visible {
  outline: 3px solid #e8d870 !important;
  outline-offset: 0;
}

/* Scrollbar */
[data-theme="bios"] ::-webkit-scrollbar {
  width: 22px;
  background: #0c1f80;
}

[data-theme="bios"] ::-webkit-scrollbar-track {
  background: #0c1f80;
  border-left: 3px solid #a8a8a8;
}

[data-theme="bios"] ::-webkit-scrollbar-thumb {
  background: #a8a8a8;
  border: 2px solid #c8c8c8;
}

[data-theme="bios"] ::-webkit-scrollbar-thumb:hover {
  background: #c8c8c8;
}

/* Link cards & post-panel links — chunky drop shadow, click-to-press hover */
[data-theme="bios"] .link-card {
  border: 2px solid #c8c8c8 !important;
  box-shadow: 4px 4px #000000 !important;
}

[data-theme="bios"] .link-card:hover,
[data-theme="bios"] .link-card:focus-visible {
  border-color: #e8d870 !important;
  transform: translate(4px, 4px) !important;
  box-shadow: none !important;
}

[data-theme="bios"] .panel:has(.panel-link:hover),
[data-theme="bios"] .panel:has(.panel-link:focus-visible) {
  border-color: #e8d870 !important;
  transform: translate(4px, 4px) !important;
  box-shadow: none !important;
}

/* Scanline reveal — CRT-style row-by-row redraw, overrides the global animation:none */
@media (prefers-reduced-motion: no-preference) {
  @keyframes bios-scan-in {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
  }

  [data-theme="bios"] .stagger-children > * {
    animation: bios-scan-in 0.45s steps(12, end) both !important;
  }
  [data-theme="bios"] .stagger-children > *:nth-child(2) { animation-delay: 150ms !important; }
  [data-theme="bios"] .stagger-children > *:nth-child(3) { animation-delay: 300ms !important; }
  [data-theme="bios"] .stagger-children > *:nth-child(4) { animation-delay: 450ms !important; }
  [data-theme="bios"] .stagger-children > *:nth-child(n+5) { animation-delay: 600ms !important; }
}

/* Skip link */
[data-theme="bios"] .skip-link:focus {
  background: #e8d870 !important;
  color: #000000 !important;
  border: 2px solid #c8c8c8 !important;
}

/* Tools / Dice roller */
[data-theme="bios"] .dice-group,
[data-theme="bios"] .dice-preset,
[data-theme="bios"] .dice-history-item {
  background: #0c1f80 !important;
  border: 2px solid #c8c8c8 !important;
}

[data-theme="bios"] .dice-subhead {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-field-label {
  color: #6fd4d8 !important;
}

[data-theme="bios"] .dice-x {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-quick-btn {
  background: #a8a8a8 !important;
  color: #000000 !important;
  border: 2px outset #c8c8c8 !important;
  box-shadow: 2px 2px #000000 !important;
}

[data-theme="bios"] .dice-quick-btn:hover {
  background: #00aa00 !important;
}

[data-theme="bios"] .dice-quick-btn.is-active {
  background: #00aaaa !important;
  color: #000000 !important;
}

[data-theme="bios"] .dice-result-formula,
[data-theme="bios"] .dice-preset-formula {
  color: #a8a8a8 !important;
}

[data-theme="bios"] .dice-formula-pill {
  border: 2px dashed #c8c8c8 !important;
  background: #0a1d70 !important;
}

[data-theme="bios"] .dice-formula-label {
  color: #6fd4d8 !important;
}

[data-theme="bios"] .dice-formula {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-result-card {
  background: #0a1d70 !important;
  border: 4px double #e8d870 !important;
  box-shadow: 4px 4px #000000 !important;
}

[data-theme="bios"] .dice-result-card.is-flash {
  box-shadow: 4px 4px #e8d870 !important;
  border-color: #e8d870 !important;
}

[data-theme="bios"] .dice-total-label {
  color: #6fd4d8 !important;
}

[data-theme="bios"] .dice-total {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-result-roll {
  background: #000000 !important;
  border: 2px solid #a8a8a8 !important;
  color: #00ff00 !important;
}

[data-theme="bios"] .dice-result-roll.is-max {
  background: #00aaaa !important;
  border-color: #e8d870 !important;
  color: #000000 !important;
}

[data-theme="bios"] .dice-result-roll.is-min {
  background: #000000 !important;
  border-color: #a8a8a8 !important;
  color: #a8a8a8 !important;
}

[data-theme="bios"] .dice-result-group-label {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-result-group-sum {
  color: #ffffff !important;
}

[data-theme="bios"] .dice-result-group-sum strong {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-history-total {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-history-time {
  color: #a8a8a8 !important;
}

[data-theme="bios"] .dice-preset-name {
  color: #e8d870 !important;
}

[data-theme="bios"] .dice-preset-io {
  border-top: 3px double #a8a8a8 !important;
}

[data-theme="bios"] .dice-io-status.is-ok {
  background: #00aa00 !important;
  color: #000000 !important;
  border: 2px solid #c8c8c8 !important;
}

[data-theme="bios"] .dice-io-status.is-error {
  background: #aa0000 !important;
  color: #ffffff !important;
  border: 2px solid #e8d870 !important;
}
