    /* Regex Lab theme variables - matches site theme */
    .regex-lab-layout {
      --regex-bg: #ffffff;
      --regex-card-bg: #f8f9fa;
      --regex-card-border: #e1e4e8;
      --regex-accent: #0969da;
      --regex-accent-soft: rgba(9, 105, 218, 0.1);
      --regex-accent-strong: #0550ae;
      --regex-text-main: #24292f;
      --regex-text-muted: #57606a;
      --regex-danger: #d1242f;
      --regex-success: #1a7f37;
      --regex-radius-lg: 8px;
      --regex-radius-xl: 12px;
      --regex-shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
      --regex-border-subtle: 1px solid #d0d7de;
      --regex-transition-fast: 0.15s ease;
      --regex-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
      --regex-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
      --regex-input-bg: #ffffff;
      --regex-input-border: #d0d7de;
      --regex-fieldset-bg: #f6f8fa;
    }

    /* Override theme's page container width for regex lab */
    .page,
    .content,
    main .container,
    article.page,
    .single .content {
      max-width: 1400px !important;
    }

    .regex-lab-layout * {
      box-sizing: border-box;
    }

    /* Commented out global html/body styles - theme handles these
    html, body {
      margin: 0;
      padding: 0;
      color: var(--text-main);
      font-family: var(--font-sans);
      -webkit-font-smoothing: antialiased;
    }
    */

/*    body {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }*/

    .regex-lab-layout a {
      color: var(--regex-accent);
      text-decoration: none;
    }

    .regex-lab-layout a:hover {
      text-decoration: underline;
      color: var(--regex-accent-strong);
    }

/*    header {
      border-bottom: var(--border-subtle);
      background: rgba(2, 6, 23, 0.95);
      backdrop-filter: blur(18px);
      position: sticky;
      top: 0;
      z-index: 20;
    }*/

