:root {
    color-scheme: light;
    --web-bg:          #fcfcfc;
    --web-surface:     #ffffff;
    --web-surface-hover: #f0f0f0;
    --web-text:        #202020;
    --web-text-sub:    #646464;
    --web-text-muted:  #8d8d8d;
    --web-border:      #e7e7e7;
    --web-border-hair: #efefef;
    --web-accent:      #202020;
    --web-accent-hover:#000000;
    --web-code-bg:     #f3f3f3;
    --web-shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.05);
    --web-shadow-btn:  0 0 0 1px rgba(0, 0, 0, 0.06);
    --web-shadow-btn-hover: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

html.dark {
    color-scheme: dark;
    --web-bg:          #101010;
    --web-surface:     #171717;
    --web-surface-hover: #232323;
    --web-text:        #ededed;
    --web-text-sub:    #a1a1a1;
    --web-text-muted:  #757575;
    --web-border:      #262626;
    --web-border-hair: #222222;
    --web-accent:      #ededed;
    --web-accent-hover:#ffffff;
    --web-code-bg:     #1c1c1c;
    --web-shadow-card: 0 0 0 1px #262626;
    --web-shadow-btn:  0 0 0 1px #2a2a2a;
    --web-shadow-btn-hover: 0 0 0 1px #3a3a3a;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--web-bg);
    color: var(--web-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

.web-theme-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    background: var(--web-surface);
    border: 1px solid var(--web-border);
    border-radius: 9999px;
    box-shadow: var(--web-shadow-btn);
}
.web-theme-toggle__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: var(--web-text-muted);
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.web-theme-toggle__btn:hover,
.web-theme-toggle__btn[aria-pressed="true"] {
    color: var(--web-text);
    background: var(--web-surface-hover);
}
.web-theme-toggle__btn svg { width: 16px; height: 16px; }

.web-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}
.web-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
    padding: 32px 20px 32px 24px;
    background: var(--web-surface);
    border-right: 1px solid var(--web-border);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.4;
}
.web-brand { display: block; font-weight: 600; font-size: 13.5px; color: var(--web-text); text-decoration: none; padding: 4px 10px 20px; }
.web-nav { display: flex; flex-direction: column; gap: 2px; }
.web-nav a {
    display: block;
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--web-text-sub);
    text-decoration: none;
    transition: background 120ms ease, color 120ms ease;
}
.web-nav a:hover { background: var(--web-surface-hover); color: var(--web-text); }
.web-nav a.active { background: var(--web-surface-hover); color: var(--web-text); font-weight: 600; }
.web-nav a.is-section { background: transparent; color: var(--web-text); font-weight: 600; }
.web-nav-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--web-text-muted);
    padding: 14px 10px 5px;
}

.web-subnav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 10px;
    padding-left: 10px;
    border-left: 1px solid var(--web-border);
}
.web-subnav .web-nav-section { padding: 10px 10px 4px; }
.web-subnav .web-nav-section:first-child { padding-top: 2px; }
.web-subnav .ds-tab-btn {
    appearance: none;
    border: 0;
    width: 100%;
    display: block;
    text-align: left;
    background: transparent;
    padding: 6px 10px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    color: var(--web-text-sub);
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease;
}
.web-subnav .ds-tab-btn:hover { background: var(--web-surface-hover); color: var(--web-text); }
.web-subnav .ds-tab-btn.is-active { background: var(--web-surface-hover); color: var(--web-text); font-weight: 600; }
.web-main { min-width: 0; }
.web-content { max-width: 760px; margin: 0 auto; padding: 56px 32px 110px; }
.web-content > .catalog-page,
.web-content > .atlas-interior-page { max-width: none; margin: 0; padding: 0; }

@media (max-width: 760px) {
    .web-shell, .ds-shell { display: block; }
    .web-sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--web-border); }
    .web-content { padding: 32px 20px 80px; }
}

