/* =============================================================
   3DISM Manual — Refined Product Documentation
   Clean sans-serif system. Modern, professional, restrained.
   Inspired by best-in-class product docs (Vercel, Linear, Stripe).

   Type stack:
     Geist        — body + display (variable 100..900)
     Geist Mono   — kbd, measurements, metadata
   ============================================================= */

:root {
    --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Geist Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;

    /* Off-white paper + neutral ink — clean but not sterile */
    --paper:        #fafaf7;
    --paper-card:   #f4f3ee;
    --paper-deep:   #ebeae3;
    --paper-mute:   #f7f6f2;

    --ink:          #0a0a0a;
    --ink-soft:     #404040;
    --ink-faint:    #737373;
    --ink-vapor:    rgba(10, 10, 10, 0.40);
    --rule:         rgba(10, 10, 10, 0.10);
    --rule-soft:    rgba(10, 10, 10, 0.06);

    --ink-green:    #0a5530;
    --ink-green-2:  #07472a;
    --screen-green: #22c55e;
    --mark:         #b88b3d;
    --warn:         #b04324;
    --warn-soft:    rgba(176, 67, 36, 0.06);

    --dark-ink:     #0a0a0a;
    --dark-ink-2:   #15151a;
    --dark-text:    #fafaf7;
    --dark-faint:   #a3a3a3;

    --measure:      72ch;
    --hero-w:       1280px;
    --gutter:       clamp(20px, 4vw, 56px);

    --ease-edit:    cubic-bezier(.2, .9, .25, 1);

    --radius:       6px;
    --radius-sm:    4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.manual {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.6;
    font-feature-settings: 'ss01', 'ss03', 'cv11';
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.manual strong, .manual b { font-weight: 600; color: var(--ink); }
.manual em, .manual i { font-style: italic; }

.manual code {
    font-family: var(--font-mono);
    font-size: 0.86em;
    background: var(--paper-card);
    padding: 1.5px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--rule);
    color: var(--ink);
    font-weight: 500;
}

/* Links — clean underline-on-hover, no draw-in animation */
.manual a {
    color: var(--ink-green);
    text-decoration: none;
    transition: color 0.15s var(--ease-edit);
}
.manual a:hover { color: var(--ink-green-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }

/* Focus rings */
.manual a:focus-visible,
.manual button:focus-visible,
.manual input:focus-visible,
.manual [tabindex]:focus-visible {
    outline: 2px solid var(--ink-green);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
    .manual *, .manual *::before, .manual *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Skip-to-content */
.m-skip-link {
    position: absolute; left: -9999px; top: 12px; z-index: 200;
    padding: 10px 16px;
    background: var(--ink); color: var(--paper);
    font-family: var(--font-mono); font-size: 12px;
    font-weight: 500; letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
}
.m-skip-link:focus { left: 16px; }

/* =============================================================
   Typography ramp
   ============================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0;
}

.m-display-xl { font-size: clamp(40px, 6vw, 72px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.m-display-l  { font-size: clamp(30px, 4vw, 48px); font-weight: 600; letter-spacing: -0.028em; line-height: 1.1; }
.m-display-m  { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.02em; }
.m-display-s  { font-size: clamp(18px, 1.8vw, 20px); font-weight: 600; letter-spacing: -0.015em; }

/* Kicker — small caps mono label */
.m-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    font-weight: 500;
    margin: 0 0 14px;
}

/* Lede — clean larger paragraph, NOT italic, NOT serif */
.m-lede {
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink-soft);
    font-weight: 400;
    max-width: 62ch;
}

.m-mono, kbd { font-family: var(--font-mono); }

/* =============================================================
   Topbar — modern doc-site nav
   ============================================================= */

.m-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
    padding: 14px var(--gutter);
    background: rgba(250, 250, 247, 0.85);
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
}

