/* ============================================================================
 * ScriptureWorks — Windows 98 × Gen-Z Y2K Decorative Pops
 * Super old-school Win98 bones with playful Gen-Z stickers, chrome pills & sparkles
 * ============================================================================ */

:root {
  --desktop-teal: #008080;
  --desktop-teal-deep: #006b6b;
  --w98-face: #c0c0c0;
  --w98-face-light: #d6d6d6;
  --w98-highlight: #ffffff;
  --w98-light: #dfdfdf;
  --w98-shadow: #808080;
  --w98-dark: #0a0a0a;
  --w98-navy: #000080;
  --w98-sky: #1084d0;
  --w98-paper: #ffffff;
  --w98-cream: #ffffe1;
  --w98-ink: #111111;
  --w98-muted: #4a4a4a;
  --w98-link: #0000ee;
  --w98-visited: #551a8b;

  /* Gen-Z Y2K Decorative Pops */
  --pop-lime: #dcff4a;
  --pop-pink: #ff6ad5;
  --pop-cyan: #72f0ff;
  --pop-lavender: #d6b8ff;
  --pop-peach: #ffb87a;
  --pop-holo: linear-gradient(120deg, #ff79d8 0%, #c8a2ff 32%, #72f0ff 66%, #dcff4a 100%);

  /* Authentic Win98 3D bevels */
  --bevel-out: inset -1px -1px var(--w98-dark), inset 1px 1px var(--w98-highlight),
    inset -2px -2px var(--w98-shadow), inset 2px 2px var(--w98-light);
  --bevel-out-sm: inset -1px -1px var(--w98-dark), inset 1px 1px var(--w98-highlight);
  --bevel-in: inset -1px -1px var(--w98-highlight), inset 1px 1px var(--w98-dark),
    inset -2px -2px var(--w98-light), inset 2px 2px var(--w98-shadow);
  --bevel-well: inset -1px -1px var(--w98-highlight), inset 1px 1px var(--w98-shadow);

  --font-ui: 'Tahoma', 'MS Sans Serif', 'Geneva', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', ui-monospace, monospace;
  --font-biblical: 'Cardo', 'Times New Roman', Georgia, serif;
  --font-hebrew: 'Ezra SIL', 'SBL Hebrew', 'Cardo', serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: var(--w98-ink);
  background-color: var(--desktop-teal);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  padding-bottom: 54px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 999;
  background: var(--pop-lime);
  color: #000;
  padding: 6px 12px;
  border: 2px solid #000;
  font-weight: 700;
}

.skip-link:focus {
  left: 8px;
}

a {
  color: var(--w98-link);
}

a:visited {
  color: var(--w98-visited);
}

:focus-visible {
  outline: 2px solid var(--pop-pink);
  outline-offset: 2px;
}

/* ============================================================================
 * Desktop Shell Layout
 * ============================================================================ */
.desktop-shell {
  max-width: 1260px;
  margin: 0 auto;
  padding: 18px 16px 32px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.desktop-icons {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.desk-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #ffffff;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
  padding: 4px 2px;
  border: 1px solid transparent;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.75);
}

.desk-icon:visited {
  color: #ffffff;
}

.desk-icon:hover,
.desk-icon:focus-visible {
  background: rgba(0, 0, 128, 0.65);
  border: 1px dotted var(--pop-lime);
  outline: none;
}

.desk-icon-box {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--w98-face);
  box-shadow: var(--bevel-out);
  font-size: 20px;
  color: #000;
  position: relative;
}

.desk-icon-box.pop-holo-box {
  background: var(--pop-holo);
}

.desk-icon-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--pop-lime);
  color: #000;
  border: 1px solid #000;
  font-size: 9px;
  font-weight: 700;
  padding: 0 3px;
  line-height: 1.3;
  text-shadow: none;
  transform: rotate(7deg);
}

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

/* ============================================================================
 * Classic Win98 Window Frame
 * ============================================================================ */