.catalog-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.catalog-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 32px;
    font-size: 13px;
    font-weight: 600;
    color: var(--web-text-sub);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--web-surface);
    border: 1px solid var(--web-border);
    border-radius: 9999px;
    box-shadow: var(--web-shadow-btn);
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.catalog-breadcrumb:hover {
    color: var(--web-text);
    background: #f5f5f5;
    box-shadow: var(--web-shadow-btn-hover);
}

.catalog-header {
    margin-bottom: 48px;
}

.catalog-header h1 {
    font-family: inherit;
    font-weight: 700;
    font-size: 2.25rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--web-text);
    margin: 0 0 8px;
}

.catalog-header h2 {
    font-family: inherit;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    color: var(--web-text);
    margin: 0 0 8px;
}

.catalog-header .subtitle {
    font-size: 1rem;
    color: var(--web-text-sub);
    line-height: 1.5;
    max-width: 640px;
    margin: 0;
}

.catalog-header .subtitle code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--web-code-bg);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--web-text);
}

.catalog-header .subtitle a {
    color: var(--web-accent);
    text-decoration: none;
    border-bottom: 1px dashed rgba(26, 122, 101, 0.4);
    transition: color 150ms ease, border-color 150ms ease;
}

.catalog-header .subtitle a:hover {
    color: var(--web-accent-hover);
    border-bottom-color: var(--web-accent-hover);
}

.catalog-header .stat-pill,
.catalog-header .stat-pill-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--web-text-sub);
    background: var(--web-surface);
    border: 1px solid var(--web-border);
    border-radius: 9999px;
    box-shadow: var(--web-shadow-btn);
}

.catalog-header .stat-pill strong {
    color: var(--web-text);
    font-weight: 700;
}

.catalog-section {
    margin-top: 48px;
}

.catalog-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--web-text-muted);
    margin: 0 0 16px;
}

.dot-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 32px 0;
}

.dot-divider span {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d9d9d9;
}

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

.catalog-card {
    display: block;
    background: var(--web-surface);
    border-radius: 16px;
    box-shadow: var(--web-shadow-card);
    padding: 28px 28px 24px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 150ms ease, transform 150ms ease;
}

.catalog-card[hidden] { display: none; }

a.catalog-card:hover {
    box-shadow:
        0px 0px 0px 1px rgba(0, 0, 0, 0.08),
        0px 2px 6px -1px rgba(0, 0, 0, 0.08),
        0px 6px 14px 0px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.card-diagram {
    background: var(--web-bg);
    border-radius: 10px;
    aspect-ratio: 220 / 130;
    max-height: 180px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-diagram svg {
    width: 100%;
    height: 100%;
    display: block;
}

.card-body { min-width: 0; }

.card-body .card-role,
.catalog-card .card-role {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--web-text-muted);
    margin-bottom: 6px;
}

.card-body h2,
.catalog-card h2 {
    font-family: inherit;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    line-height: 1.25;
    color: var(--web-text);
    margin: 0 0 10px;
}

.card-body p,
.catalog-card p {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0 0 14px;
}

.card-body p + p { margin-top: -4px; }

.card-body .field-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--web-text-muted);
    margin-top: 14px;
    margin-bottom: 4px;
}

.card-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.card-body li {
    position: relative;
    padding-left: 18px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--web-text-sub);
}

.card-body li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 6px;
    height: 2px;
    background: var(--web-text-muted);
    border-radius: 1px;
}

.card-pose {
    display: block;
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--web-code-bg);
    border-radius: 8px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.45;
    color: var(--web-text);
    overflow-x: auto;
    white-space: pre;
}

.card-used {
    margin-top: 14px;
    font-size: 12px;
    color: var(--web-text-muted);
    line-height: 1.5;
}

.card-used code,
.card-sub code,
.card-desc code,
.card-notes code,
.card-body p code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--web-code-bg);
    padding: 1px 6px;
    border-radius: 4px;
}

