/* Smart Auto Text Replacer - Modern Web Suite Design */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Brand Colors */
  --primary-color: hsl(242, 82%, 63%);
  --primary-hover: hsl(242, 82%, 58%);
  --primary-light: hsl(242, 85%, 96%);
  
  --accent-color: hsl(192, 95%, 47%);
  --accent-hover: hsl(192, 95%, 40%);
  --accent-light: hsl(192, 95%, 95%);
  
  --success-color: hsl(142, 72%, 45%);
  --success-bg: hsl(142, 70%, 95%);
  --success-text: hsl(142, 76%, 28%);
  
  --warning-color: hsl(38, 92%, 50%);
  --warning-bg: hsl(38, 90%, 96%);
  --warning-text: hsl(38, 90%, 28%);
  
  --danger-color: hsl(0, 84%, 60%);
  --danger-bg: hsl(0, 84%, 97%);
  --danger-text: hsl(0, 84%, 35%);

  /* Neutrals (Light Mode) */
  --bg-app: linear-gradient(180deg, hsl(220, 40%, 96%) 0%, hsl(220, 30%, 98%) 420px, hsl(220, 20%, 99%) 100%);
  --bg-card: hsl(0, 0%, 100%);
  --text-main: hsl(222, 47%, 11%);
  --text-muted: hsl(215, 20%, 45%);
  --text-light: hsl(215, 16%, 60%);
  
  --border-color: hsl(220, 25%, 90%);
  --input-bg: hsl(0, 0%, 100%);
  --input-border: hsl(220, 20%, 82%);
  
  /* Shadows & Layout */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 15px 35px -5px rgba(27, 39, 78, 0.08), 0 5px 15px -2px rgba(27, 39, 78, 0.04);
  
  --font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
  --border-radius-xl: 24px;
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-app: linear-gradient(180deg, hsl(222, 47%, 9%) 0%, hsl(222, 40%, 12%) 420px, hsl(222, 35%, 11%) 100%);
    --bg-card: hsl(223, 33%, 17%);
    
    --text-main: hsl(210, 40%, 98%);
    --text-muted: hsl(215, 20%, 75%);
    --text-light: hsl(215, 16%, 60%);
    
    --border-color: hsl(223, 25%, 24%);
    --input-bg: hsl(222, 47%, 10%);
    --input-border: hsl(223, 20%, 28%);
    --primary-light: rgba(88, 80, 236, 0.15);
    
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-text: hsl(142, 70%, 70%);
    
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-text: hsl(38, 90%, 70%);
    
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-text: hsl(0, 80%, 75%);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 5px 15px -2px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Button styles */
button,
a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--border-radius-sm);
  padding: 10px 18px;
  background: var(--primary-color);
  color: #fff;
  font-family: var(--font-family);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

button:hover,
a.button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(88, 80, 236, 0.2);
}

button:active,
a.button:active {
  transform: translateY(0);
}

button.secondary,
a.button.secondary {
  background: var(--border-color);
  color: var(--text-main);
  box-shadow: none;
}

button.secondary:hover,
a.button.secondary:hover {
  background: var(--text-light);
  color: #fff;
}

button.ghost,
a.button.ghost {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

button.ghost:hover,
a.button.ghost:hover {
  background: var(--primary-light);
  border-color: var(--primary-color);
}

/* Page Shell Layout */
.shell {
  max-width: 1060px;
  margin: 0 auto;
  padding: 30px 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(88, 80, 236, 0.25);
  transition: var(--transition);
}

.brand img:hover {
  transform: scale(1.05) rotate(5deg);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav a,
.language {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.topnav a:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.topnav a.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(88, 80, 236, 0.2);
}

.language {
  cursor: pointer;
  outline: none;
  padding-right: 28px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
}

.language:hover {
  border-color: var(--primary-color);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 36px;
  align-items: center;
  padding: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.kicker {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 99px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 10px 0 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0;
  max-width: 680px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-card {
  padding: 24px;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, var(--primary-color), hsl(242, 82%, 48%));
  color: #fff;
  box-shadow: 0 10px 25px rgba(88, 80, 236, 0.25);
}

.hero-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.hero-card p {
  font-size: 13px;
  color: var(--primary-light);
  line-height: 1.55;
}

.host-box {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.host-box small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.host-box code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
}

.status {
  min-height: 24px;
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--success-text);
  background: var(--success-bg);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  display: inline-block;
}

/* Sections Styling */
.section {
  margin-top: 40px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.section h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.section-head p {
  margin: 0;
  color: var(--text-light);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 750;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 16px;
  border-radius: var(--border-radius-sm);
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 800;
  font-size: 14px;
}

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: var(--border-radius-md);
  background: var(--warning-bg);
  border: 1px solid var(--warning-text);
  margin-bottom: 20px;
}

.callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--warning-text);
}

