/*
 * Scribble OS - Organic Hand-Drawn Sketch Wobble Design System
 * Conforms to MASTER_PRD.md Section 24, 25, 26, 27 & preview.png
 * Crisp, High-DPI Vector Inking without Raster Displacement Blur
 */

@import url('https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Inter:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --scribble-bg: #9BD8D2;
  --scribble-surface: #A7DDD7;
  --scribble-surface-light: #B4E5DF;
  --scribble-ink: #071D1B;
  --scribble-muted: #244B47;
  --scribble-line: #173B37;
  --scribble-soft-line: rgba(7, 29, 27, 0.25);
  --scribble-card-border: #133330;
  --scribble-danger: #7A2929;
  --scribble-success: #174E3E;
  --scribble-highlight: #F5E5C9;
  
  --font-brand: 'Architects Daughter', cursive, sans-serif;
  --font-hand: 'Architects Daughter', cursive, sans-serif;
  --font-mono: 'Space Mono', 'SF Mono', Monaco, Consolas, monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--scribble-bg);
  color: var(--scribble-ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hand-drawn sketch border utility - Razor sharp double inked stroke */
.sketch-border {
  border: 2.5px solid var(--scribble-line);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  box-shadow: 2px 3px 0px rgba(7, 29, 27, 0.35), inset 0 0 0 1px rgba(7, 29, 27, 0.12);
}

.sketch-border-sm {
  border: 2px solid var(--scribble-line);
  border-radius: 255px 12px 225px 10px/10px 225px 12px 255px;
  box-shadow: 1.5px 2px 0px rgba(7, 29, 27, 0.25);
}

/* Hand-drawn sketchy card */
.sketch-card {
  background: var(--scribble-bg);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 14px 225px 12px/12px 225px 14px 255px;
  position: relative;
  box-shadow: 2px 3px 0px rgba(7, 29, 27, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sketch-card::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border: 1px solid var(--scribble-soft-line);
  border-radius: 250px 16px 230px 14px/14px 230px 16px 250px;
  pointer-events: none;
}

/* Hand-drawn interactive button */
.sketch-btn {
  background: var(--scribble-surface);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  color: var(--scribble-ink);
  font-family: var(--font-brand);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  padding: 8px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 2px 2px 0px var(--scribble-line);
  transition: all 0.15s ease-in-out;
  user-select: none;
}

.sketch-btn:hover {
  background: var(--scribble-surface-light);
  transform: translateY(-2px);
  box-shadow: 3px 4px 0px var(--scribble-line);
}

.sketch-btn:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0px var(--scribble-line);
}

/* Sketched pill badge */
.sketch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1.5px solid var(--scribble-line);
  border-radius: 255px 10px 225px 10px/10px 225px 10px 255px;
  font-family: var(--font-brand);
  font-size: 0.95rem;
  box-shadow: 1px 1.5px 0px rgba(7, 29, 27, 0.25);
}

/* Hand-drawn scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
  border-left: 2px solid var(--scribble-line);
}

::-webkit-scrollbar-thumb {
  background: var(--scribble-line);
  border: 2px solid var(--scribble-bg);
  border-radius: 255px 12px 225px 12px/12px 225px 12px 255px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scribble-ink);
}

/* Monospace crypto text elements */
.font-mono {
  font-family: var(--font-mono) !important;
}

.font-brand {
  font-family: var(--font-brand) !important;
}

/* Status dots */
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  border: 1.5px solid var(--scribble-ink);
}

.status-dot.green {
  background-color: #174E3E;
}

.status-dot.amber {
  background-color: #A36B00;
}

.status-dot.red {
  background-color: var(--scribble-danger);
}

/* SVG filter container (hidden) */
.svg-filter-def {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  overflow: hidden;
}

/*
 * Scribble OS - Terminal & Context Rail Styles
 * Conforms 1:1 to preview.png & MASTER_PRD.md Section 29, 30, 31, 32
 * Fully responsive: 320px mobile to 4K desktop with Termux-inspired mobile mode.
 * Crisp Monospaced Terminal, Architectural Hand-Lettered Headers.
 */

