/*
 * KeyCon Website - CSS Fallbacks and ASCII Utilities
 *
 * This file provides CSS fallbacks for critical utilities when Tailwind
 * plugin fails to generate them. It also defines ASCII decoration utilities
 * for the retro aesthetic.
 *
 * Note: Primary styles are in assets/styles.css with Tailwind integration.
 * This file serves as a fallback and for no-JS scenarios.
 */

/* ===== CSS Custom Properties ===== */
:root {
  /* Dark theme colors */
  --keycon-dark: #1a1a1a;
  --keycon-darker: #121212;
  --keycon-gray: #2a2a2a;
  --keycon-light-gray: #3a3a3a;

  /* GeekHack orange accent */
  --keycon-orange: #f7941d;
  --keycon-orange-light: #ffa94d;
  --keycon-orange-dark: #c77815;

  /* Text colors */
  --keycon-text: #e5e5e5;
  --keycon-text-muted: #a0a0a0;

  /* Fonts - JetBrains Mono for ASCII, Inter for body */
  --font-mono:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --font-sans:
    "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

/* ===== Base Reset (Tailwind Preflight) ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: currentColor;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  line-height: 1.5;
  tab-size: 4;
}

body {
  margin: 0;
  line-height: inherit;
  background-color: var(--keycon-dark);
  color: var(--keycon-text);
  font-family: var(--font-sans);
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

p {
  margin: 0;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: inherit;
}

img, svg {
  display: block;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* ===== Tailwind Utility Fallbacks ===== */

/* Display */
.block {
  display: block;
}
.inline-block {
  display: inline-block;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.grid {
  display: grid;
}
.hidden {
  display: none;
}

/* Flexbox */
.flex-col {
  flex-direction: column;
}
.flex-row {
  flex-direction: row;
}
.flex-wrap {
  flex-wrap: wrap;
}
.items-center {
  align-items: center;
}
.items-start {
  align-items: flex-start;
}
.items-end {
  align-items: flex-end;
}
.justify-center {
  justify-content: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-start {
  justify-content: flex-start;
}
.justify-end {
  justify-content: flex-end;
}
.gap-2 {
  gap: var(--space-2);
}
.gap-4 {
  gap: var(--space-4);
}
.gap-6 {
  gap: var(--space-6);
}
.gap-8 {
  gap: var(--space-8);
}

/* Grid */
.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Width */
.w-full {
  width: 100%;
}
.w-auto {
  width: auto;
}
.max-w-xs {
  max-width: 20rem; /* 320px */
}
.max-w-sm {
  max-width: 24rem; /* 384px */
}
.max-w-md {
  max-width: 28rem; /* 448px */
}
.max-w-lg {
  max-width: 32rem; /* 512px */
}
.max-w-xl {
  max-width: 36rem; /* 576px */
}
.max-w-screen-sm {
  max-width: 640px;
}
.max-w-screen-md {
  max-width: 768px;
}
.max-w-screen-lg {
  max-width: 1024px;
}
.max-w-screen-xl {
  max-width: 1280px;
}
.max-w-prose {
  max-width: 65ch;
}

/* Height */
.h-auto {
  height: auto;
}
.h-full {
  height: 100%;
}
.min-h-screen {
  min-height: 100vh;
}

/* Margin */
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.my-4 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}
.my-6 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}
.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-8 {
  margin-top: var(--space-8);
}
.mb-4 {
  margin-bottom: var(--space-4);
}
.mb-8 {
  margin-bottom: var(--space-8);
}

/* Padding */
.p-4 {
  padding: var(--space-4);
}
.p-6 {
  padding: var(--space-6);
}
.p-8 {
  padding: var(--space-8);
}
.px-4 {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}
.px-6 {
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}
.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}
.py-4 {
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}
.py-12 {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}
.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}
.py-20 {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
}
.py-24 {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

/* Typography */
.text-center {
  text-align: center;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}
.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}
.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}
.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}
.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}
.text-5xl {
  font-size: 3rem;
  line-height: 1;
}
.font-normal {
  font-weight: 400;
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}
.font-bold {
  font-weight: 700;
}
.font-mono {
  font-family: var(--font-mono);
}
.font-sans {
  font-family: var(--font-sans);
}
.uppercase {
  text-transform: uppercase;
}
.tracking-wide {
  letter-spacing: 0.025em;
}
.tracking-wider {
  letter-spacing: 0.05em;
}
.tracking-widest {
  letter-spacing: 0.1em;
}
.leading-relaxed {
  line-height: 1.625;
}
.leading-loose {
  line-height: 2;
}