.w98-window {
  background: var(--w98-face);
  box-shadow: var(--bevel-out), 4px 4px 0 rgba(0, 0, 0, 0.35);
  padding: 3px;
  position: relative;
}

.w98-titlebar {
  background: linear-gradient(90deg, var(--w98-navy) 0%, var(--w98-sky) 100%);
  color: #ffffff;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.w98-titlebar.alt-y2k {
  background: linear-gradient(90deg, #000080 0%, #3d35b8 55%, #b842b5 100%);
}

.w98-title-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.w98-title-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  image-rendering: auto;
}

.w98-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.w98-win-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.w98-ctrl-btn {
  width: 17px;
  height: 15px;
  background: var(--w98-face);
  box-shadow: var(--bevel-out-sm);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  user-select: none;
}

/* Menu Bar */
.w98-menubar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 3px 4px;
  border-bottom: 1px solid var(--w98-shadow);
  box-shadow: 0 1px 0 var(--w98-highlight);
  font-size: 12.5px;
}

.w98-menubar a {
  color: var(--w98-ink);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid transparent;
}

.w98-menubar a:visited {
  color: var(--w98-ink);
}

.w98-menubar a:hover,
.w98-menubar a[aria-current='page'] {
  background: var(--w98-navy);
  color: #ffffff;
}

.w98-menubar .menu-spacer {
  flex: 1;
}

/* Address / Breadcrumb Bar */
.w98-addressbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  font-size: 12px;
  border-bottom: 1px solid var(--w98-shadow);
}

.w98-address-label {
  color: var(--w98-muted);
  white-space: nowrap;
}

.w98-address-input {
  flex: 1;
  background: #ffffff;
  box-shadow: var(--bevel-in);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #000;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Window Body */
.w98-body {
  padding: 14px;
}

.w98-paper {
  background: var(--w98-paper);
  box-shadow: var(--bevel-in);
  padding: 20px 22px;
}

.w98-statusbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 4px 2px 2px;
  font-size: 11.5px;
  color: var(--w98-ink);
}

.w98-status-well {
  box-shadow: var(--bevel-well);
  padding: 2px 8px;
  background: var(--w98-face);
}

.w98-status-well.grow {
  flex: 1;
  min-width: 180px;
}

/* ============================================================================
 * Gen-Z Pops, Stickers, Sparkles & Y2K Micro-Frills
 * ============================================================================ */
.sticker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.pop-sticker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 2px solid #000000;
  border-radius: 999px;
  box-shadow: 2px 2px 0 #000000;
  color: #000000;
  line-height: 1.3;
}

.pop-sticker.lime {
  background: var(--pop-lime);
  transform: rotate(-1.5deg);
}

.pop-sticker.pink {
  background: var(--pop-pink);
  transform: rotate(1.4deg);
}

.pop-sticker.cyan {
  background: var(--pop-cyan);
  transform: rotate(-0.8deg);
}

.pop-sticker.lavender {
  background: var(--pop-lavender);
  transform: rotate(1.1deg);
}

.pop-sticker.holo {
  background: var(--pop-holo);
  transform: rotate(-1deg);
}

.sparkle {
  display: inline-block;
  color: #b8009f;
  font-style: normal;
}