.terminal-run-btn {
  border: 2px solid var(--scribble-line);
  background: var(--scribble-surface);
  color: var(--scribble-ink);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}
.setup-pending .context-rail, .setup-pending .mobile-view-tabs { display: none !important; }
.setup-pending .window-body { grid-template-columns: 1fr; }
#scribbleAppWindow .terminal-pane { min-width: 0; }
#scribbleAppWindow .terminal-input-field { min-width: 0; }
@media (max-width: 820px) {
  #scribbleAppWindow { min-height: 0; height: calc(100dvh - 24px); }
  #scribbleAppWindow .window-body { min-height: 0; overflow: hidden; }
  #scribbleAppWindow .terminal-pane { min-height: 0; height: auto !important; }
}
.os-wrapper {
  max-width: 1300px;
  margin: 16px auto;
  padding: 8px;
  width: 96%;
}

/* Master Hand-Drawn Window Frame */
.os-window {
  background-color: var(--scribble-bg);
  border: 2.5px solid var(--scribble-line);
  border-radius: 255px 18px 225px 16px/16px 225px 18px 255px;
  padding: 16px 20px 20px 20px;
  box-shadow: 3px 4px 0px rgba(7, 29, 27, 0.35);
  position: relative;
  min-height: 82vh;
  display: flex;
  flex-direction: column;
}

/* Window Title Bar */
.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--scribble-line);
  flex-wrap: wrap;
  gap: 10px;
}

.titlebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.titlebar-title {
  font-family: var(--font-brand);
  font-size: 1.45rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--scribble-ink);
  margin: 0;
}

.titlebar-version {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--scribble-line);
  letter-spacing: normal;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px solid var(--scribble-line);
  border-radius: 255px 8px 225px 8px/8px 225px 8px 255px;
  padding: 3px 8px;
  background: var(--scribble-surface);
  box-shadow: 1px 1px 0px var(--scribble-line);
}

.win-btn {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  color: var(--scribble-ink);
  line-height: 1;
  padding: 2px 4px;
  transition: transform 0.15s ease;
}

.win-btn:hover {
  transform: scale(1.2);
}

/* Mobile Screen Tab Switcher (Visible only on mobile/narrow screens) */
.mobile-view-tabs {
  display: none;
  width: 100%;
  margin-bottom: 12px;
  gap: 8px;
}

.mobile-tab-btn {
  flex: 1;
  background: var(--scribble-surface);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 10px 225px 8px/8px 225px 10px 255px;
  padding: 10px 14px;
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--scribble-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 1.5px 2px 0px var(--scribble-line);
  transition: all 0.15s ease;
}

.mobile-tab-btn.active {
  background: var(--scribble-ink);
  color: var(--scribble-bg);
  box-shadow: inset 1px 1px 0px rgba(255,255,255,0.1);
}

/* Main Split Body (75% / 25%) */
.window-body {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 18px;
  flex: 1;
  min-height: 520px;
}

/* --- LEFT: INTERACTIVE TERMINAL PANE (~75%) --- */
.terminal-pane {
  background-color: var(--scribble-bg);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 15px 225px 14px/14px 225px 15px 255px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(7, 29, 27, 0.12), 2px 2px 0px rgba(7, 29, 27, 0.2);
}

.terminal-scrollback {
  flex: 1;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--scribble-ink);
  padding-right: 8px;
  word-break: break-word;
}