.card-sub {
    font-size: 0.875rem;
    color: var(--web-text-sub);
    margin: 0 0 6px;
}

.card-desc {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0 0 16px;
}

.card-notes {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0 0 4px;
}

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

@media (max-width: 720px) {
    .role-grid { grid-template-columns: minmax(0, 1fr); }
}

.role-card {
    background: var(--web-surface);
    border-radius: 12px;
    box-shadow: var(--web-shadow-card);
    padding: 20px 22px;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.role-card .role-diagram {
    background: var(--web-bg);
    border-radius: 8px;
    aspect-ratio: 1 / 1;
}

.role-card .role-diagram svg {
    width: 100%;
    height: 100%;
    display: block;
}

.role-card .role-name {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--web-text);
    margin: 0 0 4px;
    line-height: 1.25;
}

.role-card .role-tagline {
    font-size: 12px;
    color: var(--web-text-sub);
    margin: 0 0 10px;
    line-height: 1.4;
}

.role-card .role-shape {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    color: var(--web-accent);
    background: var(--web-code-bg);
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.cam-lede {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--web-text-sub);
    max-width: 68ch;
    margin: 0 0 16px;
}

.cam-lede code,
.cam-map code,
.role-use code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    background: var(--web-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
}

.cam-map-wrap {
    overflow-x: auto;
    background: var(--web-surface);
    border-radius: 12px;
    box-shadow: var(--web-shadow-card);
}

.cam-map {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 12px;
}

.cam-map th,
.cam-map td {
    text-align: left;
    vertical-align: top;
    padding: 12px 14px;
    border-top: 1px solid var(--web-border);
}

.cam-map thead th {
    border-top: none;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--web-text-muted);
}

.cam-map thead th span {
    display: block;
    margin-top: 2px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--web-text-sub);
}

.cam-map tbody th {
    width: 140px;
    font-weight: 600;
    color: var(--web-text);
}

.cam-map tbody th span {
    display: block;
    margin-top: 4px;
    font-weight: 400;
    color: var(--web-text-muted);
}

.cam-map td.is-empty { color: var(--web-text-muted); }

.cam-chip {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    color: var(--web-accent);
    background: var(--web-code-bg);
    text-decoration: none;
}

.cam-chip:hover { background: var(--web-surface-hover); }

.cam-ladder {
    list-style: none;
    margin: 0;
    padding: 16px 20px 14px;
    background: var(--web-surface);
    border-radius: 12px;
    box-shadow: var(--web-shadow-card);
    display: grid;
    gap: 7px;
}

.cam-ladder li {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 44px;
    gap: 12px;
    align-items: center;
    font-size: 12px;
}

.cam-ladder__name {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    color: var(--web-text);
    text-decoration: none;
}

.cam-ladder__track {
    position: relative;
    height: 8px;
    background: var(--web-bg);
    border-radius: 4px;
}

.cam-ladder__bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: calc(var(--pad) / 1.6 * 100%);
    border-radius: 4px;
    background: #1A7A65;
}

.cam-ladder__fit {
    position: absolute;
    left: calc(1 / 1.6 * 100%);
    top: -4px;
    bottom: -4px;
    width: 1px;
    background: var(--web-text-muted);
}

.cam-ladder__val {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    text-align: right;
    color: var(--web-text-sub);
    font-variant-numeric: tabular-nums;
}

.cam-ladder__legend {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 44px;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--web-text-muted);
}

.cam-ladder__legend span:nth-child(2) {
    display: flex;
    justify-content: space-between;
}

@media (max-width: 560px) {
    .cam-ladder li,
    .cam-ladder__legend { grid-template-columns: 112px minmax(0, 1fr) 40px; }
}

.cam-family + .cam-family { margin-top: 32px; }

.cam-family__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0 0 12px;
}

.cam-family__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--web-text);
}