.m-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}
.m-brand:hover { color: var(--ink); text-decoration: none; }
.m-brand-mark { width: 22px; height: 22px; flex-shrink: 0; }
.m-brand-name {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.m-brand-name .accent {
    color: var(--ink-green);
    font-weight: 600;
}
.m-brand-tagline { display: none; }

.m-top-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.m-top-links {
    display: flex;
    gap: 22px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
}
.m-top-links a {
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.15s;
}
.m-top-links a:hover { color: var(--ink); text-decoration: none; }

.m-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    background: var(--paper-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink-faint);
    font-family: var(--font-sans);
    font-size: 13px;
    cursor: pointer;
    transition: all .15s var(--ease-edit);
    min-width: 240px;
}
.m-search-trigger:hover {
    border-color: var(--ink-faint);
    background: var(--paper);
    color: var(--ink);
}
.m-search-trigger span { flex: 1; text-align: left; }
.m-search-trigger svg { flex-shrink: 0; opacity: 0.7; }

.m-kbd {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 2px 6px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius-sm);
    color: var(--ink-faint);
    font-weight: 500;
}

/* =============================================================
   Breadcrumb
   ============================================================= */

.m-breadcrumb-bar {
    padding: 12px var(--gutter);
    border-bottom: 1px solid var(--rule-soft);
    background: var(--paper-mute);
}
.m-breadcrumb {
    max-width: var(--hero-w);
    margin: 0 auto;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--ink-faint);
    font-weight: 500;
}
.m-breadcrumb a {
    color: var(--ink-faint);
    text-decoration: none;
}
.m-breadcrumb a:hover { color: var(--ink-green); text-decoration: none; }
.m-breadcrumb-sep {
    margin: 0 8px;
    color: var(--ink-vapor);
}
.m-breadcrumb-current { color: var(--ink); font-weight: 600; }

/* =============================================================
   Shell — sidebar + content
   ============================================================= */

.m-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

.m-sidebar {
    padding: 28px 12px 32px var(--gutter);
    border-right: 1px solid var(--rule-soft);
    align-self: flex-start;
    position: sticky;
    top: 60px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}
.m-sidebar::-webkit-scrollbar { width: 6px; }
.m-sidebar::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }

.m-sidebar-group { margin-bottom: 24px; }
.m-sidebar-group:last-child { margin-bottom: 0; }
.m-sidebar h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    margin: 0 0 10px 0;
    padding: 0 0 6px 0;
    border-bottom: 1px solid var(--rule-soft);
}
.m-sidebar ul { list-style: none; padding: 0; margin: 0; }
.m-sidebar li { margin: 0; }
.m-sidebar li a {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--ink-soft);
    font-family: var(--font-sans);
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all .12s var(--ease-edit);
}
.m-sidebar-icon {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--ink-faint);
    letter-spacing: 0;
    text-align: left;
}
.m-sidebar-label { font-weight: 500; }
.m-sidebar li a:hover {
    color: var(--ink);
    background: var(--paper-card);
    text-decoration: none;
}
.m-sidebar li a.active {
    color: var(--ink-green);
    background: rgba(10, 85, 48, 0.07);
    font-weight: 600;
}
.m-sidebar li a.active .m-sidebar-icon { color: var(--ink-green); }
.m-sidebar li a.coming-soon { color: var(--ink-faint); cursor: default; opacity: 0.55; }
.m-sidebar li a.coming-soon:hover { background: transparent; }

.m-content { min-width: 0; padding-bottom: 60px; }

/* =============================================================
   Landing — clean product hero
   ============================================================= */

.m-hero-with-art {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
    padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 72px);
    max-width: var(--hero-w);
    margin: 0 auto;
}
.m-hero-with-art h1 {
    font-size: clamp(38px, 5.5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin: 0 0 18px;
    color: var(--ink);
}
.m-hero-with-art h1 .accent {
    color: var(--ink-green);
    font-weight: 700;
}
.m-hero-with-art .m-hero-lede {
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink-soft);
    font-weight: 400;
    max-width: 520px;
    margin: 0 0 32px;
}

.m-hero-ctas {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.m-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    transition: all .2s var(--ease-edit);
}
.m-hero-cta::after {
    content: '→';
    transition: transform .2s var(--ease-edit);
}
.m-hero-cta:hover {
    background: var(--ink-green);
    border-color: var(--ink-green);
    color: var(--paper);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(10, 85, 48, 0.18);
}
.m-hero-cta:hover::after { transform: translateX(3px); }