/* Colors */
.text-white {
  color: #ffffff;
}
.text-gray-400 {
  color: #9ca3af;
}
.text-gray-500 {
  color: #6b7280;
}
.bg-transparent {
  background-color: transparent;
}

/* KeyCon custom colors */
.text-keycon-orange {
  color: var(--keycon-orange);
}
.text-keycon-text {
  color: var(--keycon-text);
}
.text-keycon-text-muted {
  color: var(--keycon-text-muted);
}
.bg-keycon-dark {
  background-color: var(--keycon-dark);
}
.bg-keycon-darker {
  background-color: var(--keycon-darker);
}
.bg-keycon-gray {
  background-color: var(--keycon-gray);
}
.border-keycon-orange {
  border-color: var(--keycon-orange);
}
.border-keycon-gray {
  border-color: var(--keycon-gray);
}

/* Border */
.border {
  border-width: 1px;
  border-style: solid;
}
.border-0 {
  border-width: 0;
}
.border-2 {
  border-width: 2px;
}
.rounded {
  border-radius: 0.25rem;
}
.rounded-md {
  border-radius: 0.375rem;
}
.rounded-lg {
  border-radius: 0.5rem;
}

/* Opacity */
.opacity-50 {
  opacity: 0.5;
}
.opacity-75 {
  opacity: 0.75;
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}
.overflow-auto {
  overflow: auto;
}

/* Position */
.relative {
  position: relative;
}
.absolute {
  position: absolute;
}
.fixed {
  position: fixed;
}
.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Pointer events */
.pointer-events-none {
  pointer-events: none;
}