.terminal-line {
  margin-bottom: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.terminal-line.mono {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  word-break: break-all;
}

.terminal-line.success {
  color: #124A3B;
  font-weight: 700;
}

.terminal-line.error {
  color: var(--scribble-danger);
  font-weight: 700;
}

.terminal-line.section-header {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-top: 10px;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.terminal-line.prompt-echo {
  font-weight: 700;
  margin-top: 10px;
  color: var(--scribble-ink);
}

/* Live Prompt Row */
.terminal-input-row {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  border-top: 1px dashed var(--scribble-soft-line);
  padding-top: 8px;
}

.terminal-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% - 2px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--scribble-surface, #f7f3e8);
  border: 2px solid var(--scribble-line);
  border-radius: 8px;
  box-shadow: 2px 3px 0 rgba(7, 29, 27, 0.25);
  z-index: 20;
}

.terminal-suggestions[hidden] { display: none; }

.terminal-suggestion {
  border: 0;
  border-radius: 4px;
  padding: 7px 9px;
  text-align: left;
  color: var(--scribble-ink);
  background: transparent;
  font: 0.9rem var(--font-mono);
  cursor: pointer;
}

.terminal-suggestion:hover,
.terminal-suggestion:focus-visible {
  outline: none;
  background: var(--scribble-accent, #9bd8d2);
}

.prompt-prefix {
  user-select: none;
  white-space: nowrap;
  color: var(--scribble-ink);
}

.terminal-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--scribble-ink);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding-left: 6px;
  caret-color: var(--scribble-ink);
  min-width: 50px;
}

.terminal-cursor {
  display: inline-block;
  width: 9px;
  height: 18px;
  background-color: var(--scribble-ink);
  vertical-align: middle;
  margin-left: 2px;
  animation: cursorBlink 1s step-end infinite;
}

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

/* --- RIGHT: CONTEXT RAIL (~25%) --- */
.context-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rail-card {
  background: var(--scribble-bg);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 14px 225px 12px/12px 225px 14px 255px;
  padding: 12px 14px;
  position: relative;
  box-shadow: 2px 2px 0px rgba(7, 29, 27, 0.25);
}

.card-title {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding-bottom: 6px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid var(--scribble-line);
  color: var(--scribble-ink);
}

.card-label {
  font-family: var(--font-brand);
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--scribble-line);
  margin-bottom: 4px;
}

/* Wallet Box */
.address-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--scribble-line);
  border-radius: 255px 10px 225px 8px/8px 225px 10px 255px;
  padding: 6px 10px;
  background: var(--scribble-surface);
  margin-bottom: 10px;
  gap: 6px;
  box-shadow: 1px 1.5px 0px var(--scribble-line);
}

.address-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.copy-btn:hover {
  transform: scale(1.2);
}

.network-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.8px solid var(--scribble-line);
  border-radius: 255px 10px 225px 8px/8px 225px 10px 255px;
  padding: 4px 12px;
  background: var(--scribble-surface);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 1px 1.5px 0px var(--scribble-line);
}

/* Balance Card */
.balance-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}

.balance-numbers {
  display: flex;
  flex-direction: column;
}

.balance-eth {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--scribble-ink);
  word-break: break-all;
}

.balance-usd {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--scribble-line);
  margin-top: 2px;
}

/* Quick Actions Card */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px dashed var(--scribble-soft-line);
  padding: 7px 6px;
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 1.12rem;
  transition: all 0.15s ease;
  user-select: none;
}

.action-item:last-child {
  border-bottom: none;
}

.action-item:hover {
  background: var(--scribble-surface);
  padding-left: 8px;
  border-radius: 6px;
}

.action-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-chevron {
  font-family: var(--font-mono);
  font-weight: bold;
}

/* System Card */
.system-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.system-row:last-child {
  margin-bottom: 0;
}

.system-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Toast alert notification */
.toast-msg {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--scribble-surface-light);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 12px 225px 10px/10px 225px 12px 255px;
  padding: 8px 18px;
  font-family: var(--font-brand);
  font-size: 1.15rem;
  box-shadow: 2px 3px 0px rgba(7, 29, 27, 0.35);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(10px);
}

.toast-msg.show {
  opacity: 1;
  transform: translateY(0);
}

/* The public route is a focused terminal surface. Its setup is entered by
   the user directly, without the app's wallet rail or shortcut controls. */
.web-terminal-only .context-rail,
.web-terminal-only .mobile-view-tabs,
.web-terminal-only .window-controls {
  display: none !important;
}

