/**
 * Manav - stark, premium B2B trust infrastructure theme.
 *
 * This intentionally OVERRIDES the parent /blog/theme.css palette for /manav/*
 * pages. The parent theme is still loaded for its topbar/footer chrome, but
 * the body, type, surfaces and accents below are owned here so the human-
 * signature surface looks like trust infrastructure (Stripe / Linear /
 * Tailscale family) rather than an editorial blog.
 *
 * Existing class names (.m-card, .m-btn, .m-badge, .m-kv, .m-mono, ...) are
 * kept so all existing templates render with zero markup changes.
 *
 * Palette: paper-white surface, near-black text, one accent (electric
 * green for "verified"), one warning (amber), one critical (red). Mono
 * is used everywhere a hash/ID/JSON appears.
 */

/* ══════════════════════════════════════════════
   1. TOKENS
   ══════════════════════════════════════════════ */

:root {
    /* Surfaces - paper-white, near-zero saturation */
    --twc-bg:              #ffffff;
    --twc-surface:         #ffffff;
    --twc-surface-hover:   #fafafa;
    --twc-surface-mute:    #f6f6f6;
    --twc-border:          #ececec;
    --twc-divider:         #f0f0f0;

    /* Text */
    --twc-text:            #0a0a0a;
    --twc-text-secondary:  #525252;
    --twc-text-muted:      #8a8a8a;
    --twc-text-inverse:    #ffffff;

    /* Accent - single electric green for "verified". No purple, no other accents. */
    --twc-accent:          #0ea968;
    --twc-accent-hover:    #0c8f59;
    --twc-accent-light:    rgba(14, 169, 104, 0.08);
    --twc-violet:          #0a0a0a;          /* legacy alias - anything that asked for "violet" gets near-black */
    --twc-violet-light:    rgba(10, 10, 10, 0.05);

    /* Status (used only on the proof / verification badges) */
    --twc-success:         #0ea968;
    --twc-success-light:   rgba(14, 169, 104, 0.10);
    --twc-warning:         #b25e09;
    --twc-warning-light:   rgba(178, 94, 9, 0.10);
    --twc-error:           #c2410c;
    --twc-error-light:     rgba(194, 65, 12, 0.10);
    --twc-critical:        #c2410c;
    --twc-critical-light:  rgba(194, 65, 12, 0.10);
    --twc-highlight:       #0a0a0a;
    --twc-highlight-light: rgba(10, 10, 10, 0.05);

    /* Shadows - almost nothing. Premium B2B uses borders, not shadows. */
    --manav-shadow-sm:     0 0 0 1px var(--twc-border);
    --manav-shadow:        0 0 0 1px var(--twc-border);
    --manav-shadow-lg:     0 8px 28px -16px rgba(0,0,0,0.20);
    --manav-glow:          0 0 0 1px var(--twc-text);

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

    /* Layout - tighter than parent */
    --twc-content-width:  1040px;
    --twc-narrow-width:   720px;
    --twc-header-height:  64px;
    --twc-radius:         10px;
    --twc-radius-sm:      6px;
    --twc-radius-lg:      14px;
    --twc-radius-full:    999px;

    /* Typography - system sans across the board, mono for crypto bits.
       No serif body. No italics. Premium B2B trust feel. */
    --twc-font-ui:         -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
    --twc-font-display:    -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
    --twc-font:            -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
    --twc-font-mono:       'SF Mono', 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
    --twc-font-weight:        400;
    --twc-font-weight-medium: 500;
    --twc-font-weight-bold:   600;

    /* Type scale - tighter, no editorial body sizes */
    --twc-text-xs:    12px;
    --twc-text-sm:    13px;
    --twc-text-base:  15px;
    --twc-text-lg:    17px;
    --twc-text-xl:    20px;
    --twc-text-2xl:   26px;
    --twc-text-3xl:   38px;
    --twc-text-hero:  56px;
    --twc-line-height:       1.55;
    --twc-line-height-tight: 1.15;

    --twc-transition:      120ms ease;
    --twc-transition-slow: 240ms ease;
}

/* ══════════════════════════════════════════════
   2. BASE - override parent body & typography for /manav/* pages.
   These !important overrides are scoped to body to win against parent.
   ══════════════════════════════════════════════ */

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

html { background: var(--twc-bg); }

body {
    background: var(--twc-bg) !important;
    color: var(--twc-text) !important;
    font-family: var(--twc-font-ui) !important;
    font-size: var(--twc-text-base);
    line-height: var(--twc-line-height);
    font-weight: 400;
    font-style: normal !important;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
}

/* Kill parent serif/italic on every text element inside the manav shell */
.m-shell, .m-shell * {
    font-family: var(--twc-font-ui);
    font-style: normal;
}
.m-shell .m-mono, .m-shell .m-tag-mono, .m-shell .m-code, .m-shell pre, .m-shell code {
    font-family: var(--twc-font-mono) !important;
}

img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--twc-text); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color var(--twc-transition); }
a:hover { color: var(--twc-text); border-bottom-color: var(--twc-text); }
button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: transparent; color: inherit; }

/* Override parent topbar/footer chrome for the manav surface */
.m-shell .topbar {
    background: var(--twc-bg) !important;
    border-bottom: 1px solid var(--twc-border) !important;
    backdrop-filter: none !important;
}
.m-shell .topbar a,
.m-shell .topbar .brand,
.m-shell .topbar .nav a {
    color: var(--twc-text) !important;
    font-family: var(--twc-font-ui) !important;
    font-style: normal !important;
    font-weight: 400 !important;
    border-bottom: none !important;
}
.m-shell .topbar .nav a { color: var(--twc-text-secondary) !important; font-size: 13px; }
.m-shell .topbar .nav a:hover, .m-shell .topbar .nav a.active { color: var(--twc-text) !important; }
.m-shell .topbar .brand .dot { background: var(--twc-text) !important; }
.m-shell footer.site {
    background: var(--twc-bg) !important;
    border-top: 1px solid var(--twc-border) !important;
    color: var(--twc-text-muted) !important;
    font-size: 12px;
}
.m-shell footer.site a { color: var(--twc-text-secondary) !important; border-bottom: none !important; }
.m-shell footer.site a:hover { color: var(--twc-text) !important; }

/* App shell */
.m-shell { min-height: 100vh; display: flex; flex-direction: column; }
.m-main  { flex: 1; padding: 56px 0 96px; }
@media (min-width: 720px) { .m-main { padding: 80px 0 120px; } }

.m-container {
    width: 100%;
    max-width: var(--twc-content-width);
    margin: 0 auto;
    padding: 0 22px;
}
@media (min-width: 720px) { .m-container { padding: 0 32px; } }
.m-narrow { max-width: var(--twc-narrow-width); }