.m-hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    transition: all .2s var(--ease-edit);
}
.m-hero-cta-secondary:hover {
    color: var(--ink);
    text-decoration: none;
    border-color: var(--ink-faint);
    background: var(--paper-card);
}

.m-hero-stats {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--ink-faint);
    padding-top: 24px;
    border-top: 1px solid var(--rule);
}
.m-hero-stats strong {
    color: var(--ink);
    font-weight: 600;
    margin-right: 4px;
}

.m-hero-with-art .m-hero-art {
    justify-self: center;
    width: 100%;
    max-width: 480px;
    position: relative;
    filter: drop-shadow(0 24px 48px rgba(10, 10, 10, 0.18));
}
.m-hero-with-art .m-hero-art::before {
    /* Soft ambient backdrop behind the device */
    content: '';
    position: absolute;
    inset: -8% -6% -4% -6%;
    background:
        radial-gradient(60% 50% at 50% 60%, rgba(34, 197, 94, 0.06), transparent 70%);
    pointer-events: none;
    z-index: -1;
    border-radius: 50%;
}
.m-hero-with-art .m-hero-art svg {
    width: 100%;
    height: auto;
    display: block;
}

/* =============================================================
   Section heads
   ============================================================= */

.m-section {
    padding: clamp(48px, 6vw, 80px) var(--gutter);
    max-width: var(--hero-w);
    margin: 0 auto;
    width: 100%;
}
.m-section + .m-section { padding-top: clamp(20px, 3vw, 48px); }

.m-section-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}
.m-section-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-green);
    margin: 0 0 10px;
    font-weight: 500;
}
.m-section-head h2 {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 600;
    letter-spacing: -0.028em;
    line-height: 1.1;
    margin: 0;
}
.m-section-head .m-section-sub {
    font-family: var(--font-sans);
    font-size: 16px;
    color: var(--ink-soft);
    margin: 10px 0 0;
    max-width: 56ch;
    font-weight: 400;
    line-height: 1.5;
}
.m-section-head .m-section-count {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-faint);
    align-self: end;
    margin-bottom: 4px;
    font-weight: 500;
}

/* =============================================================
   Walkthrough cards — clean rows with number prefix
   ============================================================= */

.m-walkthrough-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--rule);
    counter-reset: wt-counter;
}
.m-card-wt {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: clamp(16px, 2.5vw, 32px);
    align-items: baseline;
    padding: 22px 8px;
    border-bottom: 1px solid var(--rule-soft);
    color: inherit;
    text-decoration: none;
    transition: padding-left .2s var(--ease-edit), background .15s;
    position: relative;
}
.m-card-wt::before {
    content: counter(wt-counter, decimal-leading-zero);
    counter-increment: wt-counter;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-faint);
    align-self: start;
    padding-top: 6px;
}
.m-card-wt-icon { display: none; }
.m-card-wt-text { min-width: 0; }
.m-card-wt-title {
    font-family: var(--font-sans);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 600;
    letter-spacing: -0.018em;
    line-height: 1.2;
    color: var(--ink);
    margin: 0;
}
.m-card-wt-sub {
    font-family: var(--font-sans);
    font-size: 14.5px;
    color: var(--ink-soft);
    font-weight: 400;
    line-height: 1.5;
    margin: 4px 0 0;
    max-width: 60ch;
}
.m-card-wt-meta {
    align-self: start;
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: right;
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-faint);
    font-weight: 500;
}
.m-card-wt-meta .pill {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-weight: 600;
}
.m-card-wt-meta .pill-beginner { color: var(--ink-green); }
.m-card-wt-meta .pill-intermediate { color: var(--mark); }
.m-card-wt-meta .pill-advanced { color: var(--warn); }
.m-card-wt::after {
    content: '→';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    opacity: 0;
    font-size: 18px;
    color: var(--ink-green);
    transition: all .2s var(--ease-edit);
    pointer-events: none;
}
.m-card-wt:hover {
    background: var(--paper-card);
    padding-left: 16px;
    text-decoration: none;
}
.m-card-wt:hover .m-card-wt-title { color: var(--ink-green); }
.m-card-wt:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* =============================================================
   Panel cards — list of index rows
   ============================================================= */