.cam-family__head p {
    margin: 0;
    font-size: 12px;
    color: var(--web-text-sub);
}

.role-grid--stack { grid-template-columns: minmax(0, 1fr); }

.role-card--spec {
    grid-template-columns: 150px minmax(0, 1fr);
    scroll-margin-top: 24px;
}

.role-card--spec .role-diagram { aspect-ratio: 4 / 3; overflow: hidden; }

.role-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
}

.role-specs span {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    color: var(--web-accent);
    background: var(--web-code-bg);
    padding: 3px 8px;
    border-radius: 6px;
}

.role-specs span em {
    font-style: normal;
    color: var(--web-text-muted);
    margin-right: 4px;
}

.role-use {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 4px 10px;
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}

.role-use dt {
    padding-top: 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--web-text-muted);
}

.role-use dd { margin: 0; color: var(--web-text-sub); }

.role-example {
    margin: 10px 0 0;
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 10.5px;
    color: var(--web-text-muted);
}

@media (max-width: 480px) {
    .role-card--spec { grid-template-columns: minmax(0, 1fr); }
    .role-card--spec .role-diagram { max-width: 200px; }
}

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

.cam-forms > div {
    background: var(--web-surface);
    border-radius: 12px;
    box-shadow: var(--web-shadow-card);
    padding: 16px 18px;
    min-width: 0;
}

.cam-forms h3 {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--web-text);
}

.cam-forms p {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--web-text-sub);
}

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

.cam-svg .cd-desk { stroke: var(--web-text); stroke-width: 1.5; }
.cam-svg .cd-obj { fill: #FFCC66; stroke: #0A4238; stroke-width: 0.8; }
.cam-svg .cd-obj--paper { fill: #FFFDF5; }
.cam-svg .cd-fov { fill: rgba(26, 122, 101, 0.14); }
.cam-svg .cd-ray { stroke: #1A7A65; stroke-width: 0.8; stroke-dasharray: 2 2; fill: none; }
.cam-svg .cd-cam { fill: #1A7A65; stroke: #0F5C4A; stroke-width: 0.8; }
.cam-svg .cd-label {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 7px;
    fill: var(--web-text-muted);
}

.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    counter-reset: rule;
}

.rules-list > li {
    background: var(--web-surface);
    border-radius: 12px;
    box-shadow: var(--web-shadow-card);
    padding: 16px 20px 16px 52px;
    position: relative;
    counter-increment: rule;
}

.rules-list > li::before {
    content: "R" counter(rule);
    position: absolute;
    left: 16px;
    top: 17px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--web-accent);
    letter-spacing: 0.02em;
}

.rules-list .rule-title {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--web-text);
    margin: 0 0 4px;
}

.rules-list .rule-body {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0;
}

.applied-card {
    background: var(--web-surface);
    border-radius: 16px;
    box-shadow: var(--web-shadow-card);
    padding: 24px 28px 22px;
    min-width: 0;
    margin-bottom: 20px;
}

.applied-card > h2,
.applied-card > h3 {
    font-family: inherit;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
    color: var(--web-text);
    margin: 0 0 4px;
}

.applied-card .applied-meta {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--web-text-muted);
    margin-bottom: 10px;
}

.applied-card p {
    font-size: 0.875rem;
    line-height: 1.55;
    margin: 0 0 12px;
    color: var(--web-text-sub);
}

.applied-card .mapping-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.applied-card .mapping-table th,
.applied-card .mapping-table td {
    text-align: left;
    padding: 8px 10px;
    font-size: 12px;
    border-top: 1px solid var(--web-border);
}

.applied-card .mapping-table th {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--web-text-muted);
    border-top: none;
    background: transparent;
}

.applied-card .mapping-table code {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11px;
    background: var(--web-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
}

.callout-note {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    padding: 12px 16px;
    background: #fffaea;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-left: 3px solid #E0B94A;
    border-radius: 8px;
    margin: 12px 0 0;
}

.callout-note strong { color: var(--web-text); }

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 72px;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: 9999px;
    border: 1px solid var(--web-border);
    background: var(--web-surface);
    color: var(--web-text-sub);
    white-space: nowrap;
}