.web-terminal-only .window-body {
  grid-template-columns: 1fr;
}

.web-terminal-only .terminal-pane {
  min-height: calc(100dvh - 150px);
  height: auto;
}

.web-terminal-only .os-window {
  min-height: calc(100dvh - 32px);
}

/* --- RESPONSIVE MEDIA QUERIES --- */

/* Tablet (1024px to 800px) */
@media (max-width: 1024px) {
  .window-body {
    grid-template-columns: 1fr 270px;
    gap: 14px;
  }
}

/* Mobile & Small Screens (< 820px) */
@media (max-width: 820px) {
  .os-wrapper {
    margin: 4px auto;
    width: 98%;
    padding: 2px;
  }

  .os-window {
    min-height: 92vh;
    padding: 12px 10px;
    border-radius: 255px 12px 225px 10px/10px 225px 12px 255px;
  }

  .mobile-view-tabs {
    display: flex;
  }

  .window-body {
    grid-template-columns: 1fr;
    min-height: 520px;
    position: relative;
  }

  /* When mobile tab is active */
  .window-body.view-terminal .context-rail {
    display: none !important;
  }
  .window-body.view-terminal .terminal-pane {
    display: flex !important;
    height: 100%;
  }

  .window-body.view-rail .terminal-pane {
    display: none !important;
  }
  .window-body.view-rail .context-rail {
    display: flex !important;
  }

  .terminal-input-field {
    font-size: 16px !important; /* Non-negotiable PRD 31 rule: prevent iOS browser zoom */
  }

  .terminal-scrollback {
    font-size: 0.92rem;
  }
}

/* Very Narrow Mobile (< 400px) */
@media (max-width: 400px) {
  .os-window {
    padding: 8px 6px;
  }

  .titlebar-title {
    font-size: 1.2rem;
  }

  .terminal-pane {
    padding: 10px;
  }

  .prompt-prefix {
    font-size: 0.85rem;
  }
}

/* --- 2. LANDING PAGE STYLES --- */
.landing-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 20px 80px 20px;
  width: 100%;
  overflow-x: hidden;
}

/* Nav */
.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 2px solid var(--scribble-line);
  margin-bottom: 34px;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-brand);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--scribble-ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--font-brand);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--scribble-ink);
  text-decoration: none;
  transition: transform 0.15s ease;
}

.nav-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  transform: translateY(-1px);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero */
.hero-section {
  text-align: center;
  padding: 20px 0 40px 0;
}

.hero-badge {
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-brand);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  max-width: 950px;
  margin-left: auto;
  margin-right: auto;
  color: var(--scribble-ink);
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--scribble-muted);
  max-width: 840px;
  margin: 0 auto 30px auto;
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-cli-quick {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--scribble-surface);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 12px 225px 10px/10px 225px 12px 255px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  max-width: 100%;
  overflow-x: auto;
  box-shadow: 1.5px 2px 0px var(--scribble-line);
}

.copy-cli-btn {
  background: var(--scribble-bg);
  border: 1.5px solid var(--scribble-line);
  border-radius: 255px 6px 225px 6px/6px 225px 6px 255px;
  padding: 3px 8px;
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.copy-cli-btn:hover {
  background: var(--scribble-surface-light);
}

/* Callout Box */
.device-callout-box {
  max-width: 860px;
  margin: 0 auto 30px auto;
  padding: 16px 22px;
  background: var(--scribble-surface);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 14px 225px 12px/12px 225px 14px 255px;
  box-shadow: 2px 3px 0px rgba(7, 29, 27, 0.25);
  text-align: left;
}

.device-callout-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--scribble-ink);
}

.device-callout-p {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--scribble-muted);
  margin: 0;
}