.m-panel-group { margin-bottom: 36px; }
.m-panel-group:last-child { margin-bottom: 0; }
.m-panel-group-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin: 0 0 12px;
    padding: 0 0 6px 0;
    border-bottom: 1px solid var(--rule);
}
.m-panel-group-label-count { font-weight: 500; color: var(--ink-faint); }

.m-panel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
.m-card-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--rule-soft);
    color: inherit;
    text-decoration: none;
    transition: padding-left .15s var(--ease-edit), background .15s;
}
.m-card-panel-icon {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ink-faint);
    min-width: 36px;
    font-weight: 500;
}
.m-card-panel-text {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.m-card-panel-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.012em;
}
.m-card-panel-sub {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--ink-soft);
    font-weight: 400;
}
.m-card-panel-where {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-faint);
    white-space: nowrap;
    font-weight: 500;
}
.m-card-panel:hover {
    background: var(--paper-card);
    padding-left: 14px;
    text-decoration: none;
}
.m-card-panel:hover .m-card-panel-title { color: var(--ink-green); }

/* =============================================================
   Walkthrough / Panel page hero + body
   ============================================================= */

.m-hero-page {
    padding: clamp(36px, 5vw, 56px) var(--gutter) clamp(28px, 3.5vw, 40px);
    max-width: var(--hero-w);
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
}
.m-hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-green);
    margin: 0 0 14px;
    font-weight: 500;
}
.m-hero-page h1 {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.032em;
    line-height: 1.08;
    margin: 0 0 14px;
    max-width: 22ch;
}
.m-hero-page .subtitle {
    font-family: var(--font-sans);
    font-size: clamp(16px, 1.6vw, 19px);
    color: var(--ink-soft);
    font-weight: 400;
    margin: 0 0 24px;
    max-width: 64ch;
    line-height: 1.5;
}
.m-hero-meta {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    font-family: var(--font-sans);
    font-size: 13.5px;
    color: var(--ink-faint);
    padding-top: 18px;
    border-top: 1px solid var(--rule-soft);
}
.m-hero-meta .meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.m-hero-meta .meta strong { color: var(--ink); font-weight: 600; }

.m-body {
    padding: clamp(32px, 4vw, 48px) var(--gutter) clamp(40px, 5vw, 64px);
    max-width: 780px;
    margin: 0 auto;
}

/* Intro — clean lead paragraph, NO DROP CAP */
.m-intro {
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink-soft);
    font-weight: 400;
    margin: 0 0 40px;
    padding: 0 0 0 18px;
    border-left: 2px solid var(--ink-green);
    max-width: 64ch;
}

/* Steps */
.m-step { margin: 0 0 48px; padding: 0; }
.m-step:last-child { margin-bottom: 0; }
.m-step + .m-step { padding-top: 40px; border-top: 1px solid var(--rule-soft); }

.m-step h2 {
    font-family: var(--font-sans);
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 16px;
    color: var(--ink);
}
.m-step p {
    font-family: var(--font-sans);
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--ink);
    margin: 0 0 14px;
    max-width: 64ch;
}
.m-step p:last-of-type { margin-bottom: 0; }

/* Tip — left-rule callout box (clean, not literary) */
.m-tip {
    margin: 24px 0;
    padding: 14px 18px;
    border-left: 3px solid var(--ink-green);
    background: rgba(10, 85, 48, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.55;
}
.m-tip::before {
    content: 'Tip';
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-green);
    font-weight: 600;
    margin-bottom: 4px;
}

.m-warning {
    margin: 24px 0;
    padding: 14px 18px;
    border-left: 3px solid var(--warn);
    background: var(--warn-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.55;
}
.m-warning::before {
    content: 'Heads up';
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--warn);
    font-weight: 600;
    margin-bottom: 4px;
}
.m-tip > div, .m-warning > div { display: inline; }