.y2k-marquee-bar {
  background: #0a0a0a;
  color: var(--pop-lime);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border: 1px solid #000;
  box-shadow: var(--bevel-in);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.y2k-marquee-bar span strong {
  color: var(--pop-cyan);
}

/* ============================================================================
 * Classic Win98 Buttons + Gen-Z Glossy Primary CTA
 * ============================================================================ */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.w98-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 14px;
  background: var(--w98-face);
  box-shadow: var(--bevel-out);
  color: #000000;
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.w98-btn:visited {
  color: #000000;
}

.w98-btn:hover {
  background: var(--w98-face-light);
}

.w98-btn:active {
  box-shadow: var(--bevel-in);
  transform: translate(1px, 1px);
}

.w98-btn.primary {
  background: linear-gradient(180deg, #eeff8c 0%, var(--pop-lime) 55%, #b9ee20 100%);
  border: 2px solid #000000;
  box-shadow: inset 1px 1px #ffffff, 3px 3px 0 #000000;
  color: #000000;
}

.w98-btn.primary:hover {
  background: linear-gradient(180deg, #f5ffb3 0%, #e5ff66 55%, #c7f734 100%);
}

.w98-btn.primary:active {
  transform: translate(2px, 2px);
  box-shadow: inset 1px 1px #000000, 1px 1px 0 #000000;
}

.w98-btn.y2k-pink {
  background: linear-gradient(180deg, #ffb6ec 0%, var(--pop-pink) 100%);
  border: 2px solid #000000;
  box-shadow: inset 1px 1px #ffffff, 3px 3px 0 #000000;
  color: #000000;
}

.w98-btn.sm {
  min-height: 26px;
  padding: 3px 10px;
  font-size: 12px;
}

/* ============================================================================
 * Hero & Typography
 * ============================================================================ */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #000080;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #000080;
  display: flex;
  align-items: center;
  gap: 7px;
}

h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: #000000;
}

.lead {
  font-size: 15px;
  line-height: 1.62;
  color: #1f1f1f;
  margin: 0 0 12px;
}

.callout-note {
  background: var(--w98-cream);
  border: 1px solid #000000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  font-size: 13px;
  margin: 12px 0;
}

/* Interactive Command Line Simulator Box */
.cmd-sim-window {
  background: var(--w98-face);
  box-shadow: var(--bevel-out);
  padding: 3px;
}

.cmd-sim-body {
  background: #101424;
  color: #eef5ff;
  box-shadow: var(--bevel-in);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.cmd-sim-form {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.cmd-sim-input {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  color: #000000;
  border: none;
  box-shadow: var(--bevel-in);
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.cmd-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.cmd-chip {
  background: #1e2747;
  color: var(--pop-cyan);
  border: 1px solid #485b9a;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  cursor: pointer;
}

.cmd-chip:hover {
  background: var(--pop-lime);
  color: #000;
  border-color: #000;
}

.biblical-preview {
  background: #ffffff;
  color: #111111;
  box-shadow: var(--bevel-in);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.greek-line {
  font-family: var(--font-biblical);
  font-size: 17px;
  line-height: 1.5;
  color: #000080;
}

.hebrew-line {
  font-family: var(--font-hebrew);
  font-size: 19px;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
  color: #5b1866;
}

.morph-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  background: #eef2ff;
  border: 1px solid #8a99cc;
  padding: 1px 5px;
  color: #111;
}

/* ============================================================================
 * Grids, Groupboxes, Tables & Accordions
 * ============================================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.w98-groupbox {
  border: 1px solid var(--w98-shadow);
  box-shadow: 1px 1px 0 var(--w98-highlight), inset 1px 1px 0 var(--w98-highlight);
  padding: 12px 14px;
  background: #f4f4f4;
  position: relative;
}

.w98-groupbox.white {
  background: #ffffff;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.stat-box {
  background: #ffffff;
  box-shadow: var(--bevel-in);
  padding: 10px 12px;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #000080;
}

.stat-label {
  font-size: 11.5px;
  color: var(--w98-muted);
}

/* Responsive Data Table */
.table-wrap {
  overflow-x: auto;
  box-shadow: var(--bevel-in);
  background: #ffffff;
  margin: 12px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #d4d4d4;
  vertical-align: top;
}

th {
  background: var(--w98-face);
  box-shadow: var(--bevel-out-sm);
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:nth-child(even) {
  background: #f8f9fc;
}

/* Native <details> / <summary> FAQ Accordion (Win98 style) */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

details.w98-faq {
  background: #ffffff;
  box-shadow: var(--bevel-in);
}

details.w98-faq > summary {
  cursor: pointer;
  padding: 9px 12px;
  font-weight: 700;
  background: var(--w98-face);
  box-shadow: var(--bevel-out-sm);
  color: #000000;
}

details.w98-faq[open] > summary {
  background: var(--w98-navy);
  color: #ffffff;
}

details.w98-faq > .faq-answer {
  padding: 10px 14px;
  font-size: 13.5px;
}

/* Share Strip */
.share-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.share-status {
  min-height: 1.2em;
  font-size: 12px;
  font-weight: 700;
  color: #006400;
  margin-top: 6px;
}

/* Code blocks */
pre {
  background: #101424;
  color: var(--pop-lime);
  box-shadow: var(--bevel-in);
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.5;
}

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: #eceff7;
  padding: 1px 4px;
  border: 1px solid #c5cde0;
}

pre code {
  background: transparent;
  padding: 0;
  border: none;
  color: inherit;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 12px;
  margin-bottom: 10px;
  color: var(--w98-muted);
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.breadcrumbs li + li::before {
  content: '▸';
  margin-right: 6px;
  color: var(--w98-shadow);
}

/* ============================================================================
 * Fixed Windows 98 Taskbar + Start Menu
 * ============================================================================ */
.w98-taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 36px;
  background: var(--w98-face);
  border-top: 2px solid var(--w98-highlight);
  box-shadow: 0 -1px 0 var(--w98-light);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  z-index: 100;
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  background: var(--w98-face);
  box-shadow: var(--bevel-out);
  border: none;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: #000;
  cursor: pointer;
}

.start-btn[aria-expanded='true'],
.start-btn:active {
  box-shadow: var(--bevel-in);
}

.start-sparkle-dot {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: var(--pop-holo);
  border: 1px solid #000;
  display: inline-block;
}

.taskbar-divider {
  width: 2px;
  height: 24px;
  border-left: 1px solid var(--w98-shadow);
  border-right: 1px solid var(--w98-highlight);
}

.taskbar-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.taskbar-tab {
  height: 26px;
  padding: 0 10px;
  background: var(--w98-face);
  box-shadow: var(--bevel-out-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #000;
  font-size: 12px;
  white-space: nowrap;
}

.taskbar-tab:visited {
  color: #000;
}

.taskbar-tab.active {
  box-shadow: var(--bevel-in);
  background: #dcdcdc;
  font-weight: 700;
}

.taskbar-tray {
  height: 26px;
  padding: 0 10px;
  box-shadow: var(--bevel-well);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* Start Menu Popover */
.start-menu {
  position: fixed;
  left: 6px;
  bottom: 38px;
  width: 270px;
  background: var(--w98-face);
  box-shadow: var(--bevel-out), 4px 4px 0 rgba(0, 0, 0, 0.35);
  z-index: 120;
  display: grid;
  grid-template-columns: 28px 1fr;
  padding: 2px;
}

.start-menu[hidden] {
  display: none;
}

.start-menu-rail {
  background: linear-gradient(180deg, #000080 0%, #3d35b8 65%, #ff6ad5 100%);
  color: #ffffff;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  padding: 10px 4px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.start-menu-list {
  list-style: none;
  margin: 0;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.start-menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  color: #000;
  text-decoration: none;
  font-size: 12.5px;
}

.start-menu-list a:visited {
  color: #000;
}

.start-menu-list a:hover,
.start-menu-list a:focus-visible {
  background: var(--w98-navy);
  color: #ffffff;
  outline: none;
}

.start-menu-sep {
  height: 1px;
  background: var(--w98-shadow);
  border-bottom: 1px solid var(--w98-highlight);
  margin: 3px 2px;
}

/* ============================================================================
 * Responsive & Reduced Motion
 * ============================================================================ */
@media (max-width: 900px) {
  .desktop-shell {
    grid-template-columns: 1fr;
    padding: 10px 10px 28px;
  }

  .desktop-icons {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

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

  .w98-paper {
    padding: 14px;
  }

  .taskbar-tab.hide-mobile {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .pop-sticker {
    transform: none !important;
  }
}