.m-section { margin-bottom: 64px; }
@media (min-width: 720px) { .m-section { margin-bottom: 96px; } }

/* ══════════════════════════════════════════════
   3. TYPOGRAPHY (sharp, tight, no italic)
   ══════════════════════════════════════════════ */

.m-eyebrow {
    font-family: var(--twc-font-ui);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--twc-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.m-hero {
    font-family: var(--twc-font-display);
    font-size: clamp(36px, 6vw, var(--twc-text-hero));
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 600;
    color: var(--twc-text);
    margin: 0;
}
.m-hero-light { font-weight: 400; color: var(--twc-text-muted); }
.m-h1 {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-3xl);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 600;
    color: var(--twc-text);
    margin: 0;
}
.m-h2 {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-2xl);
    line-height: 1.15;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: var(--twc-text);
    margin: 0;
}
.m-h3 {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-xl);
    line-height: 1.25;
    letter-spacing: -0.015em;
    font-weight: 500;
    color: var(--twc-text);
    margin: 0;
}
.m-lead {
    font-family: var(--twc-font);
    font-style: normal !important;
    font-size: var(--twc-text-lg);
    line-height: 1.5;
    color: var(--twc-text-secondary);
    max-width: 56ch;
    font-weight: 400;
    margin: 0;
}
.m-muted     { color: var(--twc-text-muted); }
.m-secondary { color: var(--twc-text-secondary); }
.m-mono      { font-family: var(--twc-font-mono); font-size: 0.95em; letter-spacing: -0.01em; }

.m-text-accent { color: var(--twc-accent); }
.m-text-violet { color: var(--twc-text); }   /* legacy alias */

/* ══════════════════════════════════════════════
   4. BUTTONS (sharp, square-ish, no shadow)
   ══════════════════════════════════════════════ */

.m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--twc-radius);
    font-family: var(--twc-font-ui);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.005em;
    transition: all var(--twc-transition);
    border: 1px solid transparent;
    text-align: center;
    min-height: 40px;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.m-btn-primary {
    background: var(--twc-text);
    color: var(--twc-bg);
    border-color: var(--twc-text);
}
.m-btn-primary:hover {
    background: #1a1a1a;
    color: var(--twc-bg);
    border-color: #1a1a1a;
    border-bottom: 1px solid #1a1a1a !important;
}
.m-btn-ghost {
    background: var(--twc-bg);
    color: var(--twc-text);
    border-color: var(--twc-border);
}
.m-btn-ghost:hover { border-color: var(--twc-text); color: var(--twc-text); border-bottom: 1px solid var(--twc-text) !important; }
.m-btn-violet { background: var(--twc-text); color: var(--twc-bg); border-color: var(--twc-text); }
.m-btn-violet:hover { background: #1a1a1a; color: var(--twc-bg); }
.m-btn-warn {
    background: var(--twc-warning);
    color: white;
    border-color: var(--twc-warning);
}
.m-btn-warn:hover { filter: brightness(1.05); color: white; }
.m-btn-block { width: 100%; }
.m-btn-sm { padding: 7px 13px; min-height: 32px; font-size: 12px; border-radius: 8px; }
.m-btn-lg { padding: 14px 26px; min-height: 48px; font-size: 15px; }

/* ══════════════════════════════════════════════
   5. CARDS / SURFACES
   ══════════════════════════════════════════════ */

.m-card {
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    padding: 24px;
    box-shadow: none;
    transition: border-color var(--twc-transition);
}
.m-card-hover { cursor: pointer; }
.m-card-hover:hover { border-color: var(--twc-text); }
.m-card-tight { padding: 18px 20px; }
.m-card-glow { border-color: var(--twc-text); }
.m-card-flat  { border-color: var(--twc-divider); background: var(--twc-surface-mute); }

.m-card-title {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-lg);
    font-weight: 600;
    line-height: 1.3;
    color: var(--twc-text);
    margin-bottom: 6px;
    letter-spacing: -0.012em;
}
.m-card-subtitle {
    font-family: var(--twc-font);
    color: var(--twc-text-secondary);
    font-size: var(--twc-text-sm);
}

/* Grid */
.m-grid    { display: grid; gap: 16px; }
.m-grid-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-grid-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m-grid-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m-grid-6  { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 960px) {
    .m-grid-3, .m-grid-4, .m-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .m-grid-2, .m-grid-3, .m-grid-4, .m-grid-6 { grid-template-columns: 1fr; }
}

.m-stack       { display: flex; flex-direction: column; gap: 16px; }
.m-row         { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.m-row-between { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* ══════════════════════════════════════════════
   6. STATUS BADGES
   ══════════════════════════════════════════════ */

.m-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--twc-radius-full);
    font-family: var(--twc-font-ui);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.4;
    border: 1px solid;
}
.m-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.m-badge-verified  { color: var(--twc-success);  background: var(--twc-success-light);  border-color: var(--twc-success); }
.m-badge-supervised{ color: var(--twc-text);     background: var(--twc-surface-mute);   border-color: var(--twc-text); }
.m-badge-warning   { color: var(--twc-warning);  background: var(--twc-warning-light);  border-color: var(--twc-warning); }
.m-badge-critical  { color: var(--twc-critical); background: var(--twc-critical-light); border-color: var(--twc-critical); }
.m-badge-unverified{ color: var(--twc-text-muted); background: var(--twc-surface-mute); border-color: var(--twc-border); }
.m-badge-info      { color: var(--twc-text);     background: var(--twc-surface-mute);   border-color: var(--twc-border); }

/* ══════════════════════════════════════════════
   7. PRESENCE SCORE
   ══════════════════════════════════════════════ */