.status-pill.ok      { background: #E8F5EF; border-color: rgba(26, 122, 101, 0.3); color: #0F5C4A; }
.status-pill.partial { background: #FFF7DA; border-color: rgba(201, 144, 0, 0.3); color: #6B5000; }
.status-pill.missing { background: #FBE9E7; border-color: rgba(184, 80, 64, 0.3); color: #7A2A20; }
.status-pill.new     { background: #E5F0FB; border-color: rgba(38, 139, 210, 0.3); color: #1F4E7A; }

.actions-block {
    margin-top: 16px;
    padding: 0 28px;
    background: var(--web-surface);
    border-radius: 16px;
    box-shadow: var(--web-shadow-card);
}

.actions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.actions-table th,
.actions-table td {
    text-align: left;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
    border-top: 1px solid var(--web-border);
    vertical-align: top;
    color: var(--web-text-sub);
}

.actions-table thead th {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--web-text-muted);
    border-top: none;
    background: transparent;
    padding-top: 0;
    padding-bottom: 6px;
}

.actions-table td.col-action {
    font-weight: 600;
    color: var(--web-text);
    white-space: nowrap;
    width: 1%;
}

.actions-table td.col-status {
    width: 1%;
    white-space: nowrap;
}

.actions-table code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 11px;
    background: var(--web-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
    white-space: nowrap;
}

.actions-table tr.row-missing td.col-action { color: var(--web-text-muted); }

.actions-table td.col-action a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.25);
    transition: color 150ms ease, border-color 150ms ease;
}

.actions-table td.col-action a:hover {
    color: var(--web-accent);
    border-bottom-color: var(--web-accent);
}

.actions-table td.col-action a:focus-visible {
    outline: 2px solid var(--web-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.tier-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    padding: 14px 20px;
    background: var(--web-surface);
    border-radius: 12px;
    box-shadow: var(--web-shadow-card);
}

.tier-legend-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--web-text-muted);
    margin-right: 4px;
}

.tier-legend-step {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--web-text);
    padding: 5px 12px;
    background: var(--web-code-bg);
    border-radius: 8px;
    white-space: nowrap;
}

.tier-legend-arrow {
    color: var(--web-text-muted);
    font-size: 14px;
    user-select: none;
}

.status-legend {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 0 4px 4px;
    font-size: 12px;
    color: var(--web-text-sub);
}

.status-legend .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tier-section {
    margin-top: 56px;
}

.tier-section:first-of-type {
    margin-top: 40px;
}

.tier-title {
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--web-text);
    margin: 0 0 6px;
}

.tier-tagline {
    font-size: 0.9375rem;
    color: var(--web-text-sub);
    margin: 0 0 8px;
    line-height: 1.55;
    max-width: 720px;
}

.tier-tagline em { font-style: italic; }
.tier-tagline strong { color: var(--web-text); font-weight: 600; }

.action-entry {
    padding: 24px 0;
    border-top: 1px solid var(--web-border);
}

.actions-block > .action-entry:first-child {
    border-top: none;
}

.action-name {
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--web-text);
    margin: 0 0 6px;
}

.action-name a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.25);
    transition: color 150ms ease, border-color 150ms ease;
}

.action-name a:hover {
    color: var(--web-accent);
    border-bottom-color: var(--web-accent);
}

.action-name a:focus-visible {
    outline: 2px solid var(--web-accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.action-desc {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0 0 18px;
    max-width: 780px;
}

.action-desc code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--web-code-bg);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--web-text);
}

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

.input-slot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
}

.input-slot:empty {
    display: block;
}

.input-slot-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--web-text-muted);
    margin-bottom: 2px;
}

.input-slot .input-method {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--web-text);
}