.callout p {
  margin: 0;
  color: var(--warning-text);
  font-size: 13.5px;
  line-height: 1.5;
}

.icon {
  font-size: 24px;
  line-height: 1;
}

.code-block {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: hsl(222, 47%, 9%);
  color: hsl(210, 40%, 98%);
  overflow: auto;
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  border: 1px solid var(--border-color);
}

/* Comparison Tables */
.example-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.example-table th,
.example-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 13.5px;
  vertical-align: top;
}

.example-table th {
  background: var(--border-color);
  color: var(--text-main);
  font-weight: 750;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.example-table tr:last-child td {
  border-bottom: 0;
}

.example-table tr:hover td {
  background: var(--primary-light);
}

.example-table code {
  overflow-wrap: anywhere;
  background: var(--border-color);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 11.5px;
}

.notes {
  display: grid;
  gap: 12px;
}

.note-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.note-item::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-text);
  font-weight: 800;
  font-size: 12px;
}

.release-meta {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 600;
}

/* FAQ Details section */
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.faq details[open] {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.faq summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 15px;
  outline: none;
}

.faq details p {
  color: var(--text-muted);
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

/* Footer Section */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  cursor: pointer;
  font-weight: 600;
}

.warning {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  background: var(--warning-bg);
  border: 1px solid var(--warning-text);
  color: var(--warning-text);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

/* Demo & Simulator Interactive Styling */
.demo-section {
  scroll-margin-top: 30px;
}

.demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.demo-toolbar p {
  margin: 3px 0 0;
}

.demo-label {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}

.demo-field,
.demo-editor {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  background: var(--input-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 15px;
  outline: 0;
  transition: var(--transition);
}

.demo-field:focus,
.demo-editor:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(88, 80, 236, 0.15);
}

.demo-editor {
  min-height: 120px;
  resize: vertical;
}

.demo-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.event-log {
  min-height: 140px;
  max-height: 240px;
  overflow: auto;
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: hsl(222, 47%, 9%);
  color: hsl(210, 40%, 90%);
  font-family: ui-monospace, SFMono-Regular, Monaco, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  border: 1px solid var(--border-color);
}

.demo-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-outputs {
  display: flex;
  flex-direction: column;
}

.demo-outputs .card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.demo-outputs .event-log {
  flex: 1;
  min-height: 260px;
  max-height: none;
}

/* Live Simulator Terminal Look */
.simulator-card {
  background: hsl(222, 47%, 11%) !important;
  color: hsl(210, 40%, 98%) !important;
  border: 1px solid hsl(223, 25%, 24%) !important;
  box-shadow: var(--shadow-lg) !important;
}

.simulator-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid hsl(223, 25%, 20%);
  margin-bottom: 18px;
}

.sim-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.sim-dot.red { background: hsl(0, 84%, 60%); }
.sim-dot.yellow { background: hsl(38, 92%, 50%); }
.sim-dot.green { background: hsl(142, 72%, 45%); }

.sim-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(215, 20%, 65%);
  margin-left: 8px;
}

.simulator-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sim-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-label {
  font-size: 12px;
  font-weight: 750;
  color: hsl(215, 20%, 65%);
}

.sim-input-box, .sim-output-box {
  background: hsl(222, 47%, 6%);
  border: 1px solid hsl(223, 25%, 18%);
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Monaco, monospace;
  font-size: 13.5px;
  min-height: 42px;
  display: flex;
  align-items: center;
  position: relative;
  transition: var(--transition);
}

.sim-input-box {
  color: hsl(210, 40%, 90%);
}

.sim-output-box {
  color: hsl(192, 95%, 47%);
  font-weight: 700;
}