/* Live Mint & FCFS Whitelist Counter Banner */
.fcfs-counter-banner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--scribble-surface);
  border: 2.5px solid var(--scribble-line);
  border-radius: 255px 14px 225px 12px/12px 225px 14px 255px;
  padding: 18px 26px;
  margin: 0 auto 34px auto;
  max-width: 880px;
  flex-wrap: wrap;
  gap: 18px;
  text-align: center;
  box-shadow: 3px 4px 0px rgba(7, 29, 27, 0.3);
}

.counter-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.counter-num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  color: var(--scribble-ink);
  line-height: 1;
}

.counter-label {
  font-family: var(--font-brand);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--scribble-line);
}

.counter-divider {
  width: 2px;
  height: 48px;
  background: var(--scribble-soft-line);
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--scribble-bg);
  border: 1.8px solid var(--scribble-line);
  border-radius: 255px 8px 225px 8px/8px 225px 8px 255px;
  padding: 4px 14px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 1px 1px 0px var(--scribble-line);
}

@media (max-width: 650px) {
  .counter-divider {
    display: none;
  }
  .fcfs-counter-banner {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
}

/* --- INTERACTIVE COMMAND TOUR & EXPLANATION ENGINE --- */
.command-tour-section {
  max-width: 1040px;
  margin: 0 auto 20px auto;
  text-align: left;
}

.tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.tour-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-brand);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--scribble-ink);
}

.tour-subtitle {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--scribble-line);
}

.tour-chips-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  flex-wrap: wrap;
}

.tour-chip {
  background: var(--scribble-surface);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 10px 225px 8px/8px 225px 10px 255px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--scribble-ink);
  cursor: pointer;
  box-shadow: 1.5px 2px 0px var(--scribble-line);
  transition: all 0.15s ease;
  user-select: none;
}

.tour-chip:hover {
  background: var(--scribble-surface-light);
  transform: translateY(-2px);
  box-shadow: 2px 3px 0px var(--scribble-line);
}

.tour-chip.active {
  background: var(--scribble-ink);
  color: var(--scribble-bg);
  box-shadow: inset 1px 1px 0px rgba(255,255,255,0.2);
}

/* Live Terminal Preview Frame on Landing */
.hero-preview-container {
  max-width: 1040px;
  margin: 0 auto 30px auto;
  text-align: left;
}

#heroPreviewWindow {
  min-height: 0;
  scroll-margin-top: 20px;
}

#heroPreviewWindow .terminal-pane {
  min-height: 0;
  min-width: 0;
  height: 520px;
}
#heroPreviewWindow .terminal-input-row { flex-wrap: wrap; gap: 6px; }
#heroPreviewWindow .prompt-prefix { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
#heroPreviewWindow .terminal-input-field { min-width: 80px; }
#web-terminal { scroll-margin-top: 20px; }
@media (max-width: 820px) {
  #heroPreviewWindow .window-body { min-height: 0; }
  #heroPreviewWindow .terminal-pane { height: 65dvh !important; min-height: 280px; }
  #heroPreviewWindow .prompt-prefix { flex-basis: 100%; }
  #heroPreviewWindow .terminal-cursor { display: none; }
  .nav-actions, .nav-links, .hero-cli-quick { flex-wrap: wrap; }
  .hero-cli-quick { overflow-wrap: anywhere; }
}
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--scribble-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Command Inspector Card */
.command-inspector {
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--scribble-surface);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 12px 225px 10px/10px 225px 12px 255px;
}

.setup-walkthrough {
  margin-top: 18px;
  padding: 16px;
  background: var(--scribble-surface-light);
}

.walkthrough-topline,
.walkthrough-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.walkthrough-label { font-weight: 700; }
.walkthrough-live { display: inline-flex; align-items: center; gap: 5px; opacity: 0.7; }
.walkthrough-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--scribble-success); animation: walkthroughPulse 1.2s ease-in-out infinite; }

.walkthrough-screen {
  position: relative;
  min-height: 170px;
  margin: 10px 0 8px;
  padding: 14px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: var(--scribble-bg);
  color: var(--scribble-ink);
  font: 0.82rem/1.65 var(--font-mono);
}