.input-slot code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--web-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--web-text);
}

@media (max-width: 640px) {
    .action-inputs {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .input-slot:empty { display: none; }
}

.badge-intent {
    display: inline-block;
    padding: 1px 7px;
    margin-left: 6px;
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--web-text-muted);
    background: var(--web-code-bg);
    border: 1px solid var(--web-border);
    border-radius: 5px;
    white-space: nowrap;
    vertical-align: 2px;
    line-height: 1.5;
}

.mode-entry .action-name {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-family: inherit;
}

.mode-entry .action-name > code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0;
    padding: 2px 10px;
    border-radius: 6px;
    background: var(--web-code-bg);
    color: var(--web-text);
}

.mode-entry .action-desc code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--web-code-bg);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--web-text);
}

.mode-refs {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px 20px;
    margin: 0;
    align-items: start;
}

.mode-refs dt {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--web-text-muted);
    padding-top: 3px;
}

.mode-refs dd {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--web-text-sub);
    min-width: 0;
}

.mode-refs dd code {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
    background: var(--web-code-bg);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--web-text);
    word-break: break-all;
}

.mode-altsels {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mode-altsels li {
    font-size: 13px;
    line-height: 1.55;
    color: var(--web-text-sub);
}

.mode-altsels-note {
    color: var(--web-text-muted);
    font-size: 12px;
}

.altsel-demo-link {
    color: var(--web-accent);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    margin-left: 6px;
    white-space: nowrap;
    transition: color 150ms ease;
}

.altsel-demo-link:hover {
    color: var(--web-accent-hover);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .mode-refs {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    .mode-refs dt {
        padding-top: 10px;
    }
    .mode-refs dt:first-child {
        padding-top: 0;
    }
}

.atlas-body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background:
        radial-gradient(1200px 600px at 50% -200px, rgba(26, 122, 101, 0.06), transparent 60%),
        var(--web-bg);
    min-height: 100vh;
}

.atlas-interior-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 28px 96px;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.atlas-interior-page a { color: inherit; }

.atlas-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--web-text-muted);
    text-decoration: none;
    margin-bottom: 32px;
    transition: color 150ms ease, gap 180ms ease;
}

.atlas-breadcrumb:hover {
    color: var(--web-accent);
    gap: 10px;
}

.atlas-interior-header {
    margin-bottom: 48px;
}

.atlas-interior-header h1 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--web-text);
    margin: 0 0 14px;
}

.atlas-interior-header__lede {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0 0 16px;
    max-width: 60ch;
}

.atlas-interior-header__lede strong {
    color: var(--web-text);
    font-weight: 600;
}

.atlas-interior-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--accent, var(--web-accent));
    border-radius: 9999px;
    font-feature-settings: "tnum" 1;
}

.atlas-interior-section {
    margin: 56px 0 0;
}

.atlas-interior-section:first-of-type {
    margin-top: 0;
}

.atlas-interior-section-label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--web-text-muted);
    margin: 0 0 20px;
}

.atlas-interior-section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--web-border);
}

.atlas-interior-card {
    background: var(--web-surface);
    border-radius: 12px;
    box-shadow: var(--web-shadow-card);
    padding: 28px 30px 26px;
    margin: 0 0 20px;
}

.atlas-interior-card:last-child {
    margin-bottom: 0;
}

.atlas-interior-card h2 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--web-text);
    margin: 0 0 8px;
}

.atlas-interior-card h3 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.005em;
    line-height: 1.25;
    color: var(--web-text);
    margin: 0 0 6px;
}

.atlas-interior-card p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0 0 12px;
}

.atlas-interior-card p:last-child {
    margin-bottom: 0;
}

.atlas-interior-card strong {
    color: var(--web-text);
    font-weight: 600;
}

.atlas-interior-card code {
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 0.84em;
    background: var(--web-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--web-text);
}