.m-score {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--twc-surface-mute);
    border-radius: var(--twc-radius);
    border: 1px solid var(--twc-border);
}
.m-score-num {
    font-family: var(--twc-font-mono);
    font-size: var(--twc-text-2xl);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--twc-text);
}
.m-score-label {
    font-family: var(--twc-font-ui);
    color: var(--twc-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}
.m-score-bar {
    height: 4px;
    border-radius: var(--twc-radius-full);
    background: var(--twc-divider);
    overflow: hidden;
    flex: 1;
    min-width: 80px;
}
.m-score-bar-fill { height: 100%; border-radius: inherit; transition: width 600ms cubic-bezier(.2, .8, .2, 1); }
.m-score-good { background: var(--twc-success) !important; }
.m-score-warn { background: var(--twc-warning) !important; }
.m-score-bad  { background: var(--twc-critical) !important; }

/* ══════════════════════════════════════════════
   8. METRIC TILES
   ══════════════════════════════════════════════ */

.m-metric {
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.m-metric-label {
    font-family: var(--twc-font-ui);
    font-size: 11px;
    color: var(--twc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-weight: 500;
}
.m-metric-value {
    font-family: var(--twc-font-mono);
    font-size: 32px;
    font-weight: 500;
    color: var(--twc-text);
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.m-metric-delta {
    font-family: var(--twc-font);
    font-size: 12px;
    color: var(--twc-text-muted);
}
.m-metric-accent { color: var(--twc-accent); }

/* ══════════════════════════════════════════════
   9. TABLES
   ══════════════════════════════════════════════ */

.m-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--twc-font-ui);
    font-size: 13px;
    background: var(--twc-surface);
}
.m-table th, .m-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--twc-border);
    vertical-align: middle;
    color: var(--twc-text);
}
.m-table th {
    background: var(--twc-surface-mute);
    font-weight: 500;
    color: var(--twc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 11px;
}
.m-table tr:hover td { background: var(--twc-surface-hover); }
.m-table-wrap {
    overflow-x: auto;
    border-radius: var(--twc-radius);
    border: 1px solid var(--twc-border);
    background: var(--twc-surface);
}

/* ══════════════════════════════════════════════
   10. ALERTS
   ══════════════════════════════════════════════ */

.m-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--twc-radius);
    border: 1px solid;
    background: var(--twc-surface);
    margin-bottom: 16px;
    line-height: 1.5;
}
.m-alert-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--twc-font-ui);
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}
.m-alert-title {
    font-family: var(--twc-font-display);
    font-weight: 600;
    margin-bottom: 2px;
    line-height: 1.3;
    color: var(--twc-text);
    font-size: 14px;
}
.m-alert-body {
    color: var(--twc-text-secondary);
    font-size: var(--twc-text-sm);
    font-family: var(--twc-font);
}
.m-alert-warn     { border-color: var(--twc-warning);  background: var(--twc-warning-light); }
.m-alert-warn .m-alert-icon { background: var(--twc-warning); color: white; }
.m-alert-critical { border-color: var(--twc-critical); background: var(--twc-critical-light); }
.m-alert-critical .m-alert-icon { background: var(--twc-critical); color: white; }
.m-alert-success  { border-color: var(--twc-success);  background: var(--twc-success-light); }
.m-alert-success .m-alert-icon { background: var(--twc-success); color: white; }
.m-alert-info     { border-color: var(--twc-text);     background: var(--twc-surface-mute); }
.m-alert-info .m-alert-icon { background: var(--twc-text); color: white; }

/* ══════════════════════════════════════════════
   11. TIMELINE
   ══════════════════════════════════════════════ */

.m-timeline {
    position: relative;
    padding-left: 28px;
    margin-top: 16px;
}
.m-timeline::before {
    content: '';
    position: absolute;
    left: 11px; top: 4px; bottom: 4px;
    width: 1px;
    background: var(--twc-border);
}
.m-timeline-item { position: relative; padding-bottom: 24px; }
.m-timeline-item::before {
    content: '';
    position: absolute;
    left: -22px; top: 6px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--twc-text);
    border: 2px solid var(--twc-bg);
    box-shadow: 0 0 0 1px var(--twc-text);
}
.m-timeline-item.is-warn::before    { background: var(--twc-warning);  box-shadow: 0 0 0 1px var(--twc-warning); }
.m-timeline-item.is-critical::before{ background: var(--twc-critical); box-shadow: 0 0 0 1px var(--twc-critical); }
.m-timeline-item.is-success::before { background: var(--twc-success);  box-shadow: 0 0 0 1px var(--twc-success); }
.m-timeline-time {
    font-family: var(--twc-font-mono);
    font-size: 11px;
    color: var(--twc-text-muted);
    letter-spacing: 0.01em;
    margin-bottom: 4px;
}
.m-timeline-title {
    font-family: var(--twc-font-display);
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--twc-text);
    font-size: 14px;
}
.m-timeline-body {
    color: var(--twc-text-secondary);
    font-size: var(--twc-text-sm);
}

/* ══════════════════════════════════════════════
   12. SIDE-BY-SIDE COMPARE
   ══════════════════════════════════════════════ */

.m-compare {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: stretch;
}
.m-compare-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--twc-text-muted);
}
.m-compare-col {
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    padding: 18px 20px;
}
.m-compare-col.is-bad  { border-color: var(--twc-critical); background: var(--twc-critical-light); }
.m-compare-col.is-good { border-color: var(--twc-success);  background: var(--twc-success-light); }
@media (max-width: 720px) {
    .m-compare { grid-template-columns: 1fr; }
    .m-compare-arrow { transform: rotate(90deg); padding: 8px 0; }
}

/* ══════════════════════════════════════════════
   13. CHIPS, PILLS, KEY-VALUE
   ══════════════════════════════════════════════ */

.m-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--twc-surface-mute);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius-full);
    font-family: var(--twc-font-ui);
    font-size: 12px;
    color: var(--twc-text-secondary);
    letter-spacing: 0.01em;
}

.m-kv {
    display: flex;
    gap: 12px;
    align-items: baseline;
    font-family: var(--twc-font);
    font-size: var(--twc-text-sm);
    line-height: 1.5;
}
.m-kv-label {
    font-family: var(--twc-font-ui);
    color: var(--twc-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 6rem;
    font-weight: 500;
}
.m-kv-val { color: var(--twc-text); word-break: break-all; }

.m-tag-mono {
    font-family: var(--twc-font-mono);
    font-size: 12px;
    color: var(--twc-text);
    background: var(--twc-surface-mute);
    border: 1px solid var(--twc-border);
    border-radius: 5px;
    padding: 2px 7px;
    letter-spacing: -0.01em;
}

/* ══════════════════════════════════════════════
   14. AVATAR
   ══════════════════════════════════════════════ */

.m-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--twc-text);
    color: var(--twc-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--twc-font-ui);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.m-avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.m-avatar-lg { width: 56px; height: 56px; font-size: 16px; }

/* ══════════════════════════════════════════════
   15. FORMS
   ══════════════════════════════════════════════ */

.m-input, .m-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    color: var(--twc-text);
    font-family: var(--twc-font);
    font-size: var(--twc-text-base);
    line-height: 1.4;
    transition: border-color var(--twc-transition);
}
.m-input:focus, .m-textarea:focus {
    outline: none;
    border-color: var(--twc-text);
    box-shadow: none;
}
.m-textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
.m-label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--twc-font-ui);
    font-size: var(--twc-text-sm);
    color: var(--twc-text-secondary);
    font-weight: 500;
}

/* ══════════════════════════════════════════════
   16. CODE / JSON
   ══════════════════════════════════════════════ */