.walkthrough-frame {
  position: absolute;
  inset: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.walkthrough-frame {
  position: relative;
  inset: auto;
  opacity: 0;
  transform: translateY(5px);
  animation: walkthroughReveal 12s linear 1;
  animation-fill-mode: both;
}

.frame-wallet { animation-delay: 4s; }
.frame-whitelist { animation-delay: 8s; }
.walkthrough-prompt { color: var(--scribble-muted); }
.walkthrough-frame strong { color: var(--scribble-success); font-weight: 400; }
.walkthrough-secret { color: var(--scribble-danger); }
.walkthrough-secret b { filter: blur(4px); color: var(--scribble-ink); letter-spacing: 0.12em; user-select: none; }
.walkthrough-address { color: var(--scribble-line); }

.walkthrough-steps { color: var(--scribble-muted); }
.walkthrough-steps span { flex: 1; text-align: center; }

@keyframes walkthroughReveal {
  0%, 8% { opacity: 0; transform: translateY(5px); }
  12%, 100% { opacity: 1; transform: translateY(0); }
}

@keyframes walkthroughPulse { 50% { opacity: 0.3; } }

@media (prefers-reduced-motion: reduce) {
  .walkthrough-frame { animation: none; opacity: 1; transform: none; }
  .walkthrough-live i { animation: none; }
}

.inspector-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.inspector-cmd-tag {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  background: var(--scribble-ink);
  color: var(--scribble-bg);
  padding: 3px 10px;
  border-radius: 4px;
}

.inspector-badge {
  font-family: var(--font-brand);
  font-size: 1rem;
  font-weight: 700;
  border: 1.5px solid var(--scribble-line);
  padding: 2px 10px;
  border-radius: 255px 8px 225px 8px/8px 225px 8px 255px;
  background: var(--scribble-bg);
}

.inspector-body {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--scribble-ink);
  margin-bottom: 6px;
  font-weight: 500;
}

.inspector-detail {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--scribble-muted);
}

/* Features Grid */
.features-section {
  padding: 40px 0;
  border-top: 2px dashed var(--scribble-line);
  margin-top: 20px;
}

.section-title {
  font-family: var(--font-brand);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-align: center;
  color: var(--scribble-ink);
}

.section-desc {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--scribble-muted);
  text-align: center;
  margin-bottom: 32px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 22px;
  background: var(--scribble-bg);
  border: 2px solid var(--scribble-line);
  border-radius: 255px 14px 225px 12px/12px 225px 14px 255px;
  box-shadow: 2px 3px 0px rgba(7, 29, 27, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 3px 5px 0px rgba(7, 29, 27, 0.3);
}

.feature-icon-wrapper {
  margin-bottom: 12px;
  display: inline-block;
}

.feature-title {
  font-family: var(--font-brand);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  color: var(--scribble-ink);
}

.feature-text {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--scribble-muted);
}

/* Installation Showcase Section */
.install-section {
  padding: 40px 0;
  border-top: 2px dashed var(--scribble-line);
  margin-top: 30px;
}

.install-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.install-card {
  background: var(--scribble-bg);
  border: 2.2px solid var(--scribble-line);
  border-radius: 255px 15px 225px 14px/14px 225px 15px 255px;
  padding: 24px;
  box-shadow: 3px 4px 0px rgba(7, 29, 27, 0.25);
}

.install-card-title {
  font-family: var(--font-brand);
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  letter-spacing: 0.02em;
}

.install-step-list {
  list-style: none;
  margin: 14px 0 20px 0;
}

.install-step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--scribble-ink);
}

.step-num {
  font-family: var(--font-brand);
  font-weight: bold;
  border: 1.8px solid var(--scribble-line);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--scribble-surface);
  font-size: 0.95rem;
  box-shadow: 1px 1px 0px var(--scribble-line);
}

.code-snippet-box {
  background: var(--scribble-ink);
  color: var(--scribble-bg);
  border-radius: 255px 10px 225px 8px/8px 225px 10px 255px;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
  overflow-x: auto;
}