/* Transitions */
.transition {
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke,
    opacity,
    box-shadow,
    transform,
    filter,
    backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.transition-colors {
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.duration-150 {
  transition-duration: 150ms;
}
.duration-300 {
  transition-duration: 300ms;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip link - visible when focused */
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.focus\:absolute:focus {
  position: absolute;
}

.focus\:top-4:focus {
  top: var(--space-4);
}

.focus\:left-4:focus {
  left: var(--space-4);
}

.focus\:z-50:focus {
  z-index: 50;
}

.focus\:px-4:focus {
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.focus\:py-2:focus {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}

.focus\:bg-keycon-orange:focus {
  background-color: var(--keycon-orange);
}

.focus\:text-keycon-dark:focus {
  color: var(--keycon-dark);
}

.focus\:font-mono:focus {
  font-family: var(--font-mono);
}

.focus\:text-sm:focus {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* ===== ASCII Decoration Utilities ===== */
/*
 * Box-drawing characters reference:
 * Single line: ─ │ ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼
 * Double line: ═ ║ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬
 * Rounded:     ╭ ╮ ╰ ╯
 * Dashes:      ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋
 */

/* ASCII border with corner decorations (simple + style) */
.ascii-border {
  border: 1px solid var(--keycon-orange);
  position: relative;
}

.ascii-border::before {
  content: "+";
  position: absolute;
  top: -0.5em;
  left: -0.5em;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  background: var(--keycon-dark);
  padding: 0 0.1em;
}

.ascii-border::after {
  content: "+";
  position: absolute;
  bottom: -0.5em;
  right: -0.5em;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  background: var(--keycon-dark);
  padding: 0 0.1em;
}

/* ASCII box with single-line box-drawing characters */
.ascii-box {
  position: relative;
  padding: 1.5rem;
  font-family: var(--font-mono);
  border: none;
}

.ascii-box::before {
  content: "┌" attr(data-title) "┐";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  border-top: 1px solid var(--keycon-orange);
  border-left: 1px solid var(--keycon-orange);
  border-right: 1px solid var(--keycon-orange);
  padding: 0.25rem 0.5rem;
  background: var(--keycon-dark);
}

.ascii-box::after {
  content: "└────────────────────────────────────────────────────────────┘";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
  border-bottom: 1px solid var(--keycon-orange);
  border-left: 1px solid var(--keycon-orange);
  border-right: 1px solid var(--keycon-orange);
  padding: 0.25rem 0.5rem;
  background: var(--keycon-dark);
  overflow: hidden;
  white-space: nowrap;
}

/* Simple bordered box with corner characters */
.ascii-box-simple {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--keycon-orange);
}

.ascii-box-simple::before,
.ascii-box-simple::after {
  position: absolute;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  line-height: 1;
  background: var(--keycon-dark);
  padding: 0 0.15em;
}

.ascii-box-simple::before {
  content: "┌";
  top: -0.5em;
  left: -0.15em;
}

.ascii-box-simple::after {
  content: "┘";
  bottom: -0.5em;
  right: -0.15em;
}

/* Double-line box (fancy style) */
.ascii-box-double {
  position: relative;
  padding: 1.5rem;
  border: 2px solid var(--keycon-orange);
}

.ascii-box-double::before,
.ascii-box-double::after {
  position: absolute;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 1.5rem;
  line-height: 1;
  background: var(--keycon-dark);
  padding: 0 0.1em;
}

.ascii-box-double::before {
  content: "╔";
  top: -0.5em;
  left: -0.2em;
}

.ascii-box-double::after {
  content: "╝";
  bottom: -0.5em;
  right: -0.2em;
}

/* Rounded box corners */
.ascii-box-rounded {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--keycon-orange);
}

.ascii-box-rounded::before,
.ascii-box-rounded::after {
  position: absolute;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  line-height: 1;
  background: var(--keycon-dark);
  padding: 0 0.15em;
}

.ascii-box-rounded::before {
  content: "╭";
  top: -0.5em;
  left: -0.15em;
}

.ascii-box-rounded::after {
  content: "╯";
  bottom: -0.5em;
  right: -0.15em;
}

/* Full four-corner box using wrapper with corner spans */
.ascii-frame {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--keycon-orange);
}

.ascii-frame-corner {
  position: absolute;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  line-height: 1;
  background: var(--keycon-dark);
  padding: 0 0.15em;
}

.ascii-frame-corner--tl {
  top: -0.5em;
  left: -0.15em;
}

.ascii-frame-corner--tr {
  top: -0.5em;
  right: -0.15em;
}

.ascii-frame-corner--bl {
  bottom: -0.5em;
  left: -0.15em;
}

.ascii-frame-corner--br {
  bottom: -0.5em;
  right: -0.15em;
}

/* ASCII divider with horizontal box-drawing lines */
.ascii-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-8) 0;
}

.ascii-divider::before,
.ascii-divider::after {
  content: "────────────────────────"; /* ─ character repeated */
  display: inline-block;
  color: var(--keycon-gray);
}

.ascii-divider::before {
  margin-right: var(--space-4);
}

.ascii-divider::after {
  margin-left: var(--space-4);
}

/* Double-line divider */
.ascii-divider-double {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-8) 0;
}

.ascii-divider-double::before,
.ascii-divider-double::after {
  content: "════════════════════════"; /* ═ character repeated */
  display: inline-block;
  color: var(--keycon-gray);
}

.ascii-divider-double::before {
  margin-right: var(--space-4);
}

.ascii-divider-double::after {
  margin-left: var(--space-4);
}

/* Dashed divider */
.ascii-divider-dashed {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-8) 0;
}

.ascii-divider-dashed::before,
.ascii-divider-dashed::after {
  content: "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄"; /* ┄ character repeated */
  display: inline-block;
  color: var(--keycon-gray);
}

.ascii-divider-dashed::before {
  margin-right: var(--space-4);
}

.ascii-divider-dashed::after {
  margin-left: var(--space-4);
}

/* ASCII divider with decorative symbol */
.ascii-divider-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 1rem;
  padding: var(--space-8) 0;
  gap: var(--space-4);
}