/* =============================================================
   Screenshot frames
   ============================================================= */

/* Screenshot frame — refined device-style bezel.
   Outer: deep ink with subtle gradient + ambient green screen-glow halo.
   Inner: small rim highlight that suggests the bezel of an actual LCD. */
.m-shot-frame {
    position: relative;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(34, 197, 94, 0.06), transparent 55%),
        linear-gradient(180deg, #15151a 0%, #0a0a0a 100%);
    border-radius: 14px;
    padding: clamp(18px, 2.5vw, 30px);
    margin: 28px 0;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 18px 40px -20px rgba(0, 0, 0, 0.55),
        0 4px 12px -4px rgba(34, 197, 94, 0.06);
}
.m-shot-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    /* Inner bezel rim — subtle highlight that frames the LCD content */
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 8px 24px -12px rgba(0, 0, 0, 0.7);
}
.m-shot {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reference diagram frame — light paper card with refined depth */
.m-ref-frame {
    margin: 28px 0;
    padding: clamp(20px, 3vw, 32px);
    background:
        linear-gradient(180deg, #ffffff 0%, var(--paper-card) 100%);
    border: 1px solid var(--rule);
    border-radius: 10px;
    text-align: center;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.6) inset,
        0 1px 2px rgba(10, 10, 10, 0.04),
        0 12px 28px -18px rgba(10, 10, 10, 0.12);
}
.m-ref-frame img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 4px;
}
.m-ref-caption {
    margin: 18px auto 0;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--ink-faint);
    line-height: 1.5;
    max-width: 50ch;
    padding-top: 12px;
    border-top: 1px solid var(--rule-soft);
}

/* =============================================================
   Bambu-style callouts
   ============================================================= */

:root {
    --m-callout: #f59f3b;
    --m-callout-soft: rgba(245, 159, 59, 0.13);
}

.m-callout-box {
    position: absolute;
    border: 1.5px solid var(--m-callout);
    border-radius: var(--radius-sm);
    background: var(--m-callout-soft);
    pointer-events: none;
}
.m-callout-num {
    position: absolute;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--m-callout);
    color: var(--dark-ink);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.5);
    border: 2px solid var(--dark-ink);
    top: -13px; left: -13px;
    pointer-events: auto;
    cursor: help;
    transition: transform .15s var(--ease-edit);
}
.m-callout-num:hover { transform: scale(1.15); }

.m-callout {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--m-callout);
    color: var(--dark-ink);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 11px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border: 2px solid var(--dark-ink);
    cursor: pointer;
    transition: transform .15s var(--ease-edit);
}
.m-callout:hover { transform: translate(-50%, -50%) scale(1.15); }

/* =============================================================
   Callout legend
   ============================================================= */

.m-legend {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    border-top: 1px solid var(--rule);
}
.m-legend li {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule-soft);
    align-items: baseline;
}
.m-legend .m-legend-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: transparent;
    color: var(--m-callout);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border: 1.5px solid var(--m-callout);
    flex-shrink: 0;
    margin-top: 2px;
}
.m-legend-title {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 3px;
    letter-spacing: -0.012em;
}
.m-legend-detail {
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* =============================================================
   Panel page regions + TOC
   ============================================================= */

.m-panel-regions {
    margin: 32px 0 0;
    counter-reset: region-counter;
}
.m-region {
    padding: 22px 0;
    border-bottom: 1px solid var(--rule-soft);
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 18px;
    counter-increment: region-counter;
}
.m-region:last-child { border-bottom: none; }
.m-region-head { display: contents; }
.m-legend-num {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: transparent;
    color: var(--m-callout);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1.5px solid var(--m-callout);
    grid-row: span 3;
}
.m-region-head h3 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--ink);
    grid-column: 2;
    letter-spacing: -0.015em;
}
.m-region-summary {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--ink-faint);
    margin: 0 0 10px;
    grid-column: 2;
    line-height: 1.5;
    font-weight: 500;
}
.m-region-detail {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink);
    margin: 0;
    grid-column: 2;
    max-width: 64ch;
}
.m-region--flash { animation: m-region-flash 1.5s var(--ease-edit); }
@keyframes m-region-flash {
    0% { background: rgba(245, 159, 59, 0.15); }
    100% { background: transparent; }
}