.code-copy-icon {
  background: transparent;
  border: none;
  color: var(--scribble-bg);
  cursor: pointer;
  font-family: var(--font-brand);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.code-copy-icon:hover {
  text-decoration: underline;
  transform: scale(1.05);
}

/* Footer */
.landing-footer {
  border-top: 2px solid var(--scribble-line);
  padding-top: 28px;
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--scribble-muted);
  flex-wrap: wrap;
  gap: 14px;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 860px) {
  .landing-nav {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 14px;
  }
  .nav-brand {
    justify-content: center;
  }
  .nav-links {
    justify-content: center;
  }
  .nav-actions {
    justify-content: center;
  }
  .install-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .sketch-btn {
    width: 100%;
    justify-content: center;
  }
  .hero-cli-quick {
    width: 100%;
    justify-content: space-between;
  }
  .tour-chips-bar {
    justify-content: center;
  }
  .tour-header {
    justify-content: center;
    text-align: center;
  }
}

/* Compact guide and NFT surfaces */
.guide-page { max-width: 1040px; margin: 0 auto; padding: 18px 20px 42px; color: var(--scribble-ink); }
.guide-nav { display:flex; justify-content:space-between; align-items:center; border-bottom:2px solid var(--scribble-line); padding:8px 0 14px; font-family:var(--font-mono); }
.guide-nav a { color:inherit; text-decoration:none; margin-left:16px; }
.guide-brand { font-family:var(--font-brand); font-size:1.35rem; font-weight:700; letter-spacing:.08em; }
.guide-hero { padding:76px 0 54px; max-width:680px; }
.guide-hero h1 { font-family:var(--font-brand); font-size:clamp(2.4rem,7vw,5rem); line-height:1; margin:12px 0 18px; }
.guide-hero p:not(.eyebrow) { font-size:1.12rem; line-height:1.55; color:var(--scribble-muted); margin-bottom:24px; }
.eyebrow { font:700 .78rem var(--font-mono); letter-spacing:.12em; color:var(--scribble-line); }
.guide-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.guide-card, .guide-section { border:2px solid var(--scribble-line); border-radius:18px 8px 20px 10px; padding:20px; box-shadow:2px 3px 0 rgba(7,29,27,.2); }
.guide-card h2, .guide-section h2 { font-family:var(--font-brand); margin:8px 0; }
.guide-card p, .guide-section p { color:var(--scribble-muted); line-height:1.5; }
.guide-card code { display:block; background:var(--scribble-ink); color:var(--scribble-bg); padding:10px; border-radius:8px; overflow:auto; font: .8rem var(--font-mono); }
.guide-number { font:700 .8rem var(--font-mono); color:var(--scribble-line); }
.guide-section { margin-top:22px; }
.nft-guide { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.opensea-mark { display:flex; align-items:center; gap:8px; flex-shrink:0; font:700 1.15rem var(--font-brand); transform:rotate(-2deg); }
.opensea-mark span { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:2px solid var(--scribble-line); border-radius:50% 44% 55% 48%; font-size:1.5rem; }
.text-link { color:var(--scribble-ink); font-weight:700; }
.nft-card { grid-column:span 2; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.nft-card .install-card-title { margin:4px 0; }
.x-mark { color:var(--scribble-ink); font:700 1.6rem var(--font-mono); text-decoration:none; }
.guide-footer { display:flex; align-items:center; justify-content:space-between; border-top:2px solid var(--scribble-line); margin-top:32px; padding-top:18px; font: .82rem var(--font-mono); color:var(--scribble-muted); }
@media (max-width: 760px) { .guide-grid { grid-template-columns:repeat(2,1fr); } .nft-card { grid-column:span 2; } .nft-guide { align-items:flex-start; flex-direction:column; } }
@media (max-width: 430px) { .guide-page { padding-inline:14px; } .guide-nav span a { margin-left:8px; } .guide-grid { grid-template-columns:1fr; } .nft-card { grid-column:span 1; } }