.ascii-divider-symbol::before,
.ascii-divider-symbol::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to var(--direction, right),
    transparent,
    var(--keycon-gray),
    transparent
  );
}

.ascii-divider-symbol::before {
  --direction: right;
}

.ascii-divider-symbol::after {
  --direction: left;
}

/* Section divider with T-junction characters */
.ascii-section-divider {
  display: flex;
  align-items: center;
  font-family: var(--font-mono);
  color: var(--keycon-gray);
  padding: var(--space-6) 0;
  overflow: hidden;
}

.ascii-section-divider::before {
  content: "├";
  color: var(--keycon-orange);
  margin-right: 0.5rem;
}

.ascii-section-divider::after {
  content: "────────────────────────────────────────────────────────────────────────────────";
  flex: 1;
  overflow: hidden;
}

/* Vertical divider for side-by-side layouts */
.ascii-vdivider {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  color: var(--keycon-gray);
  padding: 0 var(--space-4);
}

.ascii-vdivider::before,
.ascii-vdivider::after {
  content: "│\A│\A│\A│\A│"; /* │ with line breaks */
  white-space: pre;
  flex: 1;
}

/* ===== Background Effects ===== */

/* Subtle scan-line effect overlay */
.scanlines {
  position: relative;
}

.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* Subtle noise texture background */
.bg-noise {
  position: relative;
}

.bg-noise::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
  z-index: 0;
}

/* Combined dark textured background */
.bg-dark-textured {
  background-color: var(--keycon-dark);
  background-image: /* Subtle radial gradient for depth */
    radial-gradient(
      ellipse at center,
      rgba(42, 42, 42, 0.3) 0%,
      transparent 70%
    ),
     /* Very subtle grid pattern */linear-gradient(
    rgba(255, 255, 255, 0.01) 1px,
    transparent 1px
  ),
    linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.01) 1px,
    transparent 1px
  );
  background-size: 100% 100%, 20px 20px, 20px 20px;
  background-position: center, 0 0, 0 0;
}

/* Scan-line overlay that works on any element */
.overlay-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.02) 2px,
    rgba(0, 0, 0, 0.02) 4px
  );
}

/* CRT vignette effect (optional, more dramatic) */
.vignette {
  position: relative;
}

.vignette::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 60%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Text glow effect for headers */
.text-glow {
  text-shadow:
    0 0 10px rgba(247, 148, 29, 0.3),
    0 0 20px rgba(247, 148, 29, 0.2);
}

/* Strong text glow */
.text-glow-strong {
  text-shadow:
    0 0 10px rgba(247, 148, 29, 0.5),
    0 0 20px rgba(247, 148, 29, 0.3),
    0 0 40px rgba(247, 148, 29, 0.2);
}