.sim-cursor {
  animation: sim-blink 1s step-end infinite;
  color: var(--accent-color);
  margin-left: 2px;
  font-weight: bold;
}

.sim-rules-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
}

.sim-flow-arrow {
  color: hsl(215, 16%, 45%);
  font-size: 16px;
  font-weight: bold;
  margin-left: 24px;
}

.sim-rule-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: var(--transition);
}

.sim-rule-badge.waiting {
  background: hsl(223, 25%, 20%);
  color: hsl(215, 20%, 60%);
}

.sim-rule-badge.typing {
  background: rgba(88, 80, 236, 0.15);
  color: hsl(242, 85%, 80%);
  border: 1px solid rgba(88, 80, 236, 0.25);
}

.sim-rule-badge.active {
  background: rgba(245, 158, 11, 0.18);
  color: hsl(38, 90%, 75%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.sim-rule-badge.success {
  background: rgba(16, 185, 129, 0.18);
  color: hsl(142, 70%, 75%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.flash-glow {
  animation: flash-glow-animation 0.5s ease-out;
}

.flash-success {
  border-color: var(--success-color) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

@keyframes sim-blink {
  from, to { opacity: 0 }
  50% { opacity: 1 }
}

@keyframes flash-glow-animation {
  0% { text-shadow: 0 0 0px var(--accent-color); background: hsl(222, 47%, 6%); }
  50% { text-shadow: 0 0 10px var(--accent-color); background: hsl(223, 25%, 15%); }
  100% { text-shadow: 0 0 0px var(--accent-color); background: hsl(222, 47%, 6%); }
}

/* Real-time Sandbox Styling */
.card-header-with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.badge-live {
  background: var(--primary-light);
  color: var(--primary-color);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-status-ok {
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rules-applied-badge {
  background: var(--warning-bg);
  color: var(--warning-text);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: var(--transition);
}

.rules-applied-badge.active {
  opacity: 1;
}

.sandbox-field-group {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-color);
}

.sandbox-field-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.output-field-group {
  margin-bottom: 18px;
}

.output-field-group:last-child {
  margin-bottom: 0;
}

.output-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.output-preview-box {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

/* Console Trace Container */
.console-card {
  display: flex;
  flex-direction: column;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.console-header h3 {
  margin: 0;
}

.mini-btn {
  padding: 4px 10px !important;
  font-size: 11.5px !important;
  border-radius: 6px !important;
}

.trace-block {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed hsl(223, 25%, 24%);
  font-family: ui-monospace, SFMono-Regular, Monaco, monospace;
}

.trace-block:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.trace-header {
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 6px;
  font-size: 12.5px;
}

.trace-time {
  color: var(--text-light);
}

.trace-event {
  color: var(--danger-color);
}

.trace-target {
  color: var(--warning-color);
}

.trace-value {
  color: var(--text-muted);
}

.trace-steps {
  padding-left: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trace-step-row {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trace-step-row.applied {
  color: hsl(210, 40%, 98%);
  font-weight: 600;
}

.trace-step-row.skipped {
  color: hsl(215, 16%, 35%);
}

.trace-step-row.final {
  color: var(--accent-color);
  font-size: 12px;
  margin-top: 4px;
  font-weight: bold;
}

.step-arrow {
  color: hsl(215, 16%, 40%);
}

.step-name {
  font-weight: 500;
}

.step-status {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
  text-transform: uppercase;
}

.status-match {
  background: rgba(16, 185, 129, 0.2);
  color: hsl(142, 70%, 75%);
}

.status-no-match {
  background: rgba(239, 68, 68, 0.2);
  color: hsl(0, 80%, 75%);
}

.status-info {
  background: rgba(88, 80, 236, 0.25);
  color: hsl(242, 85%, 85%);
}

/* Sidebar and simulator styles */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.welcome-simulator-card {
  background: linear-gradient(135deg, hsl(222, 47%, 6%) 0%, hsl(244, 47%, 14%) 100%) !important;
  color: hsl(210, 40%, 98%) !important;
  border: 1px solid rgba(88, 80, 236, 0.3) !important;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(88, 80, 236, 0.15) !important;
  padding: 20px !important;
  border-radius: var(--border-radius-lg) !important;
}

.sim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}

.sim-dots {
  display: flex;
  gap: 6px;
}

.sim-dots .sim-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.sim-dots .sim-dot.dot-red { background: hsl(0, 84%, 60%); }
.sim-dots .sim-dot.dot-yellow { background: hsl(38, 92%, 50%); }
.sim-dots .sim-dot.dot-green { background: hsl(142, 72%, 45%); }

.sim-header .sim-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(215, 20%, 65%);
}

.sim-status {
  font-size: 10px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
  color: hsl(142, 70%, 75%);
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
}

.sim-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sim-browser-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-field-label {
  font-size: 11px;
  font-weight: 700;
  color: hsl(215, 20%, 65%);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sim-field-input {
  background: hsl(222, 47%, 4%);
  border: 1px solid hsl(223, 25%, 15%);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Monaco, monospace;
  font-size: 13px;
  min-height: 38px;
  display: flex;
  align-items: center;
  position: relative;
  transition: var(--transition);
  color: hsl(210, 40%, 90%);
  border-left: 3px solid var(--primary-color);
}

.sim-caret {
  animation: sim-blink 1s step-end infinite;
  color: var(--primary-color);
  margin-left: 2px;
  font-weight: bold;
}

.sim-popup-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(88, 80, 236, 0.12);
  border: 1px solid rgba(88, 80, 236, 0.25);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  color: hsl(242, 85%, 85%);
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin: 4px 0;
}

.sim-popup-indicator.active {
  opacity: 1;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 0 0 rgba(88, 80, 236, 0.7);
  animation: pulsePurple 2s infinite;
  display: inline-block;
}

.sim-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 10px;
}

.sim-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: hsl(215, 16%, 35%);
  transition: var(--transition);
  font-family: ui-monospace, SFMono-Regular, Monaco, monospace;
}

.sim-step-item code {
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 3px;
  color: hsl(215, 20%, 65%);
}

.sim-step-item.active {
  color: hsl(210, 40%, 98%);
  font-weight: 700;
}

.sim-step-item.active code {
  color: hsl(242, 85%, 80%);
}

.sim-step-item.success {
  color: hsl(142, 70%, 70%);
  font-weight: 700;
}

.sim-step-item.success code {
  color: hsl(142, 70%, 70%);
}

.step-check {
  font-weight: bold;
  visibility: hidden;
  font-family: sans-serif;
}

.sim-step-item.success .step-check {
  visibility: visible;
}

.hero-card-compact {
  padding: 18px !important;
  border-radius: var(--border-radius-lg) !important;
  background: linear-gradient(145deg, hsl(244, 47%, 16%), hsl(244, 47%, 9%)) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.hero-card-compact h3 {
  margin: 0 0 6px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hero-card-compact p {
  font-size: 11.5px !important;
  color: hsl(242, 85%, 85%) !important;
  margin: 0 0 12px !important;
  line-height: 1.4 !important;
}

.host-box-compact {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-top: 8px !important;
  padding: 8px 12px !important;
  border-radius: var(--border-radius-sm) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  font-size: 11px !important;
}

.host-box-compact small {
  color: hsl(242, 85%, 80%) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.03em;
}

.host-box-compact code {
  overflow-wrap: anywhere !important;
  font-family: ui-monospace, SFMono-Regular, Monaco, monospace !important;
  color: #fff !important;
  font-size: 11px !important;
  background: transparent !important;
  padding: 0 !important;
}

@keyframes pulsePurple {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(88, 80, 236, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(88, 80, 236, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(88, 80, 236, 0);
  }
}

/* Webstore Promotional Banner */
.webstore-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, hsl(222, 47%, 9%) 0%, hsl(222, 40%, 15%) 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(88, 80, 236, 0.25) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 22px 26px !important;
  border-radius: var(--border-radius-lg) !important;
  margin-bottom: 24px;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.banner-brand-icon img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(88, 80, 236, 0.35);
}

.banner-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banner-tag {
  align-self: flex-start;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(88, 80, 236, 0.2);
  color: hsl(242, 85%, 80%);
  padding: 2px 8px;
  border-radius: 99px;
}

.webstore-banner h3 {
  margin: 0 !important;
  font-size: 16px !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.webstore-banner p {
  margin: 0 !important;
  font-size: 12px !important;
  color: hsl(215, 20%, 65%) !important;
  line-height: 1.45 !important;
  max-width: 600px;
}

.banner-install-btn {
  background: var(--primary-color) !important;
  color: #fff !important;
  transition: var(--transition) !important;
  white-space: nowrap;
  padding: 12px 22px !important;
  font-weight: 700 !important;
  border-radius: var(--border-radius-sm) !important;
  box-shadow: 0 4px 12px rgba(88, 80, 236, 0.3);
  text-decoration: none;
  font-size: 13.5px;
}

.banner-install-btn:hover {
  background: var(--primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(88, 80, 236, 0.4);
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .shell {
    padding: 16px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .topnav {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .hero h1 {
    font-size: 32px;
  }
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .example-table {
    display: block;
    overflow-x: auto;
  }
  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .webstore-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 20px !important;
  }
  .banner-content {
    align-items: flex-start;
    gap: 14px;
  }
  .banner-brand-icon img {
    width: 42px;
    height: 42px;
  }
  .banner-install-btn {
    width: 100%;
    text-align: center;
  }
}

/* Better UI for demo.html Sandbox */

.demo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.demo-toolbar strong {
  font-size: 16px;
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.demo-toolbar p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
}

.demo-toolbar button {
  white-space: nowrap;
}

.sandbox-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

@media (min-width: 900px) {
  .sandbox-container {
    grid-template-columns: 1fr 60px 1fr;
    gap: 0;
    align-items: stretch;
  }
}

.sandbox-panel {
  display: flex;
  flex-direction: column;
}

.panel-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

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

.panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  flex-grow: 1;
}

.panel-icon {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary-color);
}

.output-card-theme .panel-icon {
  background: var(--success-bg);
  color: var(--success-text);
}

.panel-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 20px 0;
}

.sandbox-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.sandbox-field-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.field-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.field-selector-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: var(--text-light);
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
}

.sandbox-field-group input.field,
.sandbox-field-group textarea.field,
.sandbox-field-group .editable {
  width: 100%;
  font-family: var(--font-family);
  font-size: 14.5px;
  color: var(--text-main);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-md);
  padding: 12px 14px;
  outline: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.sandbox-field-group input.field:focus,
.sandbox-field-group textarea.field:focus,
.sandbox-field-group .editable:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(88, 80, 236, 0.15);
}

.sandbox-field-group textarea.field {
  min-height: 80px;
  resize: vertical;
}

.sandbox-field-group .editable {
  min-height: 80px;
  overflow-y: auto;
}

.sandbox-field-group .buttons {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.sandbox-field-group .buttons button {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  font-weight: 600;
  box-shadow: none;
}

.sandbox-field-group .buttons button:not(.secondary) {
  background: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid transparent;
}

.sandbox-field-group .buttons button:not(.secondary):hover {
  background: var(--primary-color);
  color: #fff;
}

.sandbox-field-group .buttons button.secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.sandbox-field-group .buttons button.secondary:hover {
  background: var(--border-color);
  color: var(--text-main);
}

.sandbox-divider {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
}

.sandbox-divider .divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.sandbox-divider .divider-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  border-radius: 99px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sandbox-divider .arrow-icon {
  display: inline-block;
  font-size: 14px;
  color: var(--primary-color);
  transform: rotate(90deg);
}

@media (min-width: 900px) {
  .sandbox-divider {
    flex-direction: column;
    padding: 24px 0;
  }
  .sandbox-divider .divider-line {
    width: 1px;
    height: 100%;
  }
  .sandbox-divider .arrow-icon {
    transform: rotate(0deg);
  }
}

.output-preview-group {
  background: rgba(16, 185, 129, 0.02);
  border-radius: var(--border-radius-md);
  padding: 14px;
  border: 1px dashed rgba(16, 185, 129, 0.2);
}

.output-preview-group .field-info {
  margin-bottom: 8px;
}

.output-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.output-preview-box {
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  min-height: 40px;
  display: flex;
  align-items: center;
  word-break: break-all;
}

.output-preview-box:empty::before {
  content: "(Empty output)";
  color: var(--text-light);
  font-style: italic;
  font-weight: 400;
}

.console-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-red { background: #ef4444; }
.terminal-yellow { background: #f59e0b; }
.terminal-green { background: #10b981; }

.badge-terminal {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.console-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}