/* Body with right-rail TOC */
.m-body-with-toc {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 56px;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(32px, 4vw, 48px) var(--gutter) clamp(40px, 5vw, 64px);
}
.m-body-with-toc > .m-body-main { min-width: 0; }
.m-region-toc {
    position: sticky;
    top: 80px;
    align-self: flex-start;
    padding: 0 0 0 14px;
    border-left: 1px solid var(--rule);
    font-family: var(--font-sans);
    font-size: 13px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.m-region-toc h5 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-faint);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--rule-soft);
}
.m-region-toc ul { list-style: none; padding: 0; margin: 0; }
.m-region-toc li { margin: 0; }
.m-region-toc a {
    display: block;
    padding: 6px 0 6px 10px;
    color: var(--ink-soft);
    text-decoration: none;
    line-height: 1.35;
    margin-left: -1px;
    border-left: 1px solid transparent;
    font-weight: 500;
}
.m-region-toc a:hover { color: var(--ink); border-left-color: var(--rule); text-decoration: none; }
.m-region-toc a.is-active {
    color: var(--ink-green);
    border-left: 2px solid var(--ink-green);
    margin-left: -2px;
    font-weight: 600;
}
.m-region-toc-num {
    display: inline-block;
    width: 22px;
    color: var(--ink-faint);
    font-family: var(--font-mono);
    font-size: 11px;
    margin-right: 6px;
}
.m-region-toc a.is-active .m-region-toc-num { color: var(--ink-green); }

/* Good-to-know notes */
.m-panel-notes {
    margin: 36px 0 0;
    padding: 18px 22px;
    background: rgba(10, 85, 48, 0.04);
    border: 1px solid rgba(10, 85, 48, 0.12);
    border-radius: var(--radius);
}
.m-panel-notes h3 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-green);
    margin: 0 0 12px;
}
.m-panel-notes ul { list-style: none; padding: 0; margin: 0; }
.m-panel-notes li {
    position: relative;
    padding-left: 18px;
    margin: 8px 0;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14.5px;
    line-height: 1.55;
}
.m-panel-notes li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--ink-green);
    font-weight: 600;
}

/* =============================================================
   Next-steps
   ============================================================= */

.m-next {
    margin: 48px 0 0;
    padding: 24px 0 0;
    border-top: 1px solid var(--rule);
}
.m-next h3 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-faint);
    margin: 0 0 14px;
}
.m-next ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}
.m-next li {}
.m-next li a {
    display: block;
    padding: 14px 18px;
    color: var(--ink);
    text-decoration: none;
    background: var(--paper-card);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 15px;
    transition: all .15s var(--ease-edit);
}
.m-next li a:hover {
    color: var(--ink-green);
    border-color: var(--ink-green);
    background: var(--paper);
    text-decoration: none;
}
.m-next li .arrow { color: var(--ink-green); margin-left: 6px; }

/* =============================================================
   Search overlay (Cmd+K)
   ============================================================= */

.m-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 90px 16px 16px;
}
.m-search-overlay.is-open { display: flex; }
.m-search-modal {
    width: 100%;
    max-width: 580px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}
.m-search-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--rule);
    color: var(--ink-faint);
}
.m-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    color: var(--ink);
    background: transparent;
}
.m-search-input::placeholder { color: var(--ink-faint); }
.m-search-results { list-style: none; padding: 6px; margin: 0; overflow-y: auto; flex: 1; }
.m-search-results li { margin: 0; }
.m-search-hit {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
}
.m-search-hit:hover { background: var(--paper-card); text-decoration: none; }
.m-search-results li.is-active .m-search-hit {
    background: var(--ink);
    color: var(--paper);
}
.m-search-results li.is-active .m-search-hit-sub,
.m-search-results li.is-active .m-search-hit-kind { color: var(--dark-faint); }
.m-search-hit-icon { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); text-align: center; }
.m-search-hit-body { min-width: 0; }
.m-search-hit-title { font-family: var(--font-sans); font-size: 14px; font-weight: 600; display: block; line-height: 1.3; }
.m-search-hit-sub { font-family: var(--font-sans); font-size: 12.5px; color: var(--ink-faint); display: block; line-height: 1.3; margin-top: 2px; }
.m-search-hit-kind {
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--ink-faint);
    padding: 3px 8px;
    background: var(--paper-card);
    border-radius: 99px;
    flex-shrink: 0;
    font-weight: 500;
}
.m-search-empty { padding: 32px 16px; text-align: center; color: var(--ink-faint); font-size: 14px; }