/* ASCII header decoration with brackets */
.ascii-header {
  font-family: var(--font-mono);
  color: var(--keycon-orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ascii-header::before {
  content: "[ ";
  opacity: 0.7;
}

.ascii-header::after {
  content: " ]";
  opacity: 0.7;
}

/* ASCII header with box-drawing decorations */
.ascii-header-box {
  font-family: var(--font-mono);
  color: var(--keycon-orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ascii-header-box::before {
  content: "┤ ";
  opacity: 0.7;
}

.ascii-header-box::after {
  content: " ├";
  opacity: 0.7;
}

/* ASCII header with double-line decorations */
.ascii-header-double {
  font-family: var(--font-mono);
  color: var(--keycon-orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ascii-header-double::before {
  content: "╣ ";
  opacity: 0.7;
}

.ascii-header-double::after {
  content: " ╠";
  opacity: 0.7;
}

/* ASCII pre block for decorative text */
.ascii-pre {
  font-family: var(--font-mono);
  white-space: pre;
  color: var(--keycon-orange);
  font-size: 0.75rem;
  line-height: 1.2;
  overflow-x: auto;
}

/* ASCII art container with proper line height */
.ascii-art {
  font-family: var(--font-mono);
  white-space: pre;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--keycon-orange);
}

/* ASCII decorative bracket utilities */
.ascii-bracket-left::before {
  content: "[ ";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

.ascii-bracket-right::after {
  content: " ]";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

.ascii-angle-left::before {
  content: "< ";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

.ascii-angle-right::after {
  content: " >";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

.ascii-pipe-left::before {
  content: "│ ";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

.ascii-pipe-right::after {
  content: " │";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

/* Keyboard key style (for keyboard-themed decorations) */
.ascii-key {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--keycon-gray);
  border-bottom-width: 3px;
  border-radius: 0.25rem;
  background: var(--keycon-darker);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--keycon-text);
  text-transform: uppercase;
}

.ascii-key--orange {
  border-color: var(--keycon-orange);
  color: var(--keycon-orange);
}

/* Terminal prompt style */
.ascii-prompt::before {
  content: "> ";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

.ascii-prompt-user::before {
  content: "$ ";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

/* Blinking cursor effect */
.ascii-cursor::after {
  content: "█";
  color: var(--keycon-orange);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Arrow decorations */
.ascii-arrow-right::after {
  content: " →";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

.ascii-arrow-left::before {
  content: "← ";
  color: var(--keycon-orange);
  font-family: var(--font-mono);
}

/* List bullet styles */
.ascii-list {
  list-style: none;
  padding-left: 0;
}

.ascii-list li {
  position: relative;
  padding-left: 1.5em;
  font-family: var(--font-mono);
}

.ascii-list li::before {
  content: "├─";
  position: absolute;
  left: 0;
  color: var(--keycon-gray);
}

.ascii-list li:last-child::before {
  content: "└─";
}

/* Inline code style */
.ascii-code {
  font-family: var(--font-mono);
  background: var(--keycon-darker);
  padding: 0.125rem 0.375rem;
  border: 1px solid var(--keycon-gray);
  font-size: 0.875em;
}

/* ===== Selection Colors ===== */
::selection {
  background-color: var(--keycon-orange);
  color: var(--keycon-dark);
}

/* ===== Link Styles ===== */
a {
  color: var(--keycon-orange);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--keycon-orange-light);
}

a:focus {
  outline: 2px solid var(--keycon-orange);
  outline-offset: 2px;
}

/* ===== Button Styles ===== */
.btn-ascii {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--keycon-orange);
  background-color: transparent;
  color: var(--keycon-orange);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.btn-ascii:hover {
  background-color: var(--keycon-orange);
  color: var(--keycon-dark);
}

.btn-ascii:focus {
  outline: 2px solid var(--keycon-orange-light);
  outline-offset: 2px;
}

/* Filled button variant */
.btn-ascii-filled {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--keycon-orange);
  background-color: var(--keycon-orange);
  color: var(--keycon-dark);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.btn-ascii-filled:hover {
  background-color: var(--keycon-orange-light);
  border-color: var(--keycon-orange-light);
}

.btn-ascii-filled:focus {
  outline: 2px solid var(--keycon-orange-light);
  outline-offset: 2px;
}

/* ===== Responsive Utilities ===== */
@media (min-width: 640px) {
  .sm\:flex {
    display: flex;
  }
  .sm\:hidden {
    display: none;
  }
  .sm\:block {
    display: block;
  }
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /* Max-width utilities */
  .sm\:max-w-sm {
    max-width: 24rem;
  }
  .sm\:max-w-md {
    max-width: 28rem;
  }
  /* Typography */
  .sm\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
  .sm\:text-base {
    font-size: 1rem;
    line-height: 1.5rem;
  }
  .sm\:text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
  .sm\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
  .sm\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  /* Spacing */
  .sm\:px-0 {
    padding-left: 0;
    padding-right: 0;
  }
  .sm\:px-6 {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
  .sm\:py-3 {
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }
  .sm\:py-4 {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }
  .sm\:py-16 {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
  .sm\:mb-6 {
    margin-bottom: var(--space-6);
  }
  .sm\:mb-8 {
    margin-bottom: var(--space-8);
  }
  .sm\:mt-2 {
    margin-top: var(--space-2);
  }
  .sm\:mt-4 {
    margin-top: var(--space-4);
  }
  .sm\:mt-10 {
    margin-top: 2.5rem;
  }
  .sm\:mb-2 {
    margin-bottom: var(--space-2);
  }
  .sm\:bottom-8 {
    bottom: var(--space-8);
  }
  .sm\:tracking-widest {
    letter-spacing: 0.1em;
  }
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }
  .md\:hidden {
    display: none;
  }
  .md\:block {
    display: block;
  }
  .md\:flex-row {
    flex-direction: row;
  }
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* Max-width utilities */
  .md\:max-w-md {
    max-width: 28rem;
  }
  .md\:max-w-lg {
    max-width: 32rem;
  }
  /* Typography */
  .md\:text-base {
    font-size: 1rem;
    line-height: 1.5rem;
  }
  .md\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }
  .md\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  .md\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }
  /* Spacing */
  .md\:px-8 {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
  .md\:py-6 {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
  }
  .md\:py-16 {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }
  .md\:py-20 {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
  .md\:mt-12 {
    margin-top: var(--space-12);
  }
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex;
  }
  .lg\:hidden {
    display: none;
  }
  .lg\:block {
    display: block;
  }
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /* Max-width utilities */
  .lg\:max-w-lg {
    max-width: 32rem;
  }
  .lg\:max-w-xl {
    max-width: 36rem;
  }
  /* Typography */
  .lg\:text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  .lg\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  .lg\:text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
  /* Spacing */
  .lg\:px-12 {
    padding-left: var(--space-12);
    padding-right: var(--space-12);
  }
  .lg\:py-20 {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
  .lg\:py-24 {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

@media (min-width: 1280px) {
  .xl\:flex {
    display: flex;
  }
  .xl\:hidden {
    display: none;
  }
  .xl\:block {
    display: block;
  }
  /* Max-width utilities */
  .xl\:max-w-xl {
    max-width: 36rem;
  }
  .xl\:max-w-2xl {
    max-width: 42rem;
  }
}

/* ===== Missing Utility Classes ===== */

/* Font smoothing */
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Text sizes */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}
.text-\[8px\] {
  font-size: 8px;
  line-height: 1.25;
}
.text-\[10px\] {
  font-size: 10px;
  line-height: 1.25;
}

/* Colors */
.text-gray-100 {
  color: #f3f4f6;
}
.text-keycon-gray {
  color: var(--keycon-gray);
}
.hover\:text-keycon-orange:hover {
  color: var(--keycon-orange);
}
.hover\:text-keycon-orange-light:hover {
  color: var(--keycon-orange-light);
}

/* Line height */
.leading-none {
  line-height: 1;
}
.leading-tight {
  line-height: 1.25;
}

/* Whitespace */
.whitespace-nowrap {
  white-space: nowrap;
}
.whitespace-pre {
  white-space: pre;
}

/* Overflow */
.overflow-x-auto {
  overflow-x: auto;
}

/* Opacity */
.opacity-30 {
  opacity: 0.3;
}
.opacity-70 {
  opacity: 0.7;
}

/* Text decoration */
.underline {
  text-decoration-line: underline;
}
.underline-offset-4 {
  text-underline-offset: 4px;
}

/* Gap */
.gap-1 {
  gap: var(--space-1);
}
.gap-3 {
  gap: var(--space-3);
}

/* Space-y (vertical spacing between children) */
.space-y-1 > * + * {
  margin-top: var(--space-1);
}
.space-y-2 > * + * {
  margin-top: var(--space-2);
}
.space-y-4 > * + * {
  margin-top: var(--space-4);
}

/* Border */
.border-t {
  border-top-width: 1px;
  border-top-style: solid;
}

/* Position */
.top-0 {
  top: 0;
}
.top-8 {
  top: var(--space-8);
}
.left-8 {
  left: var(--space-8);
}
.right-8 {
  right: var(--space-8);
}
.bottom-8 {
  bottom: var(--space-8);
}
.left-1\/2 {
  left: 50%;
}

/* Transform */
.-translate-x-1\/2 {
  --tw-translate-x: -50%;
  transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y));
}
.-translate-y-1\/2 {
  --tw-translate-y: -50%;
  transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y));
}
.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.group:hover .group-hover\:-translate-x-1 {
  transform: translateX(-0.25rem);
}

/* Animation */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Group */
.group {
  position: relative;
}

/* Max-width */
.max-w-2xl {
  max-width: 42rem;
}
.max-w-3xl {
  max-width: 48rem;
}
.max-w-4xl {
  max-width: 56rem;
}
.max-w-5xl {
  max-width: 64rem;
}

/* Arbitrary max-width values */
.max-w-\[286px\] {
  max-width: 286px;
}
.max-w-\[70\%\] {
  max-width: 70%;
}

/* Margin */
.mt-1 {
  margin-top: var(--space-1);
}
.mt-2 {
  margin-top: var(--space-2);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-10 {
  margin-top: 2.5rem;
}
.mt-16 {
  margin-top: var(--space-16);
}
.mb-2 {
  margin-bottom: var(--space-2);
}
.mb-6 {
  margin-bottom: var(--space-6);
}
.mb-10 {
  margin-bottom: 2.5rem;
}
.mb-12 {
  margin-bottom: var(--space-12);
}
.mx-1 {
  margin-left: var(--space-1);
  margin-right: var(--space-1);
}

/* Padding */
.p-3 {
  padding: var(--space-3);
}
.px-2 {
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}
.px-3 {
  padding-left: var(--space-3);
  padding-right: var(--space-3);
}
.py-2 {
  padding-top: var(--space-2);
  padding-bottom: var(--space-2);
}
.py-3 {
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* ===== Additional Responsive Utilities ===== */
@media (min-width: 640px) {
  .sm\:flex-row {
    flex-direction: row;
  }
  .sm\:text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
  }
  .sm\:text-\[10px\] {
    font-size: 10px;
    line-height: 1.25;
  }
  .sm\:max-w-\[342px\] {
    max-width: 342px;
  }
  .sm\:max-w-3xl {
    max-width: 48rem;
  }
  .sm\:max-w-5xl {
    max-width: 64rem;
  }
  .sm\:p-4 {
    padding: var(--space-4);
  }
  .sm\:px-4 {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  .sm\:py-12 {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
  .sm\:py-20 {
    padding-top: var(--space-20);
    padding-bottom: var(--space-20);
  }
  .sm\:mt-6 {
    margin-top: var(--space-6);
  }
  .sm\:mt-8 {
    margin-top: var(--space-8);
  }
  .sm\:mt-12 {
    margin-top: var(--space-12);
  }
  .sm\:mb-12 {
    margin-bottom: var(--space-12);
  }
  .sm\:mb-16 {
    margin-bottom: var(--space-16);
  }
  .sm\:mx-2 {
    margin-left: var(--space-2);
    margin-right: var(--space-2);
  }
  .sm\:gap-4 {
    gap: var(--space-4);
  }
  .sm\:gap-6 {
    gap: var(--space-6);
  }
  .sm\:gap-8 {
    gap: var(--space-8);
  }
  .sm\:space-y-2 > * + * {
    margin-top: var(--space-2);
  }
}

@media (min-width: 768px) {
  .md\:text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
  }
  .md\:text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
  }
  .md\:text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
  .md\:text-left {
    text-align: left;
  }
  .md\:max-w-\[400px\] {
    max-width: 400px;
  }
  .md\:py-24 {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
  .md\:mt-14 {
    margin-top: 3.5rem;
  }
  .md\:mb-16 {
    margin-bottom: var(--space-16);
  }
  .md\:gap-6 {
    gap: var(--space-6);
  }
  .md\:px-8 {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

@media (min-width: 1024px) {
  .lg\:max-w-\[457px\] {
    max-width: 457px;
  }
  .lg\:py-32 {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }
}

@media (min-width: 1280px) {
  .xl\:max-w-\[515px\] {
    max-width: 515px;
  }
}

/* ===== Focus Visible for Accessibility ===== */
:focus-visible {
  outline: 2px solid var(--keycon-orange);
  outline-offset: 2px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