.m-code {
    font-family: var(--twc-font-mono) !important;
    background: #0a0a0a;
    color: #e8e8e8;
    border: 1px solid #0a0a0a;
    border-radius: var(--twc-radius);
    padding: 18px 20px;
    font-size: 12.5px;
    line-height: 1.65;
    overflow-x: auto;
    white-space: pre;
    letter-spacing: -0.005em;
}
.m-code-light {
    background: var(--twc-surface-mute);
    color: var(--twc-text);
    border-color: var(--twc-border);
}
.m-code .tk-key   { color: #7dd3fc; }
.m-code .tk-str   { color: #86efac; }
.m-code .tk-num   { color: #fbbf24; }
.m-code .tk-cmt   { color: #71717a; }

/* ══════════════════════════════════════════════
   17. RISK CHIPS
   ══════════════════════════════════════════════ */

.m-risk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: var(--twc-radius-sm);
    font-family: var(--twc-font-ui);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    border: 1px solid;
}
.m-risk-low  { color: var(--twc-success);  background: var(--twc-success-light);  border-color: var(--twc-success); }
.m-risk-med  { color: var(--twc-warning);  background: var(--twc-warning-light);  border-color: var(--twc-warning); }
.m-risk-high { color: var(--twc-critical); background: var(--twc-critical-light); border-color: var(--twc-critical); }
.m-risk-crit { color: white; background: var(--twc-critical); border-color: var(--twc-critical); }

/* ══════════════════════════════════════════════
   18. PROOF BADGE - the showpiece
   ══════════════════════════════════════════════ */

.m-proof-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 56px 32px;
    border-radius: var(--twc-radius-lg);
    border: 1px solid;
    text-align: center;
    background: var(--twc-surface);
}
.m-proof-hero-mark {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 600; line-height: 1;
    color: white;
}
.m-proof-hero-title {
    font-family: var(--twc-font-display);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.m-proof-hero-sub {
    font-family: var(--twc-font-mono);
    font-size: 13px;
    color: var(--twc-text-muted);
    letter-spacing: -0.01em;
}
.m-proof-hero.is-verified   { border-color: var(--twc-success); }
.m-proof-hero.is-verified   .m-proof-hero-mark  { background: var(--twc-success); }
.m-proof-hero.is-verified   .m-proof-hero-title { color: var(--twc-success); }
.m-proof-hero.is-supervised { border-color: var(--twc-text); }
.m-proof-hero.is-supervised .m-proof-hero-mark  { background: var(--twc-text); }
.m-proof-hero.is-supervised .m-proof-hero-title { color: var(--twc-text); }
.m-proof-hero.is-flagged    { border-color: var(--twc-critical); }
.m-proof-hero.is-flagged    .m-proof-hero-mark  { background: var(--twc-critical); }
.m-proof-hero.is-flagged    .m-proof-hero-title { color: var(--twc-critical); }
.m-proof-hero.is-unverified { border-color: var(--twc-border); }
.m-proof-hero.is-unverified .m-proof-hero-mark  { background: var(--twc-text-muted); }
.m-proof-hero.is-unverified .m-proof-hero-title { color: var(--twc-text-muted); }

/* Legacy (.m-proof-badge) - kept so older templates render */
.m-proof-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 48px;
    border-radius: var(--twc-radius);
    border: 1px solid;
    text-align: center;
}
.m-proof-badge-title {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-2xl);
    font-weight: 600;
    letter-spacing: -0.01em;
}
.m-proof-badge-sub {
    font-family: var(--twc-font-mono);
    font-size: var(--twc-text-sm);
    color: var(--twc-text-secondary);
}
.m-proof-verified  { border-color: var(--twc-success);  background: var(--twc-success-light);  color: var(--twc-success); }
.m-proof-supervised{ border-color: var(--twc-text);     background: var(--twc-surface-mute);   color: var(--twc-text); }
.m-proof-flagged   { border-color: var(--twc-critical); background: var(--twc-critical-light); color: var(--twc-critical); }
.m-proof-unverified{ border-color: var(--twc-border);   background: var(--twc-surface-mute);   color: var(--twc-text-muted); }

/* ══════════════════════════════════════════════
   19. CHARTS
   ══════════════════════════════════════════════ */

.m-chart-bar         { fill: var(--twc-text); }
.m-chart-bar.is-warn { fill: var(--twc-warning); }
.m-chart-bar.is-bad  { fill: var(--twc-critical); }
.m-chart-axis        { stroke: var(--twc-border); }
.m-chart-text {
    fill: var(--twc-text-muted);
    font-size: 11px;
    font-family: var(--twc-font-ui);
}

/* ══════════════════════════════════════════════
   20. TRUST STRIP (homepage / footer-ish)
   ══════════════════════════════════════════════ */

.m-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 28px;
    padding: 18px 22px;
    border-top: 1px solid var(--twc-border);
    border-bottom: 1px solid var(--twc-border);
    background: var(--twc-surface-mute);
    border-radius: 0;
    margin: 24px 0;
}
.m-trust-item {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--twc-font-ui);
    font-size: 12px;
    color: var(--twc-text-secondary);
    letter-spacing: 0.01em;
}
.m-trust-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--twc-success);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   21. INLINE DEMO STAGE (homepage hero demo)
   ══════════════════════════════════════════════ */

.m-stage {
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius-lg);
    overflow: hidden;
}
.m-stage-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: var(--twc-surface-mute);
    border-bottom: 1px solid var(--twc-border);
    font-family: var(--twc-font-mono);
    font-size: 12px;
    color: var(--twc-text-muted);
}
.m-stage-dots {
    display: inline-flex; gap: 6px;
}
.m-stage-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0e0e0; }
.m-stage-body { padding: 32px; }
.m-stage-action {
    display: flex; flex-direction: column; gap: 4px;
    padding: 18px 20px;
    background: var(--twc-surface-mute);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
}
.m-stage-action-label { font-size: 11px; color: var(--twc-text-muted); text-transform: uppercase; letter-spacing: 0.10em; font-weight: 500; }
.m-stage-action-title { font-size: var(--twc-text-lg); font-weight: 500; color: var(--twc-text); letter-spacing: -0.012em; }
.m-stage-action-meta  { font-family: var(--twc-font-mono); font-size: 12px; color: var(--twc-text-muted); margin-top: 4px; }

/* ══════════════════════════════════════════════
   22. UTILITIES
   ══════════════════════════════════════════════ */

.m-spacer-2  { height: 8px;  }
.m-spacer-4  { height: 16px; }
.m-spacer-8  { height: 32px; }
.m-spacer-12 { height: 48px; }
.m-text-center { text-align: center; }
.m-hidden { display: none !important; }
.m-inline { display: inline-flex; align-items: center; gap: 8px; }
.m-rule   { border: 0; border-top: 1px solid var(--twc-border); margin: 20px 0; }
.m-cta-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Animation */
@keyframes m-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.m-anim { animation: m-fade-up 350ms ease both; }