/* =============================================================
   Footer
   ============================================================= */

.m-footer {
    background: var(--dark-ink);
    color: var(--dark-text);
    padding: clamp(28px, 4vw, 48px) var(--gutter);
    text-align: center;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    margin-top: 64px;
    border-top: 1px solid var(--ink);
}
.m-footer a { color: var(--dark-text); text-decoration: none; }
.m-footer a:hover { color: var(--screen-green); text-decoration: none; }
.m-footer-meta {
    margin-top: 10px;
    color: var(--dark-faint);
    font-size: 12px;
    font-weight: 400;
}

/* =============================================================
   Page-load stagger
   ============================================================= */

.m-stagger > * {
    opacity: 0;
    transform: translateY(8px);
    animation: m-fade-up 0.5s var(--ease-edit) forwards;
}
.m-stagger > *:nth-child(1) { animation-delay: 0.04s; }
.m-stagger > *:nth-child(2) { animation-delay: 0.10s; }
.m-stagger > *:nth-child(3) { animation-delay: 0.16s; }
.m-stagger > *:nth-child(4) { animation-delay: 0.22s; }
.m-stagger > *:nth-child(5) { animation-delay: 0.28s; }
.m-stagger > *:nth-child(6) { animation-delay: 0.34s; }
@keyframes m-fade-up {
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================================
   Responsive
   ============================================================= */

@media (max-width: 980px) {
    .m-shell { display: block; }
    .m-sidebar {
        position: static;
        max-height: none;
        padding: 18px var(--gutter);
        border-right: none;
        border-bottom: 1px solid var(--rule);
        overflow-y: visible;
    }
    .m-hero-with-art { grid-template-columns: 1fr; gap: 32px; padding: 40px var(--gutter) 32px; }
    .m-hero-with-art .m-hero-art { max-width: 320px; }
    .m-section { padding: 40px var(--gutter); }
    .m-section-head { grid-template-columns: 1fr; }
    .m-section-head .m-section-count { padding-top: 0; }
    .m-card-wt { grid-template-columns: 36px 1fr; }
    .m-card-wt-meta { grid-column: 2; align-items: flex-start; text-align: left; flex-direction: row; padding-top: 6px; gap: 12px; }
    .m-body-with-toc { grid-template-columns: 1fr; gap: 0; }
    .m-region-toc { display: none; }
    .m-search-trigger { min-width: 0; padding: 7px 10px; }
    .m-search-trigger span, .m-search-trigger .m-kbd { display: none; }
    .m-top-links a:not(:first-child) { display: none; }
}

@media (max-width: 640px) {
    .m-step h2 { font-size: 22px; }
    .m-region { grid-template-columns: 1fr; gap: 10px; }
    .m-legend-num { grid-row: auto; }
    .m-card-panel { grid-template-columns: 1fr; gap: 4px; padding: 14px 8px; }
    .m-card-panel-where { font-size: 10.5px; }
    .m-hero-stats { gap: 14px; font-size: 12.5px; }
}

/* Print */
@media print {
    .m-topbar, .m-sidebar, .m-footer, .m-skip-link, .m-search-overlay,
    .m-breadcrumb-bar, .m-region-toc, .m-callout-box { display: none; }
    .manual { background: #fff; color: #000; }
    .m-shell { display: block; }
    .m-content { padding: 0; }
    a { color: #000; }
    .m-shot-frame { background: #fff; border: 1px solid #000; box-shadow: none; }
}