/*    .nav {
      max-width: 1120px;
      margin: 0 auto;
      padding: 0.75rem 1.25rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }*/

    .brand {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .brand-mark {
      width: 34px;
      height: 34px;
      border-radius: 999px;
      background: radial-gradient(circle at 30% 10%, #38bdf8, #0f172a 55%, #020617);
      box-shadow:
        0 0 16px rgba(56, 189, 248, 0.8),
        0 0 40px rgba(250, 204, 21, 0.4);
      position: relative;
      overflow: hidden;
    }

    .brand-mark::after {
      content: "";
      position: absolute;
      inset: 4px;
      border-radius: inherit;
      border: 1px solid rgba(226, 232, 240, 0.15);
    }

    .brand-text {
      display: flex;
      flex-direction: column;
    }

    .brand-name {
      font-weight: 700;
      letter-spacing: 0.06em;
      font-size: 0.95rem;
      text-transform: uppercase;
    }

    .brand-tagline {
      font-size: 0.7rem;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .nav-links {
      display: flex;
      gap: 1.25rem;
      font-size: 0.9rem;
    }

    .nav-link {
      color: var(--text-muted);
      text-decoration: none;
      position: relative;
      padding-bottom: 2px;
    }

    .nav-link::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: 0;
      width: 0;
      height: 2px;
      background: linear-gradient(90deg, var(--accent), var(--accent-strong));
      transition: width var(--transition-fast);
      border-radius: 999px;
    }

    .nav-link:hover {
      color: var(--text-main);
    }

    .nav-link:hover::after {
      width: 100%;
    }

    main {
      flex: 1;
    }

/*    .page {
      max-width: 1120px;
      margin: 0 auto;
      padding: 1.75rem 1.25rem 3rem;
    }*/

    .hero {
      display: grid;
      grid-template-columns: minmax(0, 1.5fr);
      gap: 1.5rem;
      align-items: center;
      margin-bottom: 1rem;
    }

    .hero-title {
      font-size: clamp(1.9rem, 2.35rem, 2.6rem);
      line-height: 1.1;
      letter-spacing: -0.04em;
      margin: 0 0 0.75rem;
    }

    .hero-title span.accent {
      background: linear-gradient(90deg, var(--accent), var(--accent-strong));
      -webkit-background-clip: text;
      color: transparent;
    }

    .hero-subtitle {
      margin: 0 0 1rem;
      color: var(--text-muted);
      font-size: 0.95rem;
      max-width: 36rem;
    }

    .hero-badges {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin-bottom: 1.1rem;
    }

    .badge {
      padding: 0.2rem 0.6rem;
      border-radius: 999px;
      font-size: 0.75rem;
      border: 1px solid rgba(148, 163, 184, 0.4);
      background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 55%);
      color: var(--text-muted);
    }

    .hero-cta {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      align-items: center;
      margin-bottom: 0.5rem;
    }

    .btn-primary {
      border: none;
      cursor: pointer;
      padding: 0.6rem 1.1rem;
      border-radius: 999px;
      font-size: 0.9rem;
      font-weight: 600;
      background: radial-gradient(circle at top left, var(--accent-strong), var(--accent));
      color: #020617;
      box-shadow:
        0 0 20px rgba(56, 189, 248, 0.7),
        0 0 36px rgba(250, 204, 21, 0.35);
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
    }

    .btn-primary:hover {
      transform: translateY(-1px);
      box-shadow:
        0 0 28px rgba(56, 189, 248, 0.9),
        0 0 48px rgba(250, 204, 21, 0.5);
    }

    .btn-ghost {
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.4);
      padding: 0.5rem 0.9rem;
      font-size: 0.85rem;
      background: rgba(15, 23, 42, 0.7);
      color: var(--text-muted);
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      cursor: pointer;
    }

    .hero-meta {
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    /* Ad slots */
    .ad-slot {
      border-radius: var(--radius-lg);
      margin: 1.25rem 0;
      border: 1px dashed rgba(148, 163, 184, 0.35);
      background: radial-gradient(circle at top, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.9));
      min-height: 80px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.75rem;
      color: var(--text-muted);
    }

    .ad-slot span {
      opacity: 0.7;
    }

    .regex-lab-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 1rem;
      align-items: flex-start;
      margin-bottom: 2rem;
      width: 100%;
      max-width: 100%;
    }

    /* Natural Language Helper card spans full width */
    .regex-lab-nl-card {
      grid-column: 1 / -1;
    }

    @media (max-width: 900px) {
      .regex-lab-layout {
        grid-template-columns: minmax(0, 1fr);
      }

      .regex-lab-nl-card {
        grid-column: 1;
      }
    }

    .regex-lab-card {
      border-radius: var(--regex-radius-xl);
      border: var(--regex-border-subtle);
      background: var(--regex-card-bg);
      box-shadow: var(--regex-shadow-soft);
      padding: 1.15rem 1rem 1.2rem;
      position: relative;
      overflow: hidden;
    }

    .regex-lab-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 0.75rem;
    }

    .regex-lab-card-title {
      font-size: 0.95rem;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--regex-text-main);
    }

    .regex-lab-card-subtitle {
      font-size: 0.8rem;
      color: var(--regex-text-muted);
    }

    .regex-lab-pill {
      padding: 0.15rem 0.6rem;
      border-radius: 999px;
      font-size: 0.7rem;
      border: 1px solid var(--regex-input-border);
      background: var(--regex-accent-soft);
      color: var(--regex-accent-strong);
      font-weight: 500;
    }

    .regex-lab-form-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 0.75rem;
      position: relative;
      z-index: 1;
    }

    .regex-lab-fieldset {
      border-radius: var(--regex-radius-lg);
      border: 1px solid var(--regex-input-border);
      padding: 0.6rem 0.6rem 0.7rem;
      background: var(--regex-fieldset-bg);
    }

    .regex-lab-fieldset legend {
      padding: 0 0.25rem;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--regex-text-muted);
      font-weight: 600;
    }

    .regex-lab-field {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      margin-bottom: 0.45rem;
    }

    .regex-lab-field:last-child {
      margin-bottom: 0;
    }

    .regex-lab-field-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }

    .regex-lab-layout label {
      font-size: 0.75rem;
      color: var(--regex-text-main);
      font-weight: 500;
    }

    .regex-lab-layout input[type="text"],
    .regex-lab-layout select,
    .regex-lab-layout textarea {
      width: 100%;
      font-family: var(--regex-font-mono);
      font-size: 0.8rem;
      padding: 0.5rem 0.75rem;
      border-radius: 6px;
      border: 1px solid var(--regex-input-border);
      background: var(--regex-input-bg);
      color: var(--regex-text-main);
      outline: none;
      transition: border-color var(--regex-transition-fast), box-shadow var(--regex-transition-fast);
    }

    .regex-lab-layout input[type="text"]:focus,
    .regex-lab-layout select:focus,
    .regex-lab-layout textarea:focus {
      border-color: var(--regex-accent);
      box-shadow: 0 0 0 3px var(--regex-accent-soft);
      outline: none;
    }

    .regex-lab-layout textarea {
      min-height: 140px;
      resize: vertical;
      line-height: 1.4;
    }

    .regex-lab-checkbox-group {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      font-size: 0.8rem;
    }

    .regex-lab-checkbox-item {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      color: var(--regex-text-main);
    }

    .regex-lab-checkbox-item input {
      accent-color: var(--regex-accent);
    }

    .regex-lab-hint {
      font-size: 0.7rem;
      color: var(--regex-text-muted);
    }

    .regex-lab-hint strong {
      color: var(--regex-accent);
      font-weight: 600;
    }

    .regex-lab-section-label {
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--regex-text-muted);
      margin-bottom: 0.35rem;
      font-weight: 600;
    }

    .regex-lab-pill-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.4rem;
    }

    .regex-lab-pill-btn {
      border-radius: 6px;
      border: 1px solid var(--regex-input-border);
      padding: 0.4rem 0.75rem;
      font-size: 0.75rem;
      background: var(--regex-input-bg);
      color: var(--regex-text-main);
      cursor: pointer;
      font-weight: 500;
      transition: all var(--regex-transition-fast);
    }

    .regex-lab-pill-btn:hover {
      background: var(--regex-accent);
      border-color: var(--regex-accent);
      color: #ffffff;
    }

    /* Match + error + highlight */
    .regex-lab-match-summary {
      font-size: 0.8rem;
      color: var(--regex-text-muted);
      margin-bottom: 0.35rem;
    }

    .regex-lab-match-summary strong {
      color: var(--regex-accent);
      font-weight: 600;
    }

    .regex-lab-regex-error {
      font-size: 0.78rem;
      color: var(--regex-danger);
      margin-bottom: 0.4rem;
      font-weight: 500;
    }

    .regex-lab-highlight-preview {
      font-family: var(--regex-font-mono);
      font-size: 0.8rem;
      background: var(--regex-fieldset-bg);
      border-radius: 6px;
      border: 1px solid var(--regex-input-border);
      padding: 0.75rem;
      min-height: 100px;
      line-height: 1.5;
      white-space: pre-wrap;
      word-break: break-word;
      margin-bottom: 0.7rem;
      color: var(--regex-text-main);
    }

    /* STRONGER highlighting for matched parts */
    .regex-lab-highlight-preview mark {
      background: var(--regex-accent-soft);
      color: var(--regex-accent-strong);
      border-radius: 3px;
      padding: 0.1rem 0.2rem;
      font-weight: 600;
      border: 1px solid var(--regex-accent);
    }

    .regex-lab-groups-panel {
      margin-bottom: 0.7rem;
    }

    .regex-lab-groups-container {
      font-size: 0.78rem;
      color: var(--regex-text-muted);
    }

    .groups-scroll {
      max-height: 160px;
      overflow: auto;
      border-radius: 6px;
      border: 1px solid var(--regex-input-border);
      background: var(--regex-input-bg);
    }

    .groups-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.78rem;
    }

    .groups-table th,
    .groups-table td {
      padding: 0.5rem 0.75rem;
      border-bottom: 1px solid var(--regex-input-border);
      text-align: left;
      vertical-align: top;
      color: var(--regex-text-main);
    }

    .groups-table th {
      position: sticky;
      top: 0;
      background: var(--regex-fieldset-bg);
      z-index: 1;
      font-weight: 600;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--regex-text-muted);
    }

    .groups-table tr:last-child td {
      border-bottom: none;
    }

    .groups-table tbody tr:nth-child(even) {
      background: var(--regex-fieldset-bg);
    }

    /* Explanation panel + plain-English summary */
    .regex-lab-explanation-panel {
      border-radius: 6px;
      border: 1px solid var(--regex-input-border);
      background: var(--regex-fieldset-bg);
      padding: 0.75rem;
      max-height: 280px;
      overflow: auto;
      margin-bottom: 0.7rem;
    }

    .regex-lab-regex-summary {
      font-size: 0.8rem;
      color: var(--regex-text-muted);
      margin: 0.35rem 0 0.4rem;
    }

    .regex-lab-regex-summary strong {
      color: var(--regex-accent);
      font-weight: 600;
    }

    .regex-lab-explanation-list {
      list-style: none;
      margin: 0;
      padding: 0;
      font-size: 0.78rem;
    }

    .regex-lab-explanation-list li {
      margin-bottom: 0.25rem;
      display: flex;
      gap: 0.4rem;
    }

    .regex-lab-explanation-token {
      font-family: var(--regex-font-mono);
      font-size: 0.75rem;
      padding: 0.15rem 0.4rem;
      border-radius: 4px;
      background: var(--regex-input-bg);
      border: 1px solid var(--regex-input-border);
      white-space: nowrap;
      color: var(--regex-accent-strong);
      font-weight: 600;
    }

    .regex-lab-explanation-text {
      color: var(--regex-text-muted);
      line-height: 1.5;
    }

    /* Cheat sheet patterns */
    .regex-lab-recipes {
      margin-top: 0.7rem;
      border-radius: 6px;
      border: 1px solid var(--regex-input-border);
      background: var(--regex-fieldset-bg);
      padding: 0.75rem;
    }

    .regex-lab-recipes-title {
      font-size: 0.78rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--regex-text-muted);
      margin-bottom: 0.5rem;
      font-weight: 600;
    }

    .regex-lab-recipes-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0.35rem;
    }

    .recipe-btn {
      border-radius: 6px;
      border: 1px solid var(--regex-input-border);
      background: var(--regex-input-bg);
      color: var(--regex-text-main);
      font-size: 0.75rem;
      padding: 0.5rem 0.75rem;
      cursor: pointer;
      text-align: left;
      flex: 1 1 calc(50% - 0.2rem);
      min-width: 140px;
      font-weight: 500;
      transition: all var(--regex-transition-fast);
    }

    .recipe-btn:hover {
      border-color: var(--regex-accent);
      background: var(--regex-accent-soft);
    }

    .recipe-btn span {
      display: block;
      font-size: 0.7rem;
      color: var(--regex-text-muted);
      margin-top: 0.15rem;
      font-weight: 400;
    }

    @media (max-width: 600px) {
      .recipe-btn {
        flex: 1 1 100%;
      }
    }

    /* Natural-language helper panel */
    .regex-lab-nl-helper {
      position: relative;
      z-index: 1;
    }

    .regex-lab-nl-helper textarea {
      margin-top: 0.5rem;
    }

    .content-section {
      margin-bottom: 2rem;
    }

    .content-section h2 {
      font-size: 1.1rem;
      margin: 0 0 0.5rem;
    }

    .content-section p {
      font-size: 0.9rem;
      color: var(--text-muted);
      max-width: 56rem;
      line-height: 1.6;
    }

    .content-section ul {
      font-size: 0.9rem;
      color: var(--text-muted);
      line-height: 1.6;
      padding-left: 1.2rem;
    }

    .faq-item {
      margin-bottom: 0.8rem;
    }

    .faq-item h3 {
      font-size: 0.95rem;
      margin: 0 0 0.25rem;
    }

    footer {
      border-top: var(--border-subtle);
      background: rgba(2, 6, 23, 0.98);
      padding: 1.3rem 1.25rem 1.5rem;
      margin-top: auto;
    }

    .footer-inner {
      max-width: 1120px;
      margin: 0 auto;
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      align-items: center;
      justify-content: space-between;
      font-size: 0.8rem;
      color: var(--text-muted);
    }

    .footer-links {
      display: flex;
      gap: 0.8rem;
      flex-wrap: wrap;
    }

    .footer-links a {
      color: var(--text-muted);
    }

    .regex-lab-mt-small {
      margin-top: 0.35rem;
    }