/* Mobile tweaks */
@media (max-width: 640px) {
    .m-main { padding: 40px 0 64px; }
    .m-section { margin-bottom: 56px; }
}

/* ══════════════════════════════════════════════
   23. DEMO TOUR SHELL  (top + bottom navigation,
       progress dots, share affordance, takeaway chip)
   ══════════════════════════════════════════════ */

.m-tour-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: -56px calc(50% - 50vw) 40px;
    padding: 0;
    background: color-mix(in srgb, var(--twc-bg) 92%, transparent);
    border-bottom: 1px solid var(--twc-border);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
}
@media (min-width: 720px) { .m-tour-nav { margin-top: -80px; } }
.m-tour-nav-inner {
    max-width: var(--twc-content-width);
    margin: 0 auto;
    padding: 12px 22px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    align-items: center;
}
@media (min-width: 720px) { .m-tour-nav-inner { padding: 14px 32px; } }
@media (max-width: 720px) {
    .m-tour-nav-inner { grid-template-columns: 1fr; gap: 10px; padding: 10px 18px; }
    .m-tour-nav-meta { order: 1; }
    .m-tour-nav-progress { order: 2; justify-self: start; }
    .m-tour-nav-actions { order: 3; justify-self: stretch; }
    .m-tour-nav-actions .m-btn { flex: 1; }
}
.m-tour-nav-meta {
    display: flex; flex-direction: column; gap: 2px;
    font-family: var(--twc-font-ui);
    line-height: 1.2;
}
.m-tour-nav-label {
    font-size: 11px;
    color: var(--twc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.10em;
    font-weight: 500;
}
.m-tour-nav-pos {
    font-family: var(--twc-font-mono);
    font-size: 13px;
    color: var(--twc-text);
    letter-spacing: -0.01em;
}
.m-tour-nav-progress {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-self: center;
}
.m-tour-dot {
    width: 16px; height: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    border: none !important;
    border-bottom: none !important;
}
.m-tour-dot span {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--twc-divider);
    transition: all 200ms ease;
}
.m-tour-dot.is-done span    { background: var(--twc-text-muted); }
.m-tour-dot.is-current span { width: 22px; height: 6px; border-radius: 3px; background: var(--twc-accent); }
.m-tour-dot:hover span      { background: var(--twc-text); transform: scale(1.2); }
.m-tour-dot.is-current:hover span { transform: none; background: var(--twc-accent); }
.m-tour-nav-actions {
    display: inline-flex; gap: 8px; align-items: center; justify-self: end;
}

.m-tour-foot {
    background: var(--twc-surface-mute);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius-lg);
    margin-top: 64px;
    overflow: hidden;
}
.m-tour-foot-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 28px 32px;
}
@media (max-width: 720px) {
    .m-tour-foot-inner { grid-template-columns: 1fr; }
}
.m-tour-foot-title {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-top: 6px;
    color: var(--twc-text);
}

.m-takeaway {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--twc-radius-full);
    background: var(--twc-surface-mute);
    border: 1px solid var(--twc-border);
    margin: -4px 0 28px;
    font-family: var(--twc-font-ui);
    font-size: var(--twc-text-sm);
    max-width: 100%;
}
.m-takeaway-tag {
    font-size: 10px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--twc-accent);
    font-weight: 600;
}
.m-takeaway-body { color: var(--twc-text); font-weight: 400; }

/* ══════════════════════════════════════════════
   24. DEMO INDEX - branch tiles, tour cards
   ══════════════════════════════════════════════ */

.m-branch-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
@media (max-width: 880px) { .m-branch-grid { grid-template-columns: 1fr; } }

.m-branch-tile {
    position: relative;
    display: flex; flex-direction: column;
    gap: 12px;
    padding: 24px 24px 22px;
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    background: var(--twc-surface);
    transition: transform 220ms ease, border-color var(--twc-transition), background var(--twc-transition);
    overflow: hidden;
    border-bottom: 1px solid var(--twc-border) !important;
}
.m-branch-tile:hover {
    border-color: var(--twc-text) !important;
    transform: translateY(-2px);
    background: var(--twc-surface);
    color: var(--twc-text);
}
.m-branch-tile::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 60%, var(--twc-accent-light) 100%);
    opacity: 0; transition: opacity 240ms ease;
    pointer-events: none;
}
.m-branch-tile:hover::after { opacity: 1; }
.m-branch-tile .m-eyebrow { color: var(--twc-text-muted); }
.m-branch-tile-title {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-xl);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--twc-text);
}
.m-branch-tile-desc { color: var(--twc-text-secondary); font-size: var(--twc-text-sm); line-height: 1.5; }
.m-branch-tile-meta {
    display: inline-flex; gap: 8px; flex-wrap: wrap;
    font-family: var(--twc-font-mono);
    font-size: 11px;
    color: var(--twc-text-muted);
}
.m-branch-tile-go {
    margin-top: auto;
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 500;
    color: var(--twc-accent);
    letter-spacing: -0.005em;
}

.m-stat-strip {
    display: grid; grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    background: var(--twc-surface);
    overflow: hidden;
}
@media (max-width: 720px) { .m-stat-strip { grid-template-columns: repeat(2, 1fr); } }
.m-stat-strip-cell {
    padding: 22px 24px;
    border-right: 1px solid var(--twc-border);
    display: flex; flex-direction: column; gap: 4px;
}
.m-stat-strip-cell:last-child { border-right: none; }
@media (max-width: 720px) {
    .m-stat-strip-cell:nth-child(2) { border-right: none; }
    .m-stat-strip-cell:nth-child(-n+2) { border-bottom: 1px solid var(--twc-border); }
}
.m-stat-strip-num {
    font-family: var(--twc-font-mono);
    font-size: 28px; font-weight: 500;
    letter-spacing: -0.03em; line-height: 1;
    color: var(--twc-text);
}
.m-stat-strip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--twc-text-muted);
    font-weight: 500;
}