.atlas-interior-subhead {
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--web-text-muted);
    margin: 20px 0 12px;
}

.atlas-interior-card > .atlas-interior-subhead:first-child,
.atlas-interior-card > h2 + .atlas-interior-subhead {
    margin-top: 16px;
}

.atlas-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.atlas-list li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px dashed var(--web-border-hair);
    font-size: 0.9rem;
    line-height: 1.5;
}

.atlas-list li:first-child {
    border-top: none;
    padding-top: 4px;
}

.atlas-list__slug {
    flex: 0 0 auto;
    min-width: 180px;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--accent-page, var(--web-text));
}

.atlas-list__desc {
    flex: 1 1 auto;
    color: var(--web-text-sub);
}

.atlas-list__desc strong {
    color: var(--web-text);
    font-weight: 600;
}

.atlas-list__group {
    margin: 0 0 22px;
}

.atlas-list__group:last-child {
    margin-bottom: 0;
}

.atlas-list__group-label {
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-page, var(--web-text-muted));
    margin: 0 0 8px;
}

@media (max-width: 560px) {
    .atlas-list li {
        flex-direction: column;
        gap: 4px;
        padding: 12px 0;
    }
    .atlas-list__slug { min-width: 0; }
}

.atlas-procedure {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: procedure;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.atlas-procedure > li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    counter-increment: procedure;
}

.atlas-procedure__num {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-page, var(--web-accent));
    color: var(--web-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    margin-top: 2px;
}

.atlas-procedure__body {
    flex: 1 1 auto;
    min-width: 0;
}

.atlas-procedure__body h3 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.005em;
    line-height: 1.25;
    color: var(--web-text);
    margin: 0 0 6px;
}

.atlas-procedure__body p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--web-text-sub);
    margin: 0 0 10px;
}

.atlas-procedure__body p:last-child {
    margin-bottom: 0;
}

.atlas-procedure__body code {
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 0.84em;
    background: var(--web-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
}

.atlas-procedure__mock {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    margin: 8px 0 4px;
    border-radius: 8px;
    background: var(--web-bg);
    border: 1px solid var(--web-border);
}

.atlas-code {
    background: var(--web-code-bg);
    border: 1px solid var(--web-border);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 14px;
    overflow-x: auto;
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--web-text);
}

.atlas-code code {
    font-family: inherit;
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
    white-space: pre;
}

.atlas-foot {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--web-border);
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--web-text-muted);
}

.atlas-foot code {
    font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
    font-size: 0.82rem;
    background: var(--web-code-bg);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--web-text);
}

.atlas-foot a {
    color: var(--web-accent);
    text-decoration: none;
    border-bottom: 1px dashed rgba(26, 122, 101, 0.4);
    transition: color 150ms ease, border-color 150ms ease;
}

.atlas-foot a:hover {
    color: var(--web-accent-hover);
    border-bottom-color: var(--web-accent-hover);
}

.web-back { display: block; font-size: 12.5px; color: var(--web-text-sub); text-decoration: none; padding: 4px 10px 12px; }
.web-back:hover { color: var(--web-text); }

.web-menu-btn { display: none; }
@media (max-width: 760px) {
    .web-sidebar { padding: 20px 16px 16px; }
    .web-brand { padding-bottom: 12px; }
    .web-menu-btn {
        display: inline-flex;
        align-items: center;
        margin: 0 10px 4px;
        padding: 7px 14px;
        border: 1px solid var(--web-border);
        border-radius: 8px;
        background: var(--web-surface);
        color: var(--web-text);
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }
    .web-sidebar:not(.is-open) .web-nav { display: none; }
    .web-sidebar.is-open .web-nav { margin-top: 10px; }
}

.cat-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin: 12px 0 16px;
}
.cat-case-link { font-size: 13px; color: var(--web-text-sub); text-decoration: none; }
.cat-case-link:hover { color: var(--web-text); text-decoration: underline; text-underline-offset: 3px; }