.m-demo-card {
    position: relative;
    display: flex; flex-direction: column; gap: 12px;
    padding: 22px 22px 18px;
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    background: var(--twc-surface);
    transition: border-color var(--twc-transition), transform 220ms ease, background var(--twc-transition);
    color: var(--twc-text);
    text-decoration: none;
    border-bottom: 1px solid var(--twc-border) !important;
    overflow: hidden;
}
.m-demo-card:hover {
    border-color: var(--twc-text) !important;
    color: var(--twc-text);
    transform: translateY(-2px);
}
.m-demo-card-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--twc-border);
    background: var(--twc-surface-mute);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--twc-text);
}
.m-demo-card-title {
    font-family: var(--twc-font-display);
    font-size: var(--twc-text-lg);
    font-weight: 600;
    letter-spacing: -0.015em;
}
.m-demo-card-oneline { color: var(--twc-text-secondary); font-size: var(--twc-text-sm); line-height: 1.5; min-height: 2.5em; }
.m-demo-card-footer {
    display: inline-flex; align-items: center; gap: 10px;
    margin-top: auto;
    font-size: 12px;
    color: var(--twc-text-muted);
    font-family: var(--twc-font-mono);
}
.m-demo-card-go {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 500;
    color: var(--twc-accent);
    margin-left: auto;
}

/* ══════════════════════════════════════════════
   25. SCENE / MOTION - used by detection demos
   ══════════════════════════════════════════════ */

@keyframes m-fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-slide-up  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes m-pop       { 0% { transform: scale(0.94); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(1); } }
@keyframes m-pulse     { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.85); } }
@keyframes m-flash-bad { 0% { box-shadow: 0 0 0 0 rgba(194,65,12,0.55); } 60% { box-shadow: 0 0 0 16px rgba(194,65,12,0); } 100% { box-shadow: 0 0 0 0 rgba(194,65,12,0); } }
@keyframes m-flash-ok  { 0% { box-shadow: 0 0 0 0 rgba(14,169,104,0.55); } 60% { box-shadow: 0 0 0 16px rgba(14,169,104,0); } 100% { box-shadow: 0 0 0 0 rgba(14,169,104,0); } }
@keyframes m-ekg       { 0% { stroke-dashoffset: 1000; } 100% { stroke-dashoffset: 0; } }
@keyframes m-shake     { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes m-marquee   { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes m-spin      { to { transform: rotate(360deg); } }
@keyframes m-blink     { 50% { opacity: 0; } }

.m-anim         { animation: m-slide-up 380ms cubic-bezier(.2,.7,.2,1) both; }
.m-anim-pop     { animation: m-pop 420ms cubic-bezier(.2,.7,.2,1) both; }
.m-anim-fade    { animation: m-fade-in 320ms ease both; }
.m-flash-crit   { animation: m-flash-bad 900ms ease-out; }
.m-flash-good   { animation: m-flash-ok 900ms ease-out; }
.m-shake        { animation: m-shake 320ms ease-in-out 2; }

.m-pulse-dot {
    position: relative;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--twc-accent);
    display: inline-block;
}
.m-pulse-dot::before {
    content: '';
    position: absolute; inset: -4px;
    border-radius: 50%;
    background: var(--twc-accent);
    opacity: 0.45;
    animation: m-pulse 1.6s ease-in-out infinite;
}
.m-pulse-dot.is-warn { background: var(--twc-warning); }
.m-pulse-dot.is-warn::before { background: var(--twc-warning); }
.m-pulse-dot.is-crit { background: var(--twc-critical); }
.m-pulse-dot.is-crit::before { background: var(--twc-critical); }

/* The "scene" container is just a flex column that animates its
   children in sequence when `.is-playing` is added. JS adds the
   `.is-playing` class which triggers staggered slide-up on .m-scene-step. */
.m-scene { display: flex; flex-direction: column; gap: 16px; }
.m-scene-step { opacity: 0; transform: translateY(10px); transition: opacity 420ms ease, transform 420ms ease; }
.m-scene-step.is-on { opacity: 1; transform: none; }
.m-scene-step.is-flash { animation: m-flash-bad 900ms ease-out; }

/* Stage with controls - autoplay / pause / replay */
.m-stage-pro {
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius-lg);
    overflow: hidden;
}
.m-stage-pro-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    background: var(--twc-surface-mute);
    border-bottom: 1px solid var(--twc-border);
    font-family: var(--twc-font-mono);
    font-size: 12px;
    color: var(--twc-text-muted);
}
.m-stage-pro-bar .left, .m-stage-pro-bar .right {
    display: inline-flex; align-items: center; gap: 10px;
}
.m-stage-pro-body { padding: 28px 32px; }
@media (max-width: 720px) { .m-stage-pro-body { padding: 20px; } }
.m-stage-pro-clock {
    font-family: var(--twc-font-mono);
    font-size: 11px;
    color: var(--twc-text-muted);
    padding: 3px 8px;
    border: 1px solid var(--twc-border);
    border-radius: 5px;
    background: var(--twc-bg);
    min-width: 64px;
    text-align: center;
}

/* ══════════════════════════════════════════════
   26. TERMINAL stage (fake-commit, code snippet typewriter)
   ══════════════════════════════════════════════ */

.m-term {
    background: #0a0a0a;
    color: #d4d4d4;
    border: 1px solid #0a0a0a;
    border-radius: var(--twc-radius);
    font-family: var(--twc-font-mono);
    font-size: 12.5px;
    line-height: 1.7;
    overflow: hidden;
}
.m-term-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    background: #161616;
    border-bottom: 1px solid #2a2a2a;
    color: #888;
    font-size: 11px;
}
.m-term-dots { display: inline-flex; gap: 5px; }
.m-term-dots span { width: 10px; height: 10px; border-radius: 50%; background: #404040; }
.m-term-body { padding: 18px 22px; min-height: 200px; }
.m-term-line { display: block; white-space: pre-wrap; }
.m-term-prompt { color: #6a737d; }
.m-term-cmd    { color: #d4d4d4; }
.m-term-out    { color: #9a9a9a; }
.m-term-ok     { color: var(--twc-success); }
.m-term-err    { color: var(--twc-critical); }
.m-term-warn   { color: var(--twc-warning); }
.m-term-key    { color: #7dd3fc; }
.m-term-str    { color: #86efac; }
.m-term-caret  { display: inline-block; width: 9px; height: 1.1em; vertical-align: -2px; background: #d4d4d4; margin-left: 2px; animation: m-blink 1.05s steps(2) infinite; }

/* ══════════════════════════════════════════════
   27. SIGNAL CARDS - EKG / entropy / counters
   ══════════════════════════════════════════════ */

.m-signal {
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    padding: 18px 20px;
    display: flex; flex-direction: column; gap: 10px;
}
.m-signal-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.m-signal-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.10em; font-weight: 500;
    color: var(--twc-text-muted);
}
.m-signal-val {
    font-family: var(--twc-font-mono);
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--twc-text);
    font-weight: 500;
    line-height: 1;
    transition: color 400ms ease;
}
.m-signal-val.is-warn { color: var(--twc-warning); }
.m-signal-val.is-bad  { color: var(--twc-critical); }
.m-signal-val.is-good { color: var(--twc-success); }
.m-signal-track {
    height: 8px;
    border-radius: 4px;
    background: var(--twc-divider);
    overflow: hidden;
    position: relative;
}
.m-signal-fill {
    height: 100%;
    background: var(--twc-text);
    border-radius: inherit;
    width: 0%;
    transition: width 600ms cubic-bezier(.2,.7,.2,1), background 400ms ease;
}
.m-signal-fill.is-good { background: var(--twc-success); }
.m-signal-fill.is-warn { background: var(--twc-warning); }
.m-signal-fill.is-bad  { background: var(--twc-critical); }
.m-signal-foot { font-size: 11px; color: var(--twc-text-muted); font-family: var(--twc-font-mono); }

.m-ekg {
    width: 100%;
    height: 64px;
    display: block;
}
.m-ekg path {
    fill: none;
    stroke: var(--twc-text);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
}
.m-ekg.is-running path { animation: m-ekg 2.2s linear; }
.m-ekg.is-bad path     { stroke: var(--twc-critical); }
.m-ekg.is-warn path    { stroke: var(--twc-warning); }
.m-ekg.is-good path    { stroke: var(--twc-success); }

/* ══════════════════════════════════════════════
   28. WORLD MAP - parallel-jobs hero visual
   ══════════════════════════════════════════════ */

.m-world {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    background: var(--twc-surface);
    border-radius: var(--twc-radius);
    border: 1px solid var(--twc-border);
    overflow: hidden;
}
.m-world svg { width: 100%; height: 100%; }
.m-world .land     { fill: var(--twc-surface-mute); stroke: var(--twc-border); stroke-width: 0.5; }
.m-world .pin      { transform-origin: center; }
.m-world .pin-ring {
    fill: none;
    stroke: var(--twc-accent);
    stroke-width: 1.6;
    transform-origin: center;
    transform-box: fill-box;
    opacity: 0;
}
.m-world .pin-dot  {
    fill: var(--twc-text);
    transition: fill 400ms ease, r 400ms ease;
}
.m-world .pin.is-on .pin-ring  { animation: m-pulse 1.6s ease-in-out infinite; opacity: 0.55; }
.m-world .pin.is-bad .pin-ring { stroke: var(--twc-critical); animation: m-pulse 1s ease-in-out infinite; opacity: 0.55; }
.m-world .pin.is-bad .pin-dot  { fill: var(--twc-critical); }
.m-world .pin-label {
    font-family: var(--twc-font-mono);
    font-size: 10px;
    fill: var(--twc-text-muted);
    text-anchor: middle;
}
.m-world .pin.is-on .pin-label  { fill: var(--twc-text); }
.m-world .pin.is-bad .pin-label { fill: var(--twc-critical); }
.m-world .link {
    stroke: var(--twc-critical);
    stroke-width: 1.4;
    fill: none;
    stroke-dasharray: 5 4;
    opacity: 0;
    transition: opacity 400ms ease;
}
.m-world .link.is-on { opacity: 0.85; animation: m-fade-in 600ms ease both, m-marquee 12s linear infinite; }
.m-world-stamp {
    position: absolute;
    top: 16px; right: 16px;
    padding: 6px 12px;
    border: 1.5px solid var(--twc-critical);
    color: var(--twc-critical);
    border-radius: 4px;
    background: var(--twc-bg);
    font-family: var(--twc-font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    opacity: 0;
    transform: rotate(-6deg) scale(0.9);
    transition: opacity 320ms ease, transform 480ms cubic-bezier(.2,.7,.2,1);
}
.m-world-stamp.is-on {
    opacity: 1;
    transform: rotate(-6deg) scale(1);
}

/* ══════════════════════════════════════════════
   29. SIGN-WITH-MANAV button (lighting pulse)
   ══════════════════════════════════════════════ */

.m-sign-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    background: var(--twc-text);
    color: var(--twc-bg);
    border: 1px solid var(--twc-text);
    border-radius: var(--twc-radius);
    font-family: var(--twc-font-ui);
    font-size: 14px; font-weight: 500;
    width: 100%; min-height: 48px;
    cursor: pointer;
    transition: background 200ms ease, transform 200ms ease;
    overflow: hidden;
    text-decoration: none;
}
.m-sign-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 800ms ease;
}
.m-sign-btn:hover { background: #1a1a1a; color: var(--twc-bg); transform: translateY(-1px); }
.m-sign-btn:hover::before { transform: translateX(100%); }
.m-sign-btn:active { transform: translateY(0); }
.m-sign-btn-fingerprint {
    width: 18px; height: 18px;
    display: inline-block;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'><path d='M12 3a8 8 0 0 1 8 8v3'/><path d='M4 14v-3a8 8 0 0 1 4-6.93'/><path d='M8 11a4 4 0 0 1 8 0v4a6 6 0 0 1-3 5.2'/><path d='M12 11v6'/></svg>") center/contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'><path d='M12 3a8 8 0 0 1 8 8v3'/><path d='M4 14v-3a8 8 0 0 1 4-6.93'/><path d='M8 11a4 4 0 0 1 8 0v4a6 6 0 0 1-3 5.2'/><path d='M12 11v6'/></svg>") center/contain no-repeat;
}

/* ══════════════════════════════════════════════
   30. STAMP - "VERIFIED HUMAN" overlay
   ══════════════════════════════════════════════ */

.m-stamp {
    position: relative;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 18px;
    border: 2px solid var(--twc-success);
    color: var(--twc-success);
    background: var(--twc-bg);
    border-radius: 6px;
    font-family: var(--twc-font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transform: rotate(-4deg);
}
.m-stamp.is-bad   { border-color: var(--twc-critical); color: var(--twc-critical); }
.m-stamp.is-warn  { border-color: var(--twc-warning);  color: var(--twc-warning); }
.m-stamp.is-pop   { animation: m-pop 420ms cubic-bezier(.2,.7,.2,1) both; }

/* ══════════════════════════════════════════════
   31. SPLIT - side-by-side compare with strong divider
   ══════════════════════════════════════════════ */

.m-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    overflow: hidden;
}
@media (max-width: 720px) { .m-split { grid-template-columns: 1fr; } }
.m-split > * { padding: 22px 24px; border-right: 1px solid var(--twc-border); }
.m-split > *:last-child { border-right: none; }
@media (max-width: 720px) {
    .m-split > * { border-right: none; border-bottom: 1px solid var(--twc-border); }
    .m-split > *:last-child { border-bottom: none; }
}
.m-split-good { background: var(--twc-success-light); }
.m-split-bad  { background: var(--twc-critical-light); }
.m-split-head {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--twc-font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: var(--twc-text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

/* ══════════════════════════════════════════════
   32. AUDIT STREAM - live-feel log table
   ══════════════════════════════════════════════ */

.m-audit {
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    background: var(--twc-surface);
    overflow: hidden;
    font-family: var(--twc-font-mono);
    font-size: 12px;
}
.m-audit-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px;
    background: var(--twc-surface-mute);
    border-bottom: 1px solid var(--twc-border);
    color: var(--twc-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}
.m-audit-row {
    display: grid;
    grid-template-columns: 90px 1fr 100px;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--twc-divider);
    align-items: center;
    color: var(--twc-text);
}
@media (max-width: 640px) { .m-audit-row { grid-template-columns: 1fr; gap: 4px; } }
.m-audit-row:last-child { border-bottom: none; }
.m-audit-row.is-new { animation: m-slide-up 460ms ease both; }
.m-audit-time { color: var(--twc-text-muted); }
.m-audit-event-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--twc-border);
    background: var(--twc-surface-mute);
    margin-right: 8px;
    color: var(--twc-text);
}
.m-audit-row.is-ok  .m-audit-event-tag { color: var(--twc-success);  border-color: var(--twc-success);  background: var(--twc-success-light); }
.m-audit-row.is-bad .m-audit-event-tag { color: var(--twc-critical); border-color: var(--twc-critical); background: var(--twc-critical-light); }
.m-audit-status {
    text-align: right;
    color: var(--twc-text-muted);
    font-size: 11px;
}

/* ══════════════════════════════════════════════
   33. SDK CODE - toggleable code preview
   ══════════════════════════════════════════════ */

.m-sdk {
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    overflow: hidden;
    background: var(--twc-surface);
}
.m-sdk-tabs {
    display: flex; align-items: center; gap: 0;
    background: var(--twc-surface-mute);
    border-bottom: 1px solid var(--twc-border);
}
.m-sdk-tab {
    padding: 10px 16px;
    font-family: var(--twc-font-mono);
    font-size: 12px;
    color: var(--twc-text-muted);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}
.m-sdk-tab.is-on { color: var(--twc-text); border-bottom-color: var(--twc-text); }
.m-sdk-tab:hover:not(.is-on) { color: var(--twc-text-secondary); }
.m-sdk-copy {
    margin-left: auto;
    padding: 6px 12px;
    font-family: var(--twc-font-ui);
    font-size: 11px;
    color: var(--twc-text-secondary);
    background: transparent;
    border: 1px solid var(--twc-border);
    border-radius: 5px;
    cursor: pointer;
    margin-right: 8px;
}
.m-sdk-copy:hover { color: var(--twc-text); border-color: var(--twc-text); }
.m-sdk-copy.is-copied { color: var(--twc-success); border-color: var(--twc-success); }
.m-sdk-pane { display: none; }
.m-sdk-pane.is-on { display: block; }

/* ══════════════════════════════════════════════
   34. TYPING RACE  (ai-worker demo)
   ══════════════════════════════════════════════ */

.m-race {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 720px) { .m-race { grid-template-columns: 1fr; } }
.m-race-pane {
    background: var(--twc-surface);
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius);
    overflow: hidden;
    display: flex; flex-direction: column;
}
.m-race-pane-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--twc-border);
    background: var(--twc-surface-mute);
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--twc-font-mono);
    font-size: 12px;
}
.m-race-pane-body {
    padding: 16px 18px;
    min-height: 200px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--twc-text);
    white-space: pre-wrap;
    word-wrap: break-word;
}
.m-race-pane-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--twc-border);
    background: var(--twc-bg);
}
.m-race-pane-stat {
    padding: 10px 16px;
    border-right: 1px solid var(--twc-border);
    display: flex; flex-direction: column; gap: 2px;
}
.m-race-pane-stat:last-child { border-right: none; }
.m-race-pane-stat-label {
    font-size: 10px; text-transform: uppercase; letter-spacing: 0.10em;
    color: var(--twc-text-muted); font-weight: 500;
}
.m-race-pane-stat-val {
    font-family: var(--twc-font-mono);
    font-size: 14px;
    color: var(--twc-text);
}

/* ══════════════════════════════════════════════
   35. COUNTER (animated number)
   ══════════════════════════════════════════════ */

.m-counter {
    font-family: var(--twc-font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    letter-spacing: -0.02em;
}

/* ══════════════════════════════════════════════
   36. SCREEN MOCK - chrome around a fake app screen
   ══════════════════════════════════════════════ */

.m-screen {
    border: 1px solid var(--twc-border);
    border-radius: var(--twc-radius-lg);
    background: var(--twc-surface);
    overflow: hidden;
    box-shadow: 0 1px 0 var(--twc-border), 0 12px 32px -20px rgba(0,0,0,0.15);
}
.m-screen-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    background: var(--twc-surface-mute);
    border-bottom: 1px solid var(--twc-border);
}
.m-screen-dots { display: inline-flex; gap: 6px; }
.m-screen-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--twc-divider); border: 1px solid var(--twc-border); }
.m-screen-url {
    flex: 1;
    padding: 4px 12px;
    background: var(--twc-bg);
    border: 1px solid var(--twc-border);
    border-radius: 6px;
    font-family: var(--twc-font-mono);
    font-size: 11.5px;
    color: var(--twc-text-secondary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.m-screen-body { padding: 24px 28px; }

/* ══════════════════════════════════════════════
   37. TUMBLER / 3-state proof preview
   ══════════════════════════════════════════════ */

.m-proof-tumbler { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 880px) { .m-proof-tumbler { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════
   38. CALL-OUT, KEY POINT
   ══════════════════════════════════════════════ */

.m-callout {
    border-left: 3px solid var(--twc-text);
    padding: 14px 18px;
    background: var(--twc-surface-mute);
    border-radius: 0 var(--twc-radius) var(--twc-radius) 0;
    font-size: var(--twc-text-sm);
    color: var(--twc-text-secondary);
    line-height: 1.55;
}
.m-callout strong { color: var(--twc-text); font-weight: 500; }
.m-callout.is-good { border-left-color: var(--twc-success); }
.m-callout.is-warn { border-left-color: var(--twc-warning); }
.m-callout.is-bad  { border-left-color: var(--twc-critical); }

/* ══════════════════════════════════════════════
   39. TOAST - bottom-right share confirmation
   ══════════════════════════════════════════════ */

.m-toast {
    position: fixed;
    bottom: 24px; right: 24px;
    padding: 12px 16px;
    background: var(--twc-text);
    color: var(--twc-bg);
    border-radius: var(--twc-radius);
    font-size: 13px;
    z-index: 100;
    box-shadow: 0 16px 36px -16px rgba(0,0,0,0.30);
    opacity: 0; transform: translateY(8px);
    transition: opacity 240ms ease, transform 240ms ease;
}
.m-toast.is-on { opacity: 1; transform: none; }
